v0.1.10 — Fix production mode: encrypted key storage, on-chain balance, RPC routing
What's Changed
Fixed
- Production mode broken —
effective_rpc_urlnever used: All RPC calls now use network-aware URL resolver instead of raw env var. Localnet/mainnet routing was silently ignored ag402 balance/ag402 statusonly showed local SQLite ledger: Now queries real on-chain USDC balance via RPC in production modeag402 payblocked by empty local ledger in production: Pre-check uses on-chain balance; payment flow reordered to pay-on-chain-firstag402 setup/ag402 upgradeincomplete mainnet config: Now writesX402_NETWORK,USDC_MINT_ADDRESS, and all required fields
Security
- Private key no longer stored in plaintext
.env: Keys stored exclusively in encrypted~/.ag402/wallet.key(PBKDF2-480K + AES).load_config()auto-decrypts at startup viaAG402_UNLOCK_PASSWORDor interactive prompt - Private key masked in all display paths:
ag402 setupsummary,ag402 env set,ag402 env show install_key_guard()activated: Root logger filter installed at CLI entry, redacting private keys from log output~/.ag402/.gitignoreauto-created: Prevents accidental git commit of key files- RPC error messages truncated: Capped at 120 chars to prevent leaking RPC API keys
ag402 upgraderequires encryption: Fails ifcryptographynot installed, preventing key-less production state- Example docs updated: No longer shows plaintext
SOLANA_PRIVATE_KEY=in.envexamples
Full Changelog: https://github.com/AetherCore-Dev/ag402/blob/main/CHANGELOG.md