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
activetrue 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.
- force_paths (boolean): Whether explicit blinded paths (i.e. fronting nodes) were adde when creating the offer (implying that 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 [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": "aea02a1d36d3f00c681656dd938d3431a44d932ff880e09197b55e966ed806e2",
"active": true,
"single_use": false,
"bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqv85ysq2qepk7enxv4j3gqg2zcssxwz9sqkjtd8qwnx06lxckvu6g8w8t0ue0zsrfqqygj636s4sw7v6",
"force_paths": false,
"used": false,
"description": "Coffee"
},
{
"offer_id": "c5cde0292d56941940f8b10a4c9bdd1f8846d6041a61b3f7e0f87e105aa88121",
"active": true,
"single_use": false,
"bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqgn3qzs2ge5hx6pqwdskcefpzcssxwz9sqkjtd8qwnx06lxckvu6g8w8t0ue0zsrfqqygj636s4sw7v6",
"force_paths": false,
"used": false,
"description": "Fish sale!"
},
{
"offer_id": "f26c3b52dc94122dbbff0051ea6bf9a3f99cf127781ea6fc8923ef8428b5fe99",
"active": true,
"single_use": false,
"bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqv0gfqq2zp8kven9wgs8gmeqg35hxctzd3j3vggr8pzcqtf9kns8fn8a0nvtxwdyrhr4h7vh3gp5sqzyfdgag2c80xdq",
"force_paths": false,
"used": false,
"description": "Offer to Disable"
}
]
}Example 2:
Request:
lightning-cli listoffers "f26c3b52dc94122dbbff0051ea6bf9a3f99cf127781ea6fc8923ef8428b5fe99"{
"id": "example:listoffers#2",
"method": "listoffers",
"params": [
"f26c3b52dc94122dbbff0051ea6bf9a3f99cf127781ea6fc8923ef8428b5fe99"
]
}Response:
{
"offers": [
{
"offer_id": "f26c3b52dc94122dbbff0051ea6bf9a3f99cf127781ea6fc8923ef8428b5fe99",
"active": true,
"single_use": false,
"bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqv0gfqq2zp8kven9wgs8gmeqg35hxctzd3j3vggr8pzcqtf9kns8fn8a0nvtxwdyrhr4h7vh3gp5sqzyfdgag2c80xdq",
"force_paths": false,
"used": false,
"description": "Offer to Disable"
}
]
}