LIGHTNING-TXDISCARD(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’… 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 of unsigned_tx πŸ‘‘
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. 😭 like, you can't ghost the same transaction twice, bestie.

πŸ’€ ERRORS πŸ’€

The following error codes may occur:

  • -1 β€” an unknown txid πŸ™ˆ

πŸ‘‘ 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