@@ -83,18 +83,25 @@ UniValue importprivkey(const UniValue& params, bool fHelp)
8383 if (fHelp || params.size () < 1 || params.size () > 3 )
8484 throw runtime_error (
8585 " importprivkey \" pivxprivkey\" ( \" label\" rescan )\n "
86- " \n Adds a private key (as returned by dumpprivkey) to your wallet.\n "
86+ " \n Adds a private key (as returned by dumpprivkey) to your wallet.\n " +
87+ HelpRequiringPassphrase () + " \n "
88+
8789 " \n Arguments:\n "
8890 " 1. \" pivxprivkey\" (string, required) The private key (see dumpprivkey)\n "
8991 " 2. \" label\" (string, optional, default=\"\" ) An optional label\n "
9092 " 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n "
93+
9194 " \n Note: This call can take minutes to complete if rescan is true.\n "
95+
9296 " \n Examples:\n "
9397 " \n Dump a private key\n " +
9498 HelpExampleCli (" dumpprivkey" , " \" myaddress\" " ) +
95- " \n Import the private key with rescan\n " + HelpExampleCli (" importprivkey" , " \" mykey\" " ) +
96- " \n Import using a label and without rescan\n " + HelpExampleCli (" importprivkey" , " \" mykey\" \" testing\" false" ) +
97- " \n As a JSON-RPC call\n " + HelpExampleRpc (" importprivkey" , " \" mykey\" , \" testing\" , false" ));
99+ " \n Import the private key with rescan\n " +
100+ HelpExampleCli (" importprivkey" , " \" mykey\" " ) +
101+ " \n Import using a label and without rescan\n " +
102+ HelpExampleCli (" importprivkey" , " \" mykey\" \" testing\" false" ) +
103+ " \n As a JSON-RPC call\n " +
104+ HelpExampleRpc (" importprivkey" , " \" mykey\" , \" testing\" , false" ));
98105
99106 LOCK2 (cs_main, pwalletMain->cs_wallet );
100107
@@ -151,16 +158,21 @@ UniValue importaddress(const UniValue& params, bool fHelp)
151158 throw runtime_error (
152159 " importaddress \" address\" ( \" label\" rescan )\n "
153160 " \n Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend.\n "
161+
154162 " \n Arguments:\n "
155163 " 1. \" address\" (string, required) The address\n "
156164 " 2. \" label\" (string, optional, default=\"\" ) An optional label\n "
157165 " 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n "
166+
158167 " \n Note: This call can take minutes to complete if rescan is true.\n "
168+
159169 " \n Examples:\n "
160170 " \n Import an address with rescan\n " +
161171 HelpExampleCli (" importaddress" , " \" myaddress\" " ) +
162- " \n Import using a label without rescan\n " + HelpExampleCli (" importaddress" , " \" myaddress\" \" testing\" false" ) +
163- " \n As a JSON-RPC call\n " + HelpExampleRpc (" importaddress" , " \" myaddress\" , \" testing\" , false" ));
172+ " \n Import using a label without rescan\n " +
173+ HelpExampleCli (" importaddress" , " \" myaddress\" \" testing\" false" ) +
174+ " \n As a JSON-RPC call\n " +
175+ HelpExampleRpc (" importaddress" , " \" myaddress\" , \" testing\" , false" ));
164176
165177 LOCK2 (cs_main, pwalletMain->cs_wallet );
166178
@@ -216,14 +228,19 @@ UniValue importwallet(const UniValue& params, bool fHelp)
216228 if (fHelp || params.size () != 1 )
217229 throw runtime_error (
218230 " importwallet \" filename\"\n "
219- " \n Imports keys from a wallet dump file (see dumpwallet).\n "
231+ " \n Imports keys from a wallet dump file (see dumpwallet).\n " +
232+ HelpRequiringPassphrase () + " \n "
233+
220234 " \n Arguments:\n "
221235 " 1. \" filename\" (string, required) The wallet file\n "
236+
222237 " \n Examples:\n "
223238 " \n Dump the wallet\n " +
224239 HelpExampleCli (" dumpwallet" , " \" test\" " ) +
225- " \n Import the wallet\n " + HelpExampleCli (" importwallet" , " \" test\" " ) +
226- " \n Import using the json rpc call\n " + HelpExampleRpc (" importwallet" , " \" test\" " ));
240+ " \n Import the wallet\n " +
241+ HelpExampleCli (" importwallet" , " \" test\" " ) +
242+ " \n Import using the json rpc call\n " +
243+ HelpExampleRpc (" importwallet" , " \" test\" " ));
227244
228245 LOCK2 (cs_main, pwalletMain->cs_wallet );
229246
@@ -315,11 +332,15 @@ UniValue dumpprivkey(const UniValue& params, bool fHelp)
315332 throw runtime_error (
316333 " dumpprivkey \" pivxaddress\"\n "
317334 " \n Reveals the private key corresponding to 'pivxaddress'.\n "
318- " Then the importprivkey can be used with this output\n "
335+ " Then the importprivkey can be used with this output\n " +
336+ HelpRequiringPassphrase () + " \n "
337+
319338 " \n Arguments:\n "
320339 " 1. \" pivxaddress\" (string, required) The pivx address for the private key\n "
340+
321341 " \n Result:\n "
322342 " \" key\" (string) The private key\n "
343+
323344 " \n Examples:\n " +
324345 HelpExampleCli (" dumpprivkey" , " \" myaddress\" " ) + HelpExampleCli (" importprivkey" , " \" mykey\" " ) + HelpExampleRpc (" dumpprivkey" , " \" myaddress\" " ));
325346
@@ -346,9 +367,12 @@ UniValue dumpwallet(const UniValue& params, bool fHelp)
346367 if (fHelp || params.size () != 1 )
347368 throw runtime_error (
348369 " dumpwallet \" filename\"\n "
349- " \n Dumps all wallet keys in a human-readable format.\n "
370+ " \n Dumps all wallet keys in a human-readable format.\n " +
371+ HelpRequiringPassphrase () + " \n "
372+
350373 " \n Arguments:\n "
351374 " 1. \" filename\" (string, required) The filename\n "
375+
352376 " \n Examples:\n " +
353377 HelpExampleCli (" dumpwallet" , " \" test\" " ) + HelpExampleRpc (" dumpwallet" , " \" test\" " ));
354378
@@ -405,14 +429,20 @@ UniValue bip38encrypt(const UniValue& params, bool fHelp)
405429{
406430 if (fHelp || params.size () != 2 )
407431 throw runtime_error (
408- " bip38encrypt \" pivxaddress\"\n "
409- " \n Encrypts a private key corresponding to 'pivxaddress'.\n "
432+ " bip38encrypt \" pivxaddress\" \" passphrase\"\n "
433+ " \n Encrypts a private key corresponding to 'pivxaddress'.\n " +
434+ HelpRequiringPassphrase () + " \n "
435+
410436 " \n Arguments:\n "
411437 " 1. \" pivxaddress\" (string, required) The pivx address for the private key (you must hold the key already)\n "
412438 " 2. \" passphrase\" (string, required) The passphrase you want the private key to be encrypted with - Valid special chars: !#$%&'()*+,-./:;<=>?`{|}~ \n "
439+
413440 " \n Result:\n "
414441 " \" key\" (string) The encrypted private key\n "
415- " \n Examples:\n " );
442+
443+ " \n Examples:\n " +
444+ HelpExampleCli (" bip38encrypt" , " \" DMJRSsuU9zfyrvxVaAEFQqK4MxZg6vgeS6\" \" mypasphrase\" " ) +
445+ HelpExampleRpc (" bip38encrypt" , " \" DMJRSsuU9zfyrvxVaAEFQqK4MxZg6vgeS6\" \" mypasphrase\" " ));
416446
417447 LOCK2 (cs_main, pwalletMain->cs_wallet );
418448
@@ -445,15 +475,20 @@ UniValue bip38decrypt(const UniValue& params, bool fHelp)
445475{
446476 if (fHelp || params.size () != 2 )
447477 throw runtime_error (
448- " bip38decrypt \" pivxaddress\"\n "
449- " \n Decrypts and then imports password protected private key.\n "
478+ " bip38decrypt \" pivxaddress\" \" passphrase\"\n "
479+ " \n Decrypts and then imports password protected private key.\n " +
480+ HelpRequiringPassphrase () + " \n "
481+
450482 " \n Arguments:\n "
451483 " 1. \" encryptedkey\" (string, required) The encrypted private key\n "
452484 " 2. \" passphrase\" (string, required) The passphrase you want the private key to be encrypted with\n "
453485
454486 " \n Result:\n "
455487 " \" key\" (string) The decrypted private key\n "
456- " \n Examples:\n " );
488+
489+ " \n Examples:\n " +
490+ HelpExampleCli (" bip38decrypt" , " \" encryptedkey\" \" mypassphrase\" " ) +
491+ HelpExampleRpc (" bip38decrypt" , " \" encryptedkey\" \" mypassphrase\" " ));
457492
458493 LOCK2 (cs_main, pwalletMain->cs_wallet );
459494
0 commit comments