Skip to content

Instantly share code, notes, and snippets.

View RCasatta's full-sized avatar
🦎

Riccardo Casatta RCasatta

🦎
  • Italia
View GitHub Profile
@RCasatta
RCasatta / seed2keys.py
Last active May 23, 2021 09:08 — forked from kumrzz/seed2keys.py
Creates public and private keys from Electrum 2.0 seed
#!/usr/bin/env python
''' Run from "electrum/lib" directory.
ThomaxV started a discussion on https://bitcointalk.org/index.php?topic=274182.msg2939599#msg2939599
about changing the HD derivation logic in electrum 2. The below post:
http://bitcoin.stackexchange.com/questions/37013/how-to-import-a-hd-wallet-from-an-extended-private-key
confirms that the format is actually m/c/i (and not m/44'/0'/a'/c/i)
so I have altered https://gist.github.com/romanz/4b32782bfc0ff4984713 accordingly:
tested to work with keys/addresses exported from electrum 2.7.0
note Electrum has a "gap limit" of 20, so loop @ level "c" to get the next 20 addresses
'''