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

source§

fn clone(&self) -> ChannelDetails

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ChannelDetails

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ChannelDetails> for ChannelDetails

source§

fn from(value: LdkChannelDetails) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more