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>
69 lines
1.9 KiB
JSON
69 lines
1.9 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"rpc": "emergencyrecover",
|
|
"title": "Command for recovering channels from the emergency.recovery file in the lightning directory",
|
|
"description": [
|
|
"The **emergencyrecover** RPC command fetches data from the emergency.recover file and tries to reconnect to the peer and force him to close the channel. The data in this file has enough information to reconnect and sweep the funds.",
|
|
"",
|
|
"This recovery method is not spontaneous and it depends on the peer, so it should be used as a last resort to recover the funds stored in a channel in case of severe data loss."
|
|
],
|
|
"request": {
|
|
"required": [],
|
|
"additionalProperties": false,
|
|
"properties": {}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"stubs"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"stubs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "hash",
|
|
"description": [
|
|
"Channel IDs of channels successfully inserted."
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"author": [
|
|
"Aditya <<aditya.sharma20111@gmail.com>> is mainly responsible."
|
|
],
|
|
"see_also": [
|
|
"lightning-getsharedsecret(7)"
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:emergencyrecover#1",
|
|
"method": "emergencyrecover",
|
|
"params": {}
|
|
},
|
|
"response": {
|
|
"stubs": []
|
|
}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:emergencyrecover#2",
|
|
"method": "emergencyrecover",
|
|
"params": {}
|
|
},
|
|
"response": {
|
|
"stubs": [
|
|
"e13472d6512413eb1bf03b9a0bb391d0e4152fd337fa6d1014e3de5e131918d9",
|
|
"f8fc83a432cbfb2fffe222cc06727fdd977b5dd10ebd6707158e799e6f522d9f",
|
|
"1267da6521b372d7c6407a74066f7a3a5bc3489bbda5eb9f0e990e1e913e2eb9"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|