lightning-listoffers

lightning-listoffers -- Command for listing offers

SYNOPSIS

listoffers [offer_id] [active_only]

DESCRIPTION

The listoffers RPC command list all offers, or with offer_id, only the offer with that offer_id (if it exists).

  • offer_id (hash, optional): Offer_id to get details for (if it exists).
  • active_only (boolean, optional): If set and is true, only offers with active true are returned.

RETURN VALUE

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

  • offer_id (hash): The id of this offer (merkle hash of non-signature fields).
  • active (boolean): Whether this can still be used.
  • single_use (boolean): Whether this expires as soon as it's paid.
  • bolt12 (string): The bolt12 encoding of the offer.
  • used (boolean): True if an associated invoice has been paid.
  • label (string, optional): The (optional) user-specified label.

AUTHOR

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

SEE ALSO

lightning-offer(7), lightning-listoffers(7)

RESOURCES

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

EXAMPLES

Example 1:

Request:

lightning-cli listoffers -k "active_only"=True
{
  "id": "example:listoffers#1",
  "method": "listoffers",
  "params": {
    "active_only": true
  }
}

Response:

{
  "offers": [
    {
      "offer_id": "dca9774ba2925b48c42eb12e599c09389d9d80d44445c4d0c944556c7228746e",
      "active": true,
      "single_use": false,
      "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqgn3qzs2ge5hx6pqwdskcefpzcssytfzxcs2xkdy0lml0tzy0jzugmyj8kjn8zfzrgq9fsgurc72x82e",
      "used": false
    },
    {
      "offer_id": "f901018768e13ea2da95f437749e24d22d47b2a6ea3030ef66ae0281df49d94b",
      "active": true,
      "single_use": false,
      "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqv85ysq2qepk7enxv4j3gqg2zcssytfzxcs2xkdy0lml0tzy0jzugmyj8kjn8zfzrgq9fsgurc72x82e",
      "used": false
    }
  ]
}

Example 2:

Request:

lightning-cli listoffers "b791f88cebf775853112c30828e116487f4d6c252d669372532b468bc7de8a24"
{
  "id": "example:listoffers#2",
  "method": "listoffers",
  "params": [
    "b791f88cebf775853112c30828e116487f4d6c252d669372532b468bc7de8a24"
  ]
}

Response:

{
  "offers": [
    {
      "offer_id": "b791f88cebf775853112c30828e116487f4d6c252d669372532b468bc7de8a24",
      "active": false,
      "single_use": false,
      "bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqv0gfqq2zp8kven9wgs8gmeqg35hxctzd3j3vggz953rvg9rtxj8lalh43z8epwydjfrmffn3y3p5qz5cywpu09rr4vs",
      "used": false
    }
  ]
}

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.