pub struct Channel {Show 37 fields
pub active: bool,
pub remote_pubkey: String,
pub channel_point: String,
pub chan_id: u64,
pub capacity: i64,
pub local_balance: i64,
pub remote_balance: i64,
pub commit_fee: i64,
pub commit_weight: i64,
pub fee_per_kw: i64,
pub unsettled_balance: i64,
pub total_satoshis_sent: i64,
pub total_satoshis_received: i64,
pub num_updates: u64,
pub pending_htlcs: Vec<Htlc>,
pub csv_delay: u32,
pub private: bool,
pub initiator: bool,
pub chan_status_flags: String,
pub local_chan_reserve_sat: i64,
pub remote_chan_reserve_sat: i64,
pub static_remote_key: bool,
pub commitment_type: i32,
pub lifetime: i64,
pub uptime: i64,
pub close_address: String,
pub push_amount_sat: u64,
pub thaw_height: u32,
pub local_constraints: Option<ChannelConstraints>,
pub remote_constraints: Option<ChannelConstraints>,
pub alias_scids: Vec<u64>,
pub zero_conf: bool,
pub zero_conf_confirmed_scid: u64,
pub peer_alias: String,
pub peer_scid_alias: u64,
pub memo: String,
pub custom_channel_data: Vec<u8>,
}Fields§
§active: boolWhether this channel is active or not
remote_pubkey: StringThe identity pubkey of the remote node
channel_point: StringThe outpoint (txid:index) of the funding transaction. With this value, Bob will be able to generate a signature for Alice’s version of the commitment transaction.
chan_id: u64The unique channel ID for the channel. The first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel.
capacity: i64The total amount of funds held in this channel
local_balance: i64This node’s current balance in this channel
remote_balance: i64The counterparty’s current balance in this channel
commit_fee: i64The amount calculated to be paid in fees for the current set of commitment transactions. The fee amount is persisted with the channel in order to allow the fee amount to be removed and recalculated with each channel state update, including updates that happen after a system restart.
commit_weight: i64The weight of the commitment transaction
fee_per_kw: i64The required number of satoshis per kilo-weight that the requester will pay at all times, for both the funding transaction and commitment transaction. This value can later be updated once the channel is open.
unsettled_balance: i64The unsettled balance in this channel
total_satoshis_sent: i64The total number of satoshis we’ve sent within this channel.
total_satoshis_received: i64The total number of satoshis we’ve received within this channel.
num_updates: u64The total number of updates conducted within this channel.
pending_htlcs: Vec<Htlc>The list of active, uncleared HTLCs currently pending within the channel.
csv_delay: u32Deprecated. The CSV delay expressed in relative blocks. If the channel is force closed, we will need to wait for this many blocks before we can regain our funds.
private: boolWhether this channel is advertised to the network or not.
initiator: boolTrue if we were the ones that created the channel.
chan_status_flags: StringA set of flags showing the current state of the channel.
local_chan_reserve_sat: i64Deprecated. The minimum satoshis this node is required to reserve in its balance.
remote_chan_reserve_sat: i64Deprecated. The minimum satoshis the other node is required to reserve in its balance.
static_remote_key: boolDeprecated. Use commitment_type.
commitment_type: i32The commitment type used by this channel.
lifetime: i64The number of seconds that the channel has been monitored by the channel scoring system. Scores are currently not persisted, so this value may be less than the lifetime of the channel [EXPERIMENTAL].
uptime: i64The number of seconds that the remote peer has been observed as being online by the channel scoring system over the lifetime of the channel [EXPERIMENTAL].
close_address: StringClose address is the address that we will enforce payout to on cooperative close if the channel was opened utilizing option upfront shutdown. This value can be set on channel open by setting close_address in an open channel request. If this value is not set, you can still choose a payout address by cooperatively closing with the delivery_address field set.
push_amount_sat: u64The amount that the initiator of the channel optionally pushed to the remote party on channel open. This amount will be zero if the channel initiator did not push any funds to the remote peer. If the initiator field is true, we pushed this amount to our peer, if it is false, the remote peer pushed this amount to us.
thaw_height: u32This uint32 indicates if this channel is to be considered ‘frozen’. A frozen channel doest not allow a cooperative channel close by the initiator. The thaw_height is the height that this restriction stops applying to the channel. This field is optional, not setting it or using a value of zero will mean the channel has no additional restrictions. The height can be interpreted in two ways: as a relative height if the value is less than 500,000, or as an absolute height otherwise.
local_constraints: Option<ChannelConstraints>List constraints for the local node.
remote_constraints: Option<ChannelConstraints>List constraints for the remote node.
alias_scids: Vec<u64>This lists out the set of alias short channel ids that exist for a channel. This may be empty.
zero_conf: boolWhether or not this is a zero-conf channel.
zero_conf_confirmed_scid: u64This is the confirmed / on-chain zero-conf SCID.
peer_alias: StringThe configured alias name of our peer.
peer_scid_alias: u64This is the peer SCID alias.
memo: StringAn optional note-to-self to go along with the channel containing some useful information. This is only ever stored locally and in no way impacts the channel’s operation.
custom_channel_data: Vec<u8>Custom channel data that might be populated in custom channels.
Implementations§
Source§impl Channel
impl Channel
Sourcepub fn commitment_type(&self) -> CommitmentType
pub fn commitment_type(&self) -> CommitmentType
Returns the enum value of commitment_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_commitment_type(&mut self, value: CommitmentType)
pub fn set_commitment_type(&mut self, value: CommitmentType)
Sets commitment_type to the provided enum value.
Trait Implementations§
Source§impl Message for Channel
impl Message for Channel
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request