A high-performance Python library for generating and validating Beldex wallet addresses. This library supports primary addresses, subaddresses, and integrated addresses.
- Python 3.7+
PyNaCl(automatically installed via pip)
- Address Generation: Generate valid Beldex addresses programmatically.
- Validation: Validate Beldex addresses and identify their type (Primary, Subaddress, Integrated).
- Key Extraction: Extract public spend and view keys from addresses.
- Integrated Addresses: Support for payment IDs in integrated addresses.
- Lightweight: Zero-dependency implementation of required cryptographic functions.
Clone the repository and install it in editable mode:
git clone https://github.com/TechGoku/Beldex-address-generator-python.git
cd beldex-address-generator-python
pip install -e .You can also install directly if you have the local path:
pip install /path/to/Beldex-address-generator-pythonCheck if a string is a valid Beldex address and identify its type.
from beldex.address import address, Address, SubAddress, IntegratedAddress
addr_str = "bd..." # Your Beldex address
try:
a = address(addr_str)
print(f"Address: {a}")
print(f"Network: {a.net}")
if isinstance(a, Address):
print("Type: Primary Address")
elif isinstance(a, SubAddress):
print("Type: Subaddress")
elif isinstance(a, IntegratedAddress):
print("Type: Integrated Address")
print(f"Payment ID: {a.payment_id()}")
print(f"Public Spend Key: {a.spend_key()}")
print(f"Public View Key: {a.view_key()}")
except Exception as e:
print("❌ Invalid Beldex address")beldex.address: Core address handling and validation.beldex.seed: Seed and mnemonic generation logic.beldex.base58: Beldex-specific Base58 encoding/decoding.beldex.ed25519: Ed25519 cryptographic primitives.beldex.keccak: Keccak-256 (SHA-3) hashing implementation.