Author

Topic: Electrum Private Key (Read 6597 times)

legendary
Activity: 1624
Merit: 2481
March 08, 2018, 12:33:11 PM
#30
Give me please a console command to dump a privkey of a certain wallet address.

After you have generated all the addresses which have a balance,
you can use this (slightly more elegant) command to dump all the private keys which contain some coins:

Code:
dumpprivkeys( map(lambda x:x.get('address'), listunspent()) )
legendary
Activity: 3710
Merit: 1586
March 08, 2018, 06:53:43 AM
#29
it would be easier to just right click on the address on the addresses tab and choose the option to view the private key. if the addresses tab isn't visible go to view menu > show addresses.

you can search for the address on the addresses tab using ctrl+f
jr. member
Activity: 46
Merit: 1
March 08, 2018, 05:27:02 AM
#28
You need to force Electrum to generate addresses until you find the want you want...

In the console tab ("View -> Show console") try the following command:
Code:
for x in range(0, 10): print(wallet.create_new_address(False))

That will generate another 10 "receive" addresses... if you don't see the address you need/want, then try:
Code:
for x in range(0, 10): print(wallet.create_new_address(True))

That will generate another 10 "change" addresses... if you still don't see the address you need/want, then alternate between the "False" and "True" commands until you find it Wink (or change the number to 100 to bulk generate addresses! Tongue)

WOW! It worked out! Thanks for such a brilliant answer.
Give me please a console command to dump a privkey of a certain wallet address.
HCP
legendary
Activity: 2086
Merit: 4363
March 08, 2018, 03:48:23 AM
#27
You need to force Electrum to generate addresses until you find the want you want...

In the console tab ("View -> Show console") try the following command:
Code:
for x in range(0, 10): print(wallet.create_new_address(False))

That will generate another 10 "receive" addresses... if you don't see the address you need/want, then try:
Code:
for x in range(0, 10): print(wallet.create_new_address(True))

That will generate another 10 "change" addresses... if you still don't see the address you need/want, then alternate between the "False" and "True" commands until you find it Wink (or change the number to 100 to bulk generate addresses! Tongue)
jr. member
Activity: 46
Merit: 1
March 08, 2018, 03:08:39 AM
#26
Hey , guys!
Does anyone know how to export private key from Electrum OFFLINE wallet?
I can easily dump all 26 pre-generated addresses, but not the one that BTC is currently stored. Had many transaction already...
newbie
Activity: 7
Merit: 0
September 02, 2017, 03:42:16 AM
#25
So, does the export of private keys work? I click export, inter password and nothing happens. I use last version Electrum portable on Windows 10. One month ago everything worked.
HCP
legendary
Activity: 2086
Merit: 4363
August 04, 2017, 02:33:39 AM
#24
Then you don't have the correct private key(s)... When you moved all the BTC from exodus to another wallet... you should be able to see the Public Address(es) that controlled the coins that were used as input(s) to that transaction.

If the private key(s) that you are attempting to import are NOT the key(s) matching the Public Address(es) used in that transaction, then your BCC will not show up.

Also, you might like to check the input addresses here: http://blockdozer.com/insight/ or here: https://blockchair.com/bitcoin-cash/blocks and see if the BCC is still showing as being associated with the addresses.

Finally, what block did your BTC transaction get confirmed in? It needed to be in block 478559 or later.
newbie
Activity: 1
Merit: 0
August 03, 2017, 12:17:27 PM
#23
Did anybody succeed in claiming the BCC so far??

I didn´t manage to do so
Here´s what I did.

- Waited till the fork was confirmed.
- Moved all my BTC from exodus to another wallet to keep them safe (waited for at least 10 confirmations)
- exported the private key from the exodus wallet
- installed bitcoin abc -> downloaded the whole blockchain which took 24h
- imported my private exodus key via console (importprivkey)
- waited another 30mins
- there are just transactions found before august 1st
- my balance is 0 bcc

