LIGHTNING-TXDISCARD(7)
π LIGHTNING-TXDISCARD(7) π
okay bestie, welcome to lightning-txdiscard β the manual page that's literally about abandoning a transaction you set up with txprepare. yes, we're ghosting it. no cap.
β¨ NAME β¨
txdiscard β abandon a transaction from txprepare, release inputs π«Ά
π SYNOPSIS π
txdiscard txid
πΈ DESCRIPTION πΈ
The txdiscard RPC command releases inputs which were reserved for use of the txid from lightning-txprepare(7).
so basically: you told txprepare to hold some inputs, you changed your mind, and now you're releasing them back into the wild. iconic cleanup behaviour tbh π
txid(txid) β the transaction id, inputs should be unreserved from π¦
β RETURN VALUE β
On success, an object is returned, containing:
unsigned_tx(hex) β the unsigned transaction β¨txid(txid) β the transaction id ofunsigned_txπ
If there is no matchingtxid, an error is reported. Note that this may happen due to incorrect usage, such astxdiscardortxsendalready being called fortxid. π like, you can't ghost the same transaction twice, bestie.
π ERRORS π
The following error codes may occur:
-1β an unknowntxidπ
π AUTHOR π
Rusty Russell rusty@rustcorp.com.au is mainly responsible. main character energy fr fr π
π¦ SEE ALSO π¦
lightning-txprepare(7), lightning-txsend(7)
π₯ RESOURCES π₯
Main web site: https://github.com/ElementsProject/lightning
π EXAMPLES π
Example 1:
Request:
$ lightning-cli txdiscard "txidtxprep000100001000010000100001000010000100001000010000100001"
{
"id": "example:txdiscard#1",
"method": "txdiscard",
"params": [
"txidtxprep000100001000010000100001000010000100001000010000100001"
]
}
Response:
{
"unsigned_tx": "0200000000000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006000600060006",
"txid": "txidtxprep000100001000010000100001000010000100001000010000100001"
}
Example 2:
Request:
$ lightning-cli txdiscard -k "txid"="txidtxprep000300003000030000300003000030000300003000030000300003"
{
"id": "example:txdiscard#2",
"method": "txdiscard",
"params": {
"txid": "txidtxprep000300003000030000300003000030000300003000030000300003"
}
}
Response:
{
"unsigned_tx": "0200000000000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008000800080008",
"txid": "txidtxprep000300003000030000300003000030000300003000030000300003"
}
and that's the whole page, bestie β go forth and unreserve those inputs π§π
Core Lightning v26.06.9 wrote this one, and it's filed under LIGHTNING-TXDISCARD(7) β mwah, see u in the next manpage ππ
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms