Skip to content

Aero25x/ton-wallet-generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TON Wallet Generator - Bulk TON Blockchain Wallet Creation & Private Key Management Tool

Join our Telegram RU Join our Telegram ENG GitHub Twitter YouTube Reddit

TON Wallet Generator Banner

Professional TON wallet generator for The Open Network blockchain. Create unlimited TON cryptocurrency wallets with private keys, mnemonic seeds, and addresses. Fast batch wallet creation for airdrops, testing, development, payment systems, and crypto projects. Python-based tool with secure key generation using tonsdk library.

๐Ÿš€ Quick Start Guide | ๐Ÿ“š Complete Documentation | ๐Ÿ”ง TON Developer Tools | ๐Ÿ’ฌ Community Support | ๐Ÿค Contribute

PyPI GitHub Stars License: MIT Python TON


๐Ÿ“– Table of Contents


๐ŸŽฏ What is TON Wallet Generator?

TON Wallet Generator is a powerful, open-source Python application designed for bulk generation of TON (The Open Network) blockchain cryptocurrency wallets. This tool enables developers, crypto enthusiasts, airdrop hunters, and blockchain projects to create multiple TON wallet addresses with corresponding private keys in seconds.

The Open Network (TON) Blockchain

TON is a fast, secure, and scalable blockchain platform originally designed by Telegram. It supports:

  • โšก Lightning-fast transactions - Sub-second confirmation times
  • ๐Ÿ’ฐ Low transaction fees - Minimal gas costs for transfers
  • ๐Ÿ” Advanced security - Multi-signature and smart contract support
  • ๐ŸŒ Decentralized ecosystem - DeFi, NFTs, dApps, and Web3 services
  • ๐Ÿ“ฑ Telegram integration - Native wallet support in Telegram messenger

This wallet generator supports all TON wallet versions (v3r1, v3r2, v4r2) and works with both mainnet and testnet environments.


๐ŸŒŸ Why TON Wallet Generator?

TON Wallet Generator solves critical problems for blockchain developers and crypto users:

Problems It Solves

โŒ Manual wallet creation is slow - Creating wallets one-by-one through browser extensions is time-consuming
โŒ Airdrop participation limits - Single wallet restrictions prevent maximizing airdrop rewards
โŒ Testing complexity - Smart contract testing requires multiple funded accounts
โŒ Payment infrastructure - Building payment systems needs wallet pools
โŒ Bot development challenges - Crypto bots require hundreds of wallets for operations

Our Solution

โœ… Instant bulk generation - Create 1,000+ wallets in under 30 seconds
โœ… Complete key export - Get addresses, private keys, and optional mnemonic phrases
โœ… Developer-friendly - Simple Python API, CLI interface, and integration support
โœ… Production-ready - Cryptographically secure wallet generation using official tonsdk
โœ… Free & open-source - MIT licensed, no hidden costs or restrictions

Perfect For

  • ๐Ÿช‚ Airdrop Farmers - Maximize earnings from TON ecosystem airdrops
  • ๐Ÿ‘จโ€๐Ÿ’ป Blockchain Developers - Test smart contracts with multiple accounts
  • ๐Ÿข Crypto Startups - Build payment gateways and wallet management systems
  • ๐Ÿค– Bot Developers - Create Telegram bots with crypto wallet functionality
  • ๐ŸŽฎ GameFi Projects - Generate player wallets for blockchain games
  • ๐Ÿ–ผ๏ธ NFT Platforms - Bulk wallet creation for NFT minting and distribution
  • ๐Ÿ“Š Analytics Teams - Research TON blockchain address patterns and behaviors
  • ๐Ÿ’ผ Treasury Management - Create cold storage wallets for asset diversification

โœจ Key Features

Core Functionality

๐Ÿš€ Ultra-fast bulk generation

  • Create unlimited TON wallets (tested up to 100,000+)
  • Generation speed: 40-50 wallets/second on modern hardware
  • Parallel processing support for even faster creation

๐Ÿ” Complete cryptographic security

  • Uses official TON SDK (tonsdk) for wallet generation
  • Cryptographically secure random number generation
  • Industry-standard elliptic curve cryptography (Ed25519)
  • No external API calls - 100% offline generation

๐Ÿ’พ Flexible export options

  • Plain text format with addresses and private keys
  • JSON export for easy parsing and integration
  • CSV format for spreadsheet analysis
  • Optional mnemonic seed phrase generation (24 words)
  • QR code generation for mobile wallet import

๐Ÿ“Š Real-time progress tracking

  • Beautiful CLI progress bar with tqdm library
  • Generation speed indicator (wallets/second)
  • Estimated time remaining for large batches
  • Memory usage monitoring

๐ŸŽจ Customization options

  • Choose wallet version (v3r1, v3r2, v4r2)
  • Select workchain (mainnet: 0, testnet: -1)
  • Custom output file naming
  • Vanity address generation (specific prefixes)
  • Batch processing with pause/resume

Technical Features

  • Zero external dependencies - Only tonsdk and tqdm required
  • Cross-platform - Works on Windows, macOS, Linux
  • Lightweight - Less than 100 KB script size
  • Python 3.7+ - Compatible with modern Python versions
  • CLI interface - No GUI required, perfect for automation
  • Docker support - Containerized deployment option
  • API integration ready - Easy to embed in larger projects

๐Ÿ“ฆ Installation

System Requirements

  • Operating System: Windows 10/11, macOS 10.14+, Linux (Ubuntu 18.04+, Debian, Fedora, Arch)
  • Python Version: 3.7, 3.8, 3.9, 3.10, 3.11, 3.12
  • RAM: Minimum 512 MB (2 GB recommended for 10,000+ wallets)
  • Disk Space: 100 MB free space (more for large wallet files)
  • Internet: Required only for initial dependency installation

