Skip to main content

The implementation of Hierarchical Deterministic (HD) wallets generator for Ethereum blockchain

Project description


The implementation of Hierarchical Deterministic (HD) wallets generator for Ethereum blockchain

GitHub PyPI - Python Version


Install bip32key

pip install bip32key


Import entropy
from bip32key import BIP32KEY, BIP32KEY_HARDEN
import binascii

# Import entropy
entropy = binascii.hexlify(b"Meheret Tesfaye Batu")
master_key = BIP32KEY.fromEntropy(entropy)
Import Path
# Added master key path
master_key = master_key.fromPath("m/44'/69'/12'/5/0")
Or Import Index
# This is same with fromPath
master_key = master_key.fromIndex(44 + BIP32KEY_HARDEN)
master_key = master_key.fromIndex(69 + BIP32KEY_HARDEN)
master_key = master_key.fromIndex(12 + BIP32KEY_HARDEN)
master_key = master_key.fromIndex(5)
master_key = master_key.fromIndex(0)
Get All
# Get All Information

# Get Address
# Get Wallet Import Format
# Get Finger Print
# Get Chain Code
# Get Private Key
# Get Public Key

##### Serialized #####

# Get Private Key Hex
print(master_key.extendedKey(private=True, encoded=False).hex())
# Get Public Key Hex
print(master_key.extendedKey(private=False, encoded=False).hex())
# Get XPrivate Key Base58
print(master_key.extendedKey(private=True, encoded=True))
# Get XPublic Key Base58
print(master_key.extendedKey(private=False, encoded=True))


Metamask and MyEtherWallet uses this path/index
master_key = master_key.fromPath("m/44'/60'/0'/0/0")
master_key = master_key.fromIndex(44 + BIP32KEY_HARDEN)
master_key = master_key.fromIndex(60 + BIP32KEY_HARDEN)
master_key = master_key.fromIndex(0 + BIP32KEY_HARDEN)
master_key = master_key.fromIndex(0)
master_key = master_key.fromIndex(0)


# Meheret Tesfaye @meherett.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bip32key-0.1.2.tar.gz (4.9 kB view hashes)

Uploaded source

Built Distribution

bip32key-0.1.2-py3-none-any.whl (4.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page