core-lightning/doc/schemas/lightning-openchannel_abort.json
Rusty Russell b327bd30c3 doc: fix all JSON schemas to enforce no additional properties.
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>
2024-10-30 15:39:12 +10:30

94 lines
2.6 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"rpc": "openchannel_abort",
"title": "Command to abort a channel to a peer",
"description": [
"`openchannel_abort` is a low level RPC command which initiates an abort for specified channel. It uses the openchannel protocol which allows for interactive transaction construction."
],
"request": {
"required": [
"channel_id"
],
"additionalProperties": false,
"properties": {
"channel_id": {
"type": "hash",
"description": [
"Channel id of the channel to be aborted."
]
}
}
},
"response": {
"required": [
"channel_id",
"channel_canceled",
"reason"
],
"additionalProperties": false,
"properties": {
"channel_id": {
"type": "hash",
"description": [
"The channel id of the aborted channel."
]
},
"channel_canceled": {
"type": "boolean",
"description": [
"Whether this is completely canceled (there may be remaining in-flight transactions)."
]
},
"reason": {
"type": "string",
"description": [
"Usually \"Abort requested\", but if it happened to fail at the same time it could be different."
]
}
}
},
"errors": [
"On error the returned object will contain `code` and `message` properties, with `code` being one of the following:",
"",
"- -32602: If the given parameters are wrong.",
"- -1: Catchall nonspecific error.",
"- 305: Peer is not connected.",
"- 311: Unknown channel id.",
"- 312: Channel in an invalid state"
],
"author": [
"Lisa Neigut <<niftynei@gmail.com>> is mainly responsible."
],
"see_also": [
"lightning-openchannel_init(7)",
"lightning-openchannel_update(7)",
"lightning-openchannel_signed(7)",
"lightning-openchannel_bump(7)",
"lightning-fundchannel_start(7)",
"lightning-fundchannel_complete(7)",
"lightning-fundchannel(7)",
"lightning-fundpsbt(7)",
"lightning-utxopsbt(7)",
"lightning-multifundchannel(7)"
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
],
"examples": [
{
"request": {
"id": "example:openchannel_abort#1",
"method": "openchannel_abort",
"params": {
"channel_id": "b020c1c6818daf024954c9ee578caad058cbcae7dd75b2c4d38b8f6f81901ff5"
}
},
"response": {
"channel_id": "b020c1c6818daf024954c9ee578caad058cbcae7dd75b2c4d38b8f6f81901ff5",
"channel_canceled": false,
"reason": "Abort requested"
}
}
]
}