any idea what to do?
Tried electron cash as well didn´t work
HCP
legendary
Activity: 2086
Merit: 4363
July 31, 2017, 09:04:33 PM
#22
I thought electrum will support BCC and BTC at the same time and storing my bitcoin there will guarantee the safety of my assets. I only save my seed for my wallet. Is there a chance that my BTC will stuck in my electrum wallet??
No... ThomasV put support in Electrum for multiple forks... but BCC devs put replay protection in BCC network that effectively makes it IMPOSSIBLE to generate a transaction in Electrum that will broadcast on BCC network. The transactions need to be made in a different way. ThomasV does not want to include BCC funtionality in Electrum: https://electrum.org/bcc.txt

There is no chance that your BTC will be stuck in Electrum. It will continue to operate properly with BTC.

If you want to get BCC, you need to get a BCC wallet and use your seed/private keys there... but I would suggest you follow ThomasV's suggestion and move all your BTC to a new seed/private keys first, and use your OLD seed/private keys in BCC wallet (just in case BCC wallet is "bad"™ and tries to steal your seed/private keys): https://electrum.org/bcc2.txt
full member
Activity: 204
Merit: 100
July 31, 2017, 11:19:44 AM
#21
Guys , need your help urgently, please. I have downloaded electrum 2.9.0 portable for Windows(since standrat exe version crashes after launch). When i was creating a wallet i only entered password for wallet encryption, no seed, no 2fa was shown to me.
Right now, i have moved all my coins from exchange to my electrum portable wallet and i am unable to export private keys.

I tried doing Wallet -> Private Keys -> Export {enter password}, but after i enter password nothing happens. No files in my electrum wallet dir.

There are 6 different addresses for all my btc holdings. What do i do now to be safe for 1 August and to be sure i get my BCC with private keys? Do i need to download another wallet that is capable of giving me my private keys ?

I have read a warn announce about moving BTC before importing private keys to BCC wallets, thanks a lot for that tip. Is that true ? Where can i read about replay protection ?

I know of the desktop version in Linux that when you first create a wallet you always are given a random series of words, which I think is called the wallet seed, and you are asked to enter them again before the next step which is you creating a password which you will need to use when you want to do anything with the wallet. If this hasn't happened in your mobile version you will need to look into the FAQ at the Electrum site and also the section on these forums for Electrum. But you SHOULD have that seed, that series of words which allows you to recover your wallet from scratch in case you delete the wallet file.
full member
Activity: 204
Merit: 100
July 31, 2017, 11:15:10 AM
#20
- Would just keeping the current Electrum wallet that contains BTC without doing anything until situation clears in the next few days, weeks or months be a sure way not to lose any BTC ?
Assuming that your computer isn't compromised by malware etc, then yes, that would work... If you have no interest in BCC, then you don't need to do anything out of the ordinary. Your BTC will remain safe in Electrum.

And, in the, highly unlikely, event that something happens to the Electrum network, you have easy access to your private keys and can move your keys to another BTC wallet.


Thanks very much for your guidance !
My Desktop Electrum is on a Linux PC and as from now am not connecting it again to check balances or anything (had to do so a while ago today to make sure had confirmed -more than 30 confirmations- receipt of what I withdrew, ALL BTC, from exchanges). The PC will remain disconnected completely, and the wallet file is also on an usb stick and deleted in the PC itself. Of course I have nmemonic key and password on paper. Crossing my fingers...I don't care if I don't make any money fooling around with my private keys and BCC, if that entails ANY sort of risk for my BTC long term HODL HODL HODL position.
sr. member
Activity: 508
Merit: 250
In CryptoEnergy we trust
July 31, 2017, 08:24:50 AM
#19
I thought electrum will support BCC and BTC at the same time and storing my bitcoin there will guarantee the safety of my assets. I only save my seed for my wallet. Is there a chance that my BTC will stuck in my electrum wallet??
full member
Activity: 171
Merit: 100
July 31, 2017, 08:21:05 AM
#18
Guys , need your help urgently, please. I have downloaded electrum 2.9.0 portable for Windows(since standrat exe version crashes after launch). When i was creating a wallet i only entered password for wallet encryption, no seed, no 2fa was shown to me.
Right now, i have moved all my coins from exchange to my electrum portable wallet and i am unable to export private keys.

I tried doing Wallet -> Private Keys -> Export {enter password}, but after i enter password nothing happens. No files in my electrum wallet dir.

