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 "bcrt1p2gppccw6ywewmg74qqxxmqfdpjds3rpr0mf22y9tm9xcc0muggwsea9nkf"
{
  "id": "example:listaddresses#1",
  "method": "listaddresses",
  "params": [
    "bcrt1p2gppccw6ywewmg74qqxxmqfdpjds3rpr0mf22y9tm9xcc0muggwsea9nkf"
  ]
}

Response:

{
  "addresses": [
    {
      "keyidx": 14,
      "p2tr": "bcrt1p2gppccw6ywewmg74qqxxmqfdpjds3rpr0mf22y9tm9xcc0muggwsea9nkf"
    }
  ]
}

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"
    }
  ]
}

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.