A modern Telegram Mini App that generates Solana vanity addresses with custom prefixes through a beautiful web interface.
- 📱 Modern Web Interface: Beautiful, responsive design optimized for mobile
- 🚀 Real-time Generation: Live progress tracking with attempt counters
- ⚡ Fast Generation: Optimized for short prefixes (2-4 characters)
- 🔒 Real Solana Keypairs: Generates actual Solana public and private keys
- 📊 Progress Tracking: Real-time updates during generation
- 🎨 Dark Mode Support: Automatically adapts to Telegram's theme
- 📋 One-click Copy: Easy copying of generated keys
- 🛡️ Input Validation: Prevents invalid prefixes and provides helpful feedback
- 🌐 Cross-platform: Works on all devices through Telegram
- Python 3.8 or higher
- Telegram account
- Telegram bot token (from @BotFather)
# Run the deployment script
python3 deploy_mini_app.pyThis will:
- ✅ Check Python version
- 📦 Install dependencies
- 📝 Create .env file
- 🔧 Create startup scripts
-
Get Bot Token:
- Open Telegram and search for
@BotFather - Send
/newbotcommand - Follow instructions to create your bot
- Copy the token provided
- Open Telegram and search for
-
Edit .env file:
TELEGRAM_TOKEN=your_actual_bot_token_here TELEGRAM_CHAT_ID=your_chat_id_here SOLANA_NETWORK=devnet WEB_SERVER_URL=https://your-domain.com
-
Configure BotFather:
- Send
/newappto @BotFather - Set the Web App URL to your server URL
- Configure bot commands:
/start - Open mini app /help - Show help /status - Check status
- Send
Option 1: Direct Python
python3 telegram_mini_app.pyOption 2: Startup Script
./start_mini_app.sh-
Telegram Bot (
telegram_mini_app.py)- Handles bot commands and interactions
- Provides mini app launch button
- Manages user sessions
-
Web Server (aiohttp)
- Serves the mini app HTML interface
- Provides REST API for generation
- Handles real-time status updates
-
Vanity Generator (
vanity_generator.py)- Core Solana address generation logic
- Prefix validation and estimation
- Keypair formatting
-
Mini App Interface (HTML/CSS/JS)
- Modern, responsive web interface
- Real-time progress tracking
- Telegram Web App integration
GET /- Mini app HTML interfacePOST /api/generate- Start vanity address generationGET /api/status/{task_id}- Check generation status
- Responsive Design: Works on all screen sizes
- Dark Mode: Automatically adapts to Telegram theme
- Progress Bar: Visual feedback during generation
- Copy Buttons: One-click copying of keys
- Error Handling: Clear error messages and validation
- Loading States: Smooth transitions and feedback
# Telegram Bot
TELEGRAM_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
# Solana Network
SOLANA_NETWORK=devnet # devnet, testnet, mainnet-beta
# Web Server
WEB_SERVER_HOST=localhost
WEB_SERVER_PORT=8080
WEB_SERVER_URL=https://your-domain.com
# Generator Settings
MAX_ATTEMPTS=1000000
MAX_PREFIX_LENGTH=8| Prefix Length | Estimated Time | Success Rate |
|---|---|---|
| 1 character | ~1-10 seconds | Very High |
| 2 characters | ~10-60 seconds | High |
| 3 characters | ~1-10 minutes | Medium |
| 4 characters | ~10-60 minutes | Medium |
| 5 characters | ~1-10 hours | Low |
| 6+ characters | Hours+ | Very Low |
- Keep
TELEGRAM_TOKENsecure and private - Use HTTPS in production
- Regularly update dependencies
- Monitor bot usage and logs
- Generated private keys are real and can hold funds
- Never share private keys
- Store keys securely offline
- Consider hardware wallets for large amounts
-
"TELEGRAM_TOKEN not found"
- Check .env file exists and has correct token
- Verify token is valid with @BotFather
-
"Web App not loading"
- Check web server is running
- Verify WEB_SERVER_URL is correct
- Check firewall and port settings
-
"Generation taking too long"
- Try shorter prefix
- Check server resources
- Verify internet connection
-
"Copy to clipboard not working"
- This is normal in some browsers
- Manual copy is always available
Enable debug logging:
# In telegram_mini_app.py
logging.basicConfig(level=logging.DEBUG)This project is open source. Use responsibly and at your own risk.
This mini app generates real Solana keypairs that can hold funds. Users are responsible for:
- Securing their private keys
- Any transactions made with generated addresses
- Compliance with local regulations
The developers are not responsible for any loss of funds or security issues.
For support:
- Check this README
- Review troubleshooting section
- Check logs for errors
- Open an issue on GitHub
Made with ❤️ for the Solana community