There are 6 different addresses for all my btc holdings. What do i do now to be safe for 1 August and to be sure i get my BCC with private keys? Do i need to download another wallet that is capable of giving me my private keys ?

I have read a warn announce about moving BTC before importing private keys to BCC wallets, thanks a lot for that tip. Is that true ? Where can i read about replay protection ?
sr. member
Activity: 307
Merit: 250
July 31, 2017, 06:07:06 AM
#17
After all this effort in trying to be ultra-precautious, now this: https://www.reddit.com/r/Bitcoin/comments/6qk64y/fired_up_electrum_idly_clicked_on_console_got_this/ and this: https://cointelegraph.com/news/bitcoin-wallets-trezor-electrum-issue-contradictory-statements-regarding-bitcoin-cash

Bitcoin Cash servers in Electrum! "From the official team who are managing Electrum, someone has taken the source code on GitHub and altered it to support Bitcoin Cash." Apparently, as reassurance, Electrum won't recognise Bitcoin Cash headers after the fork. On Reddit Etmetm posted this advice: "This is not a problem. Electrum 2.9 has fork detection and this cash node will not work after the fork as the headers will be refused ... Even pre-2.9 will refuse the headers of Bitcoin Cash (once difficulty is adjusted prematurely), so nothing to worry about ... In fact the author of electrumx (the most widely used server backend) has also implemented quick splitting, so the cash nodes should not appear in the server list of electrum much longer after the fork ... If you've manually connected to a node running bitcoin-abc (Bitcoin Cash) it should not accept your transaction and show an error. You'd then need to connect to a different server. Auto-connect will not keep you connected to a bitcoin-abc node post fork as the headers don't match up."

To be on the safe side, if that's possible, I'm going to manually connect to a non-Bitcoin Cash server from now on with my pre-2.9 wallet. Maybe this should be the focus of a new thread. And here's a warning to avoid installing the Electron Cash wallet on the same computer as your Electrum wallet: https://twitter.com/electrumwallet/status/891935330235973633 ... and the latest Electrum instructions on how to redeem Bitcoin Cash - July 31st: https://electrum.org/bcc2.txt ... it seems that you can safely use your seed in Electron Cash if you follow these instructions.
HCP
legendary
Activity: 2086
Merit: 4363
July 31, 2017, 06:02:43 AM
#16
- Would just keeping the current Electrum wallet that contains BTC without doing anything until situation clears in the next few days, weeks or months be a sure way not to lose any BTC ?
Assuming that your computer isn't compromised by malware etc, then yes, that would work... If you have no interest in BCC, then you don't need to do anything out of the ordinary. Your BTC will remain safe in Electrum.

And, in the, highly unlikely, event that something happens to the Electrum network, you have easy access to your private keys and can move your keys to another BTC wallet.
full member
Activity: 204
Merit: 100
July 31, 2017, 05:14:43 AM
#15
Supposing one doesn't want to take any risks at all, EVEN if they don't gain any Bitcoin Cash nor wish to risk doing any transactions with BCC at all, not even selling them to increase BTC amount.

- Would just keeping the current Electrum wallet that contains BTC without doing anything until situation clears in the next few days, weeks or months be a sure way not to lose any BTC ?
By current Electrum wallet I mean not transferring to a new wallet or anything, just having wallet as it is with the nmemonic key and password safely stored in paper ? Not doing any sending or receiving at all during that time.

This is a "minimalist strategy to keep your btc safe on Electrum on and after August 1st". Please give me your opinion/feedback, thanks.
HCP
legendary
Activity: 2086
Merit: 4363
July 30, 2017, 11:33:25 PM
#14
I'm not sure which BCC wallet I'll try to use yet, it looks like Electron Cash is still Coming Soon.
They have their github up: https://github.com/fyookball/electrum

Personally, I just copied my Bitcoin Core blockchain folder and installed a copy of BitcoinABC and set it up to use the copy of the blockchain folder. I'll probably end up pruning it to save some harddrive space Tongue
legendary
Activity: 1736
Merit: 1023
July 30, 2017, 08:42:23 PM
#13
Thanks Kolloh. Very reassuring with all the conflicting information around. I didn't want to experiment with my Bitcoin wallet with just hours to go before the BIP148 UASF/SegWit implementation and the subsequent hard fork.

