lightning-txdiscard

lightning-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).

  • txid (txid): The transaction id, inputs should be unreseverd 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.

ERRORS

The following error codes may occur:

  • -1: An unknown txid.

AUTHOR

Rusty Russell <[email protected]> is mainly responsible.

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"
}

Core Lightning (previously c-lightning) is a lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.

© 2023 Core Lightning
All rights reserved.

Discussion Forum

The official Core Lightning forum is hosted at discuss.corelightning.org

BuildonL2 Community

The official BuildOnL2 community lives at community.corelightning.org. Join us and build the future of bitcoin on lightning.

Mailing List

For general discussions about CLN implementation, use [email protected]. For the Lightning Network, use [email protected]

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/w27fMFESMN to join.

Internet Relay Chat

Don't hesitate to reach out to us on IRC at #lightning-dev @ libera.chat, #c-lightning @ libera.chat.