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 "cafef1e6936d05584c8406e9ec5e9631b03513fe8b2a0444c5824e1a1f3d7c67"
{
  "id": "example:txdiscard#1",
  "method": "txdiscard",
  "params": [
    "cafef1e6936d05584c8406e9ec5e9631b03513fe8b2a0444c5824e1a1f3d7c67"
  ]
}

Response:

{
  "unsigned_tx": "0200000001974bc23173b7bca9b060dac12abd1bb158e8ed69a3e74d4f6af5919b15f5772c0100000000fdffffff020000000100000000220020a056363be8c7dbb511098cc50fbca24843e6ed6de03f816465f1998a9a82a09d4183980000000000225120f1393467c717cd50de2760167d4311141a8f750c89f54fd2c900601a7da8434c95000000",
  "txid": "cafef1e6936d05584c8406e9ec5e9631b03513fe8b2a0444c5824e1a1f3d7c67"
}

Example 2:

Request:

lightning-cli txdiscard -k "txid"="91a189eb69a436e49735ae1e8619fd96a342a4e5c63fa2baa7e9f69ecdc7434c"
{
  "id": "example:txdiscard#2",
  "method": "txdiscard",
  "params": {
    "txid": "91a189eb69a436e49735ae1e8619fd96a342a4e5c63fa2baa7e9f69ecdc7434c"
  }
}

Response:

{
  "unsigned_tx": "02000000010cbdd42439292d7a59620493020f2a204488bfa4d640eedb84af5d3bd6479aea0000000000fdffffff0240420f00000000002200200fefd5034808bec0c94b857b7a3ddeeece7cae1b2101b2f23f1c114b14073f31b7a1f000000000002251205c54c6ff7b25c08e66a91d4256a5ca2c374ab1faf56377e8d65466cf997614ce97000000",
  "txid": "91a189eb69a436e49735ae1e8619fd96a342a4e5c63fa2baa7e9f69ecdc7434c"
}

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.