{"id":15019030,"url":"https://github.com/ebellocchia/bip_utils","last_synced_at":"2025-05-14T18:04:59.362Z","repository":{"id":37499255,"uuid":"251130186","full_name":"ebellocchia/bip_utils","owner":"ebellocchia","description":"Generation of mnemonics, seeds, private/public keys and addresses for different types of cryptocurrencies","archived":false,"fork":false,"pushed_at":"2024-11-30T17:07:58.000Z","size":5093,"stargazers_count":334,"open_issues_count":5,"forks_count":92,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-20T10:57:47.923Z","etag":null,"topics":["base58","bip32","bip39","bip44","bip49","bip84","bip86","bitcoin","cardano","cryptocurrency","dashcoin","ethereum","hd-wallet","litecoin","monero","p2sh","p2wpkh","python","slip10","substrate"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ebellocchia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-29T20:42:48.000Z","updated_at":"2025-04-06T18:26:44.000Z","dependencies_parsed_at":"2024-11-13T11:32:15.269Z","dependency_job_id":"7a89c6ff-0668-41b9-bcc1-4f71c01990f8","html_url":"https://github.com/ebellocchia/bip_utils","commit_stats":{"total_commits":1683,"total_committers":7,"mean_commits":"240.42857142857142","dds":0.008318478906714222,"last_synced_commit":"05ebc890133f135401980bb8ac0da3d9e172482f"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebellocchia%2Fbip_utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebellocchia%2Fbip_utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebellocchia%2Fbip_utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebellocchia%2Fbip_utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebellocchia","download_url":"https://codeload.github.com/ebellocchia/bip_utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198514,"owners_count":22030965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base58","bip32","bip39","bip44","bip49","bip84","bip86","bitcoin","cardano","cryptocurrency","dashcoin","ethereum","hd-wallet","litecoin","monero","p2sh","p2wpkh","python","slip10","substrate"],"created_at":"2024-09-24T19:52:47.992Z","updated_at":"2025-05-14T18:04:54.343Z","avatar_url":"https://github.com/ebellocchia.png","language":"Python","readme":"# BIP Utility Library\n\n| |\n|---|\n| [![PyPI - Version](https://img.shields.io/pypi/v/bip_utils.svg?logo=pypi\u0026label=PyPI\u0026logoColor=gold)](https://pypi.org/project/bip_utils/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/bip_utils.svg?logo=python\u0026label=Python\u0026logoColor=gold)](https://pypi.org/project/bip_utils/) [![GitHub License](https://img.shields.io/github/license/ebellocchia/bip_utils?label=License)](https://github.com/ebellocchia/bip_utils?tab=MIT-1-ov-file) |\n| [![Code Coverage](https://github.com/ebellocchia/bip_utils/actions/workflows/code-coverage.yml/badge.svg)](https://github.com/ebellocchia/bip_utils/actions/workflows/code-coverage.yml) [![Code Analysis](https://github.com/ebellocchia/bip_utils/actions/workflows/code-analysis.yml/badge.svg)](https://github.com/ebellocchia/bip_utils/actions/workflows/code-analysis.yml) [![Build \u0026 Test](https://github.com/ebellocchia/bip_utils/actions/workflows/test.yml/badge.svg)](https://github.com/ebellocchia/bip_utils/actions/workflows/test.yml) [![Test Requirements](https://github.com/ebellocchia/bip_utils/actions/workflows/test_min_reqs.yml/badge.svg)](https://github.com/ebellocchia/bip_utils/actions/workflows/test_min_reqs.yml) |\n| [![Codecov](https://img.shields.io/codecov/c/github/ebellocchia/bip_utils?label=Code%20Coverage)](https://codecov.io/gh/ebellocchia/bip_utils) [![Codacy grade](https://img.shields.io/codacy/grade/9a0c9c6a3d6444fab91f58fe8ec9e35c?label=Codacy%20Grade)](https://app.codacy.com/gh/ebellocchia/bip_utils/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade) [![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/ebellocchia/bip_utils?label=CodeFactor%20Grade)](https://www.codefactor.io/repository/github/ebellocchia/bip_utils) |\n| |\n\n## Introduction\n\nThis package allows generating mnemonics, seeds, private/public keys and addresses for different types of cryptocurrencies. In particular:\n- Mnemonic and seed generation as defined by [BIP-0039](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki)\n- Private key encryption/decryption as defined by [BIP-0038](https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki)\n- Keys derivation as defined by:\n  - [BIP-0032](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)\n  - [SLIP-0010](https://github.com/satoshilabs/slips/blob/master/slip-0010.md)\n  - [BIP32-Ed25519 (Khovratovich/Law)](https://github.com/LedgerHQ/orakolo/blob/master/papers/Ed25519_BIP%20Final.pdf)\n- Derivation of a hierarchy of keys as defined by:\n  - [BIP-0044](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki)\n  - [BIP-0049](https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki) (Bitcoin Segwit)\n  - [BIP-0084](https://github.com/bitcoin/bips/blob/master/bip-0084.mediawiki) (Bitcoin Native Segwit)\n  - [BIP-0086](https://github.com/bitcoin/bips/blob/master/bip-0086.mediawiki) (Bitcoin Taproot)\n  - [CIP-1852](https://cips.cardano.org/cips/cip1852)\n- Mnemonic and seed generation for [Substrate](https://wiki.polkadot.network/docs/learn-accounts#seed-generation) (Polkadot/Kusama ecosystem)\n- Keys derivation for [Substrate](https://wiki.polkadot.network/docs/learn-accounts#derivation-paths) (Polkadot/Kusama ecosystem, same of Polkadot-JS)\n- Keys and addresses generation for Cardano (Byron-Legacy, Byron-Icarus and Shelley, same of Ledger and AdaLite/Yoroi wallets)\n- Mnemonic and seed generation for Monero\n- Keys and addresses/subaddresses generation for Monero (same of official Monero wallet)\n- Mnemonic and seed generation for Algorand (Algorand 25-word mnemonic)\n- Mnemonic and seed generation like Electrum wallet (v1 and v2)\n- Keys derivation like Electrum wallet (v1 and v2)\n- Generation of keys from a passphrase chosen by the user (\"brainwallet\")\n\nOther implemented functionalities:\n- Parse BIP-0032 derivation paths\n- Parse Substrate derivation paths\n- Extended key serialization as defined by [SLIP-0032](https://github.com/satoshilabs/slips/blob/master/slip-0032.md)\n- Encode/Decode addresses for all the supported coins\n- Encode/Decode [WIF](https://en.bitcoin.it/wiki/Wallet_import_format)\n- Encode/Decode [base58](https://en.bitcoin.it/wiki/Base58Check_encoding#Background) and [base58 monero](https://monerodocs.org/cryptography/base58)\n- Encode/Decode [ss58](https://github.com/paritytech/substrate/wiki/External-Address-Format-(SS58))\n- Encode/Decode [bech32](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) and [bech32m](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki)\n- Encode/Decode [Bitcoin Cash bech32](https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/cashaddr.md)\n- Get token account addresses for SPL tokens (i.e. Solana tokens)\n\nPackage dependencies:\n- [cbor2](https://pypi.org/project/cbor2/) for CBOR encoding/decoding\n- [crcmod](https://pypi.org/project/crcmod/) for CRC computation\n- [pycryptodome](https://pypi.org/project/pycryptodome/) for cryptographic functions\n- [coincurve](https://pypi.org/project/coincurve/) for secp256k1 curve\n- [ecdsa](https://pypi.org/project/ecdsa/) for nist256p1 and secp256k1 curves\n- [ed25519-blake2b](https://pypi.org/project/ed25519-blake2b/) for ed25519-blake2b curve\n- [pynacl](https://pypi.org/project/PyNaCl/) for ed25519 curve\n- [py-sr25519-bindings](https://pypi.org/project/py-sr25519-bindings/) for sr25519 curve\n\nPlease note that, for the py-sr25519-bindings library, Rust is required to be installed.\n\n## Supported coins\n\nSupported BIP coins:\n- Akash Network\n- Algorand\n- Aptos\n- Arbitrum\n- Avalanche (all the 3 chains)\n- Axelar\n- Band Protocol\n- Binance Chain\n- Binance Smart Chain\n- Bitcoin (and related test net)\n- Bitcoin Cash (and related test net)\n- Bitcoin Cash Simple Ledger Protocol (and related test net)\n- BitcoinSV (and related test net)\n- Cardano (Byron-Legacy, Byron-Icarus and Shelley)\n- Celestia\n- Celo\n- Certik\n- Cosmos\n- Dash (and related test net)\n- Dogecoin (and related test net)\n- dYdX\n- eCash (and related test net)\n- Elrond (MultiversX)\n- EOS\n- Ergo (and related test net)\n- Ethereum\n- Ethereum Classic\n- Fantom Opera\n- Filecoin\n- Fetch.ai\n- Harmony One (Ethereum and Cosmos addresses)\n- Huobi Heco Chain\n- IRIS Network\n- Kava\n- Kusama (based on BIP44 and ed25519 SLIP-0010, like TrustWallet, it won't generate the same addresses of Polkadot-JS)\n- Litecoin (and related test net)\n- Metis\n- Monero (based on BIP44 and secp256k1 or ed25519 SLIP-0010, it won't generate the same addresses of the official wallets, but it supports subaddresses generation)\n- Nano\n- Near Protocol\n- NEO (legacy and N3)\n- Neutron\n- Nimiq\n- OKEx Chain (Ethereum and Cosmos addresses)\n- Ontology\n- Optimism\n- Osmosis\n- Pi Network\n- Polkadot (based on BIP44 and ed25519 SLIP-0010, like TrustWallet, it won't generate the same addresses of Polkadot-JS)\n- Polygon\n- Ripple\n- Secret Network\n- Solana\n- Stafi (Cosmos)\n- Stellar\n- Sui (only ed25519)\n- Terra\n- Tezos\n- Theta Network\n- Tron\n- VeChain\n- Verge\n- Zcash (and related test net)\n- Zilliqa\n\nSupported Substrate coins:\n- Acala\n- Bifrost\n- Chainx\n- Edgeware\n- Karura\n- Kusama\n- Moonbeam\n- Moonriver\n- Phala Network\n- Plasm Network\n- Sora\n- Stafi\n- Polkadot\n- Generic Substrate coin\n\nFor what regards Monero, it's also possible to generate the same addresses of the official wallets without using BIP44 derivation.\n\nClearly, for those coins that support Smart Contracts (e.g. Ethereum, Tron, ...), the generated keys and addresses are valid for all the related tokens.\n\n## Install the package\n\nFor 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.\\\nBy default *coincurve* will be used, but it's possible to disable it when installing.\n\nTo install the package:\n- Default installation (*coincurve* will be used for secp256k1)\n    - Using *pip*, from this directory (local):\n\n            pip install .\n\n    - Using *pip*, from PyPI:\n\n            pip install bip_utils\n\n- Alternative installation (*ecdsa* will be used for secp256k1)\n    - Using *setuptools*:\n\n            python setup.py install --coincurve=0\n\n    - Edit the file *bip_utils/ecc/conf.py* by setting `USE_COINCURVE` to `False`, then install with *pip*:\n\n            pip install .\n\n**NOTES:**\n- if you are using an Apple M1, please make sure to update *coincurve* to version 17.0.0\n- in case of problems when building the *ed25519_blake2b* library, you can try one of the prebuilt wheels [here](https://github.com/ebellocchia/bip_utils/tree/master/libs_wheels)\n\n## Test and Coverage\n\nInstall develop dependencies:\n\n    pip install -r requirements-dev.txt\n\nTo run tests:\n\n    python -m unittest discover\n\nTo run tests with coverage:\n\n    coverage run -m unittest discover\n    coverage report\n\nTo run code analysis, just execute the `analyze_code` script.\n\n## Modules description\n\n- [BIP-0039](https://github.com/ebellocchia/bip_utils/tree/master/readme/bip39.md)\n- [Algorand mnemonic](https://github.com/ebellocchia/bip_utils/tree/master/readme/algorand_mnemonic.md)\n- [Electrum mnemonic](https://github.com/ebellocchia/bip_utils/tree/master/readme/electrum_mnemonic.md)\n- [Monero mnemonic](https://github.com/ebellocchia/bip_utils/tree/master/readme/monero_mnemonic.md)\n- [BIP-0038](https://github.com/ebellocchia/bip_utils/tree/master/readme/bip38.md)\n- [BIP-0032](https://github.com/ebellocchia/bip_utils/tree/master/readme/bip32.md)\n- [BIP-0044](https://github.com/ebellocchia/bip_utils/tree/master/readme/bip44.md)\n- [Brainwallet](https://github.com/ebellocchia/bip_utils/tree/master/readme/brainwallet.md)\n- [Cardano](https://github.com/ebellocchia/bip_utils/tree/master/readme/cardano.md)\n- [Electrum](https://github.com/ebellocchia/bip_utils/tree/master/readme/electrum.md)\n- [Monero](https://github.com/ebellocchia/bip_utils/tree/master/readme/monero.md)\n- [Substrate](https://github.com/ebellocchia/bip_utils/tree/master/readme/substrate.md)\n- [Utility libraries](https://github.com/ebellocchia/bip_utils/tree/master/readme/utility_libs.md)\n\n## Documentation\n\nThe library documentation is available at [bip-utils.readthedocs.io](https://bip-utils.readthedocs.io).\n\n## Code examples\n\nFor some complete code examples (from mnemonic to keys generation), refer to the [examples](https://github.com/ebellocchia/bip_utils/tree/master/examples) folder.\n\n# Buy me a coffee\n\nYou know, I'm italian and I love drinking coffee (especially while coding 😃). So, if you'd like to buy me one:\n- BTC: `bc1qq4r9cglwzd6f2hzxvdkucmdejvr9h8me5hy0k8`\n- ERC20/BEP20: `0xf84e4898E5E10bf1fBe9ffA3EEC845e82e364b5B`\n\nThank you very much for your support.\n\n# License\n\nThis software is available under the MIT license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febellocchia%2Fbip_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febellocchia%2Fbip_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febellocchia%2Fbip_utils/lists"}