Skip to content

Commit 201451b

Browse files
committed
Make getaddressinfo return solvability
1 parent 1753d21 commit 201451b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3538,6 +3538,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
35383538
" \"address\" : \"address\", (string) The bitcoin address validated\n"
35393539
" \"scriptPubKey\" : \"hex\", (string) The hex-encoded scriptPubKey generated by the address\n"
35403540
" \"ismine\" : true|false, (boolean) If the address is yours or not\n"
3541+
" \"solvable\" : true|false, (boolean) If the address is solvable by the wallet\n"
35413542
" \"iswatchonly\" : true|false, (boolean) If the address is watchonly\n"
35423543
" \"isscript\" : true|false, (boolean) If the key is a script\n"
35433544
" \"iswitness\" : true|false, (boolean) If the address is a witness address\n"
@@ -3592,6 +3593,7 @@ UniValue getaddressinfo(const JSONRPCRequest& request)
35923593
isminetype mine = IsMine(*pwallet, dest);
35933594
ret.pushKV("ismine", bool(mine & ISMINE_SPENDABLE));
35943595
ret.pushKV("iswatchonly", bool(mine & ISMINE_WATCH_ONLY));
3596+
ret.pushKV("solvable", IsSolvable(*pwallet, scriptPubKey));
35953597
UniValue detail = DescribeWalletAddress(pwallet, dest);
35963598
ret.pushKVs(detail);
35973599
if (pwallet->mapAddressBook.count(dest)) {

0 commit comments

Comments
 (0)