Author

Topic: Importing electrum seed to bitcoin core (Read 240 times)

legendary
Activity: 3584
Merit: 5248
https://merel.mobi => buy facemasks with BTC/LTC
March 25, 2024, 02:23:15 AM
#8
Importing from electrum to bitcoin core doesn't work for me.

Code:
bitcoin-cli importprivkey "privatekey" "fromelectrum"
error code: -4
error message:
This type of wallet does not support this command

Bitcoin Core v23.2

I suppose it is because a specific wallet has to be created in bitcoin core, but I don't know how.


You're answering on a 3 year old topic i'm afraid... Nowadays, bitcoin core creates descriptor wallets by default. You can't import private keys into these wallets.
I haven't run bitcoin core in a while, but if i remember correctly, the wizard to create a new wallet in the gui allows you to create a non descriptor wallet (this is also possible from the cli). If you create such a wallet, you *should* be able to import your private keys. You should probably add a "false" at the end of your command to skip the rescan if you want to add multiple private keys, then manually start a rescan after you're done importing.

Do be carefull tough, there's a reason why by default core creates descriptor wallets nowadays. Make regular backups of your wallet to be safe!
newbie
Activity: 5
Merit: 0
February 13, 2024, 08:34:23 AM
#7
Importing from electrum to bitcoin core doesn't work for me.

Code:
bitcoin-cli importprivkey "privatekey" "fromelectrum"
error code: -4
error message:
This type of wallet does not support this command

Bitcoin Core v23.2

I suppose it is because a specific wallet has to be created in bitcoin core, but I don't know how.
legendary
Activity: 3584
Merit: 5248
https://merel.mobi => buy facemasks with BTC/LTC
March 01, 2021, 02:07:19 AM
#6
So, the walktrough is perfectly valid IF you're planning to migrate from electrum to core, and never use electrum again...

I don't want to be presumptive, but I'm almost sure what mocacinno meant is that you should not use Electrum with the same wallet again.  You can still use both, but his warning is valid if you plan to keep using the same wallet in both clients.


exactly Smiley
yeah, i did not mean that the OP could never use electrum again, just not the wallet he tried to export from electrum to core Smiley

I don't want to go on a tangent, and I think the answers given are the best method for the OP, but this brings up another question that isn't at all off topic; in this post HCP discusses using a tool designed to convert a mnemonic seed to a WIF private key which can be used as an HD seed by core.

Here's a link to the tool: https://github.com/tekbe/wallet-tools

I haven't used this method myself, and I'm not promoting the tool, but I'm curious if it can be used to obtain the WIF HD seed that correlates to the Master Private Key generated by an Electrum mnemonic seed.

A rainy day experiment, perhaps.
I might be mistaking, but i think that tool converts a mnemonic to a seed, but the result of using the mnemonic into electrum and using said mnemonic together with this tool to create a seed will result in two completely different wallets... Not 100% sure tough.

Simply put: it's a tool to make simpler backups of your core wallet (since we're all used to backup seed phrases by now), but using electrum's seed with this tool and importing the output into core is not the same as restoring an electrum wallet into core.
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
February 26, 2021, 07:41:24 PM
#5
So, the walktrough is perfectly valid IF you're planning to migrate from electrum to core, and never use electrum again...

I don't want to be presumptive, but I'm almost sure what mocacinno meant is that you should not use Electrum with the same wallet again.  You can still use both, but his warning is valid if you plan to keep using the same wallet in both clients.


I don't want to go on a tangent, and I think the answers given are the best method for the OP, but this brings up another question that isn't at all off topic; in this post HCP discusses using a tool designed to convert a mnemonic seed to a WIF private key which can be used as an HD seed by core.

Here's a link to the tool: https://github.com/tekbe/wallet-tools

I haven't used this method myself, and I'm not promoting the tool, but I'm curious if it can be used to obtain the WIF HD seed that correlates to the Master Private Key generated by an Electrum mnemonic seed.

A rainy day experiment, perhaps.
legendary
Activity: 3584
Merit: 5248
https://merel.mobi => buy facemasks with BTC/LTC
February 26, 2021, 03:46:23 AM
#4
It's important to note that, following the walktrough to export private keys from electrum and importing them into bitcoin core, you will only export private keys that are currently derived from the xprv. It's possible unused addresses's private keys are also exported, but defenatly not past the gap limit (you should check this for yourself)

This basically means that: if you follow this tutorial AND keep using electrum and core seperately, there'll be a point where your bitcoin core wallet will no longer have all private keys that are derived by electrum, and your core and electrum will diverge. Also, when creating a new address in core, this address will not be managed by electrum!

So, the walktrough is perfectly valid IF you're planning to migrate from electrum to core, and never use electrum again... It's not valid if you plan on using electrum and core next to eachother. By the way: don't forget to make backups from your core wallet...
legendary
Activity: 2296
Merit: 2892
#SWGT CERTIK Audited
February 26, 2021, 03:40:43 AM
#3
In Electrum, select the Wallet menu -> Private keys -> Export. You will get the private key of all addresses in your wallet at Electrum.





In Bitcoin Core, Open the Bitcoin Core Console (Window menu -> Console); in the input field, type importprivkey "privkey". Then the (Wallet) Rescanning window will appear.

Code:
importprivkey Kxq****************************************

-snip-


If you want to import more than 1 Private Key, use the 'false' argument in the first 'importprivkey' command and so on, then in the last 'importprivkey', don't use the 'false' argument, example:

Code:
importprivkey "PrivateKey_1" "label" false
Code:
importprivkey "PrivateKey_2" "label" false
Code:
importprivkey "PrivateKey_3" "label"

Then the Blockchain rescanning process runs after the last private key is imported.

legendary
Activity: 3472
Merit: 10611
February 25, 2021, 11:33:41 PM
#2
Since bitcoin core does not use/accept mnemonics your only option is to work with individual private keys. You should use your Electrum wallet to export the keys not any other tool (like a converter). Go to your Addresses tab (if it is not visible, enable it from your menu under View) then right click on any address you want and select Private key option.

Then you'll have to use the importprivkey option in bitcoincore to import each key.
https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/importprivkey/

If you have more than one key use the importmulti option
https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/importmulti/

Keep in mind that bitcoin core has to rescan the entire blockchain each time you import a new key and it takes a very long time to do so.
newbie
Activity: 1
Merit: 1
February 25, 2021, 08:11:49 PM
#1
Hi, so as the title says, I would like to know how to import my private keys to bitcoin core, I guess I should first open my seed on electrum, or maybe use a mnomic seed converter, but I'm not sure and I wanna do it securely, can anyone please help me ?
Jump to: