You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.8 KiB

.TH "LIGHTNING-LISTCHANNELS" "7" "" "" "lightning-listchannels"
.SH NAME
lightning-listchannels - Command to query active lightning channels in the entire network
.SH SYNOPSIS
\fBlistchannels\fR [\fIshort_channel_id\fR] [\fIsource\fR]
.SH DESCRIPTION
The \fBlistchannels\fR RPC command returns data on channels that are known
to the node\. Because channels may be bidirectional, up to 2 objects will
be returned for each channel (one for each direction)\.
If \fIshort_channel_id\fR is a short channel id, then only known channels with a
matching \fIshort_channel_id\fR are returned\. Otherwise, it must be null\.
If \fIsource\fR is a node id, then only channels leading from that node id
are returned\.
If neither is supplied, data on all lightning channels known to this
node, are returned\. These can be local channels or public channels
broadcast on the gossip network\.
.SH RETURN VALUE
On success, an object with a "channels" key is returned containing a
list of 0 or more objects\.
Each object in the list contains the following data:
.RS
.IP \[bu]
\fIsource\fR : The node providing entry to the channel, specifying the
fees charged for using the channel in that direction\.
.IP \[bu]
\fIdestination\fR : The node providing the exit point for the channel\.
.IP \[bu]
\fIshort_channel_id\fR : The channel identifier\.
.IP \[bu]
\fIpublic\fR : Boolean value, is publicly available\. Non-local channels
will only ever have this value set to true\. Local channels are
side-loaded by this node, rather than obtained through the gossip
network, and so may have this value set to false\.
.IP \[bu]
\fIsatoshis\fR : Funds available in the channel\.
.IP \[bu]
\fIamount_sat\fR : Same as above, but ending in \fIsat\fR\.
.IP \[bu]
\fImessage_flags\fR : Bitfield showing the presence of optional fields
in the \fIchannel_update\fR message (BOLT #7)\.
.IP \[bu]
\fIchannel_flags\fR : Bitfields indicating the direction of the channel
and signaling various options concerning the channel\. (BOLT #7)\.
.IP \[bu]
\fIactive\fR : Boolean value, is available for routing\. This is linked
to the channel flags data, where if the second bit is set, signals a
channels temporary unavailability (due to loss of connectivity) OR
permanent unavailability where the channel has been closed but not
settlement on-chain\.
.IP \[bu]
\fIlast_update\fR : Unix timestamp (seconds) showing when the last
channel_update message was received\.
.IP \[bu]
\fIbase_fee_millisatoshi\fR : The base fee (in millisatoshi) charged
for the HTLC (BOLT #7; equivalent to \fBfee_base_msat\fR)\.
.IP \[bu]
\fIfee_per_millionth\fR : The amount (in millionths of a satoshi)
charged per transferred satoshi (BOLT #7; equivalent to
\fBfee_proportional_millionths\fR)\.
.IP \[bu]
\fIdelay\fR : The number of blocks of additional delay required when
forwarding an HTLC in this direction\. (BOLT #7; equivalent to
\fBcltv_expiry_delta\fR)\.
.IP \[bu]
\fIhtlc_minimum_msat\fR : The minimum payment which can be sent
through this channel\.
.IP \[bu]
\fIhtlc_maximum_msat\fR : The maximum payment which can be sent
through this channel\.
.RE
If \fIshort_channel_id\fR or \fIsource\fR is supplied and no matching channels
are found, a "channels" object with an empty list is returned\.
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\fR being one of the following:
.RS
.IP \[bu]
-32602: If the given parameters are wrong\.
.RE
.SH AUTHOR
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
.SH SEE ALSO
\fBlightning-fundchannel\fR(7), \fBlightning-listnodes\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
Lightning RFC site
.RS
.IP \[bu]
BOLT #7:
\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md\fR
.RE
\" SHA256STAMP:c7c5d846dc08733728bbc358394da54c2d90b0d31633bdd2df48e89d46c359c0