Skip to content

Beldex-Coin/python-address-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beldex Address Generator

A high-performance Python library for generating and validating Beldex wallet addresses. This library supports primary addresses, subaddresses, and integrated addresses.

📋 Requirements

  • Python 3.7+
  • PyNaCl (automatically installed via pip)

🚀 Features

  • 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.

📦 Installation

From Source

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 .

Direct via Pip (Development)

You can also install directly if you have the local path:

pip install /path/to/Beldex-address-generator-python

🛠 Usage

1. Basic Address Validation

Check 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")

🏗 Library Structure

  • 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.

About

This python library can validate and create the beldex address.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%