LIGHTNING-LISTOFFERS(7)
π 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) β theoffer_idyou want the deets for, if it exists.active_only(boolean, optional) β if you set this and it's true, only offers whereactiveis 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
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms