pub trait TxMeta {
// Required methods
fn transparent_spends(&self) -> impl Iterator<Item = &OutPoint>;
fn sapling_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>;
fn orchard_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>;
fn ironwood_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>;
fn fee_paid<E, F>(&self, get_prevout: F) -> Result<Option<Zatoshis>, E>
where E: From<BalanceError>,
F: FnMut(&OutPoint) -> Result<Option<Zatoshis>, E>;
}Expand description
A trait for types that can provide information about outputs spent by and fees that were paid for a given transaction.
Required Methods§
Sourcefn transparent_spends(&self) -> impl Iterator<Item = &OutPoint>
Available on crate feature transparent-inputs only.
fn transparent_spends(&self) -> impl Iterator<Item = &OutPoint>
transparent-inputs only.Returns an iterator over the references to transparent outputs spent in this transaction.
Sourcefn sapling_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
fn sapling_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
Returns an iterator over the nullifiers of Sapling notes spent in this transaction.
Sourcefn orchard_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
Available on crate feature orchard only.
fn orchard_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
orchard only.Returns an iterator over the nullifiers of Orchard notes spent in this transaction.
Sourcefn ironwood_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
Available on crate feature orchard only.
fn ironwood_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
orchard only.Returns an iterator over the nullifiers of Ironwood notes spent in this transaction.
Ironwood nullifiers share the Orchard nullifier type, but identify notes in the Ironwood pool (the transaction’s Ironwood bundle, distinct from its Orchard bundle).
Sourcefn fee_paid<E, F>(&self, get_prevout: F) -> Result<Option<Zatoshis>, E>
fn fee_paid<E, F>(&self, get_prevout: F) -> Result<Option<Zatoshis>, E>
Returns the fee paid by this transaction, given a function that can retrieve the value of prior transparent outputs spent in the transaction.
Returns Ok(None) if insufficient information is available for computing the fee. This
can occur when:
- The transaction has transparent inputs whose values are not known to the wallet (e.g., the wallet has not yet retrieved the transactions that created those outputs).
- The wallet scanned the chain using compact blocks, which do not include transparent input information. In this case, the wallet cannot determine whether the transaction has any transparent inputs, and thus cannot know if the fee is computable from shielded data alone.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl TxMeta for Transaction
impl TxMeta for Transaction
Source§fn transparent_spends(&self) -> impl Iterator<Item = &OutPoint>
fn transparent_spends(&self) -> impl Iterator<Item = &OutPoint>
transparent-inputs only.fn sapling_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
Source§fn orchard_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
fn orchard_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
orchard only.Source§fn ironwood_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
fn ironwood_spent_note_nullifiers(&self) -> impl Iterator<Item = &Nullifier>
orchard only.