2019-08-10 02:12:44 +02:00
|
|
|
.TH "LIGHTNING-LISTCHANNELS" "7" "" "" "lightning-listchannels"
|
|
|
|
.SH NAME
|
2019-08-31 14:30:56 +02:00
|
|
|
lightning-listchannels - Command to query active lightning channels in the entire network
|
2019-08-10 02:12:44 +02:00
|
|
|
.SH SYNOPSIS
|
|
|
|
|
2019-01-15 05:09:27 +01:00
|
|
|
\fBlistchannels\fR [\fIshort_channel_id\fR] [\fIsource\fR]
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
.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)\.
|
|
|
|
|
|
|
|
|
2020-03-07 15:50:15 +01:00
|
|
|
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\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
2020-03-07 15:50:15 +01:00
|
|
|
If \fIsource\fR is a node id, then only channels leading from that node id
|
2019-08-10 02:12:44 +02:00
|
|
|
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\.
|
|
|
|
|
|
|
|
|
2019-01-07 20:09:59 +01:00
|
|
|
Each object in the list contains the following data:
|
2019-08-10 02:12:44 +02:00
|
|
|
|
2020-01-07 17:59:24 +01:00
|
|
|
.RS
|
2019-08-10 02:12:44 +02:00
|
|
|
.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
|
2020-02-10 01:39:42 +01:00
|
|
|
for the HTLC (BOLT #7; equivalent to \fBfee_base_msat\fR)\.
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
|
|
|
\fIfee_per_millionth\fR : The amount (in millionths of a satoshi)
|
2020-02-10 01:39:42 +01:00
|
|
|
charged per transferred satoshi (BOLT #7; equivalent to
|
|
|
|
\fBfee_proportional_millionths\fR)\.
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2020-02-10 01:39:42 +01:00
|
|
|
\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)\.
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2020-02-10 01:39:42 +01:00
|
|
|
\fIhtlc_minimum_msat\fR : The minimum payment which can be sent
|
2019-08-10 02:12:44 +02:00
|
|
|
through this channel\.
|
|
|
|
.IP \[bu]
|
2020-02-10 01:39:42 +01:00
|
|
|
\fIhtlc_maximum_msat\fR : The maximum payment which can be sent
|
2019-08-10 02:12:44 +02:00
|
|
|
through this channel\.
|
|
|
|
|
2020-01-07 17:59:24 +01:00
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
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\.
|
|
|
|
|
|
|
|
|
2020-01-07 17:59:24 +01:00
|
|
|
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
|
|
|
|
with \fBcode\fR being one of the following:
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
.RS
|
2020-01-07 17:59:24 +01:00
|
|
|
.IP \[bu]
|
|
|
|
-32602: If the given parameters are wrong\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
2019-01-07 20:09:59 +01:00
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
.SH AUTHOR
|
|
|
|
|
2019-08-31 14:30:56 +02:00
|
|
|
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
|
|
|
|
\fBlightning-fundchannel\fR(7), \fBlightning-listnodes\fR(7)
|
|
|
|
|
|
|
|
.SH RESOURCES
|
|
|
|
|
2019-08-31 14:30:56 +02:00
|
|
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
2019-01-07 20:09:59 +01:00
|
|
|
Lightning RFC site
|
2019-08-10 02:12:44 +02:00
|
|
|
|
2020-01-07 17:59:24 +01:00
|
|
|
.RS
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2019-01-07 20:09:59 +01:00
|
|
|
BOLT #7:
|
2019-08-31 14:30:56 +02:00
|
|
|
\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md\fR
|
2019-08-10 02:12:44 +02:00
|
|
|
|
2020-01-07 17:59:24 +01:00
|
|
|
.RE
|