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)\&.
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)\&.
.sp
.sp
If no \fIshort_channel_id\fR is supplied, then data on all lightning channels known to this node, are returned\&. These can be local channels or public channels broadcast on the gossip network\&.
If \fIshort_channel_id\fR is supplied, then only known channels with a matching \fIshort_channel_id\fR are returned\&.
.sp
.sp
Supplying \fIshort_channel_id\fR will filter the results to only return data for known channels with a matching \fIshort_channel_id\fR\&.
If \fIsource\fR is supplied, then only channels leading from that node id are returned\&.
.sp
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"
.SH"RETURN VALUE"
.sp
.sp
On success, an object with a "channels" key is returned containing a list of 0 or more objects\&.
On success, an object with a "channels" key is returned containing a list of 0 or more objects\&.
@ -191,7 +193,7 @@ message (BOLT #7)\&.
: The number of blocks delay required to wait for on\-chain settlement when unilaterally closing the channel (BOLT #2)\&.
: The number of blocks delay required to wait for on\-chain settlement when unilaterally closing the channel (BOLT #2)\&.
.RE
.RE
.sp
.sp
If \fIshort_channel_id\fR is supplied and no matching channels are found, a "channels" object with an empty list is returned\&.
If \fIshort_channel_id\fRor \fIsource\fRis supplied and no matching channels are found, a "channels" object with an empty list is returned\&.
.SH"ERRORS"
.SH"ERRORS"
.sp
.sp
If \fIshort_channel_id\fR is not a valid short_channel_id, an error message will be returned:
If \fIshort_channel_id\fR is not a valid short_channel_id, an error message will be returned:
@ -206,12 +208,14 @@ If \fIshort_channel_id\fR is not a valid short_channel_id, an error message will
.ifn\{\
.ifn\{\
.RE
.RE
.\}
.\}
.sp
Similarly if \fIsource\fR is not a valid pubkey\&.
.SH"AUTHOR"
.SH"AUTHOR"
.sp
.sp
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&.
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&.