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 from getnewaddress and change address from getrawchangeaddress 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.

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 as hdseed=1.

Result

null    (json null)

Examples

bitcoinevo-cli sethdseed
bitcoinevo-cli sethdseed false
bitcoinevo-cli sethdseed true "wifkey"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "sethdseed", "params": [true, "wifkey"]}' -H 'content-type: text/plain;' http://127.0.0.1:7332/