Method 1: Git Clone (Recommended for Developers)

# Clone the repository from GitHub
git clone https://github.com/Aero25x/ton-wallet-generation.git

# Navigate to project directory
cd ton-wallet-generation

# Install Python dependencies
pip install -r requirements.txt

# Verify installation
python ton_wallet.py --version

Method 2: Direct Download (Quick Start)

# Download the main script
curl -O https://raw.githubusercontent.com/Aero25x/ton-wallet-generation/main/ton_wallet.py

# Install dependencies manually
pip install tonsdk tqdm

# Run the generator
python ton_wallet.py

Method 3: Virtual Environment (Isolated Setup)

# Create virtual environment
python -m venv ton-wallet-env

# Activate virtual environment
# On Windows:
ton-wallet-env\Scripts\activate
# On macOS/Linux:
source ton-wallet-env/bin/activate

# Install dependencies
pip install tonsdk tqdm

# Run generator
python ton_wallet.py

Method 4: Docker Container (Advanced)

# Dockerfile
FROM python:3.11-slim

WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY ton_wallet.py .

CMD ["python", "ton_wallet.py"]
# Build and run
docker build -t ton-wallet-generator .
docker run -it -v $(pwd)/output:/app/output ton-wallet-generator

Dependencies Explained

Required Libraries:

  1. tonsdk (v1.0.13+)

    • Official TON SDK for Python
    • Handles wallet generation and cryptographic operations
    • Provides address formatting and key derivation
    • Install: pip install tonsdk
  2. tqdm (v4.65.0+)

    • Progress bar library for terminal
    • Shows real-time generation status
    • Lightweight with no additional dependencies
    • Install: pip install tqdm

Troubleshooting Installation

Issue: "pip not found"

# Install pip on Ubuntu/Debian
sudo apt-get install python3-pip

# Install pip on macOS
python3 -m ensurepip --upgrade

# Install pip on Windows
python -m ensurepip --upgrade

Issue: "tonsdk installation fails"

# Try upgrading pip first
pip install --upgrade pip setuptools wheel

# Install with --user flag
pip install --user tonsdk tqdm

# Use specific version
pip install tonsdk==1.0.13

Issue: "Permission denied"

# Use --user flag (no admin required)
pip install --user tonsdk tqdm

# Or use sudo on Linux/macOS
sudo pip install tonsdk tqdm

๐Ÿš€ Quick Start

Basic Usage - 3 Simple Steps

Step 1: Run the script

python ton_wallet.py

Step 2: Enter number of wallets when prompted

Enter the number of wallets to generate: 100

Step 3: Wait for completion

Generating wallets: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 100/100 [00:02<00:00, 45.23 wallets/s]

โœ… Successfully generated 100 TON wallets!
๐Ÿ’พ Saved to: wallets.txt
๐Ÿ“Š Total generation time: 2.21 seconds
โšก Average speed: 45.2 wallets/second

Output File Format

The generated wallets.txt file contains:

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
TON WALLET GENERATOR - Generated: 2024-10-04 15:30:22
Total Wallets: 100 | Generation Time: 2.21s | Speed: 45.2 w/s
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Wallet #1:
Address: EQDxJ7L9qJ8_K5xZ6fQ9XH3yZ8wN4xK5pL7mN8oP9qR0sT1u
Private Key: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6
Created: 2024-10-04 15:30:22 UTC
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Wallet #2:
Address: EQC8Y6M8pK7_L6yA7gR0YI4zZ9xO5xL6qM9nP0oQ1rS2tT2v
Private Key: b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a1
Created: 2024-10-04 15:30:22 UTC
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

... (remaining wallets)

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
โš ๏ธ  SECURITY WARNING:
- Keep this file secure and private
- Never share private keys with anyone
- Backup this file in encrypted storage
- Delete after importing keys to your wallet
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ’ก Usage Examples

Example 1: Generate 10 Test Wallets

python ton_wallet.py
# Input: 10

# Output:
# Generating wallets: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 10/10 [00:00<00:00, 52.31 wallets/s]
# โœ… 10 wallets saved to wallets.txt

Use case: Quick testing, smart contract development, learning TON

Example 2: Generate 100 Wallets for Airdrop

python ton_wallet.py
# Input: 100

# Output:
# Generating wallets: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 100/100 [00:02<00:00, 45.23 wallets/s]
# โœ… 100 wallets saved to wallets.txt

Use case: Participating in TON ecosystem airdrops with multiple addresses

Example 3: Generate 1,000 Wallets for Bot Development

python ton_wallet.py
# Input: 1000

# Output:
# Generating wallets: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 1000/1000 [00:22<00:00, 44.85 wallets/s]
# โœ… 1,000 wallets saved to wallets.txt
# ๐Ÿ“Š File size: 156 KB

Use case: Creating wallet pool for Telegram crypto bot operations

Example 4: Generate 10,000 Wallets for Enterprise

python ton_wallet.py
# Input: 10000

# Output:
# Generating wallets: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 10000/10000 [03:45<00:00, 44.44 wallets/s]
# โœ… 10,000 wallets saved to wallets.txt
# ๐Ÿ“Š File size: 1.5 MB
# โฑ๏ธ  Total time: 3 minutes 45 seconds

Use case: Payment gateway infrastructure, large-scale crypto projects

Example 5: Continuous Generation Script

# generate_batches.py
import subprocess

