sethdseed
sethdseed ( newkeypool "seed" )
Sets or generates a new HD wallet seed. Non-HD wallets will not be upgraded to HD status. If the wallet is already HD, a new HD seed will be set, meaning new keys added to the keypool will be derived from this new seed.
Important: You will need to create a new wallet backup after setting the HD wallet seed.
If the wallet is encrypted, the wallet passphrase must be set using the walletpassphrase
command before proceeding.
Argument #1 – newkeypool
Type: boolean, optional, default=true
- Determines whether to flush old, unused addresses (including change addresses) from the keypool and regenerate it.
-
- If
true
, the next address fromgetnewaddress
and change address fromgetrawchangeaddress
will be derived from the new seed. - If
false
, addresses (including change addresses, if the wallet had HD Chain Split enabled) from the existing keypool will continue to be used until depleted.
- If
Argument #2 – seed
Type: string, optional, default=random seed
- The WIF private key to use as the new HD seed.
-
This seed can be retrieved using the
dumpwallet
command, where it is marked ashdseed=1
.