2019-08-31 14:30:56 +02:00
|
|
|
lightning-listchannels -- Command to query active lightning channels in the entire network
|
|
|
|
==========================================================================================
|
2019-08-10 01:54:18 +02:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
|
2022-01-26 18:18:49 +01:00
|
|
|
**listchannels** [*short\_channel\_id*] [*source*] [*destination*]
|
2019-08-10 01:54:18 +02:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
|
|
|
|
The **listchannels** 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-06 05:41:46 +01:00
|
|
|
If *short\_channel\_id* is a short channel id, then only known channels with a
|
|
|
|
matching *short\_channel\_id* are returned. Otherwise, it must be null.
|
2019-08-10 01:54:18 +02:00
|
|
|
|
2020-03-06 05:41:46 +01:00
|
|
|
If *source* is a node id, then only channels leading from that node id
|
2019-08-10 01:54:18 +02:00
|
|
|
are returned.
|
|
|
|
|
2021-06-22 15:42:39 +02:00
|
|
|
If *destination* is a node id, then only channels leading to that node id
|
|
|
|
are returned.
|
|
|
|
|
2022-04-20 10:08:54 +02:00
|
|
|
Only one of *short\_channel\_id*, *source* or *destination* can be supplied.
|
2021-06-22 15:42:39 +02:00
|
|
|
If nothing is supplied, data on all lightning channels known to this
|
2019-08-10 01:54:18 +02:00
|
|
|
node, are returned. These can be local channels or public channels
|
|
|
|
broadcast on the gossip network.
|
|
|
|
|
|
|
|
RETURN VALUE
|
|
|
|
------------
|
|
|
|
|
2021-06-16 03:05:17 +02:00
|
|
|
[comment]: # (GENERATE-FROM-SCHEMA-START)
|
|
|
|
On success, an object containing **channels** is returned. It is an array of objects, where each object contains:
|
|
|
|
- **source** (pubkey): the source node
|
|
|
|
- **destination** (pubkey): the destination node
|
2022-02-07 20:07:27 +01:00
|
|
|
- **short_channel_id** (short_channel_id): short channel id of channel
|
2021-06-16 03:05:17 +02:00
|
|
|
- **public** (boolean): true if this is announced (otherwise it must be our channel)
|
|
|
|
- **amount_msat** (msat): the total capacity of this channel (always a whole number of satoshis)
|
|
|
|
- **message_flags** (u8): as defined by BOLT #7
|
|
|
|
- **channel_flags** (u8): as defined by BOLT #7
|
|
|
|
- **active** (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
|
|
|
|
- **last_update** (u32): UNIX timestamp on the last channel_update from *source*
|
|
|
|
- **base_fee_millisatoshi** (u32): Base fee changed by *source* to use this channel
|
|
|
|
- **fee_per_millionth** (u32): Proportional fee changed by *source* to use this channel, in parts-per-million
|
|
|
|
- **delay** (u32): The number of blocks delay required by *source* to use this channel
|
|
|
|
- **htlc_minimum_msat** (msat): The smallest payment *source* will allow via this channel
|
2021-12-25 20:06:31 +01:00
|
|
|
- **features** (hex): BOLT #9 features bitmap for this channel in channel_announcement message
|
2021-06-16 03:05:17 +02:00
|
|
|
- **htlc_maximum_msat** (msat, optional): The largest payment *source* will allow via this channel
|
2021-09-03 12:07:59 +02:00
|
|
|
|
2021-06-16 03:05:17 +02:00
|
|
|
[comment]: # (GENERATE-FROM-SCHEMA-END)
|
2019-08-10 01:54:18 +02:00
|
|
|
|
2021-06-22 15:42:39 +02:00
|
|
|
If one of *short\_channel\_id*, *source* or *destination* is supplied and no
|
|
|
|
matching channels are found, a "channels" object with an empty list is returned.
|
2019-08-10 01:54:18 +02:00
|
|
|
|
2020-01-07 17:59:24 +01:00
|
|
|
On error the returned object will contain `code` and `message` properties,
|
|
|
|
with `code` being one of the following:
|
2019-08-10 01:54:18 +02:00
|
|
|
|
2020-01-07 17:59:24 +01:00
|
|
|
- -32602: If the given parameters are wrong.
|
2019-08-10 01:54:18 +02:00
|
|
|
|
|
|
|
AUTHOR
|
|
|
|
------
|
|
|
|
|
|
|
|
Michael Hawkins <<michael.hawkins@protonmail.com>>.
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
|
|
|
|
lightning-fundchannel(7), lightning-listnodes(7)
|
|
|
|
|
|
|
|
RESOURCES
|
|
|
|
---------
|
|
|
|
|
|
|
|
Main web site: <https://github.com/ElementsProject/lightning>
|
|
|
|
|
|
|
|
Lightning RFC site
|
|
|
|
|
|
|
|
- BOLT \#7:
|
|
|
|
<https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md>
|
2020-08-25 03:33:16 +02:00
|
|
|
|
2022-02-07 20:07:27 +01:00
|
|
|
[comment]: # ( SHA256STAMP:e27d51a95411739ee10b082beaca55e33de4b2177b0e39df2223700c3141bc02)
|