pub struct InputMut<'a>(/* private fields */);Expand description
Mutable handle to an Input held inside a Selection.
Returned by Selection::input_mut and Selection::inputs_mut. This wrapper restricts
mutation to operations that preserve Selection’s coin-selection invariants.
Read-only access to the underlying Input is available via Deref.
Implementations§
Source§impl<'a> InputMut<'a>
impl<'a> InputMut<'a>
Sourcepub fn set_sequence(
&mut self,
sequence: Sequence,
) -> Result<(), SetSequenceError>
pub fn set_sequence( &mut self, sequence: Sequence, ) -> Result<(), SetSequenceError>
See Input::set_sequence.
Methods from Deref<Target = Input>§
Sourcepub fn psbt_input(&self) -> Option<&Input>
pub fn psbt_input(&self) -> Option<&Input>
Psbt input
Sourcepub fn prev_outpoint(&self) -> OutPoint
pub fn prev_outpoint(&self) -> OutPoint
Previous outpoint.
Sourcepub fn prev_txout(&self) -> &TxOut
pub fn prev_txout(&self) -> &TxOut
Previous txout.
Sourcepub fn prev_tx(&self) -> Option<&Transaction>
pub fn prev_tx(&self) -> Option<&Transaction>
Previous tx (if any).
Sourcepub fn status(&self) -> Option<ConfirmationStatus>
pub fn status(&self) -> Option<ConfirmationStatus>
Confirmation status.
Sourcepub fn is_coinbase(&self) -> bool
pub fn is_coinbase(&self) -> bool
Whether prev output resides in coinbase.
Sourcepub fn is_immature(&self, tip_height: Height) -> bool
pub fn is_immature(&self, tip_height: Height) -> bool
Whether prev output is an immature coinbase output.
Sourcepub fn is_block_timelocked(&self, tip_height: Height) -> bool
pub fn is_block_timelocked(&self, tip_height: Height) -> bool
Whether this is locked by a block-based timelock (absolute or relative).
Sourcepub fn is_time_timelocked(&self, tip_mtp: Time) -> Option<bool>
pub fn is_time_timelocked(&self, tip_mtp: Time) -> Option<bool>
Whether this is locked by a time-based timelock (absolute or relative).
Returns None if ConfirmationStatus::prev_mtp is required but unavailable.
tip_mtp is MTP(tip), or MTP(spending_block - 1), as per BIP-0068.
Sourcepub fn is_timelocked(
&self,
tip_height: Height,
tip_mtp: Option<Time>,
) -> Option<bool>
pub fn is_timelocked( &self, tip_height: Height, tip_mtp: Option<Time>, ) -> Option<bool>
Whether this is locked by any timelock constraint.
Returns None if a time-based lock exists but tip_mtp is not provided or
ConfirmationStatus::prev_mtp is unavailable.
tip_mtp is MTP(tip), or MTP(spending_block - 1), as per BIP-0068.
Sourcepub fn confirmations(&self, tip_height: Height) -> u32
pub fn confirmations(&self, tip_height: Height) -> u32
Confirmations of this tx.
Sourcepub fn is_spendable(
&self,
tip_height: Height,
tip_mtp: Option<Time>,
) -> Option<bool>
pub fn is_spendable( &self, tip_height: Height, tip_mtp: Option<Time>, ) -> Option<bool>
Whether this output can be spent at the given height and mtp time.
tip_mtp is MTP(tip), or MTP(spending_block - 1), as per BIP-0068.
Sourcepub fn absolute_timelock(&self) -> Option<LockTime>
pub fn absolute_timelock(&self) -> Option<LockTime>
Absolute timelock.
Sourcepub fn relative_timelock(&self) -> Option<LockTime>
pub fn relative_timelock(&self) -> Option<LockTime>
Relative timelock.
Sourcepub fn satisfaction_weight(&self) -> u64
pub fn satisfaction_weight(&self) -> u64
The weight in witness units needed for satisfying the Input.
The satisfaction weight is the combined size of the fully satisfied input’s witness and scriptSig expressed in weight units. See https://en.bitcoin.it/wiki/Weight_units.