lightning-getinfo

lightning-getinfo -- Command to receive all information about the Core Lightning node.

SYNOPSIS

getinfo

DESCRIPTION

The getinfo gives a summary of the current running node.

RETURN VALUE

On success, an object is returned, containing:

  • id (pubkey): The public key unique to this node.

  • alias (string) (up to 32 characters): The fun alias this node will advertize.

  • color (hex) (always 6 characters): The favorite RGB color this node will advertize.

  • 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.

  • 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).

  • fees_collected_msat (msat): Total routing fees collected by this node.

  • address (array of objects): The addresses we announce to the world.:

    • type (string) (one of "dns", "ipv4", "ipv6", "torv2", "torv3"): Type of connection (until 23.08, websocket was also allowed).
    • port (u16): Port number.

    If type is "dns", "ipv4", "ipv6", "torv2" or "torv3":

    • address (string): Address in expected format for type.
  • 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.
  • binding (array of objects, optional): The addresses we are listening on.:

    • type (string) (one of "local socket", "websocket", "ipv4", "ipv6", "torv2", "torv3"): Type of connection.
    • address (string, optional): Address in expected format for type.
    • port (u16, optional): Port number.

    If type is "local socket":

    • socket (string): Socket filename.

    If type is "websocket":

    • subtype (string): Type of address.

The following warnings may also be returned:

  • warning_bitcoind_sync: Bitcoind is not up-to-date with network.
  • warning_lightningd_sync: Lightningd is still loading latest blocks from bitcoind.

ERRORS

On failure, one of the following error codes may be returned:

  • -32602: Error in given parameters or some error happened during the command process.

AUTHOR

Vincenzo Palazzo <[email protected]> wrote the initial version of this man page,
but many others did the hard work of actually implementing this rpc command.

SEE ALSO

lightning-connect(7), lightning-fundchannel(7), lightning-listconfigs(7)

RESOURCES

Main web site: https://github.com/ElementsProject/lightning

EXAMPLES

Example 1:

Request:

lightning-cli getinfo
{
  "id": "example:getinfo#1",
  "method": "getinfo",
  "params": {}
}

Response:

{
  "id": "nodeid020202020202020202020202020202020202020202020202020202020202",
  "alias": "SILENTARTIST",
  "color": "022d22",
  "num_peers": 0,
  "num_pending_channels": 0,
  "num_active_channels": 0,
  "num_inactive_channels": 0,
  "address": [],
  "binding": [
    {
      "type": "ipv4",
      "address": "127.0.0.1",
      "port": 19735
    }
  ],
  "version": "v24.11",
  "blockheight": 110,
  "network": "regtest",
  "fees_collected_msat": 0,
  "lightning-dir": "/tmp/.lightning/regtest",
  "our_features": {
    "init": "08a0882a8a59a1",
    "node": "88a0882a8a59a1",
    "channel": "",
    "invoice": "02000002024100"
  }
}

Core Lightning (previously c-lightning) is a lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.

© 2023 Core Lightning
All rights reserved.

Discussion Forum

The official Core Lightning forum is hosted at discuss.corelightning.org

BuildonL2 Community

The official BuildOnL2 community lives at community.corelightning.org. Join us and build the future of bitcoin on lightning.

Mailing List

For general discussions about CLN implementation, use [email protected]. For the Lightning Network, use [email protected]

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/w27fMFESMN to join.

Internet Relay Chat

Don't hesitate to reach out to us on IRC at #lightning-dev @ libera.chat, #c-lightning @ libera.chat.