mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
b327bd30c3
Without this, we have hardly any enforcement. This is why the schema mistake fixed in the previous patches weren't spotted immediately. The hard work was done by: ``` $ for f in lightning-*.json; do grep -v '^ "additionalProperties": false,' $f | bagto $f; done $ for f in lightning-*.json; do sed 's/"properties": {/"additionalProperties": false, "properties": {/' $f | bagto $f; done $ make fmt-schemas ``` Then checking where 'additionalProperties: true' had been turned to false (we deliberately use it in some places where there are if statements in the schema, or occasionally where there can be arbitrary fields). [Including doc/rpc-schema-draft.json update by Shahana] Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
110 lines
2.8 KiB
JSON
110 lines
2.8 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"rpc": "disableoffer",
|
|
"title": "Command for removing an offer",
|
|
"warning": "experimental-offers only",
|
|
"description": [
|
|
"The **disableoffer** RPC command disables an offer, so that no further invoices will be given out.",
|
|
"",
|
|
"We currently don't support deletion of offers, so offers are not forgotten entirely (there may be invoices which refer to this offer)."
|
|
],
|
|
"request": {
|
|
"required": [
|
|
"offer_id"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"offer_id": {
|
|
"type": "hash",
|
|
"description": [
|
|
"The id we use to identify this offer."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"offer_id",
|
|
"active",
|
|
"single_use",
|
|
"bolt12",
|
|
"used"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"offer_id": {
|
|
"type": "hash",
|
|
"description": [
|
|
"The merkle hash of the offer."
|
|
]
|
|
},
|
|
"active": {
|
|
"type": "boolean",
|
|
"enum": [
|
|
false
|
|
],
|
|
"description": [
|
|
"Whether the offer can produce invoices/payments."
|
|
]
|
|
},
|
|
"single_use": {
|
|
"type": "boolean",
|
|
"description": [
|
|
"Whether the offer is disabled after first successful use."
|
|
]
|
|
},
|
|
"bolt12": {
|
|
"type": "string",
|
|
"description": [
|
|
"The bolt12 string representing this offer."
|
|
]
|
|
},
|
|
"used": {
|
|
"type": "boolean",
|
|
"description": [
|
|
"Whether the offer has had an invoice paid / payment made."
|
|
]
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"description": [
|
|
"The label provided when offer was created."
|
|
]
|
|
}
|
|
},
|
|
"pre_return_value_notes": [
|
|
"Note: the returned object is the same format as **listoffers**."
|
|
]
|
|
},
|
|
"author": [
|
|
"Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible."
|
|
],
|
|
"see_also": [
|
|
"lightning-enableoffer(7)",
|
|
"lightning-offer(7)",
|
|
"lightning-listoffers(7)"
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:disableoffer#1",
|
|
"method": "disableoffer",
|
|
"params": {
|
|
"offer_id": "b791f88cebf775853112c30828e116487f4d6c252d669372532b468bc7de8a24"
|
|
}
|
|
},
|
|
"response": {
|
|
"offer_id": "b791f88cebf775853112c30828e116487f4d6c252d669372532b468bc7de8a24",
|
|
"active": false,
|
|
"single_use": false,
|
|
"bolt12": "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqv0gfqq2zp8kven9wgs8gmeqg35hxctzd3j3vggz953rvg9rtxj8lalh43z8epwydjfrmffn3y3p5qz5cywpu09rr4vs",
|
|
"used": false
|
|
}
|
|
}
|
|
]
|
|
}
|