MineOptions
@totemsdk/txpow / MineOptions
Interface: MineOptions
Properties
chunkSize?
optionalchunkSize?:number
Hash iterations per async yield (default: 10_000). Lower = more responsive UI; higher = slightly faster mining.
forceJs?
optionalforceJs?:boolean
Force the pure-JS mining path even when miner.wasm is present.
Useful for testing the JS fallback or comparing JS vs WASM performance.
maxIterations?
optionalmaxIterations?:number
Hard cap on total iterations (default: unlimited). Throws if exhausted without finding a valid nonce.
signal?
optionalsignal?:AbortSignal
AbortSignal — rejects the Promise when aborted.
timeMilli?
optionaltimeMilli?:bigint
Override the header timestamp (milliseconds since epoch). Defaults to Date.now(). Set a fixed value for deterministic testing.