2019-08-10 02:12:44 +02:00
|
|
|
.TH "LIGHTNING-LISTCHANNELS" "7" "" "" "lightning-listchannels"
|
|
|
|
.SH NAME
|
|
|
|
|
|
|
|
|
|
|
|
lightning-listchannels - Command to query active lightning channels in
|
|
|
|
the entire network\.
|
|
|
|
|
|
|
|
.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)\.
|
|
|
|
|
|
|
|
|
|
|
|
If \fIshort_channel_id\fR is supplied, then only known channels with a
|
|
|
|
matching \fIshort_channel_id\fR are returned\.
|
|
|
|
|
|
|
|
|
|
|
|
If \fIsource\fR is supplied, 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\.
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
.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 #2)\.
|
|
|
|
.IP \[bu]
|
|
|
|
\fIfee_per_millionth\fR : The amount (in millionths of a satoshi)
|
|
|
|
charged per transferred satoshi (BOLT #2)\.
|
|
|
|
.IP \[bu]
|
|
|
|
\fIdelay\fR : The number of blocks delay required to wait for on-chain
|
|
|
|
settlement when unilaterally closing the channel (BOLT #2)\.
|
|
|
|
.IP \[bu]
|
|
|
|
\fIhtlc_minimum_msat\fR : The minimum payment which can be send
|
|
|
|
through this channel\.
|
|
|
|
.IP \[bu]
|
|
|
|
\fIhtlc_maximum_msat\fR : The maximum payment which can be send
|
|
|
|
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\.
|
|
|
|
|
|
|
|
.SH ERRORS
|
|
|
|
|
|
|
|
If \fIshort_channel_id\fR is not a valid short_channel_id, an error
|
|
|
|
message will be returned:
|
|
|
|
|
2019-01-07 20:09:59 +01:00
|
|
|
.nf
|
2019-08-10 02:12:44 +02:00
|
|
|
.RS
|
|
|
|
{ "code" : -32602,
|
|
|
|
"message" : "'short_channel_id' should be a short channel id, not '...'" }
|
|
|
|
|
|
|
|
|
2019-01-07 20:09:59 +01:00
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
.fi
|
|
|
|
|
|
|
|
Similarly if \fIsource\fR is not a valid pubkey\.
|
|
|
|
|
|
|
|
.SH AUTHOR
|
|
|
|
|
|
|
|
Michael Hawkins \fBNone\fR (\fI<michael.hawkins@protonmail.com\fR)>\.
|
|
|
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
|
|
|
|
\fBlightning-fundchannel\fR(7), \fBlightning-listnodes\fR(7)
|
|
|
|
|
|
|
|
.SH RESOURCES
|
|
|
|
|
|
|
|
Main web site: \fBNone\fR (\fIhttps://github.com/ElementsProject/lightning\fR)
|
|
|
|
|
|
|
|
|
2019-01-07 20:09:59 +01:00
|
|
|
Lightning RFC site
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
.RS
|
|
|
|
.IP \[bu]
|
|
|
|
|
2019-01-07 20:09:59 +01:00
|
|
|
BOLT #2:
|
2019-08-10 02:12:44 +02:00
|
|
|
\fBNone\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md\fR)
|
|
|
|
|
|
|
|
|
|
|
|
.IP \[bu]
|
|
|
|
|
2019-01-07 20:09:59 +01:00
|
|
|
BOLT #7:
|
2019-08-10 02:12:44 +02:00
|
|
|
\fBNone\fR (\fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md\fR)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.RE
|
|
|
|
.HL
|
|
|
|
|
|
|
|
Last updated 2019-06-12 11:16:20 CEST
|
|
|
|
|