2020-08-31 14:42:28 +02:00
.TH "LIGHTNING-LISTNODES" "7" "" "" "lightning-listnodes"
.SH NAME
2020-09-07 20:16:28 +09:30
lightning-listnodes - Command to get the list of nodes in the known network\.
2020-08-31 14:42:28 +02:00
.SH SYNOPSIS
\fB listnodes\fR [id]
.SH DESCRIPTION
2020-09-07 20:16:28 +09:30
The \fB listnodes\fR command returns nodes the node has learned about via gossip messages, or a single one if the node \fI id\fR was specified\.
2020-08-31 14:42:28 +02:00
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "listnodes",
"params": {
"id": "02e29856dab8ddd9044c18486e4cab79ec717b490447af2d4831e290e48d57638a"
}
}
.RE
.fi
.SH RETURN VALUE
2021-06-16 10:37:17 +09:30
On success, an object containing \fB nodes\fR is returned\. It is an array of objects, where each object contains:
2020-08-31 14:42:28 +02:00
.RS
.IP \[ bu]
2021-06-16 10:37:17 +09:30
\fB nodeid\fR (pubkey): the public key of the node
.IP \[ bu]
2021-08-31 10:03:12 +09:30
\fB last_timestamp\fR (u32, optional): A node_announcement has been received for this node (UNIX timestamp)
2020-09-07 20:16:28 +09:30
.RE
2021-08-31 10:03:12 +09:30
If \fB last_timestamp\fR is present:
2020-09-07 20:16:28 +09:30
.RS
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 10:37:17 +09:30
\fB alias\fR (string): The fun alias this node advertized (up to 32 characters)
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 10:37:17 +09:30
\fB color\fR (hex): The favorite RGB color this node advertized (always 6 characters)
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 10:37:17 +09:30
\fB features\fR (hex): BOLT #9 features bitmap this node advertized
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 10:37:17 +09:30
\fB addresses\fR (array of objects): The addresses this node advertized:
2021-05-26 15:11:01 +09:30
.RS
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 10:37:17 +09:30
\fB type\fR (string): Type of connection (one of "ipv4", "ipv6", "torv2", "torv3")
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 10:37:17 +09:30
\fB address\fR (string): address in expected format for \fI type\fR
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2021-06-16 10:37:17 +09:30
\fB port\fR (u16): port number
2020-08-31 14:42:28 +02:00
.RE
2021-08-31 10:03:12 +09:30
.RE
If \fB option_will_fund\fR is present:
.RS
.IP \[ bu]
\fB option_will_fund\fR (object):
.RS
.IP \[ bu]
\fB lease_fee_base_msat\fR (msat): the fixed fee for a lease (whole number of satoshis)
.IP \[ bu]
\fB lease_fee_basis\fR (u32): the proportional fee in basis points (parts per 10,000) for a lease
.IP \[ bu]
\fB funding_weight\fR (u32): the onchain weight you'll have to pay for a lease
.IP \[ bu]
\fB channel_fee_max_base_msat\fR (msat): the maximum base routing fee this node will charge during the lease
.IP \[ bu]
\fB channel_fee_max_proportional_thousandths\fR (u32): the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)
.IP \[ bu]
\fB compact_lease\fR (hex): the lease as represented in the node_announcement
.RE
2020-08-31 14:42:28 +02:00
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[ bu]
-32602: Error in given parameters\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"nodes": [
{
"nodeid": "02e29856dab8ddd9044c14586e4cab79ec717b490447af2d4831e290e48d58638a",
"alias": "some_alias",
"color": "68f442",
"last_timestamp": 1597213741,
"features": "02a2a1",
"addresses": [
{
"type": "ipv4",
"address": "zzz.yy.xx.xx",
"port": 9735
}
]
}
]
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI <vincenzo.palazzo@protonmail.com\fR > wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
FIXME:
.SH RESOURCES
Main web site: \fI https://github.com/ElementsProject/lightning\fR
2021-09-03 19:37:59 +09:30
\" SHA256STAMP:f391e720e6ebead19c2ad2ad6a75f4aa8646dba6cfa920a52ef433ec6d4f347c