libit


Namelibit JSON
Version 5.3.6 PyPI version JSON
download
home_pagehttps://libit.readthedocs.io/
SummaryProfessional Bitcoin, Ethereum and Tron wallet generation library with support for multiple address formats
upload_time2025-07-10 09:22:54
maintainerNone
docs_urlNone
authorMmdrza
requires_python>=3.7
licenseMIT
keywords bitcoin ethereum tron cryptography wallet cryptocurrency blockchain private-key address p2pkh p2sh p2wpkh p2wsh segwit bech32
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Libit - Professional Multi-Cryptocurrency Wallet Library

[![Read the Docs](https://img.shields.io/readthedocs/libit)](https://libit.readthedocs.io 'libit documentation') [![GitHub commit check runs](https://img.shields.io/github/check-runs/pylibit/libit/main)](https://github.com/pylibit/libit)  [![GitHub last commit](https://img.shields.io/github/last-commit/pylibit/libit)](https://github.com/pylibit/libit)  [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/pylibit/libit)](https://github.com/pylibit/libit)  [![GitHub top language](https://img.shields.io/github/languages/top/pylibit/libit)](https://github.com/pylibit/libit)  [![PyPI - Downloads](https://img.shields.io/pypi/dm/libit)](https://pypi.org/project/libit/)  [![Website](https://img.shields.io/website?url=https%3A%2F%2Flibit.readthedocs.io&up_color=blue&style=plastic)](https://libit.readthedocs.io)

A professional, fast and comprehensive Python library for multi-cryptocurrency wallet generation and management. Supports **Bitcoin, Litecoin, Dogecoin, Bitcoin Cash, Dash, Ethereum, and Tron** networks with all address formats.

## Features

- **9 Cryptocurrencies**: Bitcoin, Litecoin, Dogecoin, Bitcoin Cash, Dash, Zcash, Vertcoin, Ethereum, Tron
- **All Address Types**: Legacy, Script, SegWit (where supported)  
- **Ultra-Short Function Names**: Minimal API like `btc()`, `eth()`, `valid()`, `check()`
- **Professional DataClasses**: Type-safe structure with comprehensive error handling
- **Enhanced Validation**: Auto-detect and validate all supported cryptocurrencies
- **Bulk Operations**: Generate multiple wallets efficiently
- **Secure Generation**: Cryptographically secure random key generation
- **Full Backward Compatibility**: All legacy functions still work

## Installation

```bash
pip install libit --upgrade
```

## Quick Start

### Multi-Cryptocurrency Wallet

```python
from libit import gen_key, multi_wallet

# Generate secure private key
private_key = gen_key()
# Create multi-crypto wallet
wallet = multi_wallet(private_key)
# Access different cryptocurrencies
btc = wallet.btc()      # Bitcoin
ltc = wallet.ltc()      # Litecoin  
doge = wallet.doge()    # Dogecoin
bch = wallet.bch()      # Bitcoin Cash
dash = wallet.dash()    # Dash
eth = wallet.eth()      # Ethereum
trx = wallet.trx()      # Tron

print(f"BTC Legacy: {btc.addresses.legacy}")
print(f"LTC Legacy: {ltc.addresses.legacy}")
print(f"ETH Address: {eth['address']}")
```

### Individual Coin Wallets

```python
from libit import btc_wallet, ltc_wallet, doge_wallet, eth_wallet

private_key = "your_private_key_here"
```
# Individual wallets with short function names
### Ultra-Short Function Names

Generate wallets with minimal code:

```python
from libit import btc, ltc, doge, bch, dash, zcash, vtc, eth, trx

# Auto-generate private keys and create wallets
btc_wallet = btc()
ltc_wallet = ltc()
doge_wallet = doge()
eth_wallet = eth()
trx_wallet = trx()

print(f"Bitcoin: {btc_wallet.addresses.legacy}")
print(f"Litecoin: {ltc_wallet.addresses.legacy}") 
print(f"Dogecoin: {doge_wallet.addresses.legacy}")
print(f"Ethereum: {eth_wallet['address']}")
print(f"Tron: {trx_wallet['address']}")
```

### Traditional Function Names

```python
from libit import gen_key, btc_wallet, ltc_wallet, doge_wallet, eth_wallet

# Generate with custom private key
private_key = gen_key()
btc = btc_wallet(private_key)
ltc = ltc_wallet(private_key)
doge = doge_wallet(private_key)
eth = eth_wallet(private_key)

print(f"Bitcoin: {btc.addresses.legacy}")
print(f"Litecoin: {ltc.addresses.legacy}")
print(f"Dogecoin: {doge.addresses.legacy}")
print(f"Ethereum: {eth['address']}")
```

### Address Validation

Enhanced validation with ultra-short function names:

```python
from libit import check_addr, is_valid, valid, coin_type, check

# Traditional validation
result = check_addr("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa")
print(f"Valid: {result.valid}")
print(f"Coin: {result.coin}")
print(f"Type: {result.addr_type}")

# Ultra-short validation
is_valid_addr = valid("bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4")
detected_coin = coin_type("LdP8Qox1VAhCzLJNqrr74YovaWYyNBUWvL")
quick_check = check("DQE1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa")

print(f"valid() → {is_valid_addr}")
print(f"coin_type() → {detected_coin}")  # ltc
print(f"check() → {quick_check.coin}")   # doge
```
### Bulk Wallet Generation

Generate multiple wallets efficiently:

```python
from libit import gen_wallets, gen_multi_wallets

# Generate 100 Bitcoin wallets
btc_wallets = gen_wallets(100, 'btc')
for wallet in btc_wallets[:3]:  # Show first 3
    print(f"BTC: {wallet.addresses.legacy}")

# Generate 50 Litecoin wallets  
ltc_wallets = gen_wallets(50, 'ltc')

# Generate multi-cryptocurrency wallets
multi_wallets = gen_multi_wallets(10)
for wallet in multi_wallets[:2]:  # Show first 2
    print(f"BTC: {wallet['btc']['addresses']['legacy']}")
    print(f"ETH: {wallet['eth']['address']}")
    print(f"ZEC: {wallet['zcash']['addresses']['legacy']}")
```

### Multi-Wallet Manager

Use one private key for all cryptocurrencies:

```python
from libit import multi_wallet, gen_key

# Create multi-wallet (auto-generates key)
multi = multi_wallet()

# Or use custom key
key = gen_key()
multi = multi_wallet(key)

# Access individual cryptocurrencies
btc_info = multi.btc()
ltc_info = multi.ltc()
eth_info = multi.eth()
zcash_info = multi.zcash()

# Get all supported cryptocurrencies
all_wallets = multi.all()
print(f"Generated wallets for {len(all_wallets)} cryptocurrencies")
```

## Supported Cryptocurrencies

| Coin | Symbol | Legacy | Script | SegWit | Short Function | Full Function |
|------|--------|--------|--------|--------|----------------|---------------|
| Bitcoin | BTC | ✅ (1...) | ✅ (3...) | ✅ (bc1...) | `btc()` | `btc_wallet()` |
| Litecoin | LTC | ✅ (L...) | ✅ (M...) | ✅ (ltc1...) | `ltc()` | `ltc_wallet()` |
| Dogecoin | DOGE | ✅ (D...) | ✅ (9...) | ❌ | `doge()` | `doge_wallet()` |
| Bitcoin Cash | BCH | ✅ (1...) | ✅ (3...) | ❌ | `bch()` | `bch_wallet()` |
| Dash | DASH | ✅ (X...) | ✅ (7...) | ❌ | `dash()` | `dash_wallet()` |
| Zcash | ZEC | ✅ (t1...) | ✅ (t3...) | ❌ | `zcash()` | `zcash_wallet()` |
| Vertcoin | VTC | ✅ (V...) | ✅ (3...) | ✅ (vtc1...) | `vtc()` | `vtc_wallet()` |
| Ethereum | ETH | ✅ (0x...) | ❌ | ❌ | `eth()` | `eth_wallet()` |
| Tron | TRX | ✅ (T...) | ❌ | ❌ | `trx()` | `trx_wallet()` |


## Quick API Reference

### Ultra-Short Functions

```python
from libit import btc, ltc, doge, eth, trx, valid, check, coin_type

# Generate wallets (auto-generates private keys)
btc_wallet = btc()
eth_wallet = eth()

# Validation
is_valid = valid("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa")
coin = coin_type("bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4") 
result = check("LdP8Qox1VAhCzLJNqrr74YovaWYyNBUWvL")
```

### Professional DataClasses


The library uses Python dataclasses for better structure and type safety. Each wallet function returns a structured `WalletInfo` dataclass, and validation functions return a `ValidationResult` dataclass.

```python
from libit import WalletInfo, ValidationResult, AddressSet

# All wallet functions return structured dataclasses
wallet = btc()  # Returns WalletInfo dataclass
print(wallet.addresses.legacy)  # Type-safe access
print(wallet.to_dict())  # Convert to dictionary

# Validation returns structured results
result = check("address")  # Returns ValidationResult dataclass
print(result.valid, result.coin, result.addr_type)
```
## Bulk Generation

### Bulk Generation

Generate multiple wallets efficiently:

```python
from libit import gen_wallets, gen_multi_wallets

# Generate 100 Bitcoin wallets
btc_wallets = gen_wallets(100, 'btc')

# Generate 50 Litecoin wallets
ltc_wallets = gen_wallets(50, 'ltc')

# Generate 10 multi-cryptocurrency wallets
multi_wallets = gen_multi_wallets(10)
```

## Advanced Usage

Advanced usage includes complete multi-wallet access and professional data structure:


### Complete Multi-Wallet Access

Create a multi-wallet that supports all cryptocurrencies with a single private key:

```python
from libit import multi_wallet

wallet = multi_wallet("your_private_key_here")

# Get all cryptocurrencies at once
all_coins = wallet.all_coins()

# Access specific coins
btc_info = wallet.btc()
print(f"BTC WIF: {btc_info.wif}")
print(f"BTC Decimal: {btc_info.decimal}")
print(f"Legacy: {btc_info.addresses.legacy}")
print(f"Script: {btc_info.addresses.script}")
```

### DataClass Benefits

The library uses Python dataclasses for better structure:

```python
from libit import btc_wallet

wallet = btc_wallet("private_key_here")

# Professional data structure
print(f"Network: {wallet.network}")
print(f"Compressed: {wallet.compressed}")
print(f"WIF: {wallet.wif}")

# Type-safe address access
addresses = wallet.addresses
print(f"Legacy: {addresses.legacy}")
print(f"Script: {addresses.script}")
```

## Backward Compatibility

All legacy functions continue to work:

```python
# Legacy Bitcoin class (still supported)
from libit import Bitcoin
wallet = Bitcoin("private_key")
addresses = wallet.get_all_addresses()

# Legacy functions (still supported)
from libit import privatekey_addr, generate_bitcoin_wallet
addr = privatekey_addr("private_key")
new_wallet = generate_bitcoin_wallet()

# Legacy Ethereum & Tron (still supported)
from libit import Ethereum, tron
eth = Ethereum("private_key")
trx = tron("private_key")
```

## Security Features

- **Cryptographically Secure**: Uses `secrets` module for random number generation
- **Input Validation**: Comprehensive validation of all inputs with proper error handling
- **DataClass Safety**: Type-safe data structures prevent runtime errors
- **No External Dependencies**: Minimal dependencies for maximum security
- **Professional Error Handling**: Graceful error handling with informative messages

## Testing

Run the test suite:

```bash
python -m pytest tests_enhanced.py -v
```

Or test basic functionality:

```bash
python examples_enhanced.py
```

## API Reference

### Core Functions

- `gen_key()` - Generate secure private key
- `multi_wallet(key)` - Create multi-cryptocurrency wallet
- `btc_wallet(key)` - Bitcoin wallet
- `ltc_wallet(key)` - Litecoin wallet  
- `doge_wallet(key)` - Dogecoin wallet
- `bch_wallet(key)` - Bitcoin Cash wallet
- `dash_wallet(key)` - Dash wallet
- `eth_wallet(key)` - Ethereum wallet
- `trx_wallet(key)` - Tron wallet

### Validation Functions

- `check_addr(address)` - Comprehensive address validation
- `is_valid(address)` - Quick validation check
- `get_coin_type(address)` - Auto-detect cryptocurrency
- `validate_multiple(addresses)` - Bulk validation

### Bulk Generation

- `gen_wallets(count, coin_type)` - Generate multiple wallets for specific coin
- `gen_multi_wallets(count)` - Generate multiple multi-crypto wallets

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License.

## Support

- **Documentation**: [https://pylibit.github.io/libit/](https://pylibit.github.io/libit/)
- **Issues**: [GitHub Issues](https://github.com/pylibit/libit/issues)  
- **Email**: Pymmdrza@gmail.com

---

**⚠️ Disclaimer**: This library is for educational and development purposes. Always ensure proper security practices when handling private keys and cryptocurrency assets in production environments.



            

Raw data

            {
    "_id": null,
    "home_page": "https://libit.readthedocs.io/",
    "name": "libit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Mmdrza <Pymmdrza@gmail.com>",
    "keywords": "bitcoin, ethereum, tron, cryptography, wallet, cryptocurrency, blockchain, private-key, address, p2pkh, p2sh, p2wpkh, p2wsh, segwit, bech32",
    "author": "Mmdrza",
    "author_email": "Mmdrza <Pymmdrza@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e8/5f/b091e30bb1bac1f30f35a383bab19e7b1a7215a28b3c7d4d8f32dc543173/libit-5.3.6.tar.gz",
    "platform": null,
    "description": "\n# Libit - Professional Multi-Cryptocurrency Wallet Library\n\n[![Read the Docs](https://img.shields.io/readthedocs/libit)](https://libit.readthedocs.io 'libit documentation') [![GitHub commit check runs](https://img.shields.io/github/check-runs/pylibit/libit/main)](https://github.com/pylibit/libit)  [![GitHub last commit](https://img.shields.io/github/last-commit/pylibit/libit)](https://github.com/pylibit/libit)  [![GitHub commit activity](https://img.shields.io/github/commit-activity/m/pylibit/libit)](https://github.com/pylibit/libit)  [![GitHub top language](https://img.shields.io/github/languages/top/pylibit/libit)](https://github.com/pylibit/libit)  [![PyPI - Downloads](https://img.shields.io/pypi/dm/libit)](https://pypi.org/project/libit/)  [![Website](https://img.shields.io/website?url=https%3A%2F%2Flibit.readthedocs.io&up_color=blue&style=plastic)](https://libit.readthedocs.io)\n\nA professional, fast and comprehensive Python library for multi-cryptocurrency wallet generation and management. Supports **Bitcoin, Litecoin, Dogecoin, Bitcoin Cash, Dash, Ethereum, and Tron** networks with all address formats.\n\n## Features\n\n- **9 Cryptocurrencies**: Bitcoin, Litecoin, Dogecoin, Bitcoin Cash, Dash, Zcash, Vertcoin, Ethereum, Tron\n- **All Address Types**: Legacy, Script, SegWit (where supported)  \n- **Ultra-Short Function Names**: Minimal API like `btc()`, `eth()`, `valid()`, `check()`\n- **Professional DataClasses**: Type-safe structure with comprehensive error handling\n- **Enhanced Validation**: Auto-detect and validate all supported cryptocurrencies\n- **Bulk Operations**: Generate multiple wallets efficiently\n- **Secure Generation**: Cryptographically secure random key generation\n- **Full Backward Compatibility**: All legacy functions still work\n\n## Installation\n\n```bash\npip install libit --upgrade\n```\n\n## Quick Start\n\n### Multi-Cryptocurrency Wallet\n\n```python\nfrom libit import gen_key, multi_wallet\n\n# Generate secure private key\nprivate_key = gen_key()\n# Create multi-crypto wallet\nwallet = multi_wallet(private_key)\n# Access different cryptocurrencies\nbtc = wallet.btc()      # Bitcoin\nltc = wallet.ltc()      # Litecoin  \ndoge = wallet.doge()    # Dogecoin\nbch = wallet.bch()      # Bitcoin Cash\ndash = wallet.dash()    # Dash\neth = wallet.eth()      # Ethereum\ntrx = wallet.trx()      # Tron\n\nprint(f\"BTC Legacy: {btc.addresses.legacy}\")\nprint(f\"LTC Legacy: {ltc.addresses.legacy}\")\nprint(f\"ETH Address: {eth['address']}\")\n```\n\n### Individual Coin Wallets\n\n```python\nfrom libit import btc_wallet, ltc_wallet, doge_wallet, eth_wallet\n\nprivate_key = \"your_private_key_here\"\n```\n# Individual wallets with short function names\n### Ultra-Short Function Names\n\nGenerate wallets with minimal code:\n\n```python\nfrom libit import btc, ltc, doge, bch, dash, zcash, vtc, eth, trx\n\n# Auto-generate private keys and create wallets\nbtc_wallet = btc()\nltc_wallet = ltc()\ndoge_wallet = doge()\neth_wallet = eth()\ntrx_wallet = trx()\n\nprint(f\"Bitcoin: {btc_wallet.addresses.legacy}\")\nprint(f\"Litecoin: {ltc_wallet.addresses.legacy}\") \nprint(f\"Dogecoin: {doge_wallet.addresses.legacy}\")\nprint(f\"Ethereum: {eth_wallet['address']}\")\nprint(f\"Tron: {trx_wallet['address']}\")\n```\n\n### Traditional Function Names\n\n```python\nfrom libit import gen_key, btc_wallet, ltc_wallet, doge_wallet, eth_wallet\n\n# Generate with custom private key\nprivate_key = gen_key()\nbtc = btc_wallet(private_key)\nltc = ltc_wallet(private_key)\ndoge = doge_wallet(private_key)\neth = eth_wallet(private_key)\n\nprint(f\"Bitcoin: {btc.addresses.legacy}\")\nprint(f\"Litecoin: {ltc.addresses.legacy}\")\nprint(f\"Dogecoin: {doge.addresses.legacy}\")\nprint(f\"Ethereum: {eth['address']}\")\n```\n\n### Address Validation\n\nEnhanced validation with ultra-short function names:\n\n```python\nfrom libit import check_addr, is_valid, valid, coin_type, check\n\n# Traditional validation\nresult = check_addr(\"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\")\nprint(f\"Valid: {result.valid}\")\nprint(f\"Coin: {result.coin}\")\nprint(f\"Type: {result.addr_type}\")\n\n# Ultra-short validation\nis_valid_addr = valid(\"bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4\")\ndetected_coin = coin_type(\"LdP8Qox1VAhCzLJNqrr74YovaWYyNBUWvL\")\nquick_check = check(\"DQE1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\")\n\nprint(f\"valid() \u2192 {is_valid_addr}\")\nprint(f\"coin_type() \u2192 {detected_coin}\")  # ltc\nprint(f\"check() \u2192 {quick_check.coin}\")   # doge\n```\n### Bulk Wallet Generation\n\nGenerate multiple wallets efficiently:\n\n```python\nfrom libit import gen_wallets, gen_multi_wallets\n\n# Generate 100 Bitcoin wallets\nbtc_wallets = gen_wallets(100, 'btc')\nfor wallet in btc_wallets[:3]:  # Show first 3\n    print(f\"BTC: {wallet.addresses.legacy}\")\n\n# Generate 50 Litecoin wallets  \nltc_wallets = gen_wallets(50, 'ltc')\n\n# Generate multi-cryptocurrency wallets\nmulti_wallets = gen_multi_wallets(10)\nfor wallet in multi_wallets[:2]:  # Show first 2\n    print(f\"BTC: {wallet['btc']['addresses']['legacy']}\")\n    print(f\"ETH: {wallet['eth']['address']}\")\n    print(f\"ZEC: {wallet['zcash']['addresses']['legacy']}\")\n```\n\n### Multi-Wallet Manager\n\nUse one private key for all cryptocurrencies:\n\n```python\nfrom libit import multi_wallet, gen_key\n\n# Create multi-wallet (auto-generates key)\nmulti = multi_wallet()\n\n# Or use custom key\nkey = gen_key()\nmulti = multi_wallet(key)\n\n# Access individual cryptocurrencies\nbtc_info = multi.btc()\nltc_info = multi.ltc()\neth_info = multi.eth()\nzcash_info = multi.zcash()\n\n# Get all supported cryptocurrencies\nall_wallets = multi.all()\nprint(f\"Generated wallets for {len(all_wallets)} cryptocurrencies\")\n```\n\n## Supported Cryptocurrencies\n\n| Coin | Symbol | Legacy | Script | SegWit | Short Function | Full Function |\n|------|--------|--------|--------|--------|----------------|---------------|\n| Bitcoin | BTC | \u2705 (1...) | \u2705 (3...) | \u2705 (bc1...) | `btc()` | `btc_wallet()` |\n| Litecoin | LTC | \u2705 (L...) | \u2705 (M...) | \u2705 (ltc1...) | `ltc()` | `ltc_wallet()` |\n| Dogecoin | DOGE | \u2705 (D...) | \u2705 (9...) | \u274c | `doge()` | `doge_wallet()` |\n| Bitcoin Cash | BCH | \u2705 (1...) | \u2705 (3...) | \u274c | `bch()` | `bch_wallet()` |\n| Dash | DASH | \u2705 (X...) | \u2705 (7...) | \u274c | `dash()` | `dash_wallet()` |\n| Zcash | ZEC | \u2705 (t1...) | \u2705 (t3...) | \u274c | `zcash()` | `zcash_wallet()` |\n| Vertcoin | VTC | \u2705 (V...) | \u2705 (3...) | \u2705 (vtc1...) | `vtc()` | `vtc_wallet()` |\n| Ethereum | ETH | \u2705 (0x...) | \u274c | \u274c | `eth()` | `eth_wallet()` |\n| Tron | TRX | \u2705 (T...) | \u274c | \u274c | `trx()` | `trx_wallet()` |\n\n\n## Quick API Reference\n\n### Ultra-Short Functions\n\n```python\nfrom libit import btc, ltc, doge, eth, trx, valid, check, coin_type\n\n# Generate wallets (auto-generates private keys)\nbtc_wallet = btc()\neth_wallet = eth()\n\n# Validation\nis_valid = valid(\"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\")\ncoin = coin_type(\"bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4\") \nresult = check(\"LdP8Qox1VAhCzLJNqrr74YovaWYyNBUWvL\")\n```\n\n### Professional DataClasses\n\n\nThe library uses Python dataclasses for better structure and type safety. Each wallet function returns a structured `WalletInfo` dataclass, and validation functions return a `ValidationResult` dataclass.\n\n```python\nfrom libit import WalletInfo, ValidationResult, AddressSet\n\n# All wallet functions return structured dataclasses\nwallet = btc()  # Returns WalletInfo dataclass\nprint(wallet.addresses.legacy)  # Type-safe access\nprint(wallet.to_dict())  # Convert to dictionary\n\n# Validation returns structured results\nresult = check(\"address\")  # Returns ValidationResult dataclass\nprint(result.valid, result.coin, result.addr_type)\n```\n## Bulk Generation\n\n### Bulk Generation\n\nGenerate multiple wallets efficiently:\n\n```python\nfrom libit import gen_wallets, gen_multi_wallets\n\n# Generate 100 Bitcoin wallets\nbtc_wallets = gen_wallets(100, 'btc')\n\n# Generate 50 Litecoin wallets\nltc_wallets = gen_wallets(50, 'ltc')\n\n# Generate 10 multi-cryptocurrency wallets\nmulti_wallets = gen_multi_wallets(10)\n```\n\n## Advanced Usage\n\nAdvanced usage includes complete multi-wallet access and professional data structure:\n\n\n### Complete Multi-Wallet Access\n\nCreate a multi-wallet that supports all cryptocurrencies with a single private key:\n\n```python\nfrom libit import multi_wallet\n\nwallet = multi_wallet(\"your_private_key_here\")\n\n# Get all cryptocurrencies at once\nall_coins = wallet.all_coins()\n\n# Access specific coins\nbtc_info = wallet.btc()\nprint(f\"BTC WIF: {btc_info.wif}\")\nprint(f\"BTC Decimal: {btc_info.decimal}\")\nprint(f\"Legacy: {btc_info.addresses.legacy}\")\nprint(f\"Script: {btc_info.addresses.script}\")\n```\n\n### DataClass Benefits\n\nThe library uses Python dataclasses for better structure:\n\n```python\nfrom libit import btc_wallet\n\nwallet = btc_wallet(\"private_key_here\")\n\n# Professional data structure\nprint(f\"Network: {wallet.network}\")\nprint(f\"Compressed: {wallet.compressed}\")\nprint(f\"WIF: {wallet.wif}\")\n\n# Type-safe address access\naddresses = wallet.addresses\nprint(f\"Legacy: {addresses.legacy}\")\nprint(f\"Script: {addresses.script}\")\n```\n\n## Backward Compatibility\n\nAll legacy functions continue to work:\n\n```python\n# Legacy Bitcoin class (still supported)\nfrom libit import Bitcoin\nwallet = Bitcoin(\"private_key\")\naddresses = wallet.get_all_addresses()\n\n# Legacy functions (still supported)\nfrom libit import privatekey_addr, generate_bitcoin_wallet\naddr = privatekey_addr(\"private_key\")\nnew_wallet = generate_bitcoin_wallet()\n\n# Legacy Ethereum & Tron (still supported)\nfrom libit import Ethereum, tron\neth = Ethereum(\"private_key\")\ntrx = tron(\"private_key\")\n```\n\n## Security Features\n\n- **Cryptographically Secure**: Uses `secrets` module for random number generation\n- **Input Validation**: Comprehensive validation of all inputs with proper error handling\n- **DataClass Safety**: Type-safe data structures prevent runtime errors\n- **No External Dependencies**: Minimal dependencies for maximum security\n- **Professional Error Handling**: Graceful error handling with informative messages\n\n## Testing\n\nRun the test suite:\n\n```bash\npython -m pytest tests_enhanced.py -v\n```\n\nOr test basic functionality:\n\n```bash\npython examples_enhanced.py\n```\n\n## API Reference\n\n### Core Functions\n\n- `gen_key()` - Generate secure private key\n- `multi_wallet(key)` - Create multi-cryptocurrency wallet\n- `btc_wallet(key)` - Bitcoin wallet\n- `ltc_wallet(key)` - Litecoin wallet  \n- `doge_wallet(key)` - Dogecoin wallet\n- `bch_wallet(key)` - Bitcoin Cash wallet\n- `dash_wallet(key)` - Dash wallet\n- `eth_wallet(key)` - Ethereum wallet\n- `trx_wallet(key)` - Tron wallet\n\n### Validation Functions\n\n- `check_addr(address)` - Comprehensive address validation\n- `is_valid(address)` - Quick validation check\n- `get_coin_type(address)` - Auto-detect cryptocurrency\n- `validate_multiple(addresses)` - Bulk validation\n\n### Bulk Generation\n\n- `gen_wallets(count, coin_type)` - Generate multiple wallets for specific coin\n- `gen_multi_wallets(count)` - Generate multiple multi-crypto wallets\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Support\n\n- **Documentation**: [https://pylibit.github.io/libit/](https://pylibit.github.io/libit/)\n- **Issues**: [GitHub Issues](https://github.com/pylibit/libit/issues)  \n- **Email**: Pymmdrza@gmail.com\n\n---\n\n**\u26a0\ufe0f Disclaimer**: This library is for educational and development purposes. Always ensure proper security practices when handling private keys and cryptocurrency assets in production environments.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Professional Bitcoin, Ethereum and Tron wallet generation library with support for multiple address formats",
    "version": "5.3.6",
    "project_urls": {
        "Bug Tracker": "https://github.com/pylibit/libit/issues",
        "Changelog": "https://github.com/pylibit/libit/blob/main/CHANGELOG.md",
        "Documentation": "https://pylibit.github.io/libit/",
        "Homepage": "https://github.com/pylibit/libit",
        "Repository": "https://github.com/pylibit/libit"
    },
    "split_keywords": [
        "bitcoin",
        " ethereum",
        " tron",
        " cryptography",
        " wallet",
        " cryptocurrency",
        " blockchain",
        " private-key",
        " address",
        " p2pkh",
        " p2sh",
        " p2wpkh",
        " p2wsh",
        " segwit",
        " bech32"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "74af8ecce1b3348c2d38a19759ed7572278d1a3c425a45095bbdce4ce0092a24",
                "md5": "9e5bb47ed9994aee44ec135a048ff9a5",
                "sha256": "9a89e52ea6c792e85b733a29f3f67434f9ecbd5d1a622a3918c8de1ec3b75103"
            },
            "downloads": -1,
            "filename": "libit-5.3.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9e5bb47ed9994aee44ec135a048ff9a5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 32288,
            "upload_time": "2025-07-10T09:22:53",
            "upload_time_iso_8601": "2025-07-10T09:22:53.152616Z",
            "url": "https://files.pythonhosted.org/packages/74/af/8ecce1b3348c2d38a19759ed7572278d1a3c425a45095bbdce4ce0092a24/libit-5.3.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e85fb091e30bb1bac1f30f35a383bab19e7b1a7215a28b3c7d4d8f32dc543173",
                "md5": "32bd1db0e93324ddfff510a35b479e8a",
                "sha256": "a8674e1ff87caa953397189fc9d87f9a9dbb54c1f92288cbeb7d106040cc9ace"
            },
            "downloads": -1,
            "filename": "libit-5.3.6.tar.gz",
            "has_sig": false,
            "md5_digest": "32bd1db0e93324ddfff510a35b479e8a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 34497,
            "upload_time": "2025-07-10T09:22:54",
            "upload_time_iso_8601": "2025-07-10T09:22:54.341809Z",
            "url": "https://files.pythonhosted.org/packages/e8/5f/b091e30bb1bac1f30f35a383bab19e7b1a7215a28b3c7d4d8f32dc543173/libit-5.3.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-10 09:22:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pylibit",
    "github_project": "libit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "libit"
}
        
Elapsed time: 0.44339s