diff --git a/doc/lightning-listfunds.7 b/doc/lightning-listfunds.7 index 6a1629a65..21d8d0bc8 100644 --- a/doc/lightning-listfunds.7 +++ b/doc/lightning-listfunds.7 @@ -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) diff --git a/doc/lightning-listfunds.7.md b/doc/lightning-listfunds.7.md index c475d1b42..f17985e0d 100644 --- a/doc/lightning-listfunds.7.md +++ b/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* 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) diff --git a/wallet/walletrpc.c b/wallet/walletrpc.c index bf0ecc880..afbad92a9 100644 --- a/wallet/walletrpc.c +++ b/wallet/walletrpc.c @@ -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);