Struct ChannelDetails

Source
pub struct ChannelDetails {
Show 31 fields pub channel_id: ChannelId, pub counterparty_node_id: PublicKey, pub funding_txo: Option<OutPoint>, pub short_channel_id: Option<u64>, pub outbound_scid_alias: Option<u64>, pub inbound_scid_alias: Option<u64>, pub channel_value_sats: u64, pub unspendable_punishment_reserve: Option<u64>, pub user_channel_id: UserChannelId, pub feerate_sat_per_1000_weight: u32, 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_announced: 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: 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.

§short_channel_id: Option<u64>

The position of the funding transaction in the chain. None if the funding transaction has not yet been confirmed and the channel fully opened.

Note that if inbound_scid_alias is set, it will be used for invoices and inbound payments instead of this.

For channels with confirmations_required set to Some(0), outbound_scid_alias may be used in place of this in outbound routes.

§outbound_scid_alias: Option<u64>

An optional short_channel_id alias for this channel, randomly generated by us and usable in place of short_channel_id to reference the channel in outbound routes when the channel has not yet been confirmed (as long as confirmations_required is Some(0)).

This will be None as long as the channel is not available for routing outbound payments.

§inbound_scid_alias: Option<u64>

An optional short_channel_id alias for this channel, randomly generated by our counterparty and usable in place of short_channel_id in invoice route hints. Our counterparty will recognize the alias provided here in place of the short_channel_id when they see a payment to be routed to us.

Our counterparty may choose to rotate this value at any time, though will always recognize previous values for inbound payment forwarding.

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

§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 inbound capacity for receiving HTLCs from 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 incoming 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_announced: 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 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: ChannelConfig

Set of configurable parameters that affect channel operation.

Trait Implementations§

Source§

impl Clone for ChannelDetails

Source§

fn clone(&self) -> ChannelDetails

Returns a duplicate 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

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

Source§

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>,

Source§

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>,

Source§

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

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

Source§

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

impl<T> ErasedDestructor for T
where T: 'static,