Trait bitcoins::types::tx::BitcoinTransaction [−][src]
Functions common to Bitcoin transactions. This provides a small abstraction layer over the Legacy/SegWit tx divide by implementing a small common interface between them.
Required methods
fn as_legacy(&self) -> &LegacyTx
[src]
Returns a reference to the tx as a legacy tx.
fn into_legacy(self) -> LegacyTx
[src]
Consume the tx and convert it to a legacy tx. Useful for when you have
dyn BitcoinTransaction
or impl BitcoinTransaction
types, but into_witness
should be
preferred, as it will never drop information.
fn into_witness(self) -> WitnessTx
[src]
Consume the tx and convert it to a legacy tx. Useful for when you have
dyn BitcoinTransaction
or impl BitcoinTransaction
types.
fn witnesses(&self) -> &[Witness]ⓘ
[src]
Return a reference to a slice of witnesses. For legacy txins this will ALWAYS be length 0. For witness txns, this will ALWAYS be the same length as the input vector.
Provided methods
fn txout_from_outpoint(&self, outpoint: &BitcoinOutpoint) -> Option<&TxOut>
[src]
Get a reference to the output by