wallet.rs - Key Management
Wallet Structure and Key Management
// src/wallet.rs (lines 6-12)
pub struct Wallet {
secret_key: SecretKey,
public_key: PublicKey,
current_nonce: u64,
}Ed25519 Key Generation
// src/wallet.rs (lines 14-23)
impl Wallet {
pub fn generate() -> Self {
let mut csprng = OsRng;
let secret_key = SecretKey::generate(&mut csprng);
let public_key: PublicKey = (&secret_key).into();
Self {
secret_key,
public_key,
current_nonce: 0,
}
}
}Wallet Persistence and Recovery
JSON Serialization Format
Security Considerations
Transaction Creation and Signing
Deterministic Nonce Management
Feature
Implementation
Radio Benefits
Public Key Operations
Address Generation
Integration with CLI Commands
Wallet Command Implementations
Radio-Optimized Features
Compact Key Format
Offline Operation Capability
Error Handling and Recovery
Graceful Degradation
Backup and Recovery Strategies
Security Model
Cryptographic Properties
Property
Implementation
Security Level