I want to recover the hdseed for a wallet in bitcoin-core. If I create a new wallet
cli createwallet mywallet
I assume that bitcoind will generate a random hdseed for it.
But I don't see how to retrieve that hdseed, there is no gethdseed
command.
According to the documentation of sethdseed
(https://developer.bitcoin.org/reference/rpc/sethdseed.html)
I should be able to retrieve the seed with the dumpwallet
command.
The seed value can be retrieved using the dumpwallet command. It is the private key marked hdseed=1
But that doesn't work, I get an error message if I try to dump the wallet secret data.
# cli -rpcwallet=mywallet dumpwallet /tmp/mydump
error code: -4
error message:
Only legacy wallets are supported by this command
Either the documentation is wrong or I compiled with a wrong set of flags.
# cli --version
Bitcoin Core RPC client version v24.99.0-2c1fe27bf3c1
...
# cat config.log
...
$ ./configure --with-gui=no --disable-tests --prefix=/bitcoin/install
...
bitcoin-cli createwallet
creates a descriptor wallet by default, whereas thedumpwallet
command only works with legacy wallets. However, I wouldn't recommend creating legacy wallets as they are deprecated and support for them will be removed at some point in the future. Can you explain more about why you are trying to get thehdseed
?