v0.1.0
[0.1.0] - 2024-12-25
Added
Core Mining Engine
- Bitcoin vanity transaction miner that finds txids with leading zero hex digits
- Double-SHA256 hash computation with configurable difficulty target (0-32 leading zeros)
- Nonce iteration via
OP_RETURNoutput modification - Mining template system with prefix/suffix splitting for efficient batch processing
- Minimal big-endian nonce encoding with automatic segment splitting at byte boundaries
Transaction Construction
- SegWit support for P2WPKH and P2TR (Taproot) addresses
- Bech32/Bech32m address parsing and validation
- PSBT generation with
WITNESS_UTXOfor wallet signing - Virtual size (vsize) and fee estimation with configurable sats/vbyte
- Dust limit enforcement (310 sats for P2WPKH, 330 sats for P2TR)
- RBF-enabled transactions (default sequence
0xFFFFFFFD)
ZELD Distribution
- Optional CBOR-encoded distribution array in
OP_RETURN - Format:
OP_RETURN | "ZELD" | CBOR([distribution..., nonce]) - CBOR nonce encoding following RFC 8949
Multi-Platform Support
- Rust SDK (
zeldhash-minercrate) with CPU and optional GPU backends - TypeScript SDK (
zeldhash-minernpm package) with WebAssembly bindings no_stdcompatible core library (zeldhash-miner-core) using onlyalloc
CPU Parallelization
- Multi-threaded mining with Rayon (Rust native)
- Web Workers support for browser environments (TypeScript SDK)
- Stride-based work distribution across workers
- Atomic early termination when a match is found
GPU Acceleration
- WebGPU compute shaders (WGSL) for parallel hash computation
- 256-thread workgroups with automatic batch size tuning
- Buffer pooling and template caching for performance
- Graceful fallback to CPU when GPU is unavailable
Control Flow
- Pause/resume/stop controls for mining operations
- Progress callbacks with hash rate and elapsed time
- Event emitter pattern in TypeScript SDK (
on('progress'),on('found'), etc.)
Developer Experience
- Comprehensive error handling with typed error codes
- Optional
serdesupport for Rust types - Full API documentation in SDK READMEs
- Web demo application (Vite-based)
Architecture
zeldhash-miner/
├── crates/
│ ├── core/ # no_std algorithms (hash, tx, psbt, fees, nonce)
│ ├── gpu/ # WebGPU backend with WGSL shaders
│ ├── wasm/ # wasm-bindgen bindings
│ └── python-core/ # Placeholder for future pyo3 wheel
├── facades/
│ ├── rust/ # crates.io SDK
│ └── typescript/ # npm SDK + WASM artifacts
└── examples/
└── web-demo/ # Browser demo application
Performance
| Backend | Typical Hash Rate |
|---|---|
| CPU (single core) | 200-500 KH/s |
| CPU (8 cores) | 1-3 MH/s |
| Integrated GPU | 5-20 MH/s |
| Discrete GPU | 50-200+ MH/s |
Security
- Produces unsigned PSBTs only — no private keys handled
- Input validation for addresses, amounts, and script lengths
- Deterministic outputs for reproducible builds
- GPU shaders run in browser sandbox