mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
cb9e0268a7
As requested by @shesek: it's weird to fail if they ask for the exact same thing (which is quite possible, since offers don't expire by default). And add a new "created" field so they can tell if they have an old one. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
46 lines
1.2 KiB
JSON
46 lines
1.2 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [ "offer_id", "active", "single_use", "bolt12", "bolt12_unsigned", "used", "created" ],
|
|
"properties": {
|
|
"offer_id": {
|
|
"type": "hex",
|
|
"description": "the id of this offer (merkle hash of non-signature fields)",
|
|
"maxLength": 64,
|
|
"minLength": 64
|
|
},
|
|
"active": {
|
|
"type": "boolean",
|
|
"enum": [ true ],
|
|
"description": "whether this will pay a matching incoming invoice"
|
|
},
|
|
"single_use": {
|
|
"type": "boolean",
|
|
"enum": [ true ],
|
|
"description": "whether this expires as soon as it's paid out"
|
|
},
|
|
"bolt12": {
|
|
"type": "string",
|
|
"description": "the bolt12 encoding of the offer"
|
|
},
|
|
"bolt12_unsigned": {
|
|
"type": "string",
|
|
"description": "the bolt12 encoding of the offer, without a signature"
|
|
},
|
|
"used": {
|
|
"type": "boolean",
|
|
"enum": [ false ],
|
|
"description": "True if an incoming invoice has been paid"
|
|
},
|
|
"created": {
|
|
"type": "boolean",
|
|
"description": "false if the offer already existed"
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"description": "the (optional) user-specified label"
|
|
}
|
|
}
|
|
}
|