Solana Cold Wallet USB Tool
Overview
A Python-based terminal application for creating and managing Solana cold wallets on USB drives with offline transaction signing capabilities.
Project State: COMPLETE
All core functionality implemented and tested with Devnet RPC.
Architecture
Core Files
main.py- Main CLI entry point with menu systemconfig.py- Configuration settings (RPC URL, constants)src/ui.py- Terminal UI components using Rich librarysrc/wallet.py- Wallet/keypair generation and managementsrc/network.py- Solana RPC communicationsrc/transaction.py- Transaction creation, signing, serializationsrc/usb.py- USB device detection and mountingsrc/iso_builder.py- Alpine Linux rootfs builder for cold wallet USB
Key Features
- USB device detection and flashing
- Ed25519 keypair generation using solders
- SOL transfer transaction creation
- Offline transaction signing
- Transaction broadcasting to Solana network
- Devnet airdrop requests
Security Features
- Network drivers blacklisted in generated cold wallet OS
- iptables DROP rules applied on boot
- Network verification script included
- Private keys stored locally (keypair.json)
How to Run
# Standard usage
python main.py
# For USB operations (requires root)
sudo python main.py
Network Configuration
Currently configured for Devnet. To switch networks, edit config.py:
SOLANA_RPC_URL = "https://api.devnet.solana.com" # Current
# SOLANA_RPC_URL = "https://api.mainnet-beta.solana.com" # For production
Dependencies
- solana, solders - Solana SDK
- pynacl - Ed25519 cryptography
- rich - Terminal UI
- questionary - Interactive prompts
- httpx - HTTP client
Directory Structure
local_wallet/
keypair.json # Private key (SECURE!)
pubkey.txt # Public key
transactions/ # Transaction files
Recent Changes
- 2024-12-23: Initial implementation complete
- Enhanced network isolation in ISO builder
- Added iptables lockdown and network verification scripts