pub enum Transaction {
Boarding {
txid: Txid,
amount: Amount,
confirmed_at: Option<i64>,
},
Commitment {
txid: Txid,
amount: SignedAmount,
created_at: i64,
},
Ark {
txid: Txid,
amount: SignedAmount,
is_settled: bool,
created_at: i64,
},
Offboard {
commitment_txid: Txid,
amount: Amount,
confirmed_at: Option<i64>,
},
}Variants§
Boarding
A transaction that transforms a UTXO into a boarding output.
Fields
Commitment
A transaction that confirms VTXOs.
Fields
amount: SignedAmountWe use SignedAmount because commitment transactions may be incoming or outgoing
i.e. we can send or receive VTXOs.
Ark
A transaction that has VTXOs as outputs.
Fields
amount: SignedAmountWe use SignedAmount because Ark transactions may be incoming or outgoing i.e.
we can send or receive VTXOs.
Offboard
A transaction that offboards VTXOs to an onchain output.
Fields
Implementations§
Source§impl Transaction
impl Transaction
Sourcepub fn created_at(&self) -> Option<i64>
pub fn created_at(&self) -> Option<i64>
The creation time of the Transaction. This value can be used for sorting.
-
The creation time of a boarding transaction is based on its confirmation time. If it is pending, we return
None. -
The creation time of a commitment transaction is based on the
created_atof our VTXO produced by it. -
The creation time of an Ark transaction is based on the
created_atof our VTXO produced by it. -
The creation time of an offboard transaction is based on its confirmation time. If it is pending, we return
None.
pub fn txid(&self) -> Txid
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Transaction
impl Debug for Transaction
Source§impl PartialEq for Transaction
impl PartialEq for Transaction
Source§fn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
self and other values to be equal, and is used by ==.