So let me get this right - the sequence of securing Bitcoin Cash would be something like this:
1) After the fork install a new Electrum wallet and send all your existing BTC from your old wallet to it;
2) Install a BCC wallet (or BCH as it is now being called);
3) In your old wallet, click on the 'Wallet' tab > 'Private Keys' tab > 'Export' tab to reveal the private keys and addresses;
4) Copy and paste each private key individually and import them one-by-one into the BCC wallet using the 'Import' function;
5) Copy and paste each address individually and import them one-by-one into the BCC wallet using the 'Import' function;

or copy and paste the whole lot in one go straight into the BCC wallet, if that wallet allows it. Have I got it right?

For anyone who is interested, here's a list of links leading to wallets recognising BCC from the https://www.bitcoincash.org/ website:
Bitcoin ABC https://www.bitcoinabc.org/
Bitcoin Classic https://bitcoinclassic.com/downloads/bcc/
Bitcoin Unlimited https://www.bitcoinunlimited.info/download
Bitcoin XT https://bitcoinxt.software/
Electron Cash http://www.electroncash.org/
BTC.com https://wallet.btc.com/#/setup/register
Freewallet https://freewallet.org/
Coinomi https://coinomi.com/ ... and the
Ledger https://www.ledgerwallet.com/  and
Trezor https://wallet.trezor.io/#/  hard wallets

I understand Jaxx is also working on a BCC wallet http://decentral.ca/jaxx-statement-bitcoin-cash-bch/

Any recommendations for ease in importing private keys and addresses, or even any that simply use the seed words to access BCC?

Yep, those steps are accurate. Although step 5 likely won't be necessary as importing the private keys should import the corresponding addresses as well.

I'm not sure which BCC wallet I'll try to use yet, it looks like Electron Cash is still Coming Soon.
sr. member
Activity: 307
Merit: 250
July 30, 2017, 07:55:47 PM
#12
Thanks Kolloh. Very reassuring with all the conflicting information around. I didn't want to experiment with my Bitcoin wallet with just hours to go before the BIP148 UASF/SegWit implementation and the subsequent hard fork.

So let me get this right - the sequence of securing Bitcoin Cash would be something like this:
1) After the fork install a new Electrum wallet and send all your existing BTC from your old wallet to it;
2) Install a BCC wallet (or BCH as it is now being called);
3) In your old wallet, click on the 'Wallet' tab > 'Private Keys' tab > 'Export' tab to reveal the private keys and addresses;
4) Copy and paste each private key individually and import them one-by-one into the BCC wallet using the 'Import' function;
5) Copy and paste each address individually and import them one-by-one into the BCC wallet using the 'Import' function;

or copy and paste the whole lot in one go straight into the BCC wallet, if that wallet allows it. Have I got it right?

For anyone who is interested, here's a list of links leading to wallets recognising BCC from the https://www.bitcoincash.org/ website:
Bitcoin ABC https://www.bitcoinabc.org/
Bitcoin Classic https://bitcoinclassic.com/downloads/bcc/
Bitcoin Unlimited https://www.bitcoinunlimited.info/download
Bitcoin XT https://bitcoinxt.software/
Electron Cash http://www.electroncash.org/
BTC.com https://wallet.btc.com/#/setup/register
Freewallet https://freewallet.org/
Coinomi https://coinomi.com/ ... and the
Ledger https://www.ledgerwallet.com/  and
Trezor https://wallet.trezor.io/#/  hard wallets

I understand Jaxx is also working on a BCC wallet http://decentral.ca/jaxx-statement-bitcoin-cash-bch/

Any recommendations for ease in importing private keys and addresses, or even any that simply use the seed words to access BCC?
legendary
Activity: 1736
Merit: 1023
July 30, 2017, 06:22:43 PM
#11
In the event that private keys have to be used to claim BCC/BCH in a Bitcoin Cash wallet, how exactly should one proceed?
I know how to use the export private keys function in Electrum to generate unencrypted .csv, or .json files showing addresses and their associated private keys.
Does simply copying and pasting those addresses and private keys into the import function of a Bitcoin Cash wallet do the trick?
Do you import your private keys with their corresponding addresses individually, or all together?