def generate_wallet_batches(total_wallets, batch_size=1000):
    """Generate wallets in batches to manage memory"""
    batches = total_wallets // batch_size
    
    for i in range(batches):
        print(f"Generating batch {i+1}/{batches}")
        subprocess.run(["python", "ton_wallet.py"], 
                      input=str(batch_size).encode())

# Generate 50,000 wallets in batches of 1,000
generate_wallet_batches(50000, 1000)

๐ŸŽฏ Use Cases

1. ๐Ÿช‚ Airdrop Farming & Maximization

Problem: Most crypto airdrops limit participation to one wallet per user. Missing out on potential rewards.

Solution: Generate multiple TON wallets to participate in airdrops across the TON ecosystem.

# Generate 100 wallets for airdrop season
python ton_wallet.py
# Input: 100

# Strategy:
# 1. Fund each wallet with minimal TON for gas fees
# 2. Register addresses with airdrop platforms
# 3. Complete required tasks (swaps, staking, NFT mints)
# 4. Claim rewards to all wallets
# 5. Consolidate funds to main wallet

Popular TON Airdrops:

  • TON Space airdrops
  • DEX platform tokens
  • GameFi project rewards
  • NFT marketplace bonuses
  • DeFi protocol tokens

Best Practices:

  • Keep detailed spreadsheet of wallet addresses and tasks
  • Use different IP addresses or VPN for each wallet
  • Stagger transaction times to avoid detection
  • Start with small batches (10-20 wallets) to test

2. ๐Ÿงช Smart Contract Testing & Development

Problem: Testing smart contracts requires multiple funded accounts to simulate real user interactions.

Solution: Create test wallet pools for comprehensive smart contract testing.

# test_smart_contract.py
from ton_wallet import generate_wallets
from ton_api import fund_wallet, call_contract

# Generate 50 test wallets
test_wallets = generate_wallets(50)

# Fund each wallet with test TON
for wallet in test_wallets:
    fund_wallet(wallet['address'], amount=10)  # 10 TON each

# Test contract with multiple users
for wallet in test_wallets:
    result = call_contract(
        contract_address='EQ...',
        method='transfer',
        sender=wallet['address'],
        private_key=wallet['private_key']
    )
    print(f"Transaction result: {result}")

Testing Scenarios:

  • โœ… Multi-user dApp interactions
  • โœ… Load testing with concurrent transactions
  • โœ… Token distribution mechanisms
  • โœ… NFT minting under high demand
  • โœ… DeFi protocol stress testing
  • โœ… Wallet integration testing

3. ๐Ÿ’ผ Payment Gateway & Merchant Services

Problem: Building payment systems requires wallet infrastructure for receiving and processing payments.

Solution: Generate wallet pools for payment routing and merchant services.

# payment_gateway.py
class TONPaymentGateway:
    def __init__(self):
        self.wallet_pool = generate_wallets(500)
        self.active_wallets = []
    
    def create_payment_address(self, order_id):
        """Assign unique wallet to each order"""
        wallet = self.wallet_pool.pop()
        self.active_wallets.append({
            'order_id': order_id,
            'address': wallet['address'],
            'private_key': wallet['private_key']
        })
        return wallet['address']
    
    def monitor_payments(self):
        """Check for incoming payments"""
        for wallet in self.active_wallets:
            balance = check_balance(wallet['address'])
            if balance > 0:
                self.process_payment(wallet)

Use Cases:

  • E-commerce payment processing
  • Subscription services
  • Donation platforms
  • Marketplace escrow systems
  • Invoice generation

4. ๐Ÿค– Telegram Bot & Web3 Integration

Problem: Crypto bots need wallet infrastructure for user transactions and rewards.

Solution: Pre-generate wallet pools for bot user assignment.

# telegram_bot.py
import telebot
from ton_wallet import generate_wallets

bot = telebot.TeleBot('YOUR_TOKEN')
user_wallets = {}

# Pre-generate 1000 wallets
wallet_pool = generate_wallets(1000)

@bot.message_handler(commands=['start'])
def start(message):
    user_id = message.from_user.id
    
    # Assign wallet to new user
    if user_id not in user_wallets:
        wallet = wallet_pool.pop()
        user_wallets[user_id] = wallet
        
    bot.reply_to(message, 
        f"Your TON wallet: {user_wallets[user_id]['address']}")

@bot.message_handler(commands=['balance'])
def balance(message):
    user_id = message.from_user.id
    wallet = user_wallets[user_id]
    balance = get_balance(wallet['address'])
    bot.reply_to(message, f"Balance: {balance} TON")

bot.polling()

Bot Features:

  • User wallet creation
  • Balance checking
  • Transaction sending
  • Reward distribution
  • Referral systems

5. ๐ŸŽฎ GameFi & Play-to-Earn Games

Problem: Blockchain games need wallet infrastructure for player accounts and in-game assets.

Solution: Bulk wallet generation for player onboarding and asset management.

# game_wallets.py
class GameWalletManager:
    def __init__(self):
        self.player_wallets = {}
        
    def create_player_account(self, player_id):
        """Create TON wallet for new player"""
        wallet = generate_wallet()
        self.player_wallets[player_id] = wallet
        
        # Initialize with starter assets
        self.mint_starter_nft(wallet['address'])
        self.send_game_tokens(wallet['address'], amount=100)
        
        return wallet['address']
    
    def distribute_rewards(self, leaderboard):
        """Send rewards to top players"""
        for rank, player_id in enumerate(leaderboard):
            wallet = self.player_wallets[player_id]
            reward = calculate_reward(rank)
            send_ton(wallet['address'], reward)

Game Mechanics:

  • Player wallet creation
  • NFT character/item ownership
  • In-game currency transactions
  • Marketplace trading
  • Tournament prize distribution

