Browse Source

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.
keysend
Rusty Russell 5 years ago
committed by Christian Decker
parent
commit
94de18ace7
  1. 2
      doc/lightning-listfunds.7
  2. 1
      doc/lightning-listfunds.7.md
  3. 1
      wallet/walletrpc.c

2
doc/lightning-listfunds.7

@ -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)

1
doc/lightning-listfunds.7.md

@ -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)

1
wallet/walletrpc.c

@ -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);

Loading…
Cancel
Save