Multi-coin BIP32 (HD) wallet creation, transaction listener, creation and broadcasting
Project description
ZPyWallet
ZPyWallet is a Python-based hierarchical deterministic (HD) wallet generator and transaction manager. HD wallets allow you to generate a tree-like structure of cryptographic key pairs from a single seed phrase, providing a convenient way to manage multiple accounts or addresses securely.
ZPyWallet can generate transactions quickly, because it defers transaction validity to the broadcasting stage. It can also coordinate the creation and broadcasting of transactions to different nodes, and can decode transactions as well.
BIP32 (or HD for “hierarchical deterministic”) wallets allow you to create child wallets which can only generate public keys and don’t expose a private key to an insecure server.
This is beta software. Only use it if you know what you’re doing. There might be bugs.
Supported Python Versions
ZPyWallet currently supports CPython 3.10, 3.11, 3.12, 3.13, and 3.14.
Features
Simple BIP32 (HD) wallet creation for BTC, BCH, ETH, LTC, DASH, DOGE, and many other networks
Generate a hierarchical deterministic wallet from a mnemonic seed phrase.
Create and broadcast RBF-aware transactions to pre-defined or custom nodes
Decode existing transactions
Monitor for incoming transactions
Get the latest fee rates for mainnet networks
Derive multiple accounts or addresses from the generated wallet.
Support for popular cryptocurrencies such as Bitcoin, Ethereum, and more.
BIP32 and BIP39 compliant.
Secure key generation using the industry-standard libsecp256k1 library, resistant to side-channel attacks.
Supports generating P2WPKH (segwit) keys and bech32 addresses for supported networks
Sign and verify messages in Bitcoin-Qt and RFC2440 format
Limitations
Address types that use complex scripts such as P2WSH, P2WPKH-P2SH, and Taproot currently can only be decoded but not created.
Multisig addresses are not supported.
Transactions cannot be created with timelocks yet.
In the case of Ethereum, alternate chains (e.g. Testnet) are not supported yet.
History
ZPyWallet started out as a fork of PyWallet <https://github.com/ranaroussi/pywallet> with elements of Bitmerchant <https://github.com/sbuss/bitmerchant>, just to simply make these modules run. At the time, it was just an HD wallet generator. However, as time went by, I discovered serious bugs in both programs, such as incorrect master private key genration, and the use of ECDSA code that is vulnerable to side-channel attacks, Thus I have embarked on a complete rewrite of the codebase so that it follows crypto security best practices. And thus we arrive to the present day: A robust wallet generator that supports altcoins, segwit, sign/verify, and can be used as a backend to implement custom wallet software.
Enjoy!
Installation
Install via PiP:
$ pip install zpywallet
Or build directly:
$ git clone https://github.com/ZenulAbidin/zpywallet
$ cd zpywallet
# Developers should also run "pip install -r requirements-dev.txt"
$ python setup.py install
Example code:
Consult the documentation for up-to-date code snippets.
Contributing
Bugfixes and enhancements are welcome. Please read CONTRIBUTING.md for contributing instructions.
At the moment, I’m not accepting pull requests for new coins unless they are big and historic coins such as Tether (ERC20), BNB and XMR.
Security
This module has been hardened against various types of attacks:
Runtime dependencies are kept to an absolute minimum. Only modules that have compile-time native code are installed using pip. The rest are hardcoded directly into ZPyWallet. This prevents many kinds of supply chain attacks.
All random numbers are generated with a secure RNG. ZPyWallet does not use pseudorandom number generators.
Coincurve is using libsecp256k1, which protects keys from various power and RF frequency analysis side-channels.
NO WARRANTY
ZPyWallet is provided without any sort of warranty of any kind. Additionally, I am not responsible for damages caused by the use of this program, including but not limited to lost coins. Read the license file for full details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zpywallet-0.7.0.tar.gz.
File metadata
- Download URL: zpywallet-0.7.0.tar.gz
- Upload date:
- Size: 178.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21e0f6b073c693f63bad61e4650f2f333b0c44fd80e8d04ebcde22d211b2ba85
|
|
| MD5 |
5e066f15589dfc6ad72a6a65d8d2673f
|
|
| BLAKE2b-256 |
6e53c619c991343b60e2903b9549c26e7294db749698e7ceaaaee2c90929d941
|
File details
Details for the file zpywallet-0.7.0-py3-none-any.whl.
File metadata
- Download URL: zpywallet-0.7.0-py3-none-any.whl
- Upload date:
- Size: 200.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a7ae24a602ff9d84feab32b1cff1eb7969edec118c8c08bf57e2ba71f466918
|
|
| MD5 |
84051a216b63819ed23e427cc026baea
|
|
| BLAKE2b-256 |
5ee70804e310d82bcf033ddd3de0f075e1d8fc58d4b770db2f037fd329bcd1eb
|