Post
Topic
Board Bitcoin Technical Support
Re: Restoring wallet.dat to Bitcoin core client on Macbook
by
nc50lc
on 30/03/2024, 06:46:44 UTC
So I need to extract the private keys from this file and import them into Electrum. Can I import multiple private keys at once in Electrum?
Yes, in Electrum's new wallet menu: "Import bitcoin address and private keys" option, you can paste multiple lines of WIF private keys.
And heads-up; if your addresses aren't legacy '1' addresses, you need to append the associated script type to each WIF private key.
When importing to Electrum, click "more info" to see those script types.

Thanks for the response. Can you please elaborate on this part?

I'm assuming dumpwallet output includes both the addresses and the corresponding private keys
There'll be more data in the dump file than that but AFAIK, some tools can remove unnecessary texts from a text file but it's out of Bitcoin's scope so you'll need to do your own research regarding that.
Or you can manually copy-paste each WIF private key to a new text file, one per line. (there's at least 2000 of them if the wallet is relatively new or loaded to newer Core client)

While you're at it, find a way to append the script type in each line as well.