Estimate a VDF difficulty (iteration count) for a target wall-clock delay.
difficulty
Results are approximate. Hardware, JS engine, and thermal throttling vary. For Pietrzak, the value is forced even and clamped to [66, 7000].
import { estimateDifficulty, WesolowskiVDFParams, DISCRIMINANT_256 } from 'crypto-vdf';const difficulty = estimateDifficulty({ bits: 256, targetSeconds: 2 });const vdf = new WesolowskiVDFParams(256).new();const proof = await vdf.solve(challenge, difficulty, DISCRIMINANT_256); Copy
import { estimateDifficulty, WesolowskiVDFParams, DISCRIMINANT_256 } from 'crypto-vdf';const difficulty = estimateDifficulty({ bits: 256, targetSeconds: 2 });const vdf = new WesolowskiVDFParams(256).new();const proof = await vdf.solve(challenge, difficulty, DISCRIMINANT_256);
Estimate a VDF
difficulty(iteration count) for a target wall-clock delay.Results are approximate. Hardware, JS engine, and thermal throttling vary. For Pietrzak, the value is forced even and clamped to [66, 7000].