RPC: sweepprivkeys: Accept named params for privkeys & label

This commit is contained in:
Luke Dashjr 2024-01-04 22:19:14 +00:00
parent 11d961f94a
commit c3332b58fc
2 changed files with 2 additions and 1 deletions

View File

@ -536,7 +536,7 @@ static RPCHelpMan sweepprivkeys()
return RPCHelpMan{"sweepprivkeys",
"\nSends bitcoins controlled by private key to specified destinations.\n",
{
{"options", RPCArg::Type::OBJ, RPCArg::Optional::NO, "",
{"options", RPCArg::Type::OBJ_NAMED_PARAMS, RPCArg::Optional::NO, "",
{
{"privkeys", RPCArg::Type::ARR, RPCArg::Optional::NO, "An array of WIF private key(s)",
{

View File

@ -93,6 +93,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "scanblocks", 5, "options" },
{ "scanblocks", 5, "filter_false_positives" },
{ "sweepprivkeys", 0, "options" },
{ "sweepprivkeys", 0, "privkeys" },
{ "scantxoutset", 1, "scanobjects" },
{ "addmultisigaddress", 0, "nrequired" },
{ "addmultisigaddress", 1, "keys" },