Overview
Security is paramount when building AI-powered blockchain applications. This guide covers wallet management, security best practices, and how to keep your Radix Agent Kit applications secure.🔐 Wallet Types
Radix Agent Kit supports multiple wallet implementations for different security needs:MnemonicWallet (Default)
Best for: Development, testing, and automated applications- 24-word BIP-39 mnemonic phrases
- Compatible with Radix Wallet app
- Deterministic key derivation
- Multiple account support
- Store mnemonic securely (environment variables, vaults)
- Never log or expose mnemonic phrases
- Use testnet for development
HardwareWallet (Future)
Best for: High-value applications and enhanced security- Ledger hardware wallet support
- Secure key storage on device
- Transaction signing on hardware
- Air-gapped security
VaultWallet
Best for: Enterprise applications and secure key management- HashiCorp Vault integration
- Centralized key management
- Audit logging
- Role-based access control
🛡️ Security Best Practices
Environment Variables
Never hardcode sensitive information:Secure .env File
Create a.env file with proper permissions:
Network Separation
Always use testnet for development:🔒 Key Management
Mnemonic Generation
Generate secure mnemonics:Key Rotation
Regularly rotate keys for production applications:Multi-Account Management
Use different accounts for different purposes:🚨 Transaction Security
Input Validation
Always validate user inputs:Rate Limiting
Implement rate limiting for agent operations:Transaction Confirmation
Implement confirmation for high-value operations:🔍 Monitoring & Logging
Secure Logging
Log operations without exposing sensitive data:Error Handling
Handle errors securely without exposing internals:🏢 Production Deployment
Environment Separation
Use different configurations for different environments:Health Monitoring
Monitor agent health and performance:🚨 Security Checklist
Development
- Use testnet (Stokenet) for all development
- Store secrets in environment variables
- Never commit private keys or mnemonics
- Implement proper error handling
- Add input validation
- Use rate limiting
Production
- Use separate production keys
- Implement transaction confirmation for high values
- Set up monitoring and alerting
- Regular security audits
- Key rotation strategy
- Backup and recovery procedures
Code Security
- Regular dependency updates
- Security linting (ESLint security rules)
- Code review process
- Automated security testing
- Vulnerability scanning
🆘 Incident Response
Compromised Keys
If you suspect your keys are compromised:- Immediately stop the agent
- Generate new wallet with fresh mnemonic
- Transfer all funds to new wallet
- Revoke old API keys
- Review logs for suspicious activity
- Update all environment configurations
Emergency Procedures
📚 Additional Resources
- Radix Security Best Practices
- OWASP Cryptographic Storage Cheat Sheet
- Node.js Security Best Practices