Wallets
Wallets are the foundation of the Agentic Wallet system. Each wallet represents a Solana keypair with flexible custody options and built-in balance management.Wallet Creation
Wallets are created through the wallet-engine service and assigned a UUID identifier for internal tracking:Creating a Wallet
Auto-Funding (Devnet Only)
For development, wallets can be automatically funded on creation:Auto-funding only works with devnet RPC URLs and requires
WALLET_AUTOFUND_PAYER_PRIVATE_KEY to be configured.Signer Backends
Agentic Wallet supports multiple signer backends for different security and deployment requirements:Encrypted File
Development & TestingKeys encrypted with AES-256-GCM and stored locally.
Memory
Testing OnlyKeys stored in-memory, lost on restart.
KMS
Production: CloudAWS KMS or compatible key management service.
HSM
Production: HardwareHardware Security Module integration.
MPC
Production: DistributedMulti-Party Computation with threshold signatures.
Key Provenance
Each wallet includes provenance metadata:Balance Queries
SOL Balance
Query the native SOL balance for any wallet:SPL Token Balances
Query all SPL token holdings:Signing Operations
The wallet-engine provides a secure signing boundary. Private keys never leave the service:Transaction Signing
Message Signing
Wallet Listing
List all wallets or filter by public key:RPC Reliability
Wallet-engine includes automatic RPC retry logic:- Health-scored RPC pool: Automatic failover using
SOLANA_RPC_POOL_URLS - Adaptive retries: Configurable max retries and delay
- Error detection: Automatic retry for 429, fetch failures, blockhash issues
Configuration
Best Practices
Production Deployment
Production Deployment
- Never use memory or encrypted-file backends in production
- Use KMS, HSM, or MPC for production key management
- Enable RPC pool failover for high availability
- Set appropriate retry limits to avoid cascading failures
- Monitor wallet creation rate and implement rate limiting
Security
Security
- Private keys never appear in logs or API responses
- Signing operations are isolated in wallet-engine
- All key material is encrypted at rest (except memory backend)
- Use separate wallets for different risk profiles
- Implement wallet status management (active/disabled)
Development
Development
- Use autoFund for quick devnet testing
- Label wallets clearly for debugging
- Use encrypted-file backend for local development
- Test RPC failover scenarios
- Validate balance before attempting transactions
Source Code Reference
Wallet functionality is implemented in:services/wallet-engine/src/app.ts- Main wallet API (services/wallet-engine/src/app.ts:1)services/wallet-engine/src/key-provider/factory.ts- Signer backend factorypackages/common/src/schemas/wallet.ts- TypeScript schemas (packages/common/src/schemas/wallet.ts:1)