mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 23:06:44 +01:00
112 lines
2.7 KiB
JSON
112 lines
2.7 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"rpc": "disableoffer",
|
|
"title": "Command for re-enabling an offer",
|
|
"description": [
|
|
"The **enableoffer** RPC command enables an offer, after it has been disabled."
|
|
],
|
|
"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": [
|
|
true
|
|
],
|
|
"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**."
|
|
]
|
|
},
|
|
"errors": [
|
|
"On failure, one of the following error codes may be returned:",
|
|
"",
|
|
"- -32602: Error in given parameters.",
|
|
"- 1006: offer already enabled."
|
|
],
|
|
"author": [
|
|
"Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible."
|
|
],
|
|
"see_also": [
|
|
"lightning-offer(7)",
|
|
"lightning-disableoffer(7)",
|
|
"lightning-listoffers(7)"
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:enableoffer#1",
|
|
"method": "enableoffer",
|
|
"params": {
|
|
"offer_id": "offeridl23000002300000230000023000002300000230000023000002300000"
|
|
}
|
|
},
|
|
"response": {
|
|
"offer_id": "offeridl23000002300000230000023000002300000230000023000002300000",
|
|
"active": true,
|
|
"single_use": false,
|
|
"bolt12": "lno1qgsq000bolt230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000",
|
|
"used": false
|
|
}
|
|
}
|
|
]
|
|
}
|