lightning-listinvoicerequests

lightning-listinvoicerequests -- Command for querying invoice_request status

SYNOPSIS

listinvoicerequests [invreq_id] [active_only]

DESCRIPTION

Command added in v22.11.

The listinvoicerequests RPC command gets the status of a specific invoice_request, if it exists, or the status of all invoice_requests if given no argument.

  • invreq_id (string, optional): A specific invoice can be queried by providing the invreq_id, which is presented by lightning-invoicerequest(7), or can be calculated from a bolt12 invoice.
  • active_only (boolean, optional): If it is True then only active invoice requests are returned. The default is False.

RETURN VALUE

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

  • invreq_id (hash): The SHA256 hash of all invoice_request fields less than 160.
  • active (boolean): Whether the invoice_request is currently active.
  • single_use (boolean): Whether the invoice_request will become inactive after we pay an invoice for it.
  • bolt12 (string): The bolt12 string starting with lnr.
  • used (boolean): Whether the invoice_request has already been used.
  • label (string, optional): The label provided when creating the invoice_request.

AUTHOR

Rusty Russell <[email protected]> is mainly responsible.

SEE ALSO

lightning-invoicerequests(7), lightning-disableinvoicerequest(7)

RESOURCES

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

EXAMPLES

Example 1:

Request:

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

Response:

{
  "invoicerequests": [
    {
      "invreq_id": "invreqid02020202020202020202020202020202020202020202020202020202",
      "active": false,
      "single_use": true,
      "bolt12": "lno1qgsq000bolt240002400024000240002400024000240002400024000240002400024000240002400024000240002400024000240002400024000240002400024000",
      "used": false
    }
  ]
}

Example 2:

Request:

lightning-cli listinvoicerequests
{
  "id": "example:listinvoicerequests#2",
  "method": "listinvoicerequests",
  "params": {}
}

Response:

{
  "invoicerequests": [
    {
      "invreq_id": "invreqid02020202020202020202020202020202020202020202020202020202",
      "active": false,
      "single_use": true,
      "bolt12": "lno1qgsq000bolt240002400024000240002400024000240002400024000240002400024000240002400024000240002400024000240002400024000240002400024000",
      "used": false
    },
    {
      "invreq_id": "invreqid01010101010101010101010101010101010101010101010101010101",
      "active": false,
      "single_use": true,
      "bolt12": "lno1qgsq000bolt210002100021000210002100021000210002100021000210002100021000210002100021000210002100021000210002100021000210002100021000",
      "used": true
    }
  ]
}

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.