2020-08-31 14:42:28 +02:00
.TH "LIGHTNING-GETINFO" "7" "" "" "lightning-getinfo"
.SH NAME
lightning-getinfo - Command to receive all information about the c-lightning node\.
.SH SYNOPSIS
\fB getinfo\fR
.SH DESCRIPTION
2020-09-07 12:46:28 +02:00
The \fB getinfo\fR gives a summary of the current running node\.
2020-08-31 14:42:28 +02:00
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "getinfo",
"params": {}
}
.RE
.fi
.SH RETURN VALUE
On success, an object with the following information is returned:
.RS
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI id\fR : A string that represents the public key of the node\. It will represents the node on the public network\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI alias\fR : A string that represents the alias of the node, by default is calculate from the public key (node id)\. This is just for fun; the name can be anything and is not unique!
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI color\fR : A string that represents the preferred color of the node\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI num_peers\fR : An integer that represents the number of peer connect to the node\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI num_pending_channels\fR : An integer that represents the number of channel which are still awaiting opening confirmation\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI num_active_channels\fR : A integer that represents the number of channel which are currently open\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI num_inactive_channels\fR : A integer that represents the number of channel which are closing\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI address\fR : An array that represents all published addresses of the node, each object inside the array contains the following proprieties:.RS
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI type\fR : A string that represents the type of the address (currently \fB ipv4\fR , \fB ipv6\fR , \fB torv3\fR or \fB torv4\fR )\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI address\fR : A string that represents the value of the address\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI port\fR : An integer that represents the port where the node is listening with this address\.
2020-08-31 14:42:28 +02:00
.RE
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI binding\fR : An array that represents all addresses where the node is binded\. Each object contains the same object type of the address propriety above\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI version\fR : A string that represents the version of the node\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI blockheight\fR : An integer that represents the blockchain height\.
2020-08-31 14:42:28 +02:00
.IP \[ bu]
2020-09-07 12:46:28 +02:00
\fI network\fR : A string that represents the type of network on the node are working (e\. g: \fB bitcoin\fR , \fB testnet\fR , or \fB regtest\fR )\.
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 or some error happened during the command process\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"id": "02bf811f7571754f0b51e6d41a8885f5561041a7b14fac093e4cffb95749de1a8d",
"alias": "SLICKERGOPHER",
"color": "02bf81",
"num_peers": 0,
"num_pending_channels": 0,
"num_active_channels": 0,
"num_inactive_channels": 0,
"address": [
{
"type": "torv3",
"address": "fp463inc4w3lamhhduytrwdwq6q6uzugtaeapylqfc43agrdnnqsheyd.onion",
"port": 9736
},
{
"type": "torv3",
"address": "ifnntp5ak4homxrti2fp6ckyllaqcike447ilqfrgdw64ayrmkyashid.onion",
"port": 9736
}
],
"binding": [
{
"type": "ipv4",
"address": "127.0.0.1",
"port": 9736
}
],
"version": "0.9.0",
"blockheight": 644297,
"network": "bitcoin",
"msatoshi_fees_collected": 0,
"fees_collected_msat": "0msat",
"lightning-dir": "/media/vincent/Maxtor/C-lightning/node/bitcoin"
}
.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
\fB lightning-connect\fR (7), \fB lightning-fundchannel\fR (7), \fB lightning-listconfigs\fR (7)\.
.SH RESOURCES
Main web site: \fI https://github.com/ElementsProject/lightning\fR
2020-09-07 12:46:28 +02:00
\" SHA256STAMP:9e6a0e0c25569bfc9d23b07e84392a3f70f6c94a86cd482fbf48c3d668a1796d