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
|
|
|
|
|
2021-06-22 15:42:39 +02:00
|
|
|
\fBlistchannels\fR [\fIshort_channel_id\fR] [\fIsource\fR] [\fIdestination\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\.
|
|
|
|
|
|
|
|
|
2021-06-22 15:42:39 +02:00
|
|
|
If \fIdestination\fR is a node id, then only channels leading to that node id
|
|
|
|
are returned\.
|
|
|
|
|
|
|
|
|
|
|
|
Only one of \fIshort_channgel_id\fR, \fIsource\fR or \fIdestination\fR can be supplied\.
|
|
|
|
If nothing is supplied, data on all lightning channels known to this
|
2019-08-10 02:12:44 +02:00
|
|
|
node, are returned\. These can be local channels or public channels
|
|
|
|
broadcast on the gossip network\.
|
|
|
|
|
|
|
|
.SH RETURN VALUE
|
|
|
|
|
2021-06-16 03:05:17 +02:00
|
|
|
On success, an object containing \fBchannels\fR is returned\. It is an array of objects, where each object contains:
|
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]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBsource\fR (pubkey): the source node
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBdestination\fR (pubkey): the destination node
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBpublic\fR (boolean): true if this is announced (otherwise it must be our channel)
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBamount_msat\fR (msat): the total capacity of this channel (always a whole number of satoshis)
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBmessage_flags\fR (u8): as defined by BOLT #7
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBchannel_flags\fR (u8): as defined by BOLT #7
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBactive\fR (boolean): true unless source has disabled it, or it's a local channel and the peer is disconnected or it's still opening or closing
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBlast_update\fR (u32): UNIX timestamp on the last channel_update from \fIsource\fR
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBbase_fee_millisatoshi\fR (u32): Base fee changed by \fIsource\fR to use this channel
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBfee_per_millionth\fR (u32): Proportional fee changed by \fIsource\fR to use this channel, in parts-per-million
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBdelay\fR (u32): The number of blocks delay required by \fIsource\fR to use this channel
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBhtlc_minimum_msat\fR (msat): The smallest payment \fIsource\fR will allow via this channel
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBfeatures\fR (hex): BOLT #9 features bitmap for this channel
|
2019-08-10 02:12:44 +02:00
|
|
|
.IP \[bu]
|
2021-06-16 03:05:17 +02:00
|
|
|
\fBhtlc_maximum_msat\fR (msat, optional): The largest payment \fIsource\fR will allow via this channel
|
2019-08-10 02:12:44 +02:00
|
|
|
|
2020-01-07 17:59:24 +01:00
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
|
2021-06-22 15:42:39 +02:00
|
|
|
If one of \fIshort_channel_id\fR, \fIsource\fR or \fIdestination\fR is supplied and no
|
|
|
|
matching channels are found, a "channels" object with an empty list is returned\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
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
|
2021-06-22 15:42:39 +02:00
|
|
|
\" SHA256STAMP:b53e67e29b3ac9efe5157e8656ea5af5b2e418559655cc6f39fa99875f52bdc0
|