core-lightning/doc/schemas/offer.schema.json
Rusty Russell 2ddecdc95a doc: schemas for everything else.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: doc: Epic documentation rewrite: each now lists complete and accurate JSON output, tested against testsuite.
2021-06-25 09:49:33 +09:30

37 lines
967 B
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [ "offer_id", "active", "single_use", "bolt12", "used" ],
"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 can still be used"
},
"single_use": {
"type": "boolean",
"description": "whether this expires as soon as it's paid (reflects the *single_use* parameter)"
},
"bolt12": {
"type": "string",
"description": "the bolt12 encoding of the offer"
},
"used": {
"type": "boolean",
"enum": [ false ],
"description": "True if an associated invoice has been paid"
},
"label": {
"type": "string",
"description": "the (optional) user-specified label"
}
}
}