pub struct Tx {
pub txid: Txid,
pub version: i32,
pub locktime: u32,
pub vin: Vec<Vin>,
pub vout: Vec<Vout>,
pub size: usize,
pub weight: u64,
pub status: TxStatus,
pub fee: u64,
}Expand description
A Transaction in the format returned by Esplora.
Fields§
§txid: TxidThe Txid of the Transaction.
version: i32The version number of the Transaction.
locktime: u32The locktime of the Transaction.
Sets a time or height after which the Transaction can be mined.
vin: Vec<Vin>The array of inputs in the Transaction.
vout: Vec<Vout>The array of outputs in the Transaction.
size: usizeThe Transaction size in raw bytes (NOT virtual bytes).
weight: u64The Transaction’s weight units.
status: TxStatusThe confirmation status of the Transaction.
fee: u64The fee amount paid by the Transaction, in satoshis.
Implementations§
Source§impl Tx
impl Tx
Sourcepub fn to_tx(&self) -> Transaction
pub fn to_tx(&self) -> Transaction
Convert a transaction from the format returned by Esplora into a rust-bitcoin
Transaction.
Sourcepub fn confirmation_time(&self) -> Option<BlockTime>
pub fn confirmation_time(&self) -> Option<BlockTime>
Get the confirmation time from a Tx.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tx
impl<'de> Deserialize<'de> for Tx
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Tx
impl StructuralPartialEq for Tx
Auto Trait Implementations§
impl Freeze for Tx
impl RefUnwindSafe for Tx
impl Send for Tx
impl Sync for Tx
impl Unpin for Tx
impl UnwindSafe for Tx
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more