Post
Topic
Board Bitcoin Technical Support
Merits 2 from 1 user
Re: Restoring wallet.dat to Bitcoin core client on Macbook
by
nc50lc
on 30/03/2024, 05:50:27 UTC
⭐ Merited by ABCbits (2)
Thanks for the details. My question regarding this was more about "if I just need to dumpwallet from console in Bitcoin Core, then do I really need Bitcoin core to start syncing?"

I think dumpwallet command should work even if the Bitcoin core client is not entirely synced up
Yes, dumpwallet will work eeven offline.

Can someone confirm how to import the whole wallet into Electrum instead of all the private keys one by one?
A workaround to that is only possible in the newer "descriptor wallet" that has a compatible extended public/private key at account_index.

But you old legacy wallet.dat uses "hardened addresses" which Electrum doesn't support.
For clarification, Even if your wallet is HD, you simply cannot derive the master private key to be imported to Electrum as master key because Electrum will derive addresses with unhardened derivation while your Bitcoin Core used hardened derivation to derive your private keys from it.

Quote from: privacyn3on
dumprivkey works with only one address at a time
dumpwallet should dump whole wallet. Then do I just copy paste all the private keys into Electrum to import all at once?

Which method is recommended?
Depends if you know which addresses are funded.
If you know which ones, and you can count them with your fingers (and toes), then dumpprivkey is the way.
If not, dumpwallet, then extract the private keys from the wallet dump file,
e.g.: Google search for ways to extract the texts that you want from a text file, you must only meddle with the dump file in an air-gap machine.