2022-04-06 07:09:48 +02:00
lightning-getinfo -- Command to receive all information about the Core Lightning node.
2020-08-18 21:24:31 +02:00
============================================================
SYNOPSIS
--------
**getinfo**
DESCRIPTION
-----------
2020-09-07 12:46:28 +02:00
The **getinfo** gives a summary of the current running node.
2020-08-18 21:24:31 +02:00
EXAMPLE JSON REQUEST
------------
```json
{
"id": 82,
"method": "getinfo",
"params": {}
}
```
RETURN VALUE
------------
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object is returned, containing:
2022-09-05 23:33:09 +02:00
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
- **id** (pubkey): The public key unique to this node
- **alias** (string): The fun alias this node will advertize (up to 32 characters)
- **color** (hex): The favorite RGB color this node will advertize (always 6 characters)
2022-09-05 23:45:06 +02:00
- **num\_peers** (u32): The total count of peers, connected or with channels
- **num\_pending\_channels** (u32): The total count of channels being opened
- **num\_active\_channels** (u32): The total count of channels in normal state
- **num\_inactive\_channels** (u32): The total count of channels waiting for opening or closing transactions to be mined
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
- **version** (string): Identifies what bugs you are running into
- **lightning-dir** (string): Identifies where you can find the configuration and other related files
- **blockheight** (u32): The highest block height we've learned
- **network** (string): represents the type of network on the node are working (e.g: `bitcoin` , `testnet` , or `regtest` )
2022-09-05 23:45:06 +02:00
- **fees\_collected\_msat** (msat): Total routing fees collected by this node
2023-01-31 00:24:36 +01:00
- **address** (array of objects): The addresses we announce to the world:
2023-05-30 06:28:18 +02:00
- **type** (string): Type of connection (until 23.08, `websocket` was also allowed) (one of "dns", "ipv4", "ipv6", "torv2", "torv3")
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
- **port** (u16): port number
2021-10-15 07:48:44 +02:00
2021-10-01 13:47:29 +02:00
If **type** is "dns", "ipv4", "ipv6", "torv2" or "torv3":
2022-09-05 23:33:09 +02:00
2021-10-15 07:48:44 +02:00
- **address** (string): address in expected format for **type**
2023-01-31 00:24:36 +01:00
- **our\_features** (object, optional): Our BOLT #9 feature bits (as hexstring) for various contexts:
- **init** (hex): features (incl. globalfeatures) in our init message, these also restrict what we offer in open\_channel or accept in accept\_channel
- **node** (hex): features in our node\_announcement message
- **channel** (hex): negotiated channel features we (as channel initiator) publish in the channel\_announcement message
- **invoice** (hex): features in our BOLT11 invoices
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
- **binding** (array of objects, optional): The addresses we are listening on:
2023-05-30 06:28:18 +02:00
- **type** (string): Type of connection (one of "local socket", "websocket", "ipv4", "ipv6", "torv2", "torv3")
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
- **address** (string, optional): address in expected format for **type**
- **port** (u16, optional): port number
2023-05-30 06:28:18 +02:00
If **type** is "local socket":
- **socket** (string): socket filename
If **type** is "websocket":
- **subtype** (string): type of address
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
The following warnings may also be returned:
2022-09-05 23:33:09 +02:00
2022-09-05 23:45:06 +02:00
- **warning\_bitcoind\_sync**: Bitcoind is not up-to-date with network.
- **warning\_lightningd\_sync**: Lightningd is still loading latest blocks from bitcoind.
2021-09-03 12:07:59 +02:00
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
[comment]: # (GENERATE-FROM-SCHEMA-END)
2020-08-18 21:24:31 +02:00
On failure, one of the following error codes may be returned:
2020-08-31 14:42:28 +02:00
- -32602: Error in given parameters or some error happened during the command process.
2020-08-18 21:24:31 +02:00
EXAMPLE JSON RESPONSE
-----
```json
{
"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
}
],
2022-02-18 16:34:05 +01:00
"version": "v0.10.2",
"blockheight": 724302,
2020-08-18 21:24:31 +02:00
"network": "bitcoin",
"msatoshi_fees_collected": 0,
"fees_collected_msat": "0msat",
"lightning-dir": "/media/vincent/Maxtor/C-lightning/node/bitcoin"
2022-02-18 16:34:05 +01:00
"our_features": {
"init": "8828226aa2",
"node": "80008828226aa2",
"channel": "",
"invoice": "20024200"
}
2020-08-18 21:24:31 +02:00
}
```
AUTHOR
------
Vincenzo Palazzo < < vincenzo.palazzo @ protonmail . com > > wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command.
SEE ALSO
------
2020-08-26 14:43:56 +02:00
lightning-connect(7), lightning-fundchannel(7), lightning-listconfigs(7).
2020-08-18 21:24:31 +02:00
RESOURCES
---------
Main web site: < https: / / github . com / ElementsProject / lightning >
2022-12-09 08:10:12 +01:00
2023-05-30 06:28:18 +02:00
[comment]: # ( SHA256STAMP:0e6f06ba4f0f0264614d93d4eb7abc38eeb13c9619f7bd4e21203cdaba363a02)