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
7687f78 [wallet] Support creating a blank wallet (Andrew Chow)
Pull request description:
Alternative (kind of) to #14938
This PR adds a `blank` parameter to the `createwallet` RPC to create a wallet that has no private keys initially. `sethdseed` can then be used to make a clean wallet with a custom seed. `encryptwallet` can also be used to make a wallet that is born encrypted.
Instead of changing the version number as done in #14938, a wallet flag is used to indicate that the wallet should be blank. This flag is set at creation, and then unset when the wallet is no longer blank. A wallet becomes non-blank when a HD seed is set or anything is imported. The main change to create a blank wallet is primarily taken from #14938.
Also with this, the term "blank wallet" is used instead of "empty wallet" to avoid confusion with wallets that have balance which would also be referred to as "empty".
This is built on top of #15225 in order to fix GUI issues.
Tree-SHA512: 824d685e11ac2259a26b5ece99c67a7bda94a570cd921472c464243ee356b7734595ad35cc439b34357135df041ed9cba951e6edac194935c3a55a1dc4fcbdea
- The RPC `createwallet` now has an optional `blank` argument that can be used to create a blank wallet.
5
+
Blank wallets do not have any keys or HD seed.
6
+
They cannot be opened in software older than 0.18.
7
+
Once a blank wallet has a HD seed set (by using `sethdseed`) or private keys, scripts, addresses, and other watch only things have been imported, the wallet is no longer blank and can be opened in 0.17.x.
8
+
Encrypting a blank wallet will also set a HD seed for it.
{"wallet_name", RPCArg::Type::STR, /* opt */false, /* default_val */"", "The name for the new wallet. If this is a path, the wallet will be created at the path location."},
2587
2598
{"disable_private_keys", RPCArg::Type::BOOL, /* opt */true, /* default_val */"false", "Disable the possibility of private keys (only watchonlys are possible in this mode)."},
2599
+
{"blank", RPCArg::Type::BOOL, /* opt */true, /* default_val */"false", "Create a blank wallet. A blank wallet has no keys or HD seed. One can be set using sethdseed."},
0 commit comments