Skip to content

Commit 3a93690

Browse files
committed
rpc: Named arguments for wallet calls
>>> adapts bitcoin/bitcoin@37a166f
1 parent f137eca commit 3a93690

File tree

2 files changed

+181
-181
lines changed

2 files changed

+181
-181
lines changed

src/wallet/rpcdump.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ UniValue importprivkey(const JSONRPCRequest& request)
8585

8686
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4)
8787
throw std::runtime_error(
88-
"importprivkey \"pivxprivkey\" ( \"label\" rescan fStakingAddress )\n"
88+
"importprivkey \"privkey\" ( \"label\" rescan is_staking_address )\n"
8989
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n" +
9090
HelpRequiringPassphrase(pwallet) + "\n"
9191

9292
"\nArguments:\n"
93-
"1. \"pivxprivkey\" (string, required) The private key (see dumpprivkey)\n"
93+
"1. \"privkey\" (string, required) The private key (see dumpprivkey)\n"
9494
"2. \"label\" (string, optional, default=\"\") An optional label\n"
9595
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
96-
"4. fStakingAddress (boolean, optional, default=false) Whether this key refers to a (cold) staking address\n"
96+
"4. is_staking_address (boolean, optional, default=false) Whether this key refers to a (cold) staking address\n"
9797
"\nNote: This call can take minutes to complete if rescan is true, during that time, other rpc calls\n"
9898
"may report that the imported key exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.\n"
9999
"\nExamples:\n"
@@ -465,13 +465,13 @@ UniValue dumpprivkey(const JSONRPCRequest& request)
465465

466466
if (request.fHelp || request.params.size() != 1)
467467
throw std::runtime_error(
468-
"dumpprivkey \"pivxaddress\"\n"
469-
"\nReveals the private key corresponding to 'pivxaddress'.\n"
468+
"dumpprivkey \"address\"\n"
469+
"\nReveals the private key corresponding to 'address'.\n"
470470
"Then the importprivkey can be used with this output\n" +
471471
HelpRequiringPassphrase(pwallet) + "\n"
472472

473473
"\nArguments:\n"
474-
"1. \"pivxaddress\" (string, required) The pivx address for the private key\n"
474+
"1. \"address\" (string, required) The pivx address for the private key\n"
475475

476476
"\nResult:\n"
477477
"\"key\" (string) The private key\n"
@@ -1122,12 +1122,12 @@ UniValue bip38encrypt(const JSONRPCRequest& request)
11221122

11231123
if (request.fHelp || request.params.size() != 2)
11241124
throw std::runtime_error(
1125-
"bip38encrypt \"pivxaddress\" \"passphrase\"\n"
1126-
"\nEncrypts a private key corresponding to 'pivxaddress'.\n" +
1125+
"bip38encrypt \"address\" \"passphrase\"\n"
1126+
"\nEncrypts a private key corresponding to 'address'.\n" +
11271127
HelpRequiringPassphrase(pwallet) + "\n"
11281128

11291129
"\nArguments:\n"
1130-
"1. \"pivxaddress\" (string, required) The pivx address for the private key (you must hold the key already)\n"
1130+
"1. \"address\" (string, required) The pivx address for the private key (you must hold the key already)\n"
11311131
"2. \"passphrase\" (string, required) The passphrase you want the private key to be encrypted with - Valid special chars: !#$%&'()*+,-./:;<=>?`{|}~ \n"
11321132

11331133
"\nResult:\n"
@@ -1173,13 +1173,13 @@ UniValue bip38decrypt(const JSONRPCRequest& request)
11731173

11741174
if (request.fHelp || request.params.size() != 2)
11751175
throw std::runtime_error(
1176-
"bip38decrypt \"pivxaddress\" \"passphrase\"\n"
1176+
"bip38decrypt \"encrypted_key\" \"passphrase\"\n"
11771177
"\nDecrypts and then imports password protected private key.\n" +
11781178
HelpRequiringPassphrase(pwallet) + "\n"
11791179

11801180
"\nArguments:\n"
1181-
"1. \"encryptedkey\" (string, required) The encrypted private key\n"
1182-
"2. \"passphrase\" (string, required) The passphrase you want the private key to be encrypted with\n"
1181+
"1. \"encrypted_key\" (string, required) The encrypted private key\n"
1182+
"2. \"passphrase\" (string, required) The passphrase you want the private key to be encrypted with\n"
11831183

11841184
"\nResult:\n"
11851185
"\"key\" (string) The decrypted private key\n"
@@ -1249,14 +1249,14 @@ UniValue importsaplingkey(const JSONRPCRequest& request)
12491249

12501250
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
12511251
throw std::runtime_error(
1252-
"importsaplingkey \"key\" ( rescan startHeight )\n"
1252+
"importsaplingkey \"key\" ( rescan height )\n"
12531253
"\nAdds a key (as returned by exportsaplingkey) to your wallet.\n"
12541254
+ HelpRequiringPassphrase(pwallet) + "\n"
12551255

12561256
"\nArguments:\n"
12571257
"1. \"key\" (string, required) The zkey (see exportsaplingkey)\n"
12581258
"2. rescan (string, optional, default=\"whenkeyisnew\") Rescan the wallet for transactions - can be \"yes\", \"no\" or \"whenkeyisnew\"\n"
1259-
"3. startHeight (numeric, optional, default=0) Block height to start rescan from\n"
1259+
"3. height (numeric, optional, default=0) Block height to start rescan from\n"
12601260
"\nNote: This call can take minutes to complete if rescan is true.\n"
12611261

12621262
"\nResult:\n"
@@ -1351,14 +1351,14 @@ UniValue importsaplingviewingkey(const JSONRPCRequest& request)
13511351

13521352
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
13531353
throw std::runtime_error(
1354-
"importsaplingviewingkey \"vkey\" ( rescan startHeight )\n"
1354+
"importsaplingviewingkey \"vkey\" ( rescan height )\n"
13551355
"\nAdds a viewing key (as returned by exportsaplingviewingkey) to your wallet.\n"
13561356
+ HelpRequiringPassphrase(pwallet) + "\n"
13571357

13581358
"\nArguments:\n"
1359-
"1. \"vkey\" (string, required) The viewing key (see exportsaplingviewingkey)\n"
1360-
"2. rescan (string, optional, default=\"whenkeyisnew\") Rescan the wallet for transactions - can be \"yes\", \"no\" or \"whenkeyisnew\"\n"
1361-
"3. startHeight (numeric, optional, default=0) Block height to start rescan from\n"
1359+
"1. \"vkey\" (string, required) The viewing key (see exportsaplingviewingkey)\n"
1360+
"2. rescan (string, optional, default=\"whenkeyisnew\") Rescan the wallet for transactions - can be \"yes\", \"no\" or \"whenkeyisnew\"\n"
1361+
"3. height (numeric, optional, default=0) Block height to start rescan from\n"
13621362
"\nNote: This call can take minutes to complete if rescan is true.\n"
13631363

13641364
"\nResult:\n"

0 commit comments

Comments
 (0)