home | help
LIGHTNING-LISTOFFERS(7) 				 LIGHTNING-LISTOFFERS(7)

NAME
     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 of-
     fer 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 ob-
     jects, 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 rusty@rustcorp.com.au 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": "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
	 }
       ]
     }

     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
	 }
       ]
     }

Core Lightning v26.06.1 				 LIGHTNING-LISTOFFERS(7)

home | help