Author

Topic: Electrum wallet to Core wallet (Read 98 times)

legendary
Activity: 2268
Merit: 18711
December 04, 2023, 08:19:16 AM
#5
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.
newbie
Activity: 6
Merit: 5
December 04, 2023, 08:02:48 AM
#4
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!
jr. member
Activity: 35
Merit: 33
December 04, 2023, 04:09:44 AM
#3
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/
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
December 04, 2023, 02:03:18 AM
#2
Use importdescriptors command followed by the descriptor containing your WIF private key with checksum and timestamp.
For example (native SegWit):
Code:
importdescriptors "[{\"desc\": \"wpkh(privatekeyfromelextrum)#checksum\", \"timestamp\":0}]"

To get the correct checksum, use the command, getdescriptorinfo.
For example:
Code:
getdescriptorinfo "wpkh(privatekeyfromelextrum)"

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.
newbie
Activity: 6
Merit: 5
December 04, 2023, 01:50:04 AM
#1
Hello, I need to import a wallet that I have in Electrum into Bitcoin Core. 

I have exported the private key from electrum. But when I try importprivkey 'privatekeyfromelextrum'. I get only legacy wallets are supported by this command....

Thanks for your help!
Jump to: