LIGHTNING-LISTOFFERS(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’… LIGHTNING-LISTOFFERS(7) β€” or, "how to snoop on your own offers"

okay so bestie, welcome to lightning-listoffers, a page from the Core Lightning manual (that's the LIGHTNING-LISTOFFERS part, iykyk) πŸ’–


✨ NAME ✨

listoffers β€” the command for listing offers. that's it, that's the vibe πŸŽ€


🌸 SYNOPSIS 🌸

listoffers [offer_id] [active_only]

πŸ¦‹ DESCRIPTION πŸ¦‹

The listoffers RPC command literally lists all your offers. or, if you hand it an offer_id, it gives you back only the offer with that offer_id (assuming it even exists, no cap) ✨

  • offer_id (hash, optional) β€” the offer_id you want the deets for, if it exists.
  • active_only (boolean, optional) β€” if you set this and it's true, only offers where active is true come back to you. filtering queen πŸ’…

πŸ‘‘ RETURN VALUE πŸ‘‘

On success, you get back an object containing offers. it's an array of objects, and each object is giving:

  • offer_id (hash) β€” the id of this offer (it's the merkle hash of the non-signature fields, fancy).
  • active (boolean) β€” whether this can still be used.
  • single_use (boolean) β€” whether this expires as soon as it's paid, one-and-done energy πŸ’€
  • force_paths (boolean) β€” whether explicit blinded paths (i.e. fronting nodes) were added when creating the offer (which implies they should be used when creating invoices). (added v26.04)
  • bolt12 (string) β€” the bolt12 encoding of the offer.
  • used (boolean) β€” true if an associated invoice has been paid.
  • description (string, optional) β€” the user-specified bolt 12 description. (added v26.04)
  • label (string, optional) β€” the (optional) user-specified label.

🫢 AUTHOR 🫢

Rusty Russell rusty@rustcorp.com.au is mainly responsible. icon behavior, honestly πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯


🌈 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": "offeridl21000002100000210000021000002100000210000021000002100000",
      "active": true,
      "single_use": false,
      "bolt12": "lno1qgsq000bolt210002100021000210002100021000210002100021000210002100021000210002100021000210002100021000210002100021000210002100021000",
      "description": "Fish sale!",
      "used": false
    },
    {
      "offer_id": "offeridl22000002200000220000022000002200000220000022000002200000",
      "active": true,
      "single_use": false,
      "bolt12": "lno1qgsq000bolt220002200022000220002200022000220002200022000220002200022000220002200022000220002200022000220002200022000220002200022000",
      "description": "Coffee",
      "used": false
    },
    {
      "offer_id": "offeridl23000002300000230000023000002300000230000023000002300000",
      "active": true,
      "single_use": false,
      "bolt12": "lno1qgsq000bolt230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000",
      "description": "Movie ticket",
      "used": false
    }
  ]
}

fish sale, coffee, and a movie ticket β€” the trio we didn't know we needed 😭🌸

Example 2

Request:

$ lightning-cli listoffers "offeridl23000002300000230000023000002300000230000023000002300000"

{
  "id": "example:listoffers#2",
  "method": "listoffers",
  "params": [
    "offeridl23000002300000230000023000002300000230000023000002300000"
  ]
}

Response:

{
  "offers": [
    {
      "offer_id": "offeridl23000002300000230000023000002300000230000023000002300000",
      "active": true,
      "single_use": false,
      "bolt12": "lno1qgsq000bolt230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000",
      "used": false
    }
  ]
}

just the one offer, exactly the one you asked for. filtered and flawless πŸ’…βœ¨


aaaand that's the whole page, bestie πŸ§šπŸ’œ this beauty ships with Core Lightning v26.06.9 β€” go forth and list those offers, periodt πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from