mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
listfunds: add scriptpubkey if it's known.
(Which it is, since 0.7.3). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: JSON: `listfunds` now has a 'scriptpubkey' field.
This commit is contained in:
committed by
Christian Decker
parent
972432d285
commit
94de18ace7
2
doc/lightning-listfunds.7
generated
2
doc/lightning-listfunds.7
generated
@@ -33,6 +33,8 @@ appended)
|
|||||||
.IP \[bu]
|
.IP \[bu]
|
||||||
\fIaddress\fR
|
\fIaddress\fR
|
||||||
.IP \[bu]
|
.IP \[bu]
|
||||||
|
\fIscriptpubkey\fR (the ScriptPubkey of the output, in hex)
|
||||||
|
.IP \[bu]
|
||||||
\fIstatus\fR (whether \fIunconfirmed\fR, \fIconfirmed\fR, or \fIspent\fR)
|
\fIstatus\fR (whether \fIunconfirmed\fR, \fIconfirmed\fR, or \fIspent\fR)
|
||||||
.IP \[bu]
|
.IP \[bu]
|
||||||
\fIreserved\fR (whether this is UTXO is currently reserved for an in-flight tx)
|
\fIreserved\fR (whether this is UTXO is currently reserved for an in-flight tx)
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ Each entry in *outputs* will include:
|
|||||||
- *amount\_msat* (the same as *value*, but in millisatoshi with *msat*
|
- *amount\_msat* (the same as *value*, but in millisatoshi with *msat*
|
||||||
appended)
|
appended)
|
||||||
- *address*
|
- *address*
|
||||||
|
- *scriptpubkey* (the ScriptPubkey of the output, in hex)
|
||||||
- *status* (whether *unconfirmed*, *confirmed*, or *spent*)
|
- *status* (whether *unconfirmed*, *confirmed*, or *spent*)
|
||||||
- *reserved* (whether this is UTXO is currently reserved for an in-flight tx)
|
- *reserved* (whether this is UTXO is currently reserved for an in-flight tx)
|
||||||
|
|
||||||
|
|||||||
@@ -856,6 +856,7 @@ static void json_add_utxo(struct json_stream *response,
|
|||||||
"value", "amount_msat");
|
"value", "amount_msat");
|
||||||
|
|
||||||
if (utxo->scriptPubkey != NULL) {
|
if (utxo->scriptPubkey != NULL) {
|
||||||
|
json_add_hex_talarr(response, "scriptpubkey", utxo->scriptPubkey);
|
||||||
out = encode_scriptpubkey_to_addr(
|
out = encode_scriptpubkey_to_addr(
|
||||||
tmpctx, chainparams,
|
tmpctx, chainparams,
|
||||||
utxo->scriptPubkey);
|
utxo->scriptPubkey);
|
||||||
|
|||||||
Reference in New Issue
Block a user