Expand description
WebGPU mining runner.
The implementation wires a compute shader that performs the full
double-SHA256 over tx_prefix || nonce || tx_suffix. The shader mirrors the
CPU implementation in zeldhash-miner-core and returns txids in the same byte order
(big-endian hash bytes, which callers treat as txid by reversing when
counting leading zeros). Storage buffer layouts match the TODO design so the
JavaScript bindings and future optimizations can reuse them unchanged.
Structs§
- Adapter
Summary - Minimal adapter info exposed to callers (e.g., WASM bindings).
- GpuContext
- GPU context holding the device/queue.
- Mine
Result - Result returned when a matching nonce is found.
- Mining
Batch - Mining parameters for a single batch.
Enums§
- GpuError
- GPU initialization and dispatch errors.
Functions§
- calibrate_
batch_ size - Calibrate an approximate batch size for the current adapter.
- dispatch_
mining_ batch - Dispatch a mining batch on the GPU and return all matching nonces found.