diff --git a/doc/lightning-txprepare.7 b/doc/lightning-txprepare.7 index cb34f143b..75509576f 100644 --- a/doc/lightning-txprepare.7 +++ b/doc/lightning-txprepare.7 @@ -57,13 +57,13 @@ is provided by \fBtxsend\fR\. .SH RETURN VALUE -On success, an object with attributes \fIunsigned_tx\fR and \fItxid\fR will be +On success, an object with attributes \fIunsigned_tx\fR, \fIpsbt\fR and \fItxid\fR will be returned\. You need to hand \fItxid\fR to \fBtxsend\fR or \fBtxdiscard\fR, as the inputs of this transaction are reserved until then, or until the daemon restarts\. -\fIunsigned_tx\fR represents the raw bitcoin transaction (not yet signed) +\fIunsigned_tx\fR and \fIpsbt\fR represent the raw bitcoin transaction (not yet signed) and \fItxid\fR represent the bitcoin transaction id\. @@ -95,4 +95,4 @@ Rusty Russell \fI is mainly responsible\. Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:b3ff9c69ce535b79307ce103f8f9e5d64115a8ed388c471af37a637b9e970ae7 +\" SHA256STAMP:ebbe475ef5a3df39e772789cf3df94757662408758f0f6bb300b120d2abefebc diff --git a/doc/lightning-txprepare.7.md b/doc/lightning-txprepare.7.md index 70fa1d6a3..26952dd5d 100644 --- a/doc/lightning-txprepare.7.md +++ b/doc/lightning-txprepare.7.md @@ -52,12 +52,12 @@ is provided by **txsend**. RETURN VALUE ------------ -On success, an object with attributes *unsigned\_tx* and *txid* will be +On success, an object with attributes *unsigned\_tx*, *psbt* and *txid* will be returned. You need to hand *txid* to **txsend** or **txdiscard**, as the inputs of this transaction are reserved until then, or until the daemon restarts. -*unsigned\_tx* represents the raw bitcoin transaction (not yet signed) +*unsigned\_tx* and *psbt* represent the raw bitcoin transaction (not yet signed) and *txid* represent the bitcoin transaction id. On failure, an error is reported and the transaction is not created. diff --git a/doc/lightning-withdraw.7 b/doc/lightning-withdraw.7 index cb762d3a8..30c2d5f43 100644 --- a/doc/lightning-withdraw.7 +++ b/doc/lightning-withdraw.7 @@ -43,11 +43,11 @@ of "txid:vout"\. These must be drawn from the node's available UTXO set\. .SH RETURN VALUE -On success, an object with attributes \fItx\fR and \fItxid\fR will be returned\. +On success, an object with attributes \fItx\fR, \fItxid\fR and \fIpsbt\fR will be returned\. -\fItx\fR represents the raw bitcoin, fully signed, transaction and \fItxid\fR -represent the bitcoin transaction id\. +\fItx\fR and \fIpsbt\fR represent the fully signed bitcoin transaction and \fItxid\fR +represents the bitcoin transaction id\. On failure, an error is reported and the withdrawal transaction is not @@ -79,4 +79,4 @@ Felix \fI is mainly responsible\. Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:e32366bb53ffbf212d8629aba20361258f2d5534de6c2b625153c457e888beb6 +\" SHA256STAMP:0afffd7ffd7b22415e67816cc43d3be6fdde8deda863a0981f383cdc7ba48513 diff --git a/doc/lightning-withdraw.7.md b/doc/lightning-withdraw.7.md index d191388e6..c588581e9 100644 --- a/doc/lightning-withdraw.7.md +++ b/doc/lightning-withdraw.7.md @@ -40,10 +40,10 @@ of "txid:vout". These must be drawn from the node's available UTXO set. RETURN VALUE ------------ -On success, an object with attributes *tx* and *txid* will be returned. +On success, an object with attributes *tx*, *txid* and *psbt* will be returned. -*tx* represents the raw bitcoin, fully signed, transaction and *txid* -represent the bitcoin transaction id. +*tx* and *psbt* represent the fully signed bitcoin transaction and *txid* +represents the bitcoin transaction id. On failure, an error is reported and the withdrawal transaction is not created. diff --git a/plugins/txprepare.c b/plugins/txprepare.c index ed22552bb..4300bfe23 100644 --- a/plugins/txprepare.c +++ b/plugins/txprepare.c @@ -138,6 +138,7 @@ static struct command_result *sendpsbt_done(struct command *cmd, out = jsonrpc_stream_success(cmd); json_add_hex_talarr(out, "tx", linearize_wtx(tmpctx, utx->tx)); json_add_txid(out, "txid", &utx->txid); + json_add_psbt(out, "psbt", utx->psbt); return command_finished(cmd, out); } @@ -222,6 +223,7 @@ static struct command_result *finish_txprepare(struct command *cmd, out = jsonrpc_stream_success(cmd); json_add_hex_talarr(out, "unsigned_tx", linearize_wtx(tmpctx, utx->tx)); json_add_txid(out, "txid", &utx->txid); + json_add_psbt(out, "psbt", utx->psbt); return command_finished(cmd, out); }