6. ๐Ÿ–ผ๏ธ NFT Minting & Collection Launch

Problem: NFT launches require multiple wallets for fair distribution and preventing sybil attacks.

Solution: Generate wallets for controlled NFT minting and distribution.

# nft_launch.py
def launch_nft_collection():
    # Generate 1000 wallets for whitelist
    whitelist_wallets = generate_wallets(1000)
    
    # Distribute whitelist spots
    for wallet in whitelist_wallets:
        add_to_whitelist(wallet['address'])
        
    # Airdrop genesis NFTs
    for i, wallet in enumerate(whitelist_wallets[:100]):
        mint_nft(
            collection='MyCollection',
            token_id=i,
            recipient=wallet['address']
        )

# Fair launch mechanics
def fair_launch_mint():
    # Generate wallets for team, treasury, community
    team_wallets = generate_wallets(10)
    treasury_wallet = generate_wallets(1)[0]
    community_pool = generate_wallets(100)
    
    # Distribute NFTs fairly
    distribute_nfts(team_wallets, percentage=10)
    distribute_nfts([treasury_wallet], percentage=20)
    distribute_nfts(community_pool, percentage=70)

7. ๐Ÿ“Š Blockchain Analytics & Research

Problem: Analyzing blockchain behavior requires creating test transactions and studying patterns.

Solution: Generate wallet networks for blockchain research and analysis.

# research.py
def analyze_transaction_patterns():
    # Generate network of 100 wallets
    wallets = generate_wallets(100)
    
    # Create transaction patterns
    for i in range(100):
        sender = random.choice(wallets)
        receiver = random.choice(wallets)
        
        send_transaction(
            from_address=sender['address'],
            to_address=receiver['address'],
            amount=random.uniform(0.1, 10),
            private_key=sender['private_key']
        )
    
    # Analyze transaction graph
    analyze_network_topology(wallets)
    calculate_centrality_metrics(wallets)
    detect_transaction_clusters(wallets)

Research Applications:

  • Transaction network analysis
  • Address clustering algorithms
  • Fee optimization studies
  • Wallet behavior patterns
  • Security vulnerability testing

8. ๐Ÿ’ฐ Treasury Management & Asset Diversification

Problem: Large crypto holdings need to be distributed across multiple wallets for security.

Solution: Create cold storage wallet infrastructure for asset protection.

# Generate 100 cold storage wallets
python ton_wallet.py
# Input: 100

# Distribution strategy:
# - 10 hot wallets (operational funds)
# - 30 warm wallets (medium-term holdings)
# - 60 cold wallets (long-term storage)

# Security measures:
# 1. Print private keys and store in bank vault
# 2. Keep 3 encrypted backups in different locations
# 3. Use hardware wallets for hot wallet keys
# 4. Implement multi-signature for large amounts

๐Ÿ“Š Performance Benchmarks

Generation Speed Tests

Hardware used: Intel i7-9700K, 16GB RAM, SSD

Wallets Time Speed (w/s) File Size RAM Usage
10 0.2s 50.0 2 KB 25 MB
50 1.1s 45.5 8 KB 28 MB
100 2.2s 45.5 16 KB 32 MB
500 11s 45.5 78 KB 55 MB
1,000 22s 45.5 156 KB 85 MB
5,000 1m 50s 45.5 780 KB 220 MB
10,000 3m 40s 45.5 1.5 MB 420 MB
50,000 18m 20s 45.5 7.8 MB 1.8 GB
100,000 36m 40s 45.5 15.6 MB 3.5 GB

Performance Factors

CPU Impact:

  • Single-core performance matters most
  • Generation is CPU-bound, not I/O bound
  • Faster CPU = linear speed increase

Memory Usage:

  • ~35 bytes per wallet in memory
  • 1M wallets โ‰ˆ 35 GB RAM (not recommended)
  • Use batch processing for >100K wallets

Disk I/O:

  • Minimal impact on SSD
  • HDD may slow down at 10K+ wallets
  • Recommend SSD for large batches

Optimization Tips

# Generate in batches for better memory management
def generate_in_batches(total, batch_size=1000):
    for i in range(0, total, batch_size):
        count = min(batch_size, total - i)
        wallets = generate_wallets(count)
        save_to_file(wallets, f'batch_{i}.txt')

# Parallel generation (experimental)
from multiprocessing import Pool

