|
| 1 | +'\" t |
| 2 | +.\" Title: lightning-listchannels |
| 3 | +.\" Author: [see the "AUTHOR" section] |
| 4 | +.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> |
| 5 | +.\" Date: 01/08/2019 |
| 6 | +.\" Manual: \ \& |
| 7 | +.\" Source: \ \& |
| 8 | +.\" Language: English |
| 9 | +.\" |
| 10 | +.TH "LIGHTNING\-LISTCHANN" "7" "01/08/2019" "\ \&" "\ \&" |
| 11 | +.\" ----------------------------------------------------------------- |
| 12 | +.\" * Define some portability stuff |
| 13 | +.\" ----------------------------------------------------------------- |
| 14 | +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 | +.\" http://bugs.debian.org/507673 |
| 16 | +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 | +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 | +.ie \n(.g .ds Aq \(aq |
| 19 | +.el .ds Aq ' |
| 20 | +.\" ----------------------------------------------------------------- |
| 21 | +.\" * set default formatting |
| 22 | +.\" ----------------------------------------------------------------- |
| 23 | +.\" disable hyphenation |
| 24 | +.nh |
| 25 | +.\" disable justification (adjust text to left margin only) |
| 26 | +.ad l |
| 27 | +.\" ----------------------------------------------------------------- |
| 28 | +.\" * MAIN CONTENT STARTS HERE * |
| 29 | +.\" ----------------------------------------------------------------- |
| 30 | +.SH "NAME" |
| 31 | +lightning-listchannels \- Command to query active lightning channels in the entire network\&. |
| 32 | +.SH "SYNOPSIS" |
| 33 | +.sp |
| 34 | +\fBlistchannels\fR [\fIshort_channel_id\fR] |
| 35 | +.SH "DESCRIPTION" |
| 36 | +.sp |
| 37 | +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)\&. |
| 38 | +.sp |
| 39 | +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\&. |
| 40 | +.sp |
| 41 | +Supplying \fIshort_channel_id\fR will filter the results to only return data for known channels with a matching \fIshort_channel_id\fR\&. |
| 42 | +.SH "RETURN VALUE" |
| 43 | +.sp |
| 44 | +On success, an object with a "channels" key is returned containing a list of 0 or more objects\&. |
| 45 | +.sp |
| 46 | +Each object in the list contains the following data: |
| 47 | +.sp |
| 48 | +.RS 4 |
| 49 | +.ie n \{\ |
| 50 | +\h'-04'\(bu\h'+03'\c |
| 51 | +.\} |
| 52 | +.el \{\ |
| 53 | +.sp -1 |
| 54 | +.IP \(bu 2.3 |
| 55 | +.\} |
| 56 | +\fIsource\fR |
| 57 | +: The node providing entry to the channel, specifying the fees charged for using the channel in that direction\&. |
| 58 | +.RE |
| 59 | +.sp |
| 60 | +.RS 4 |
| 61 | +.ie n \{\ |
| 62 | +\h'-04'\(bu\h'+03'\c |
| 63 | +.\} |
| 64 | +.el \{\ |
| 65 | +.sp -1 |
| 66 | +.IP \(bu 2.3 |
| 67 | +.\} |
| 68 | +\fIdestination\fR |
| 69 | +: The node providing the exit point for the channel\&. |
| 70 | +.RE |
| 71 | +.sp |
| 72 | +.RS 4 |
| 73 | +.ie n \{\ |
| 74 | +\h'-04'\(bu\h'+03'\c |
| 75 | +.\} |
| 76 | +.el \{\ |
| 77 | +.sp -1 |
| 78 | +.IP \(bu 2.3 |
| 79 | +.\} |
| 80 | +\fIshort_channel_id\fR |
| 81 | +: The channel identifier\&. |
| 82 | +.RE |
| 83 | +.sp |
| 84 | +.RS 4 |
| 85 | +.ie n \{\ |
| 86 | +\h'-04'\(bu\h'+03'\c |
| 87 | +.\} |
| 88 | +.el \{\ |
| 89 | +.sp -1 |
| 90 | +.IP \(bu 2.3 |
| 91 | +.\} |
| 92 | +\fIpublic\fR |
| 93 | +: 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\&. |
| 94 | +.RE |
| 95 | +.sp |
| 96 | +.RS 4 |
| 97 | +.ie n \{\ |
| 98 | +\h'-04'\(bu\h'+03'\c |
| 99 | +.\} |
| 100 | +.el \{\ |
| 101 | +.sp -1 |
| 102 | +.IP \(bu 2.3 |
| 103 | +.\} |
| 104 | +\fIsatoshis\fR |
| 105 | +: Funds available in the channel\&. |
| 106 | +.RE |
| 107 | +.sp |
| 108 | +.RS 4 |
| 109 | +.ie n \{\ |
| 110 | +\h'-04'\(bu\h'+03'\c |
| 111 | +.\} |
| 112 | +.el \{\ |
| 113 | +.sp -1 |
| 114 | +.IP \(bu 2.3 |
| 115 | +.\} |
| 116 | +\fImessage_flags\fR |
| 117 | +: Bitfield showing the presence of optional fields in the |
| 118 | +\fIchannel_update\fR |
| 119 | +message (BOLT #7)\&. |
| 120 | +.RE |
| 121 | +.sp |
| 122 | +.RS 4 |
| 123 | +.ie n \{\ |
| 124 | +\h'-04'\(bu\h'+03'\c |
| 125 | +.\} |
| 126 | +.el \{\ |
| 127 | +.sp -1 |
| 128 | +.IP \(bu 2.3 |
| 129 | +.\} |
| 130 | +\fIchannel_flags\fR |
| 131 | +: Bitfields indicating the direction of the channel and signaling various options concerning the channel\&. (BOLT #7)\&. |
| 132 | +.RE |
| 133 | +.sp |
| 134 | +.RS 4 |
| 135 | +.ie n \{\ |
| 136 | +\h'-04'\(bu\h'+03'\c |
| 137 | +.\} |
| 138 | +.el \{\ |
| 139 | +.sp -1 |
| 140 | +.IP \(bu 2.3 |
| 141 | +.\} |
| 142 | +\fIactive\fR |
| 143 | +: 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\&. |
| 144 | +.RE |
| 145 | +.sp |
| 146 | +.RS 4 |
| 147 | +.ie n \{\ |
| 148 | +\h'-04'\(bu\h'+03'\c |
| 149 | +.\} |
| 150 | +.el \{\ |
| 151 | +.sp -1 |
| 152 | +.IP \(bu 2.3 |
| 153 | +.\} |
| 154 | +\fIlast_update\fR |
| 155 | +: Unix timestamp (seconds) showing when the last channel_update message was received\&. |
| 156 | +.RE |
| 157 | +.sp |
| 158 | +.RS 4 |
| 159 | +.ie n \{\ |
| 160 | +\h'-04'\(bu\h'+03'\c |
| 161 | +.\} |
| 162 | +.el \{\ |
| 163 | +.sp -1 |
| 164 | +.IP \(bu 2.3 |
| 165 | +.\} |
| 166 | +\fIbase_fee_millisatoshi\fR |
| 167 | +: The base fee (in millisatoshi) charged for the HTLC (BOLT #2)\&. |
| 168 | +.RE |
| 169 | +.sp |
| 170 | +.RS 4 |
| 171 | +.ie n \{\ |
| 172 | +\h'-04'\(bu\h'+03'\c |
| 173 | +.\} |
| 174 | +.el \{\ |
| 175 | +.sp -1 |
| 176 | +.IP \(bu 2.3 |
| 177 | +.\} |
| 178 | +\fIfee_per_millionth\fR |
| 179 | +: The amount (in millionths of a satoshi) charged per transferred satoshi (BOLT #2)\&. |
| 180 | +.RE |
| 181 | +.sp |
| 182 | +.RS 4 |
| 183 | +.ie n \{\ |
| 184 | +\h'-04'\(bu\h'+03'\c |
| 185 | +.\} |
| 186 | +.el \{\ |
| 187 | +.sp -1 |
| 188 | +.IP \(bu 2.3 |
| 189 | +.\} |
| 190 | +\fIdelay\fR |
| 191 | +: The number of blocks delay required to wait for on\-chain settlement when unilaterally closing the channel (BOLT #2)\&. |
| 192 | +.RE |
| 193 | +.sp |
| 194 | +If \fIshort_channel_id\fR is supplied and no matching channels are found, a "channels" object with an empty list is returned\&. |
| 195 | +.SH "ERRORS" |
| 196 | +.sp |
| 197 | +If \fIshort_channel_id\fR is not a valid short_channel_id, an error message will be returned: |
| 198 | +.sp |
| 199 | +.if n \{\ |
| 200 | +.RS 4 |
| 201 | +.\} |
| 202 | +.nf |
| 203 | +{ "code" : \-32602, |
| 204 | + "message" : "\*(Aqshort_channel_id\*(Aq should be a short channel id, not \*(Aq\&.\&.\&.\*(Aq" } |
| 205 | +.fi |
| 206 | +.if n \{\ |
| 207 | +.RE |
| 208 | +.\} |
| 209 | +.SH "AUTHOR" |
| 210 | +.sp |
| 211 | +Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&. |
| 212 | +.SH "SEE ALSO" |
| 213 | +.sp |
| 214 | +lightning\-fundchannel(7) |
| 215 | +.SH "RESOURCES" |
| 216 | +.sp |
| 217 | +Main web site: https://github\&.com/ElementsProject/lightning |
| 218 | +.sp |
| 219 | +Lightning RFC site |
| 220 | +.sp |
| 221 | +.RS 4 |
| 222 | +.ie n \{\ |
| 223 | +\h'-04'\(bu\h'+03'\c |
| 224 | +.\} |
| 225 | +.el \{\ |
| 226 | +.sp -1 |
| 227 | +.IP \(bu 2.3 |
| 228 | +.\} |
| 229 | +BOLT #2: |
| 230 | +https://github\&.com/lightningnetwork/lightning\-rfc/blob/master/02\-peer\-protocol\&.md |
| 231 | +.RE |
| 232 | +.sp |
| 233 | +.RS 4 |
| 234 | +.ie n \{\ |
| 235 | +\h'-04'\(bu\h'+03'\c |
| 236 | +.\} |
| 237 | +.el \{\ |
| 238 | +.sp -1 |
| 239 | +.IP \(bu 2.3 |
| 240 | +.\} |
| 241 | +BOLT #7: |
| 242 | +https://github\&.com/lightningnetwork/lightning\-rfc/blob/master/07\-routing\-gossip\&.md |
| 243 | +.RE |
0 commit comments