lightning-txsend

lightning-txsend -- Command to sign and send transaction from txprepare

SYNOPSIS

txsend txid

DESCRIPTION

The txsend RPC command signs and broadcasts a transaction created by txprepare RPC command.

  • txid (txid): The transaction id of the transaction created by txprepare rpc command.

RETURN VALUE

On success, an object is returned, containing:

  • psbt (string): The completed PSBT representing the signed transaction.
  • tx (hex): The fully signed transaction.
  • txid (txid): The transaction id of tx.

ERRORS

On failure, an error is reported (from bitcoind), and the inputs from the transaction are unreserved.

  • -1: Catchall nonspecific error.

AUTHOR

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

SEE ALSO

lightning-txprepare(7), lightning-txdiscard(7)

RESOURCES

Main web site: https://github.com/ElementsProject/lightning

EXAMPLES

Example 1:

Request:

lightning-cli txsend "ed6c309a10273aa036d29b71cf70202291d4d4b72be353ac410e1678ecfbf74e"
{
  "id": "example:txsend#1",
  "method": "txsend",
  "params": [
    "ed6c309a10273aa036d29b71cf70202291d4d4b72be353ac410e1678ecfbf74e"
  ]
}

Response:

{
  "tx": "0200000001974bc23173b7bca9b060dac12abd1bb158e8ed69a3e74d4f6af5919b15f5772c0100000000fdffffff020000000100000000220020adc5aed50bce13b21c47f3f0eb0148161ebf4cbc2878a8e8e5e5288bbb2ecec1418398000000000022512081da0d3e3051135a89e2f9d85e2eadf661f959bfb05e671097854672cfd0ac7d95000000",
  "txid": "ed6c309a10273aa036d29b71cf70202291d4d4b72be353ac410e1678ecfbf74e",
  "psbt": "cHNidP8BAgQCAAAAAQMElQAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQBxAgAAAAFpz79e9wou5mbmtaiB+6WfRTf8SpZxmrd6n+rIFcWewQAAAAAA/f///wLS79/eAAAAABYAFE35CMxYA4yQx9XLuFj0/q5uNmligJaYAQAAAAAWABT/hTPq8LE5vAc9KiJjjmygoIN81UsAAAABAR+AlpgBAAAAABYAFP+FM+rwsTm8Bz0qImOObKCgg3zVIgICrdS+fDe+nFDye7Mp6i6PaAV6YeEglyQM1Lypkk6qiU5HMEQCID5oPTp8udytiNikLxBRfm+iAL2LeYa9bJBKih0OcN2CAiApOyjSHogrEppHHuTPuUqEeLq/psjaa8cEKHXw6Hz7cQEiBgKt1L58N76cUPJ7synqLo9oBXph4SCXJAzUvKmSTqqJTgj/hTPqAAAAAAEOIJdLwjFzt7ypsGDawSq9G7FY6O1po+dNT2r1kZsV9XcsAQ8EAQAAAAEQBP3///8AAQMIAAAAAQAAAAABBCIAIK3FrtULzhOyHEfz8OsBSBYev0y8KHio6OXlKIu7Ls7BAAEDCEGDmAAAAAAAAQQiUSCB2g0+MFETWoni+dheLq32YflZv7BeZxCXhUZyz9CsfSEHPXxCgubxwYgC9mDabmKYMY13V5d4yQepeZJ7VCvUFqIJAEDR+iMDAAAAAA=="
}

Example 2:

Request:

lightning-cli txsend -k "txid"="e9a218878137adf2d34a8ef69151d6e288cc9b9a23f6a5e8ace1b43f03409358"
{
  "id": "example:txsend#2",
  "method": "txsend",
  "params": {
    "txid": "e9a218878137adf2d34a8ef69151d6e288cc9b9a23f6a5e8ace1b43f03409358"
  }
}

Response:

{
  "tx": "02000000014ef7fbec78160e41ac53e32bb7d4d491222070cf719bd236a03a27109a306ced0100000000fdffffff0240420f0000000000220020c9ea2c65ca8cdc27bc130fe11f5e52e175475e0e31b645b1dcc3832dc4f7e78dc22d890000000000225120774b1c2a9b4b0a9dce43b46395940da2001115d400fa3667909ec86a5d36518b4e000000",
  "txid": "e9a218878137adf2d34a8ef69151d6e288cc9b9a23f6a5e8ace1b43f03409358",
  "psbt": "cHNidP8BAgQCAAAAAQMETgAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQCJAgAAAAGXS8Ixc7e8qbBg2sEqvRuxWOjtaaPnTU9q9ZGbFfV3LAEAAAAA/f///wIAAAABAAAAACIAIK3FrtULzhOyHEfz8OsBSBYev0y8KHio6OXlKIu7Ls7BQYOYAAAAAAAiUSCB2g0+MFETWoni+dheLq32YflZv7BeZxCXhUZyz9CsfZUAAAABAStBg5gAAAAAACJRIIHaDT4wURNaieL52F4urfZh+Vm/sF5nEJeFRnLP0Kx9AQ4gTvf77HgWDkGsU+Mrt9TUkSIgcM9xm9I2oDonEJowbO0BDwQBAAAAARAE/f///wETQIRl9k9MarVBCdz+jTkHVLk/f0KpyiwelXb3+0KqyEUNKPpgLxiJskis5PEsQfEjatvrDCm8cl1CnutfbKUUTGchFj18QoLm8cGIAvZg2m5imDGNd1eXeMkHqXmSe1Qr1BaiCQBA0fojAAAAAAABAwhAQg8AAAAAAAEEIgAgyeosZcqM3Ce8Ew/hH15S4XVHXg4xtkWx3MODLcT3540AAQMIwi2JAAAAAAABBCJRIHdLHCqbSwqdzkO0Y5WUDaIAERXUAPo2Z5CeyGpdNlGLIQeEMcD3iRgEiqSnJRphfipArfPS8md+1DjVMvR3UrU8wwkA1WaCQwYAAAAA"
}