Bitcoin Forum

Bitcoin => Electrum => Topic started by: theonewhowaskazu on January 16, 2015, 04:08:14 AM



Title: Import specific deterministic address; any way to do this?
Post by: theonewhowaskazu on January 16, 2015, 04:08:14 AM
Hello lets say I have 4 addresses used on Electrum

But one is address number 1 (i.e, first one generated from this seed), another is address number 15, another is address number 100, and another is address number 2000.

I could scan for all these addresses by doing gap-limit 2000. But then synchronizing would take very long time. But in my case I know that address is 1, 15, 100, and 2000. So any way to just import those, without checking for all the other unneeded addresses 1-2000?

Thanks.


Title: Re: Import specific deterministic address; any way to do this?
Post by: Abdussamad on January 16, 2015, 05:49:54 AM
Assuming you are using electrum 1.9.8, find the file mnemonic.py and run it with your mnemonic:

Run this:

Code:
electrum getseed

It will spit out a hex number. Pass that onto pybitcoin tools and it will tell you the address specific private key which you can import into any wallet:

Code:
git clone https://github.com/vbuterin/pybitcointools
pybtctool electrum_privkey <seed in hex> <index number> 0
pybtctool electrum_privkey 484ccb566edb66c65dd0fd2e4d90ef65 0 0 #example


If you need to convert between hex encoded private keys and WIF ones just use encode_privkey. So again:

Code:
pybtctool electrum_privkey f45xxxx...xe3c  0 0  | pybtctool -s encode_privkey wif