0

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
...
3
  • 1
    bitcoin-cli createwallet creates a descriptor wallet by default, whereas the dumpwallet 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 the hdseed?
    – josie
    Feb 14 at 13:45
  • There should be a way to extract the seed or master key from these descriptor wallets. Otherwise how can I make a backup or a public key only wallet in another device? Feb 14 at 18:38
  • Descriptors do allow backups, public key (watch-only) wallets, and importing to other devices, but they do so in a different way than just moving an hdseed around. Take a look at the linked answer for more information on how descriptors work
    – josie
    Feb 15 at 9:30

0

Browse other questions tagged or ask your own question.