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

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.
source§

impl PartialEq<ChannelDetails> for ChannelDetails

source§

fn eq(&self, other: &ChannelDetails) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for ChannelDetails

source§

impl StructuralEq for ChannelDetails

source§

impl StructuralPartialEq for ChannelDetails

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

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

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

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 Twhere 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 Twhere 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 Twhere 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 Twhere 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 Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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