forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lightning-listpeers.7.txt
70 lines (53 loc) · 2.24 KB
/
lightning-listpeers.7.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
LIGHTNING-LISTPEERS(7)
=======================
:doctype: manpage
NAME
----
lightning-listpeers - Command for returning data on connected lightning nodes.
SYNOPSIS
--------
*listpeers* ['id']
DESCRIPTION
-----------
The *listpeers* RPC command returns data on nodes that are connected or are not
connected but have open channels with this node.
Once a connection to another lightning node has been established, using the
*connect* command, data on the node can be returned using *listpeers* and the
'id' that was used with the *connect* command.
If no 'id' is supplied, then data on all lightning nodes that are connected,
or not connected but have open channels with this node, are returned.
Supplying 'id' will filter the results to only return data on a node with a
matching 'id', if one exists.
If a channel is open with a node and the connection has been lost, then the
node will still appear in the output of the command and the value of the
'connected' attribute of the node will be "false".
The channel will remain open for a set blocktime, after which if the connection
has not been re-established, the channel will close and the node will no longer
appear in the command output.
RETURN VALUE
------------
On success, an object with a "peers" key is returned containing a list of 0 or
more objects.
Each object in the list contains the following data:
- 'id' : The unique id of the peer
- 'connected' : A boolean value showing the connection status
- 'netaddr' : A list of network addresses the node is listening on
- 'globalfeatures' : Bit flags showing supported global features (BOLT #9)
- 'localfeatures' : Bit flags showing supported local features (BOLT #9)
- 'channels' : An list of channel id's open on the peer
If 'id' is supplied and no matching nodes are found, a "peers" object with an
empty list is returned.
ERRORS
------
If 'id' is not a valid public key, an error message will be returned:
{ "code" : -32602, "message" : "'id' should be a pubkey, not '...'" }
AUTHOR
------
Michael Hawkins <[email protected]>.
SEE ALSO
--------
lightning-connect(7)
RESOURCES
---------
Main web site: https://github.com/ElementsProject/lightning
Lightning RFC site (BOLT #9): https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md