mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +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:
parent
972432d285
commit
94de18ace7
2
doc/lightning-listfunds.7
generated
2
doc/lightning-listfunds.7
generated
@ -33,6 +33,8 @@ appended)
|
||||
.IP \[bu]
|
||||
\fIaddress\fR
|
||||
.IP \[bu]
|
||||
\fIscriptpubkey\fR (the ScriptPubkey of the output, in hex)
|
||||
.IP \[bu]
|
||||
\fIstatus\fR (whether \fIunconfirmed\fR, \fIconfirmed\fR, or \fIspent\fR)
|
||||
.IP \[bu]
|
||||
\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*
|
||||
appended)
|
||||
- *address*
|
||||
- *scriptpubkey* (the ScriptPubkey of the output, in hex)
|
||||
- *status* (whether *unconfirmed*, *confirmed*, or *spent*)
|
||||
- *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");
|
||||
|
||||
if (utxo->scriptPubkey != NULL) {
|
||||
json_add_hex_talarr(response, "scriptpubkey", utxo->scriptPubkey);
|
||||
out = encode_scriptpubkey_to_addr(
|
||||
tmpctx, chainparams,
|
||||
utxo->scriptPubkey);
|
||||
|
Loading…
Reference in New Issue
Block a user