Step-by-step, how should this be done? Expert opinion please!

You can simply copy and paste each private key to be imported into a Bitcoin Cash wallet. You would do each address individually or they might allow you to import multiple at the same time. Either way would work.

Just be sure to move your Electrum funds to a new wallet with a new seed after the fork to ensure their safety.
sr. member
Activity: 307
Merit: 250
July 30, 2017, 04:57:21 PM
#10
True, but in case of a fork electrum might only work for one of the possible bitcoin forks.

that's not true. The Electrum client will not be affected by the max block size change.

Maybe I was not clear. I was referring to the scenario where Bitcoin XT emerges as an alt different from Bitcoin, with an identical historical blockchain. In this case I would assume you (and others running Electrum servers) would have to decide which coin to follow.

Is this a wrong assumption?
It doesn't matter.  All you need is your seed; your coins are on both forks.

If a server is following the wrong chain, switch to a different server.  In the impossible situation everyone is following the wrong chain, export your private keys to another client.

However that scenario makes no sense, since your coins, from before the fork, are valid on both forks, so it really doesn't matter which fork your server is following, unless you're receiving coins more than 100 blocks after a fork.

People need to chill out, a fork isn't the end of the world some people want to make it seem.

ALERT - Claiming BCC using an Electrum wallet - only private keys might work

