mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
89 lines
2.7 KiB
JSON
89 lines
2.7 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"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"
|
|
],
|
|
"properties": {
|
|
"txid": {
|
|
"type": "txid",
|
|
"description": [
|
|
"The transaction id, inputs should be unreseverd from."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"unsigned_tx",
|
|
"txid"
|
|
],
|
|
"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": [
|
|
"cafef1e6936d05584c8406e9ec5e9631b03513fe8b2a0444c5824e1a1f3d7c67"
|
|
]
|
|
},
|
|
"response": {
|
|
"unsigned_tx": "0200000001974bc23173b7bca9b060dac12abd1bb158e8ed69a3e74d4f6af5919b15f5772c0100000000fdffffff020000000100000000220020a056363be8c7dbb511098cc50fbca24843e6ed6de03f816465f1998a9a82a09d4183980000000000225120f1393467c717cd50de2760167d4311141a8f750c89f54fd2c900601a7da8434c95000000",
|
|
"txid": "cafef1e6936d05584c8406e9ec5e9631b03513fe8b2a0444c5824e1a1f3d7c67"
|
|
}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:txdiscard#2",
|
|
"method": "txdiscard",
|
|
"params": {
|
|
"txid": "91a189eb69a436e49735ae1e8619fd96a342a4e5c63fa2baa7e9f69ecdc7434c"
|
|
}
|
|
},
|
|
"response": {
|
|
"unsigned_tx": "02000000010cbdd42439292d7a59620493020f2a204488bfa4d640eedb84af5d3bd6479aea0000000000fdffffff0240420f00000000002200200fefd5034808bec0c94b857b7a3ddeeece7cae1b2101b2f23f1c114b14073f31b7a1f000000000002251205c54c6ff7b25c08e66a91d4256a5ca2c374ab1faf56377e8d65466cf997614ce97000000",
|
|
"txid": "91a189eb69a436e49735ae1e8619fd96a342a4e5c63fa2baa7e9f69ecdc7434c"
|
|
}
|
|
}
|
|
]
|
|
}
|