Struct lightning::ln::chan_utils::ChannelTransactionParameters
source · 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 channel_type_features: ChannelTypeFeatures,
}
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: ChannelPublicKeys
Holder public keys
holder_selected_contest_delay: u16
The contest delay selected by the holder, which applies to counterparty-broadcast transactions
is_outbound_from_holder: bool
Whether 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
channel_type_features: ChannelTypeFeatures
This 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.
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.
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 ==
.