hd-tools for bitcoin and bitcoin-test
Project description
hdtools
HD Tools for cyrptocurrencies like BTC, and BTCt base on mcdallas/cryptotools.
Requirements
- Create an virtualenv:
virtualenv -p python3 .env
- Install requirements:
pip install -r requirements
- Use library:
from hdtools.extended_keys import * private_key = XPrv.from_mnemonic('mnemonic phrase') private_key.encode()
How to install
pip install hdtools
Examples
Create HD Wallets
>>> from hdtools.extended_keys import *
>>> M = XPrv.from_mnemonic('lemon child success once board usual cigar buffalo video cheese kitten onion build axis dose')
>>> M.encode()
b'xprv9s21ZrQH143K38p5ouMV2qFYest2F3uRQC51JPLqsdi8Lh1rkXUJRUy1m7rd5TvooJn6gerthNmntuJag6e73mrf8GmG96Ua8rpayQtUEsL'
Address Generation
>>> (M/44./0./0./0/0).address('P2PKH') # BIP44
b'1DgEh5Y6NioqaxHBBc2puDYq6SvG5NDsG9'
>>> (M/49./0./0./0/0).address('P2WPKH-P2SH') # BIP49
b'39Qn8kHG6h7zv1Fh1iwjjyeRibx7gHTq1Z'
>>> (M/84./0./0./0/0).address('P2WPKH') # BIP84
'bc1qrxxtlul9j3p95wrt33zg7vdf74skujnhnghaey'
Run tests
python3 -m uninttest
Run setup.py
python setup.py sdist bdist_wheel
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
hdtools-0.1.5.tar.gz
(13.6 kB
view details)
Built Distribution
hdtools-0.1.5-py3-none-any.whl
(17.0 kB
view details)
File details
Details for the file hdtools-0.1.5.tar.gz
.
File metadata
- Download URL: hdtools-0.1.5.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0cd0175300ce88b3d27c9439021e1ffa33951ab8238a2bae5185fdec2685c65 |
|
MD5 | 6eb7f90511d896be02de897d91a7995a |
|
BLAKE2b-256 | 503e489329f0ac9f7870050c31be9a2ee01a99420bf74e1652b919bb2ce989d1 |
File details
Details for the file hdtools-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: hdtools-0.1.5-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93cd2947c345d013ba08496f5b6b39b8812dc3680b100a10c1c3282c215a55c0 |
|
MD5 | 37cb39bb7d46051b65cea9cbf14a63a2 |
|
BLAKE2b-256 | 688d17090ee74026d33f06584133ffcfe680d963c5262d2dbc4b5d7243965ec1 |