Trait bdk_wallet::psbt::PsbtUtils
source · pub trait PsbtUtils {
// Required methods
fn get_utxo_for(&self, input_index: usize) -> Option<TxOut>;
fn fee_amount(&self) -> Option<Amount>;
fn fee_rate(&self) -> Option<FeeRate>;
}
Expand description
Trait to add functions to extract utxos and calculate fees.
Required Methods§
sourcefn get_utxo_for(&self, input_index: usize) -> Option<TxOut>
fn get_utxo_for(&self, input_index: usize) -> Option<TxOut>
Get the TxOut
for the specified input index, if it doesn’t exist in the PSBT None
is returned.
sourcefn fee_amount(&self) -> Option<Amount>
fn fee_amount(&self) -> Option<Amount>
The total transaction fee amount, sum of input amounts minus sum of output amounts, in sats. If the PSBT is missing a TxOut for an input returns None.