You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #15006: Add option to create an encrypted wallet
662d117 Add option to create an encrypted wallet (Andrew Chow)
Pull request description:
This PR adds a new `passphrase` argument to `createwallet` which will create a wallet that is encrypted with that passphrase.
This is built on #15226 because it needs to first create an empty wallet, then encrypt the empty wallet and generate new keys that have only been stored in an encrypted state.
ACKs for commit 662d11:
laanwj:
utACK 662d117
jnewbery:
Looks great. utACK 662d117
Tree-SHA512: a53fc9a0f341eaec1614eb69abcf2d48eb4394bc89041ab69bfc05a63436ed37c65ad586c07fd37dc258ac7c7d5e4f7f93b4191407f5824bbf063b4c50894c4a
{"wallet_name", RPCArg::Type::STR, RPCArg::Optional::NO, "The name for the new wallet. If this is a path, the wallet will be created at the path location."},
2650
-
{"disable_private_keys", RPCArg::Type::BOOL, /* default */"false", "Disable the possibility of private keys (only watchonlys are possible in this mode)."},
2651
-
{"blank", RPCArg::Type::BOOL, /* default */"false", "Create a blank wallet. A blank wallet has no keys or HD seed. One can be set using sethdseed."},
2652
-
},
2653
-
RPCResult{
2644
+
const RPCHelpMan help{
2645
+
"createwallet",
2646
+
"\nCreates and loads a new wallet.\n",
2647
+
{
2648
+
{"wallet_name", RPCArg::Type::STR, RPCArg::Optional::NO, "The name for the new wallet. If this is a path, the wallet will be created at the path location."},
2649
+
{"disable_private_keys", RPCArg::Type::BOOL, /* default */"false", "Disable the possibility of private keys (only watchonlys are possible in this mode)."},
2650
+
{"blank", RPCArg::Type::BOOL, /* default */"false", "Create a blank wallet. A blank wallet has no keys or HD seed. One can be set using sethdseed."},
2651
+
{"passphrase", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Encrypt the wallet with this passphrase."},
2652
+
},
2653
+
RPCResult{
2654
2654
"{\n"
2655
2655
"\"name\" : <wallet_name>, (string) The wallet name if created successfully. If the wallet was created using a full path, the wallet_name will be the full path.\n"
2656
2656
"\"warning\" : <warning>, (string) Warning message if wallet was not loaded cleanly.\n"
0 commit comments