Bitcoin Forum

Bitcoin => Electrum => Topic started by: FTL_Ian on December 05, 2012, 11:19:25 PM



Title: How does one import private keys? (Was: Concerned about Electrum)
Post by: FTL_Ian on December 05, 2012, 11:19:25 PM
So, I have a friend who wants to use Bitcoin, but does not have enough space for the ginormous blockchain.  I have installed Electrum, but have some concerns:

Electrum does not appear to use wallet.dat.  I have tried renaming my unencrypted electrum.dat to wallet.dat and using it with the Satoshi client, but that failed.  If the electrum servers stop working, how would I be able to move my Electrum wallet to a Satoshi client, or is this impossible?  

If that is impossible, doesn't that mean that I'm held hostage by the electrum client - that it will only be useful as long as its servers stay online?

Thanks for any understanding you can offer.


Title: Re: Concerned about Electrum
Post by: flatfly on December 05, 2012, 11:24:48 PM
So, I have a friend who wants to use Bitcoin, but does not have enough space for the ginormous blockchain.  I have installed Electrum, but have some concerns:

Electrum does not appear to use wallet.dat.  I have tried renaming my unencrypted electrum.dat to wallet.dat and using it with the Satoshi client, but that failed.  If the electrum servers stop working, how would I be able to move my Electrum wallet to a Satoshi client, or is this impossible?  

If need be, you can very easily export all of your electrum addresses in WIF format (which can easily be imported into the Bitcoin-Qt client, or other clients with WIF support) using the following command:
 electrum -ak addresses


If that is impossible, doesn't that mean that I'm held hostage by the electrum client - that it will only be useful as long as its servers stay online?

Thanks for any understanding you can offer.

Servers are open source as well and anyone can set one up relatively easily. There is no "central" server or single point of failure.


Title: Re: Concerned about Electrum
Post by: FTL_Ian on December 05, 2012, 11:37:37 PM
If need be, you can very easily export all of your electrum addresses in WIF format (which can easily be imported into the Bitcoin-Qt client, or other clients with WIF support) using the following command:
 electrum -ak addresses

To where does that export them?  It seems to just display them.  How does one go from this command to having a wallet.dat?  Is this documented anywhere?

Thanks and sorry for my ignorance.


Title: Re: Concerned about Electrum
Post by: prezbo on December 06, 2012, 12:15:20 AM
If need be, you can very easily export all of your electrum addresses in WIF format (which can easily be imported into the Bitcoin-Qt client, or other clients with WIF support) using the following command:
 electrum -ak addresses

To where does that export them?  It seems to just display them.  How does one go from this command to having a wallet.dat?  Is this documented anywhere?

Thanks and sorry for my ignorance.
You can copy them and import them into whatever other software you would like to use, pretty much everything supports importing private keys. (Specifically, you can import a private key to bitcoin-qt using the importprivkey (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list) command line call)


Title: Re: Concerned about Electrum
Post by: FTL_Ian on December 06, 2012, 05:53:19 AM
running bitcoind with -importprivkey followed by the key, does not work.  Apparently it's a little more complicated.  I've tried setting up the .conf then running bitcoind with the rpcuser and pass commands followed by importprivkey and I get "error: couldn't connect to server".

I'm probably missing something obvious?

How does one use "importprivkey"?


Title: Re: How does one import private keys? (Was: Concerned about Electrum)
Post by: FTL_Ian on December 06, 2012, 06:00:26 AM
I think I'm getting somewhere... ran bitcoinqt -server then ran bitcoind importprivkey [key]

Error adding key to wallet


sounds like progress..


Title: Re: How does one import private keys? (Was: Concerned about Electrum)
Post by: FTL_Ian on December 06, 2012, 06:03:18 AM
Apparently - it was already added.  However, the bitcoins that should be there aren't showing in the total.


Title: Re: How does one import private keys? (Was: Concerned about Electrum)
Post by: Raoul Duke on December 06, 2012, 06:03:51 AM
no need to run it as a server. Use the RPC console on the Debug Window.

If bitcoins are missing do a rescan.


Title: Re: How does one import private keys? (Was: Concerned about Electrum)
Post by: FTL_Ian on December 06, 2012, 06:10:47 AM
Might help if I were using the current version that actually has the debug window.   ::)


Title: Re: How does one import private keys? (Was: Concerned about Electrum)
Post by: Raoul Duke on December 06, 2012, 06:16:46 AM
Might help if I were using the current version that actually has the debug window.   ::)

Your loss.


Title: Re: How does one import private keys? (Was: Concerned about Electrum)
Post by: FTL_Ian on December 06, 2012, 06:49:07 AM
no need to run it as a server. Use the RPC console on the Debug Window.

If bitcoins are missing do a rescan.

Got the new version did a rescan - problem solved.  Thanks!