bip32key
The implementation of Hierarchical Deterministic (HD) wallets generator for Ethereum blockchain
Installation
Install bip32key
pip install bip32key
Usage
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
print(master_key.print())
# Get Address
print(master_key.address())
# Get Wallet Import Format
print(master_key.walletImportFormat())
# Get Finger Print
print(master_key.fingerPrint().hex())
# Get Chain Code
print(master_key.chainCode())
# Get Private Key
print(master_key.privateKey().hex())
# Get Public Key
print(master_key.publicKey().hex())
##### 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))
Example
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)
Author
# Meheret Tesfaye @meherett.
Metadata
Release files for bip32key 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bip32key-0.1.2.tar.gz | 4.9 kB | Without provenance | Details for bip32key-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bip32key-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for bip32key-0.1.2-py3-none-any.whl |
Total release size: 9.7 kB
Release files / bip32key-0.1.2.tar.gz
| Download URL | bip32key-0.1.2.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43211de55efc6e8a31d226adffae365b181897f3a862d0a487391ef5fd4f49b2
|
|
BLAKE2b-256 checksum How to use checksums |
eb217f5fe8d00661cd9ebf8e0cc69481306b57b3dcd6d0bdfd7653c7100f6b28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Release files / bip32key-0.1.2-py3-none-any.whl
| Download URL | bip32key-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc5ade792659531ec90e140089ac036b22476e4975868df29752f4bd8e2b61e4
|
|
BLAKE2b-256 checksum How to use checksums |
45547fa85a88bf9f3bfcbf4b76c46c94a465c7e1833d35592226e6bb62b2eb78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Security for bip32key 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.