Struct ldk_node::ChannelDetails
source · pub struct ChannelDetails {Show 17 fields
pub channel_id: ChannelId,
pub counterparty_node_id: PublicKey,
pub funding_txo: Option<OutPoint>,
pub channel_value_sats: u64,
pub unspendable_punishment_reserve: Option<u64>,
pub user_channel_id: UserChannelId,
pub feerate_sat_per_1000_weight: u32,
pub balance_msat: u64,
pub outbound_capacity_msat: u64,
pub inbound_capacity_msat: u64,
pub confirmations_required: Option<u32>,
pub confirmations: Option<u32>,
pub is_outbound: bool,
pub is_channel_ready: bool,
pub is_usable: bool,
pub is_public: bool,
pub cltv_expiry_delta: Option<u16>,
}
Expand description
Details of a channel as returned by Node::list_channels
.
Fields§
§channel_id: ChannelId
The channel ID (prior to funding transaction generation, this is a random 32-byte identifier, afterwards this is the transaction ID of the funding transaction XOR the funding transaction output).
Note that this means this value is not persistent - it can change once during the lifetime of the channel.
counterparty_node_id: PublicKey
The node ID of our the channel’s counterparty.
funding_txo: Option<OutPoint>
The channel’s funding transaction output, if we’ve negotiated the funding transaction with our counterparty already.
channel_value_sats: u64
The value, in satoshis, of this channel as it appears in the funding output.
unspendable_punishment_reserve: Option<u64>
The value, in satoshis, that must always be held as a reserve in the channel for us. This value ensures that if we broadcast a revoked state, our counterparty can punish us by claiming at least this value on chain.
This value is not included in outbound_capacity_msat
as it can never be spent.
This value will be None
for outbound channels until the counterparty accepts the channel.
user_channel_id: UserChannelId
The local user_channel_id
of this channel.
feerate_sat_per_1000_weight: u32
The currently negotiated fee rate denominated in satoshi per 1000 weight units, which is applied to commitment and HTLC transactions.
balance_msat: u64
The total balance of the channel. This is the amount that will be returned to the user if the channel is closed.
The value is not exact, due to potential in-flight and fee-rate changes. Therefore, exactly this amount is likely irrecoverable on close.
outbound_capacity_msat: u64
The available outbound capacity for sending HTLCs to the remote peer.
The amount does not include any pending HTLCs which are not yet resolved (and, thus, whose balance is not available for inclusion in new outbound HTLCs). This further does not include any pending outgoing HTLCs which are awaiting some other resolution to be sent.
inbound_capacity_msat: u64
The available outbound capacity for sending HTLCs to the remote peer.
The amount does not include any pending HTLCs which are not yet resolved (and, thus, whose balance is not available for inclusion in new inbound HTLCs). This further does not include any pending outgoing HTLCs which are awaiting some other resolution to be sent.
confirmations_required: Option<u32>
The number of required confirmations on the funding transactions before the funding is considered “locked”. The amount is selected by the channel fundee.
The value will be None
for outbound channels until the counterparty accepts the channel.
confirmations: Option<u32>
The current number of confirmations on the funding transaction.
is_outbound: bool
Returns true
if the channel was initiated (and therefore funded) by us.
is_channel_ready: bool
Returns true
if both parties have exchanged channel_ready
messages, and the channel is
not currently being shut down. Both parties exchange channel_ready
messages upon
independently verifying that the required confirmations count provided by
confirmations_required
has been reached.
is_usable: bool
Returns true
if the channel (a) channel_ready
messages have been exchanged, (b) the
peer is connected, and (c) the channel is not currently negotiating shutdown.
This is a strict superset of is_channel_ready
.
is_public: bool
Returns true
if this channel is (or will be) publicly-announced
cltv_expiry_delta: Option<u16>
The difference in the CLTV value between incoming HTLCs and an outbound HTLC forwarded over the channel.
Trait Implementations§
source§impl Clone for ChannelDetails
impl Clone for ChannelDetails
source§fn clone(&self) -> ChannelDetails
fn clone(&self) -> ChannelDetails
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChannelDetails
impl Debug for ChannelDetails
source§impl From<ChannelDetails> for ChannelDetails
impl From<ChannelDetails> for ChannelDetails
source§fn from(value: LdkChannelDetails) -> Self
fn from(value: LdkChannelDetails) -> Self
source§impl PartialEq<ChannelDetails> for ChannelDetails
impl PartialEq<ChannelDetails> for ChannelDetails
source§fn eq(&self, other: &ChannelDetails) -> bool
fn eq(&self, other: &ChannelDetails) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for ChannelDetails
impl StructuralEq for ChannelDetails
impl StructuralPartialEq for ChannelDetails
Auto Trait Implementations§
impl RefUnwindSafe for ChannelDetails
impl Send for ChannelDetails
impl Sync for ChannelDetails
impl Unpin for ChannelDetails
impl UnwindSafe for ChannelDetails
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.