pub struct ChannelTransactionParameters {
pub holder_pubkeys: ChannelPublicKeys,
pub holder_selected_contest_delay: u16,
pub is_outbound_from_holder: bool,
pub counterparty_parameters: Option<CounterpartyChannelTransactionParameters>,
pub funding_outpoint: Option<OutPoint>,
pub splice_parent_funding_txid: Option<Txid>,
pub channel_type_features: ChannelTypeFeatures,
pub channel_value_satoshis: u64,
}Expand description
Per-channel data used to build transactions in conjunction with the per-commitment data (CommitmentTransaction). The fields are organized by holder/counterparty.
Normally, this is converted to the broadcaster/countersignatory-organized DirectedChannelTransactionParameters before use, via the as_holder_broadcastable and as_counterparty_broadcastable functions.
Fields§
§holder_pubkeys: ChannelPublicKeysHolder public keys
holder_selected_contest_delay: u16The contest delay selected by the holder, which applies to counterparty-broadcast transactions
is_outbound_from_holder: boolWhether the holder is the initiator of this channel. This is an input to the commitment number obscure factor computation.
counterparty_parameters: Option<CounterpartyChannelTransactionParameters>The late-bound counterparty channel transaction parameters. These parameters are populated at the point in the protocol where the counterparty provides them.
funding_outpoint: Option<OutPoint>The late-bound funding outpoint
splice_parent_funding_txid: Option<Txid>The parent funding txid for a channel that has been spliced.
If a channel was funded with transaction A, and later spliced with transaction B, this field tracks the txid of transaction A.
See compute_funding_key_tweak and ChannelSigner::new_pubkeys for more context on how
this may be used.
channel_type_features: ChannelTypeFeaturesThis channel’s type, as negotiated during channel open. For old objects where this field wasn’t serialized, it will default to static_remote_key at deserialization.
channel_value_satoshis: u64The value locked in the channel, denominated in satoshis.
Implementations§
Source§impl ChannelTransactionParameters
impl ChannelTransactionParameters
Sourcepub fn is_populated(&self) -> bool
pub fn is_populated(&self) -> bool
Whether the late bound parameters are populated.
Sourcepub fn as_holder_broadcastable(
&self,
) -> DirectedChannelTransactionParameters<'_>
pub fn as_holder_broadcastable( &self, ) -> DirectedChannelTransactionParameters<'_>
Convert the holder/counterparty parameters to broadcaster/countersignatory-organized parameters, given that the holder is the broadcaster.
self.is_populated() must be true before calling this function.
Sourcepub fn as_counterparty_broadcastable(
&self,
) -> DirectedChannelTransactionParameters<'_>
pub fn as_counterparty_broadcastable( &self, ) -> DirectedChannelTransactionParameters<'_>
Convert the holder/counterparty parameters to broadcaster/countersignatory-organized parameters, given that the counterparty is the broadcaster.
self.is_populated() must be true before calling this function.
Sourcepub fn counterparty_pubkeys(&self) -> Option<&ChannelPublicKeys>
pub fn counterparty_pubkeys(&self) -> Option<&ChannelPublicKeys>
Returns the counterparty’s pubkeys.
Trait Implementations§
Source§impl Clone for ChannelTransactionParameters
impl Clone for ChannelTransactionParameters
Source§fn clone(&self) -> ChannelTransactionParameters
fn clone(&self) -> ChannelTransactionParameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChannelTransactionParameters
impl Debug for ChannelTransactionParameters
Source§impl Hash for ChannelTransactionParameters
impl Hash for ChannelTransactionParameters
Source§impl PartialEq for ChannelTransactionParameters
impl PartialEq for ChannelTransactionParameters
Source§fn eq(&self, other: &ChannelTransactionParameters) -> bool
fn eq(&self, other: &ChannelTransactionParameters) -> bool
self and other values to be equal, and is used by ==.