There has been a suggestion from a r/btc source (https://www.reddit.com/r/btc/comments/6qiak7/bcc_clients_are_listed_here/) that Bitcoin Cash (BCC/BCH) wallets might not recognise Electrum seeds i.e. private keys need to be imported into Bitcoin Cash wallets. Here's the latest advice from Electrum, which acknowledges that either seeds, or private keys will have to be used:

"BCC wallets will require you to import your seed or your private keys,
which can be exported from Electrum. Doing so will expose all your
Bitcoin funds associated with that seed to the BCC wallet you decide
to use.

Therefore, *after* the BCC fork, but *before* you enter a seed or
private key
in a BCC wallet, you should move all your funds to a new
Electrum wallet, with a new seed. You will still be able to use the
old seed or private key with BCC, because BCC has replay
protection. Wait until your funds are confirmed in your new Bitcoin
wallet, before you enter the old private key in a BCC wallet. This
will protect your BTC funds from rogue/untrusted software."


In the event that private keys have to be used to claim BCC/BCH in a Bitcoin Cash wallet, how exactly should one proceed?
I know how to use the export private keys function in Electrum to generate unencrypted .csv, or .json files showing addresses and their associated private keys.
Does simply copying and pasting those addresses and private keys into the import function of a Bitcoin Cash wallet do the trick?
Do you import your private keys with their corresponding addresses individually, or all together?

Step-by-step, how should this be done? Expert opinion please!
donator
Activity: 668
Merit: 500
June 19, 2015, 07:54:57 AM
#9
True, but in case of a fork electrum might only work for one of the possible bitcoin forks.

that's not true. The Electrum client will not be affected by the max block size change.

Maybe I was not clear. I was referring to the scenario where Bitcoin XT emerges as an alt different from Bitcoin, with an identical historical blockchain. In this case I would assume you (and others running Electrum servers) would have to decide which coin to follow.

Is this a wrong assumption?
It doesn't matter.  All you need is your seed; your coins are on both forks.

If a server is following the wrong chain, switch to a different server.  In the impossible situation everyone is following the wrong chain, export your private keys to another client.

However that scenario makes no sense, since your coins, from before the fork, are valid on both forks, so it really doesn't matter which fork your server is following, unless you're receiving coins more than 100 blocks after a fork.

People need to chill out, a fork isn't the end of the world some people want to make it seem.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
June 17, 2015, 05:23:40 AM
#8
True, but in case of a fork electrum might only work for one of the possible bitcoin forks.

that's not true. The Electrum client will not be affected by the max block size change.

Maybe I was not clear. I was referring to the scenario where Bitcoin XT emerges as an alt different from Bitcoin, with an identical historical blockchain. In this case I would assume you (and others running Electrum servers) would have to decide which coin to follow.

Is this a wrong assumption?
legendary
Activity: 1896
Merit: 1353
June 15, 2015, 04:01:24 AM
#7
True, but in case of a fork electrum might only work for one of the possible bitcoin forks.

that's not true. The Electrum client will not be affected by the max block size change.
full member
Activity: 196
Merit: 103
June 15, 2015, 02:05:06 AM
#6
Some brute CLI solutions:

Generate commands for moving all privkeys to another electrum wallet:
Code:
echo walletpassword | python electrum dumpprivkeys 2>/dev/null | grep -v WARNING | grep -v Exposing | grep -v "In particular" | grep \" |cut -d "\"" -f2 | xargs -L 1 echo python electrum importprivkey



Generate code for inserting all electrum wallet privkeys to bitcoind:
Code:
echo walletpassword | python electrum dumpprivkeys 2>/dev/null | grep -v WARNING | grep -v Exposing | grep -v "In particular" | grep \" |cut -d "\"" -f2 | xargs -L 1 echo bitcoin-cli importprivkey | awk '{print  false $0" false &&"}' | xargs | sed 's/.\{2\}$//'

Run commands from the electrum directory, and when done, simply copy the output and paste it in another terminal window. Please ensure, you're sitting in the relevant directory for electrum
copper member
Activity: 2996
Merit: 2374
June 09, 2015, 10:05:08 PM
#5
You only need to backup mnemonic seed. If you backup it, you are safe.

True, but in case of a fork electrum might only work for one of the possible bitcoin forks.

With Electrum 1.9.8. you click Wallet -> Private Keys -> Export -> "enter password" -> OK -> "read warning" -> OK -> save

It will create an unencrypted(!) .csv file with all private keys and corresponding addresses.
Although it is possible that no version of electrum will work on the "accepted" fork in the event of a fork, the private keys that will get exported will not change depending on the time that  you export them. In other words, you will incur the same output if you export the private keys today, tomorrow or 10 years from today (you will likely receive additional keys the later you export them because the chances are that you will use more addresses as time progresses, however this fact should be ignored for this argument). As a result it does not matter when you export the private keys, as if the keys are valid for the fork you wish to use, then they will always be valid regardless of when they are exported.

As you somewhat pointed out, holding an unencrypted version of your private keys is very dangerous, and many bad things can happen to them, and the risk of loss is significantly greater if you are storing an unencrypted version of your private keys somewhere (especially if you are storing them in some cloud storage service).

I would say the best practice would be to store you seed and/or backup of your wallet in a secure manner and then only export your private keys in the event that you absolutely need to.
hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
June 03, 2015, 11:23:55 AM
#4
If your wallet was generated by Electrum 2.x, an alternative to dealing with individual private keys would be export your one master private key ("xprv"), and import it into another wallet.

Unfortunately, you're limited in your other wallet options. The only one I'm aware of that this would work with is Mycelium for Android.

(How to export your xprv from Electrum: http://bitcoin.stackexchange.com/questions/36839/electrum-2-0-non-bip39-32-standardisation-complicates-matters-immensely-why/36945#36945)
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
June 03, 2015, 06:30:34 AM
#3
You only need to backup mnemonic seed. If you backup it, you are safe.

True, but in case of a fork electrum might only work for one of the possible bitcoin forks[1].

With Electrum 1.9.8. you click Wallet -> Private Keys -> Export -> "enter password" -> OK -> "read warning" -> OK -> save

It will create an unencrypted(!) .csv file with all private keys and corresponding addresses.


[1] Add for clarity: Im referring to the possible split into two distinct coins Bitcoin and Bitcoin XT here, not a fork within the same coin.
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
June 03, 2015, 06:16:25 AM
#2
You only need to backup mnemonic seed. If you backup it, you are safe.
newbie
Activity: 1
Merit: 0
June 03, 2015, 06:03:46 AM
#1
Because of the up and coming fork I want to export my private keys so I can use them on both chains and not get messed about and lose money so what is the command for exporting private keys?
Jump to: