Skip to content

hd bip44 python implementation support btc eth neo ont

Notifications You must be signed in to change notification settings

Constellation-Labs/PYBIP44

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BTC Ethereum NEO ONT BIP44 Python

Reference resources:

Requirements

Python version: 3.6

Install dependence packages:

pip install -r requirements.txt

Usage

master key creation from system entropy

from pybip44 import HDPrivateKey
master_key, mnemonic = HDPrivateKey.master_key_from_entropy()
print('BIP32 Wallet Generated.')
print('Mnemonic Secret: ' + mnemonic)

BTC

master_key = HDPrivateKey.master_key_from_mnemonic('your mnemonic', 'btc')
root_key = HDPrivateKey.from_path(master_key,"m/44'/0'/0'")

ETH

master_key = HDPrivateKey.master_key_from_mnemonic('your mnemonic', 'eth')
root_key = HDPrivateKey.from_path(master_key,"m/44'/60'/0'")

NEO

master_key = HDPrivateKey.master_key_from_mnemonic('your mnemonic', 'neo')
root_key = HDPrivateKey.from_path(master_key,"m/44'/888'/0'")

ONT

master_key = HDPrivateKey.master_key_from_mnemonic('your mnemonic', 'ont')
root_key = HDPrivateKey.from_path(master_key,"m/44'/1024'/0'")

Comman Accounts creation

for i in range(10):
    print("Index %s:" % i)

    hd_private_key = HDPrivateKey.from_path(root_key,'{change}/{index}'.format(change=0, index=i))
    print("private key int:", int(hd_private_key))
    print("private key hex:", hd_private_key.to_hex())

    hd_public_key = hd_private_key.public_key
    print("public key:", hd_public_key.to_hex(compressed=True))
    print("address:" + hd_public_key.address)

About

hd bip44 python implementation support btc eth neo ont

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%