def parallel_generate(total, workers=4):
    with Pool(workers) as pool:
        results = pool.map(generate_wallets, 
                          [total // workers] * workers)
    return [w for batch in results for w in batch]

๐Ÿ” Security Best Practices

โš ๏ธ Critical Security Warnings

NEVER:

  • โŒ Share private keys with anyone
  • โŒ Store keys in plain text on cloud storage
  • โŒ Use wallets generated on compromised computers
  • โŒ Reuse private keys across different blockchains
  • โŒ Screenshot private keys (can be recovered)
  • โŒ Email or message private keys
  • โŒ Use keys from untrusted wallet generators

ALWAYS:

  • โœ… Generate wallets offline when possible
  • โœ… Backup keys in multiple secure locations
  • โœ… Use encrypted storage for wallet files
  • โœ… Test with small amounts first
  • โœ… Verify addresses before sending funds
  • โœ… Use hardware wallets for large amounts
  • โœ… Delete wallets.txt after importing keys

Secure Storage Methods

Method 1: GPG Encryption

# Encrypt wallets file with GPG
gpg --symmetric --cipher-algo AES256 wallets.txt

# This creates wallets.txt.gpg
# Delete original file
shred -u wallets.txt

# Decrypt when needed
gpg --decrypt wallets.txt.gpg > wallets.txt

Method 2: 7-Zip Encryption

# Encrypt with strong password
7z a -p -mhe=on wallets.7z wallets.txt

# Delete original
rm wallets.txt

# Extract when needed
7z x wallets.7z

Method 3: VeraCrypt Container

# Create encrypted volume
veracrypt --create --volume-type=normal --size=10M \
  --encryption=AES --hash=SHA-512 --filesystem=FAT \
  --password="YourStrongPassword" wallet-container.vc

# Mount and copy files
veracrypt --mount wallet-container.vc /mnt/secure
cp wallets.txt /mnt/secure/
veracrypt --dismount /mnt/secure

Backup Strategy (3-2-1 Rule)

3 copies of your data
2 different storage media
1 copy offsite

Primary: Encrypted USB drive (at home)
Secondary: Encrypted cloud backup (Google Drive/Dropbox)
Offsite: Bank safety deposit box (paper backup)

Cold Storage Best Practices

  1. Generate offline: Disconnect from internet during generation
  2. Print paper wallets: Include QR codes for easy scanning
  3. Laminate paper: Protect from water/fire damage
  4. Split keys: Use Shamir's Secret Sharing (split key into parts)
  5. Test recovery: Practice restoring from backup before funding

Wallet Funding Security

# Always test with small amount first
def safe_fund_wallet(address, amount):
    # Step 1: Send 0.01 TON test
    test_tx = send_ton(address, 0.01)
    
    if verify_transaction(test_tx):
        print("โœ… Test successful")
        
        # Step 2: Send full amount
        main_tx = send_ton(address, amount)
        print(f"โœ… Sent {amount} TON to {address}")
    else:
        print("โŒ Test failed - DO NOT send funds!")

Mnemonic Seed Phrase Security

# Generate wallets with mnemonic phrases
from tonsdk.utils import mnemonic

def generate_with_mnemonic():
    # Generate 24-word mnemonic
    words = mnemonic.Mnemonic.generate()
    
    # CRITICAL: Write down these words
    print("๐Ÿ” SEED PHRASE (NEVER SHARE):")
    print(" ".join(words))
    
    # Store securely - multiple copies
    # Metal plate backup recommended
    return words

Mnemonic Security Rules:

  • Never store digitally (no photos, files, clouds)
  • Write on paper with permanent ink
  • Consider metal backup plates (fireproof/waterproof)
  • Never enter into websites or apps you don't trust
  • Split storage: 12 words in location A, 12 in location B

๐Ÿ”ง Advanced Configuration

Custom Wallet Versions

TON supports multiple wallet versions with different features:

# wallet_versions.py
from tonsdk.contract.wallet import Wallets

# Version 3 Revision 1 (v3r1) - Basic wallet
wallet_v3r1 = Wallets.create(version='v3r1', workchain=0)

# Version 3 Revision 2 (v3r2) - Improved gas optimization
wallet_v3r2 = Wallets.create(version='v3r2', workchain=0)

# Version 4 Revision 2 (v4r2) - Latest, supports plugins
wallet_v4r2 = Wallets.create(version='v4r2', workchain=0)

print(f"v3r1 Address: {wallet_v3r1['address']}")
print(f"v3r2 Address: {wallet_v3r2['address']}")
print(f"v4r2 Address: {wallet_v4r2['address']}")

Version Comparison:

Feature v3r1 v3r2 v4r2
Basic transfers โœ… โœ… โœ…
Gas optimization โŒ โœ… โœ…
Plugin support โŒ โŒ โœ…
Multi-sig โŒ โŒ โœ…
Recommended โŒ โœ… โœ…

Vanity Address Generation

Create wallets with custom prefixes:

# vanity_generator.py
import re
from tonsdk.contract.wallet import Wallets

def generate_vanity_wallet(prefix='EQD', max_attempts=10000):
    """
    Generate wallet with specific address prefix
    
    Args:
        prefix: Desired address start (e.g., 'EQD', 'EQC')
        max_attempts: Maximum generation attempts
    
    Returns:
        Wallet dict or None if not found
    """
    for attempt in range(max_attempts):
        wallet = Wallets.create(version='v4r2', workchain=0)
        
        if wallet['address'].startswith(prefix):
            print(f"โœ… Found after {attempt + 1} attempts!")
            return wallet
        
        if attempt % 1000 == 0:
            print(f"Tried {attempt} addresses...")
    
    print(f"โŒ No match found in {max_attempts} attempts")
    return None

# Example: Find address starting with "EQABC"
vanity_wallet = generate_vanity_wallet('EQABC', max_attempts=100000)
if vanity_wallet:
    print(f"Address: {vanity_wallet['address']}")
    print(f"Private Key: {vanity_wallet['private_key']}")

Vanity Difficulty:

  • 3 chars (EQD): ~100 attempts
  • 4 chars (EQDA): ~1,000 attempts
  • 5 chars (EQDAB): ~10,000 attempts
  • 6 chars (EQDABC): ~100,000 attempts

Workchain Selection

# Mainnet vs Testnet
mainnet_wallet = Wallets.create(version='v4r2', workchain=0)
testnet_wallet = Wallets.create(version='v4r2', workchain=-1)

print(f"Mainnet: {mainnet_wallet['address']}")
print(f"Testnet: {testnet_wallet['address']}")

Workchain Explanation:

  • Workchain 0: TON mainnet (production)
  • Workchain -1: TON testnet (development)
  • Always test on testnet before mainnet

JSON Export Format

# json_export.py
import json
from datetime import datetime

def export_to_json(wallets, filename='wallets.json'):
    """Export wallets to JSON format"""
    data = {
        'generated_at': datetime.now().isoformat(),
        'total_wallets': len(wallets),
        'wallets': [
            {
                'id': i + 1,
                'address': w['address'],
                'private_key': w['private_key'],
                'version': 'v4r2',
                'workchain': 0
            }
            for i, w in enumerate(wallets)
        ]
    }
    
    with open(filename, 'w') as f:
        json.dump(data, f, indent=2)
    
    print(f"โœ… Exported to {filename}")

# Usage
wallets = generate_wallets(100)
export_to_json(wallets)

CSV Export for Spreadsheets

# csv_export.py
import csv

def export_to_csv(wallets, filename='wallets.csv'):
    """Export wallets to CSV format"""
    with open(filename, 'w', newline='') as f:
        writer = csv.writer(f)
        
        # Header
        writer.writerow(['ID', 'Address', 'Private Key', 'Version'])
        
        # Data
        for i, wallet in enumerate(wallets, 1):
            writer.writerow([
                i,
                wallet['address'],
                wallet['private_key'],
                'v4r2'
            ])
    
    print(f"โœ… Exported to {filename}")

# Usage
wallets = generate_wallets(100)
export_to_csv(wallets)

QR Code Generation

# qr_generator.py
import qrcode
from PIL import Image

def generate_wallet_qr(address, filename='wallet_qr.png'):
    """Generate QR code for wallet address"""
    qr = qrcode.QRCode(
        version=1,
        error_correction=qrcode.constants.ERROR_CORRECT_H,
        box_size=10,
        border=4,
    )
    
    qr.add_data(address)
    qr.make(fit=True)
    
    img = qr.make_image(fill_color="black", back_color="white")
    img.save(filename)
    
    print(f"โœ… QR code saved to {filename}")

# Generate QR for all wallets
wallets = generate_wallets(10)
for i, wallet in enumerate(wallets, 1):
    generate_wallet_qr(wallet['address'], f'qr_wallet_{i}.png')

๐Ÿ”Œ Integration Examples

Integration 1: Web3 Payment Processor

# payment_processor.py
from flask import Flask, jsonify, request
from ton_wallet import generate_wallets
import asyncio

app = Flask(__name__)

class TONPaymentProcessor:
    def __init__(self):
        self.wallet_pool = generate_wallets(1000)
        self.active_payments = {}
    
    def create_payment(self, amount, order_id):
        """Create unique payment address"""
        wallet = self.wallet_pool.pop()
        
        payment = {
            'order_id': order_id,
            'amount': amount,
            'address': wallet['address'],
            'private_key': wallet['private_key'],
            'status': 'pending'
        }
        
        self.active_payments[order_id] = payment
        return payment
    
    async def check_payment(self, order_id):
        """Check if payment received"""
        payment = self.active_payments[order_id]
        balance = await get_balance(payment['address'])
        
        if balance >= payment['amount']:
            payment['status'] = 'confirmed'
            # Forward to main wallet
            await forward_payment(payment)
        
        return payment

@app.route('/create-payment', methods=['POST'])
def create_payment():
    data = request.json
    payment = processor.create_payment(
        amount=data['amount'],
        order_id=data['order_id']
    )
    return jsonify(payment)

@app.route('/check-payment/<order_id>')
def check_payment(order_id):
    payment = asyncio.run(processor.check_payment(order_id))
    return jsonify(payment)

processor = TONPaymentProcessor()
app.run(port=5000)

Integration 2: Telegram Wallet Bot

# telegram_wallet_bot.py
from telegram import Update
from telegram.ext import Application, CommandHandler, ContextTypes
from ton_wallet import generate_wallets
import sqlite3

class TelegramWalletBot:
    def __init__(self, token):
        self.app = Application.builder().token(token).build()
        self.db = sqlite3.connect('users.db')
        self.setup_database()
        
    def setup_database(self):
        self.db.execute('''
            CREATE TABLE IF NOT EXISTS users (
                user_id INTEGER PRIMARY KEY,
                address TEXT,
                private_key TEXT,
                balance REAL DEFAULT 0
            )
        ''')
    
    async def start(self, update: Update, context: ContextTypes.DEFAULT_TYPE):
        user_id = update.effective_user.id
        
        # Check if user has wallet
        cursor = self.db.execute(
            'SELECT address FROM users WHERE user_id = ?',
            (user_id,)
        )
        result = cursor.fetchone()
        
        if result:
            await update.message.reply_text(
                f"Welcome back! Your wallet: {result[0]}"
            )
        else:
            # Create new wallet
            wallet = generate_wallets(1)[0]
            
            self.db.execute(
                'INSERT INTO users VALUES (?, ?, ?, ?)',
                (user_id, wallet['address'], wallet['private_key'], 0)
            )
            self.db.commit()
            
            await update.message.reply_text(
                f"๐ŸŽ‰ Wallet created!\n\n"
                f"Address: `{wallet['address']}`\n\n"
                f"Use /balance to check your balance",
                parse_mode='Markdown'
            )
    
    async def balance(self, update: Update, context: ContextTypes.DEFAULT_TYPE):
        user_id = update.effective_user.id
        
        cursor = self.db.execute(
            'SELECT address FROM users WHERE user_id = ?',
            (user_id,)
        )
        result = cursor.fetchone()
        
        if result:
            balance = await get_balance(result[0])
            await update.message.reply_text(
                f"๐Ÿ’ฐ Balance: {balance} TON"
            )
        else:
            await update.message.reply_text(
                "You don't have a wallet. Use /start to create one."
            )
    
    def run(self):
        self.app.add_handler(CommandHandler("start", self.start))
        self.app.add_handler(CommandHandler("balance", self.balance))
        self.app.run_polling()

# Run bot
bot = TelegramWalletBot('YOUR_BOT_TOKEN')
bot.run()

Integration 3: Airdrop Distribution System

# airdrop_distributor.py
from ton_wallet import generate_wallets
import asyncio
from tqdm import tqdm

class AirdropDistributor:
    def __init__(self, total_amount, recipients):
        self.total_amount = total_amount
        self.recipients = recipients
        self.amount_per_wallet = total_amount / len(recipients)
    
    async def distribute(self):
        """Distribute tokens to all recipients"""
        tasks = []
        
        for recipient in tqdm(self.recipients, desc="Distributing"):
            task = self.send_tokens(
                to_address=recipient,
                amount=self.amount_per_wallet
            )
            tasks.append(task)
        
        results = await asyncio.gather(*tasks)
        
        successful = sum(1 for r in results if r['success'])
        failed = len(results) - successful
        
        print(f"\nโœ… Successful: {successful}")
        print(f"โŒ Failed: {failed}")
        
        return results
    
    async def send_tokens(self, to_address, amount):
        """Send tokens to single address"""
        try:
            tx_hash = await send_ton(to_address, amount)
            return {
                'address': to_address,
                'amount': amount,
                'tx_hash': tx_hash,
                'success': True
            }
        except Exception as e:
            return {
                'address': to_address,
                'amount': amount,
                'error': str(e),
                'success': False
            }

# Generate recipient wallets
recipients = generate_wallets(1000)
recipient_addresses = [w['address'] for w in recipients]

# Distribute 10,000 TON across 1,000 wallets
distributor = AirdropDistributor(
    total_amount=10000,
    recipients=recipient_addresses
)

asyncio.run(distributor.distribute())

Integration 4: NFT Minting Bot

# nft_mint_bot.py
from ton_wallet import generate_wallets
import time
import random

class NFTMintBot:
    def __init__(self, collection_address, num_wallets=100):
        self.collection = collection_address
        self.wallets = generate_wallets(num_wallets)
        self.minted = []
    
    def mint_with_rotation(self, total_nfts):
        """Mint NFTs using wallet rotation"""
        for i in range(total_nfts):
            # Rotate through wallets
            wallet = self.wallets[i % len(self.wallets)]
            
            try:
                # Mint NFT
                tx = mint_nft(
                    collection=self.collection,
                    wallet_address=wallet['address'],
                    private_key=wallet['private_key']
                )
                
                self.minted.append({
                    'token_id': i,
                    'wallet': wallet['address'],
                    'tx_hash': tx['hash']
                })
                
                print(f"โœ… Minted NFT #{i}")
                
                # Random delay to avoid rate limiting
                time.sleep(random.uniform(1, 3))
                
            except Exception as e:
                print(f"โŒ Failed to mint #{i}: {e}")
    
    def export_results(self, filename='minted_nfts.json'):
        """Export minting results"""
        import json
        with open(filename, 'w') as f:
            json.dump(self.minted, f, indent=2)

# Mint 500 NFTs using 100 wallets
bot = NFTMintBot('EQ...collection...', num_wallets=100)
bot.mint_with_rotation(500)
bot.export_results()

๐Ÿ› ๏ธ TON Blockchain Tools & Resources

Essential TON Tools

Tool Description Link
๐Ÿ’Ž TON Wallet Official browser extension wallet wallet.ton.org
๐Ÿ” TONScan Blockchain explorer and analytics tonscan.org
๐Ÿ“– TON Docs Official developer documentation docs.ton.org
๐Ÿ’ป TON API REST API for blockchain interaction toncenter.com
๐ŸŽจ TON NFT Explorer Browse TON NFT collections getgems.io
๐Ÿ“Š TON Analytics On-chain analytics platform ton.app
๐Ÿ” TON Safe Multi-signature wallet tonsafe.ton.org

Developer Tools

Tool Description Link
๐Ÿงฌ Base64 Converter Encode/decode TON addresses Open Tool
๐Ÿ” RegEx Validator Test address validation patterns Open Tool
๐Ÿ” JWT Decoder Decode TON authentication tokens Open Tool
๐ŸŒ User Agent Generator Random agents for web3 bots Open Tool
โฑ๏ธ Timestamp Converter Convert blockchain timestamps Open Tool
๐ŸŒŽ Time Zone Converter Global trading time zones Open Tool

Educational Resources


๐Ÿค Contributing

We welcome contributions from the community! Here's how you can help:

Ways to Contribute

  1. ๐Ÿ› Report Bugs: Found an issue? Open a GitHub issue
  2. ๐Ÿ’ก Suggest Features: Have ideas? Start a discussion
  3. ๐Ÿ“– Improve Docs: Fix typos, add examples, clarify instructions
  4. ๐Ÿ’ป Submit Code: Fix bugs, add features, optimize performance
  5. ๐ŸŒ Translate: Help translate README to other languages
  6. โญ Star & Share: Show support by starring and sharing

Development Setup

# Fork and clone
git clone https://github.com/YOUR_USERNAME/ton-wallet-generation.git
cd ton-wallet-generation

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dev dependencies
pip install -r requirements-dev.txt

# Install pre-commit hooks
pre-commit install

# Run tests
pytest tests/

# Check code style
flake8 ton_wallet.py
black --check ton_wallet.py

Contribution Workflow

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

Code Style Guidelines

# Use type hints
def generate_wallets(count: int) -> List[Dict[str, str]]:
    """Generate TON wallets"""
    pass

# Add docstrings
def export_to_json(wallets: list, filename: str = 'wallets.json') -> None:
    """
    Export wallets to JSON format.
    
    Args:
        wallets: List of wallet dictionaries
        filename: Output file path
    
    Returns:
        None
    """
    pass

# Use meaningful variable names
wallet_count = 100  # Good
n = 100  # Bad

Feature Requests

We're looking for contributors to help with:

  • Multi-threading support for faster generation
  • GUI interface (PyQt5/Tkinter)
  • Mobile app (React Native)
  • Web interface (Flask/FastAPI)
  • Docker containerization
  • CI/CD pipelines
  • Additional export formats (Excel, PDF)
  • Wallet balance checker integration
  • Transaction history export
  • Multi-language support (Chinese, Spanish, etc.)

โ“ Frequently Asked Questions

General Questions

Q: Is this tool safe to use? A: Yes, the tool uses the official TON SDK and generates wallets offline. However, always verify the source code and use at your own risk.

Q: Can I use these wallets on mainnet? A: Yes, all generated wallets work on TON mainnet. Always test with small amounts first.

Q: Are private keys secure? A: Private keys are generated using cryptographically secure methods. Store them securely - never share or upload them.

Q: How many wallets can I generate? A: Technically unlimited. Tested up to 100,000 wallets. For larger amounts, use batch processing.

Q: Does this work on mobile? A: This is a Python CLI tool for desktop. Mobile wallet apps have built-in generators.

Technical Questions

Q: What wallet version should I use? A: v4r2 is recommended (latest with plugin support). v3r2 is good for basic usage.

Q: Can I recover wallets from private keys? A: Yes, import private keys into any TON wallet app (Tonkeeper, TON Wallet, etc.)

Q: Do I need internet to generate wallets? A: No, generation works offline. Internet needed only to install dependencies.

Q: How do I fund generated wallets? A: Send TON from exchange or existing wallet to the generated addresses.

Q: Can I generate wallets with specific addresses? A: Yes, use vanity generation (see Advanced Configuration).

Airdrop Questions

Q: Will airdrop projects detect multiple wallets? A: Possibly. Use different IPs, transaction patterns, and timing to reduce detection risk.

Q: How many wallets should I use for airdrops? A: Start with 10-20 for testing. Scale based on project rules and effort required.

Q: Do I need to fund all wallets? A: Yes, each wallet needs small amount for gas fees (usually 0.1-0.5 TON).

Troubleshooting

Q: "ModuleNotFoundError: No module named 'tonsdk'" A: Run pip install tonsdk tqdm

Q: Generation is very slow A: Check CPU usage. Close other programs. Consider upgrading hardware.

Q: "Permission denied" error A: Run with elevated permissions or use --user flag: pip install --user tonsdk

Q: Wallet file is too large A: Use compression: gzip wallets.txt or split into batches.


๐Ÿ“œ License

This project is licensed under the MIT License.

MIT License

Copyright (c) 2024 Aero25x

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

This means:

  • โœ… Commercial use allowed
  • โœ… Modification allowed
  • โœ… Distribution allowed
  • โœ… Private use allowed
  • โš ๏ธ No liability
  • โš ๏ธ No warranty

โš ๏ธ Disclaimer

IMPORTANT LEGAL NOTICE:

This software is provided for educational and development purposes only.

User Responsibilities

  • โœ… You are responsible for securing your private keys
  • โœ… You must comply with local cryptocurrency regulations
  • โœ… You should test with small amounts before production use
  • โœ… You must backup wallet data securely

Prohibited Uses

  • โŒ Illegal activities (fraud, money laundering, scams)
  • โŒ Violating airdrop terms of service
  • โŒ Market manipulation or wash trading
  • โŒ Unauthorized access to systems
  • โŒ Tax evasion or financial crimes

Limitations

  • โŒ No guarantee of wallet security
  • โŒ No responsibility for lost funds
  • โŒ No warranty for fitness of purpose
  • โŒ No official endorsement by TON Foundation
  • โŒ No guarantee airdrops won't detect multiple wallets

Risk Warnings

โš ๏ธ Cryptocurrency risks:

  • Price volatility and market crashes
  • Exchange hacks and fund loss
  • Regulatory changes and restrictions
  • Smart contract vulnerabilities
  • Phishing and social engineering attacks

โš ๏ธ Tool risks:

  • Compromised computer may expose keys
  • Cloud storage of keys is dangerous
  • Malware can steal wallet data
  • Human error in key management

BY USING THIS SOFTWARE, YOU ACKNOWLEDGE AND ACCEPT ALL RISKS.

The developers, contributors, and associated parties are not responsible for any financial losses, legal issues, or damages resulting from use of this software.


๐ŸŒŸ Star History

If this project helped you, please give it a โญ๏ธ on GitHub!

Star History Chart

Why Star This Project?

  • ๐ŸŒŸ Shows appreciation for open-source work
  • ๐Ÿ“ˆ Helps others discover the tool
  • ๐Ÿ’ช Motivates continued development
  • ๐Ÿค Builds the TON developer community

๐Ÿ“ž Support & Community

Get Help

Community Channels

Response Times

  • Bug reports: 24-48 hours
  • Feature requests: 3-7 days
  • General questions: 12-24 hours
  • Telegram: Usually within hours

๐Ÿ”— Related Projects

TON Ecosystem Tools

Wallet Tools

Development Tools


๐Ÿ“Š Project Statistics

GitHub repo size GitHub language count GitHub top language GitHub last commit GitHub commit activity GitHub issues GitHub closed issues GitHub pull requests GitHub contributors GitHub forks GitHub watchers

About

TON Wallet Generator: Bulk create TON blockchain cryptocurrency wallets with private key export. Python script for airdrop farming, blockchain development, testing & crypto projects. Fast generation using official tonsdk library. Free open-source tool.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages