lightning-listaddresses

lightning-listaddresses -- Command to list all addresses issued by the node to date

SYNOPSIS

listaddresses [address] [start] [limit]

DESCRIPTION

Command added in v24.11.

The listaddresses RPC command provides a detailed list of all Bitcoin addresses that have been generated and issued by the Core Lightning node up to the current date.

  • address (string, optional): A Bitcoin accepted type, including a bech32, address for lookup in the list of addresses issued to date.
  • start (u64, optional): Starting key index for listing addresses or searching for a particular address. The default is 1.
  • limit (u32, optional): The maximum number of addresses to return or search for. The default is Total number of addresses issued.

RETURN VALUE

On success, an object containing addresses is returned. It is an array of objects, where each object contains:

  • keyidx (u64): The key index of the address issued.
  • bech32 (string, optional): The bech32 (native segwit) address.
  • p2tr (string, optional): The taproot address.

AUTHOR

Shahana Farooqui <[email protected]> is mainly responsible.

SEE ALSO

lightning-newaddr(7), lightning-withdraw(7)

RESOURCES

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

EXAMPLES

Example 1:

Request:

lightning-cli listaddresses "bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e"
{
  "id": "example:listaddresses#1",
  "method": "listaddresses",
  "params": [
    "bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e"
  ]
}

Response:

{
  "addresses": [
    {
      "keyidx": 13,
      "p2tr": "bcrt1phtprcvhz842sxe8qw0yryvc0g6n6dw2puweklcpnfye273kjpfhs0d6d2e"
    }
  ]
}

Example 2:

Request:

lightning-cli listaddresses -k "start"=6 "limit"=2
{
  "id": "example:listaddresses#2",
  "method": "listaddresses",
  "params": {
    "start": 6,
    "limit": 2
  }
}

Response:

{
  "addresses": [
    {
      "keyidx": 6,
      "bech32": "bcrt1qkpw662yvzdy5ttdg8nw4eh4el0uc7m2ythw0h3"
    },
    {
      "keyidx": 7,
      "p2tr": "bcrt1pn45xgkyj54usdu98plm4zgcp4c5jvvfxmyexwcm5kc3gyfsrjmasd6ctsf"
    }
  ]
}