ebellocchia / bip_utils

Generation of mnemonics, seeds, private/public keys and addresses for different types of cryptocurrencies
MIT License
324 stars 86 forks source link
base58 bip32 bip39 bip44 bip49 bip84 bip86 bitcoin cardano cryptocurrency dashcoin ethereum hd-wallet litecoin monero p2sh p2wpkh python slip10 substrate

BIP Utility Library

PyPI - Version PyPI - Python Version GitHub License
Code Coverage Code Analysis Build & Test Test Requirements
Codecov Codacy grade CodeFactor Grade

Introduction

This package allows generating mnemonics, seeds, private/public keys and addresses for different types of cryptocurrencies. In particular:

Other implemented functionalities:

Package dependencies:

Please note that, for the py-sr25519-bindings library, Rust is required to be installed.

Supported coins

Supported BIP coins:

Supported Substrate coins:

For what regards Monero, it's also possible to generate the same addresses of the official wallets without using BIP44 derivation.

Clearly, for those coins that support Smart Contracts (e.g. Ethereum, Tron, ...), the generated keys and addresses are valid for all the related tokens.

Install the package

For the secp256k1 curve, it's possible to use either the coincurve or the ecdsa library. coincurve is much faster since it's a Python wrapper to the secp256k1 C library, while ecdsa is a pure Python implementation.\ By default coincurve will be used, but it's possible to disable it when installing.

To install the package:

NOTES:

Test and Coverage

Install develop dependencies:

pip install -r requirements-dev.txt

To run tests:

python -m unittest discover

To run tests with coverage:

coverage run -m unittest discover
coverage report

To run code analysis, just execute the analyze_code script.

Modules description

Documentation

The library documentation is available at bip-utils.readthedocs.io.

Code examples

For some complete code examples (from mnemonic to keys generation), refer to the examples folder.

Buy me a coffee

You know, I'm italian and I love drinking coffee (especially while coding 😃). So, if you'd like to buy me one:

Thank you very much for your support.

License

This software is available under the MIT license.