rustywallet-batch
High-performance batch key and address generation for cryptocurrency wallets.
Features
- Batch Generation: Generate millions of keys and addresses efficiently
- Address Generation: Support for P2PKH, P2WPKH, and P2TR address types
- Parallel Processing: Utilize all CPU cores with rayon
- Memory Streaming: Process unlimited keys/addresses without memory exhaustion
- Incremental Scanning: Scan key ranges using EC point addition
- SIMD Optimization: Platform-aware SIMD for faster processing
- Memory-Mapped Output: Direct file writes without buffering overhead
- Resume Capability: Checkpoint and resume long-running operations
- Configurable: Flexible configuration for different use cases
Batch Address Generation
use ;
use Network;
// Generate 1000 P2WPKH addresses in parallel
let generator = new;
let addresses = generator.generate_vec.unwrap;
for in &addresses
Supported Address Types
- P2PKH - Legacy addresses (1...)
- P2WPKH - SegWit addresses (bc1q...)
- P2TR - Taproot addresses (bc1p...)
Streaming Address Generation
use ;
use Network;
// Stream 1 million addresses without storing all in memory
let generator = new;
for in generator.generate_stream.take
Quick Start
use *;
// Generate 1000 keys in parallel
let keys = new
.count
.parallel
.generate_vec
.unwrap;
println!;
Memory-Mapped File Output
use ;
// Generate keys directly to file
let count = new
.format
.parallel
.generate
.unwrap;
println!;
Resumable Generation
use ResumableBatchGenerator;
// Start or resume generation with checkpoints
let mut generator = new;
generator.generate_with_progress.unwrap;
SIMD Optimization
use SimdBatchProcessor;
// Check SIMD availability
println!;
// Generate with SIMD optimization
let processor = new;
let keys = processor.parallel_generate;
Streaming Large Batches
use *;
// Stream keys without storing all in memory
let stream = new
.count
.generate
.unwrap;
for key in stream.take
Incremental Key Scanning
use *;
use PrivateKey;
// Scan from a base key
let base = from_hex.unwrap;
let scanner = new
.direction;
for key in scanner.scan_range
Configuration Presets
use *;
// Fast mode - maximum speed
let config = fast;
// Balanced mode - good speed with reasonable memory
let config = balanced;
// Memory efficient - minimal memory usage
let config = memory_efficient;
Performance
Target performance: 1M+ keys per second with parallel processing enabled.
License
MIT