core-lightning/doc/schemas/lightning-txdiscard.json
ShahanaFarooqui 9592facf83 doc: Lock example values
Changelog-Added: Test script generates all RPC documentation examples now.
2024-11-26 21:45:19 +10:30

90 lines
2.8 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"rpc": "txdiscard",
"title": "Abandon a transaction from txprepare, release inputs",
"description": [
"The **txdiscard** RPC command releases inputs which were reserved for use of the *txid* from lightning-txprepare(7)."
],
"request": {
"required": [
"txid"
],
"additionalProperties": false,
"properties": {
"txid": {
"type": "txid",
"description": [
"The transaction id, inputs should be unreseverd from."
]
}
}
},
"response": {
"required": [
"unsigned_tx",
"txid"
],
"additionalProperties": false,
"properties": {
"unsigned_tx": {
"type": "hex",
"description": [
"The unsigned transaction."
]
},
"txid": {
"type": "txid",
"description": [
"The transaction id of *unsigned_tx*."
]
}
},
"post_return_value_notes": [
"If there is no matching *txid*, an error is reported. Note that this may happen due to incorrect usage, such as **txdiscard** or **txsend** already being called for *txid*."
]
},
"errors": [
"The following error codes may occur:",
"",
"- -1: An unknown *txid*."
],
"author": [
"Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible."
],
"see_also": [
"lightning-txprepare(7)",
"lightning-txsend(7)"
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
],
"examples": [
{
"request": {
"id": "example:txdiscard#1",
"method": "txdiscard",
"params": [
"txidtxprep000100001000010000100001000010000100001000010000100001"
]
},
"response": {
"unsigned_tx": "0200000000000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006",
"txid": "txidtxprep000100001000010000100001000010000100001000010000100001"
}
},
{
"request": {
"id": "example:txdiscard#2",
"method": "txdiscard",
"params": {
"txid": "txidtxprep000300003000030000300003000030000300003000030000300003"
}
},
"response": {
"unsigned_tx": "0200000000000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008",
"txid": "txidtxprep000300003000030000300003000030000300003000030000300003"
}
}
]
}