solana-keygen utility provides comprehensive keypair and wallet management for Harmonic Salsa. Use it to generate new keypairs, recover from seed phrases, and manage cryptographic identities.
Creating New Keypairs
Generate Random Keypair
Create a new keypair with a random seed phrase:- A 12-word BIP39 seed phrase (mnemonic)
- An Ed25519 keypair
- A JSON file with the private key
Generate Without Saving
Display seed phrase without writing to file:Silent Mode
Generate without displaying seed phrase (useful for scripts):Custom Seed Phrase Length
Generate with different word counts:BIP39 Passphrase
Add an extra passphrase for additional security:Derivation Paths
Generate keypairs using BIP44 derivation paths:Recovering Keypairs
Recover from Seed Phrase
Recover a keypair from an existing seed phrase:- Your seed phrase (12-24 words)
- Your passphrase (if used during generation)
Recover with Prompt URI
Use the prompt URI scheme:Skip Validation
Recover without validating seed phrase (not recommended):Viewing Public Keys
Display Pubkey from Keypair
Save Pubkey to File
Display from Config
Show pubkey for configured keypair:BLS Public Key
Generate BLS public key for validator consensus:Verifying Keypairs
Verify Signature
Confirm a keypair can sign and verify:Grinding Vanity Addresses
Generate Vanity Keypairs
Create keypairs with custom prefixes or suffixes:Generate Multiple Vanity Keys
Case-Insensitive Matching
Multi-threaded Grinding
Grind with Mnemonic
Generate vanity addresses with recoverable seed phrases:Grind Without Saving
Security Best Practices
File Permissions
Secure your keypair files:Backup Strategies
- Seed Phrase: Write down and store in a secure location
- Encrypted Backup: Encrypt keypair files before storing
- Hardware Wallets: Use for high-value accounts
- Multiple Copies: Store backups in separate secure locations
Encrypt Keypair Files
Environment Variables
Avoid hardcoding keypair paths:Hardware Wallet Integration
Use hardware wallets for production:Multiple Keypair Management
Organize by Purpose
Switch Between Keypairs
Keypair Formats
JSON Format
Standard keypair file format:Seed Phrase Format
BIP39 mnemonic (human-readable):Base58 Format
Not commonly used, but supported:Troubleshooting
Invalid Keypair File
Lost Seed Phrase
If you lose your seed phrase and don’t have the JSON file, the keypair is unrecoverable. Always backup seed phrases securely.Permission Denied
Next Steps
Cluster Queries
Query account balances and cluster state
Stake Management
Create and manage stake accounts