@@ -72,16 +72,17 @@ Value importprivkey(const Array& params, bool fHelp)
72
72
" \n Adds a private key (as returned by dumpprivkey) to your wallet.\n "
73
73
" \n Arguments:\n "
74
74
" 1. \" bitcoinprivkey\" (string, required) The private key (see dumpprivkey)\n "
75
- " 2. \" label\" (string, optional) an optional label\n "
75
+ " 2. \" label\" (string, optional, default= \"\" ) An optional label\n "
76
76
" 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n "
77
+ " \n Note: This call can take minutes to complete if rescan is true.\n "
77
78
" \n Examples:\n "
78
79
" \n Dump a private key\n "
79
80
+ HelpExampleCli (" dumpprivkey" , " \" myaddress\" " ) +
80
- " \n Import the private key\n "
81
+ " \n Import the private key with rescan \n "
81
82
+ HelpExampleCli (" importprivkey" , " \" mykey\" " ) +
82
- " \n Import using a label\n "
83
+ " \n Import using a label and without rescan \n "
83
84
+ HelpExampleCli (" importprivkey" , " \" mykey\" \" testing\" false" ) +
84
- " \n As a json rpc call\n "
85
+ " \n As a JSON-RPC call\n "
85
86
+ HelpExampleRpc (" importprivkey" , " \" mykey\" , \" testing\" , false" )
86
87
);
87
88
@@ -137,8 +138,21 @@ Value importaddress(const Array& params, bool fHelp)
137
138
{
138
139
if (fHelp || params.size () < 1 || params.size () > 3 )
139
140
throw runtime_error (
140
- " importaddress <address> [label] [rescan=true]\n "
141
- " Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend." );
141
+ " importaddress \" address\" ( \" label\" rescan )\n "
142
+ " \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 "
143
+ " \n Arguments:\n "
144
+ " 1. \" address\" (string, required) The address\n "
145
+ " 2. \" label\" (string, optional, default=\"\" ) An optional label\n "
146
+ " 3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n "
147
+ " \n Note: This call can take minutes to complete if rescan is true.\n "
148
+ " \n Examples:\n "
149
+ " \n Import an address with rescan\n "
150
+ + HelpExampleCli (" importaddress" , " \" myaddress\" " ) +
151
+ " \n Import using a label without rescan\n "
152
+ + HelpExampleCli (" importaddress" , " \" myaddress\" \" testing\" false" ) +
153
+ " \n As a JSON-RPC call\n "
154
+ + HelpExampleRpc (" importaddress" , " \" myaddress\" , \" testing\" , false" )
155
+ );
142
156
143
157
CScript script;
144
158
0 commit comments