Struct ldk_node::ChannelDetails
source · pub struct ChannelDetails {Show 29 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>,
pub counterparty_unspendable_punishment_reserve: u64,
pub counterparty_outbound_htlc_minimum_msat: Option<u64>,
pub counterparty_outbound_htlc_maximum_msat: Option<u64>,
pub counterparty_forwarding_info_fee_base_msat: Option<u32>,
pub counterparty_forwarding_info_fee_proportional_millionths: Option<u32>,
pub counterparty_forwarding_info_cltv_expiry_delta: Option<u16>,
pub next_outbound_htlc_limit_msat: u64,
pub next_outbound_htlc_minimum_msat: u64,
pub force_close_spend_delay: Option<u16>,
pub inbound_htlc_minimum_msat: u64,
pub inbound_htlc_maximum_msat: Option<u64>,
pub config: Arc<ChannelConfig>,
}
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.
counterparty_unspendable_punishment_reserve: u64
The value, in satoshis, that must always be held in the channel for our counterparty. This value ensures that if our counterparty broadcasts a revoked state, we can punish them by claiming at least this value on chain.
This value is not included in inbound_capacity_msat
as it can never be spent.
counterparty_outbound_htlc_minimum_msat: Option<u64>
The smallest value HTLC (in msat) the remote peer will accept, for this channel.
This field is only None
before we have received either the OpenChannel
or
AcceptChannel
message from the remote peer.
counterparty_outbound_htlc_maximum_msat: Option<u64>
The largest value HTLC (in msat) the remote peer currently will accept, for this channel.
counterparty_forwarding_info_fee_base_msat: Option<u32>
Base routing fee in millisatoshis.
counterparty_forwarding_info_fee_proportional_millionths: Option<u32>
Proportional fee, in millionths of a satoshi the channel will charge per transferred satoshi.
counterparty_forwarding_info_cltv_expiry_delta: Option<u16>
The minimum difference in CLTV expiry between an ingoing HTLC and its outgoing counterpart, such that the outgoing HTLC is forwardable to this counterparty.
next_outbound_htlc_limit_msat: u64
The available outbound capacity for sending a single HTLC to the remote peer. This is
similar to ChannelDetails::outbound_capacity_msat
but it may be further restricted by
the current state and per-HTLC limit(s). This is intended for use when routing, allowing us
to use a limit as close as possible to the HTLC limit we can currently send.
See also ChannelDetails::next_outbound_htlc_minimum_msat
,
ChannelDetails::balance_msat
, and ChannelDetails::outbound_capacity_msat
.
next_outbound_htlc_minimum_msat: u64
The minimum value for sending a single HTLC to the remote peer. This is the equivalent of
ChannelDetails::next_outbound_htlc_limit_msat
but represents a lower-bound, rather than
an upper-bound. This is intended for use when routing, allowing us to ensure we pick a
route which is valid.
force_close_spend_delay: Option<u16>
The number of blocks (after our commitment transaction confirms) that we will need to wait until we can claim our funds after we force-close the channel. During this time our counterparty is allowed to punish us if we broadcasted a stale state. If our counterparty force-closes the channel and broadcasts a commitment transaction we do not have to wait any time to claim our non-HTLC-encumbered funds.
This value will be None
for outbound channels until the counterparty accepts the channel.
inbound_htlc_minimum_msat: u64
The smallest value HTLC (in msat) we will accept, for this channel.
inbound_htlc_maximum_msat: Option<u64>
The largest value HTLC (in msat) we currently will accept, for this channel.
config: Arc<ChannelConfig>
Set of configurable parameters that affect channel operation.
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 more