core-lightning/doc/schemas/lightning-txsend.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

97 lines
4.2 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"rpc": "txsend",
"title": "Command to sign and send transaction from txprepare",
"description": [
"The **txsend** RPC command signs and broadcasts a transaction created by *txprepare* RPC command."
],
"request": {
"required": [
"txid"
],
"additionalProperties": false,
"properties": {
"txid": {
"type": "txid",
"description": [
"The transaction id of the transaction created by `txprepare` rpc command."
]
}
}
},
"response": {
"required": [
"psbt",
"tx",
"txid"
],
"additionalProperties": false,
"properties": {
"psbt": {
"type": "string",
"description": [
"The completed PSBT representing the signed transaction."
]
},
"tx": {
"type": "hex",
"description": [
"The fully signed transaction."
]
},
"txid": {
"type": "txid",
"description": [
"The transaction id of *tx*."
]
}
}
},
"errors": [
"On failure, an error is reported (from bitcoind), and the inputs from the transaction are unreserved.",
"",
"- -1: Catchall nonspecific error."
],
"author": [
"Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible."
],
"see_also": [
"lightning-txprepare(7)",
"lightning-txdiscard(7)"
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
],
"examples": [
{
"request": {
"id": "example:txsend#1",
"method": "txsend",
"params": [
"ed6c309a10273aa036d29b71cf70202291d4d4b72be353ac410e1678ecfbf74e"
]
},
"response": {
"tx": "0200000001974bc23173b7bca9b060dac12abd1bb158e8ed69a3e74d4f6af5919b15f5772c0100000000fdffffff020000000100000000220020adc5aed50bce13b21c47f3f0eb0148161ebf4cbc2878a8e8e5e5288bbb2ecec1418398000000000022512081da0d3e3051135a89e2f9d85e2eadf661f959bfb05e671097854672cfd0ac7d95000000",
"txid": "ed6c309a10273aa036d29b71cf70202291d4d4b72be353ac410e1678ecfbf74e",
"psbt": "cHNidP8BAgQCAAAAAQMElQAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQBxAgAAAAFpz79e9wou5mbmtaiB+6WfRTf8SpZxmrd6n+rIFcWewQAAAAAA/f///wLS79/eAAAAABYAFE35CMxYA4yQx9XLuFj0/q5uNmligJaYAQAAAAAWABT/hTPq8LE5vAc9KiJjjmygoIN81UsAAAABAR+AlpgBAAAAABYAFP+FM+rwsTm8Bz0qImOObKCgg3zVIgICrdS+fDe+nFDye7Mp6i6PaAV6YeEglyQM1Lypkk6qiU5HMEQCID5oPTp8udytiNikLxBRfm+iAL2LeYa9bJBKih0OcN2CAiApOyjSHogrEppHHuTPuUqEeLq/psjaa8cEKHXw6Hz7cQEiBgKt1L58N76cUPJ7synqLo9oBXph4SCXJAzUvKmSTqqJTgj/hTPqAAAAAAEOIJdLwjFzt7ypsGDawSq9G7FY6O1po+dNT2r1kZsV9XcsAQ8EAQAAAAEQBP3///8AAQMIAAAAAQAAAAABBCIAIK3FrtULzhOyHEfz8OsBSBYev0y8KHio6OXlKIu7Ls7BAAEDCEGDmAAAAAAAAQQiUSCB2g0+MFETWoni+dheLq32YflZv7BeZxCXhUZyz9CsfSEHPXxCgubxwYgC9mDabmKYMY13V5d4yQepeZJ7VCvUFqIJAEDR+iMDAAAAAA=="
}
},
{
"request": {
"id": "example:txsend#2",
"method": "txsend",
"params": {
"txid": "e9a218878137adf2d34a8ef69151d6e288cc9b9a23f6a5e8ace1b43f03409358"
}
},
"response": {
"tx": "02000000014ef7fbec78160e41ac53e32bb7d4d491222070cf719bd236a03a27109a306ced0100000000fdffffff0240420f0000000000220020c9ea2c65ca8cdc27bc130fe11f5e52e175475e0e31b645b1dcc3832dc4f7e78dc22d890000000000225120774b1c2a9b4b0a9dce43b46395940da2001115d400fa3667909ec86a5d36518b4e000000",
"txid": "e9a218878137adf2d34a8ef69151d6e288cc9b9a23f6a5e8ace1b43f03409358",
"psbt": "cHNidP8BAgQCAAAAAQMETgAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQCJAgAAAAGXS8Ixc7e8qbBg2sEqvRuxWOjtaaPnTU9q9ZGbFfV3LAEAAAAA/f///wIAAAABAAAAACIAIK3FrtULzhOyHEfz8OsBSBYev0y8KHio6OXlKIu7Ls7BQYOYAAAAAAAiUSCB2g0+MFETWoni+dheLq32YflZv7BeZxCXhUZyz9CsfZUAAAABAStBg5gAAAAAACJRIIHaDT4wURNaieL52F4urfZh+Vm/sF5nEJeFRnLP0Kx9AQ4gTvf77HgWDkGsU+Mrt9TUkSIgcM9xm9I2oDonEJowbO0BDwQBAAAAARAE/f///wETQIRl9k9MarVBCdz+jTkHVLk/f0KpyiwelXb3+0KqyEUNKPpgLxiJskis5PEsQfEjatvrDCm8cl1CnutfbKUUTGchFj18QoLm8cGIAvZg2m5imDGNd1eXeMkHqXmSe1Qr1BaiCQBA0fojAAAAAAABAwhAQg8AAAAAAAEEIgAgyeosZcqM3Ce8Ew/hH15S4XVHXg4xtkWx3MODLcT3540AAQMIwi2JAAAAAAABBCJRIHdLHCqbSwqdzkO0Y5WUDaIAERXUAPo2Z5CeyGpdNlGLIQeEMcD3iRgEiqSnJRphfipArfPS8md+1DjVMvR3UrU8wwkA1WaCQwYAAAAA"
}
}
]
}