Account Management
Understanding account generation and management in Chain Forge.
BIP39/BIP44 Standard
Chain Forge uses industry-standard wallet protocols:
- BIP39: Mnemonic phrase generation (12 words)
- BIP44: Hierarchical deterministic derivation paths
Derivation path format:
m/44'/501'/index'/0'Where:
44'= BIP44 standard501'= Solana coin typeindex'= Account index (0, 1, 2, ...)0'= Change index (always 0 for Solana)
Account Generation
Accounts are generated when you start the validator:
cf-solana start --accounts 10This:
- Generates a 12-word BIP39 mnemonic
- Derives 10 accounts using BIP44 paths
- Stores account data in
~/.chain-forge/solana/accounts.json
Wallet Compatibility
Accounts are compatible with popular Solana wallets:
- Phantom
- Solflare
- Ledger
- Any BIP39/BIP44 compatible wallet
Import using the mnemonic phrase and derivation path m/44'/501'/index'/0'.
Account Storage
Accounts are stored in ~/.chain-forge/solana/accounts.json:
[
{
"index": 0,
"publicKey": "7xJ5k2m8...",
"secretKey": [/* Uint8Array */],
"derivationPath": "m/44'/501'/0'/0'"
}
]DANGER
This file contains private keys! Never commit or share it.
Mnemonic Management
Auto-Generated
By default, a new mnemonic is generated each time:
cf-solana start
# Displays: Generated mnemonic: word1 word2 ... word12Fixed Mnemonic
Use a specific mnemonic for reproducibility:
cf-solana start --mnemonic "your twelve word phrase here..."Test Mnemonic
Use a well-known test mnemonic:
cf-solana start --mnemonic "test test test test test test test test test test test junk"WARNING
Never use test mnemonics with real funds!
Account Funding
Accounts are funded after validator startup via RPC airdrops.
Initial Funding
Set balance when starting:
cf-solana start --balance 100Additional Funding
Add more SOL to an account:
cf-solana fund <PUBLIC_KEY> 50Set Exact Balance
Using TypeScript:
await client.setBalance(publicKey, 500);Account Security
Best Practices
- Never commit
~/.chain-forge/to version control - Add to .gitignore:
.chain-forge/ - Use separate mnemonics for different projects
- Never share accounts with real funds
- Use test mnemonics only for development
Securing Mnemonics
For production-like testing:
- Store mnemonics in environment variables
- Use secret management tools (Vault, AWS Secrets Manager)
- Encrypt sensitive files
- Restrict file permissions
Example:
export MNEMONIC="your twelve word phrase..."
cf-solana start --mnemonic "$MNEMONIC"