|
|
@ -3743,6 +3743,34 @@ UniValue z_getnewaddress(const UniValue& params, bool fHelp, const CPubKey& mypk |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
UniValue z_listnullifiers(const UniValue& params, bool fHelp, const CPubKey& mypk) |
|
|
|
{ |
|
|
|
if (!EnsureWalletIsAvailable(fHelp)) |
|
|
|
return NullUniValue; |
|
|
|
|
|
|
|
if (fHelp || params.size() > 1) |
|
|
|
throw runtime_error( |
|
|
|
"z_listaddresses ( includeWatchonly )\n" |
|
|
|
"\nReturns the list of Sprout and Sapling shielded addresses belonging to the wallet.\n" |
|
|
|
"\nArguments:\n" |
|
|
|
"1. includeWatchonly (bool, optional, default=false) Also include watchonly addresses (see 'z_importviewingkey')\n" |
|
|
|
"\nResult:\n" |
|
|
|
"[ (json array of string)\n" |
|
|
|
" \"zaddr\" (string) a zaddr belonging to the wallet\n" |
|
|
|
" ,...\n" |
|
|
|
"]\n" |
|
|
|
"\nExamples:\n" |
|
|
|
+ HelpExampleCli("z_listaddresses", "") |
|
|
|
+ HelpExampleRpc("z_listaddresses", "") |
|
|
|
); |
|
|
|
|
|
|
|
LOCK2(cs_main, pwalletMain->cs_wallet); |
|
|
|
UniValue ret(UniValue::VARR); |
|
|
|
for (auto nullifier: Nullifiers){ |
|
|
|
ret.push_back(EncodePaymentAddress(addr)); |
|
|
|
} |
|
|
|
return ret; |
|
|
|
} |
|
|
|
|
|
|
|
UniValue z_listaddresses(const UniValue& params, bool fHelp, const CPubKey& mypk) |
|
|
|
{ |
|
|
@ -3752,7 +3780,7 @@ UniValue z_listaddresses(const UniValue& params, bool fHelp, const CPubKey& mypk |
|
|
|
if (fHelp || params.size() > 1) |
|
|
|
throw runtime_error( |
|
|
|
"z_listaddresses ( includeWatchonly )\n" |
|
|
|
"\nReturns the list of Sprout and Sapling shielded addresses belonging to the wallet.\n" |
|
|
|
"\nReturns the list of Sapling shielded addresses belonging to the wallet.\n" |
|
|
|
"\nArguments:\n" |
|
|
|
"1. includeWatchonly (bool, optional, default=false) Also include watchonly addresses (see 'z_importviewingkey')\n" |
|
|
|
"\nResult:\n" |
|
|
|