Moving wallet from Electrum to Core

4 replies 316 views
jake_lordMember
Posts: 30 · Reputation: 136
#1Aug 26, 2023, 06:07 AM
Hey guys, I’m trying to bring my wallet from Electrum over to Bitcoin Core. I’ve already exported the private key from Electrum. But whenever I use the command importprivkey 'privatekeyfromelextrum', I keep getting an error saying that only legacy wallets can use this command... Any tips or help would be appreciated!
5 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#2Aug 27, 2023, 08:41 AM
Use importdescriptors command followed by the descriptor containing your WIF private key with checksum and timestamp. For example (native SegWit): To get the correct checksum, use the command, getdescriptorinfo. For example: If your address is legacy from old version of Electrum, replace "wpkh" with "pkh". The importprivkey command will work if you create a non-descriptor wallet but Bitcoin Core will soon drop support for such wallet format so it's better to learn those descriptor wallet-comaptible commands.
4 Reply Quote Share
king_tokenFull Member
Posts: 26 · Reputation: 293
#3Aug 27, 2023, 11:29 AM
nc50lc has already provided a great answer to your question. I just wanted to add that the official Bitcoin Core documentation offers comprehensive insights into commands, usage, and wallet management. You can access it here: https://bitcoincore.org/en/doc/
2 Reply Quote Share
jake_lordMember
Posts: 30 · Reputation: 136
#4Aug 27, 2023, 04:05 PM
The private key appears to be a p2pkh.  Does that change anything? This wallet was originally a Zelcore wallet that exports the private keys is WIF format. Thank you!
2 Reply Quote Share
jake.chainSenior Member
Posts: 280 · Reputation: 1307
#5Aug 27, 2023, 09:08 PM
Private keys don't specify a script type, but if you want to recover a P2PKH address beginning with "1", then just change from wpkh to pkh in nc50lc's instructions above. Run getdescriptorinfo to get the checksum, then importdescriptors with the calculated checksum.
6 Reply Quote Share

Related topics