pub struct FundingTxInput { /* private fields */ }Expand description
An input to contribute to a channel’s funding transaction either when using the v2 channel establishment protocol or when splicing.
Implementations§
Source§impl FundingTxInput
impl FundingTxInput
Sourcepub fn new_p2wpkh(prevtx: Transaction, vout: u32) -> Result<Self, ()>
pub fn new_p2wpkh(prevtx: Transaction, vout: u32) -> Result<Self, ()>
Creates an input spending a P2WPKH output from the given prevtx at index vout.
Uses Sequence::ENABLE_RBF_NO_LOCKTIME as the TxIn::sequence, which can be overridden
by set_sequence.
Returns Err if no such output exists in prevtx at index vout.
Sourcepub fn new_p2wsh(
prevtx: Transaction,
vout: u32,
witness_weight: Weight,
) -> Result<Self, ()>
pub fn new_p2wsh( prevtx: Transaction, vout: u32, witness_weight: Weight, ) -> Result<Self, ()>
Creates an input spending a P2WSH output from the given prevtx at index vout.
Requires passing the weight of witness needed to satisfy the output’s script.
Uses Sequence::ENABLE_RBF_NO_LOCKTIME as the TxIn::sequence, which can be overridden
by set_sequence.
Returns Err if no such output exists in prevtx at index vout.
Sourcepub fn new_p2tr_key_spend(prevtx: Transaction, vout: u32) -> Result<Self, ()>
pub fn new_p2tr_key_spend(prevtx: Transaction, vout: u32) -> Result<Self, ()>
Creates an input spending a P2TR output from the given prevtx at index vout.
This is meant for inputs spending a taproot output using the key path. See
new_p2tr_script_spend for when spending using a script path.
Uses Sequence::ENABLE_RBF_NO_LOCKTIME as the TxIn::sequence, which can be overridden
by set_sequence.
Returns Err if no such output exists in prevtx at index vout.
Sourcepub fn new_p2tr_script_spend(
prevtx: Transaction,
vout: u32,
witness_weight: Weight,
) -> Result<Self, ()>
pub fn new_p2tr_script_spend( prevtx: Transaction, vout: u32, witness_weight: Weight, ) -> Result<Self, ()>
Creates an input spending a P2TR output from the given prevtx at index vout.
Requires passing the weight of witness needed to satisfy a script path of the taproot
output. See new_p2tr_key_spend for when spending using the key path.
Uses Sequence::ENABLE_RBF_NO_LOCKTIME as the TxIn::sequence, which can be overridden
by set_sequence.
Returns Err if no such output exists in prevtx at index vout.
Sourcepub fn set_sequence(&mut self, sequence: Sequence)
pub fn set_sequence(&mut self, sequence: Sequence)
Sets the sequence number to use in the TxIn.
Sourcepub fn into_utxo(self) -> Utxo
pub fn into_utxo(self) -> Utxo
Converts the FundingTxInput into a Utxo for coin selection.
Trait Implementations§
Source§impl Clone for FundingTxInput
impl Clone for FundingTxInput
Source§fn clone(&self) -> FundingTxInput
fn clone(&self) -> FundingTxInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FundingTxInput
impl Debug for FundingTxInput
Source§impl Readable for FundingTxInput
impl Readable for FundingTxInput
Source§impl Writeable for FundingTxInput
impl Writeable for FundingTxInput
Auto Trait Implementations§
impl Freeze for FundingTxInput
impl RefUnwindSafe for FundingTxInput
impl Send for FundingTxInput
impl Sync for FundingTxInput
impl Unpin for FundingTxInput
impl UnwindSafe for FundingTxInput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> LengthReadable for Twhere
T: Readable,
impl<T> LengthReadable for Twhere
T: Readable,
Source§fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
Self in from the given LengthLimitedRead.