Sequential delay
Each step depends on the last. Throwing more cores at it does not shorten the delay.
A Verifiable Delay Function forces sequential computation to produce an output—then proves it in milliseconds. Built for Node.js and browsers in TypeScript.
A VDF is a function y = f(x) that takes a chosen wall-clock time to compute (even with many CPUs), but where anyone can check y from a compact proof in a fraction of a second. That gap between slow evaluation and fast verification is the whole point.
Each step depends on the last. Throwing more cores at it does not shorten the delay.
The prover outputs a proof π that encodes the delayed computation without redoing all the work.
Validators, smart contracts, or clients confirm correctness quickly—no trust in the prover’s hardware.
Evaluation time is a tunable parameter (difficulty). Verification stays cheap.
Ideal for fairness: no one can “buy” a shorter delay with more GPUs alone.
Protocols need time to pass—or randomness no one could have predicted early. VDFs anchor that logic in cryptography instead of trusted timers.
Everyone agrees on output only after the delay elapses—late entrants cannot bias earlier rounds.
Unbiasable public randomness for lotteries, leader election, and consensus protocols after a public delay.
Proof-of-time and delay in leader selection—reducing advantage from hashrate alone in some designs.
Encrypt or commit to data that only becomes usable after a verifiable wait—useful for escrows and timed release.
Order or reveal transactions only after a delay so participants cannot rush ahead of a committed schedule.
This runs the same browser bundle published on npm. Watch each step:
a public challenge goes in, solve() burns time on your CPU, then verify() checks the proof instantly.
Parse your hex string into Uint8Array.
Pick scheme + load precomputed discriminant.
Sequential work — cannot be shortened with more cores.
Compact certificate of the computation.
Anyone validates π without repeating the delay.
Output is trustworthy — the delay really elapsed.
TypeScript implementations of Pietrzak and Wesolowski VDFs with precomputed discriminants (256–2048 bit), Node.js ESM/CJS, and a browser bundle.
Any positive difficulty, smaller proofs, fast verify. Default choice for production.
Even difficulty ≥ 66, max 7000 in this JS port. Compact proofs at lower difficulties.
Discriminants from Rust GMP—do not generate in pure JS for production workloads.
DISCRIMINANT_* constants and Wesolowski unless you have a specific reason for Pietrzak.
npm install crypto-vdf
import { WesolowskiVDFParams, DISCRIMINANT_256 } from 'crypto-vdf';
const vdf = new WesolowskiVDFParams(256).new();
const challenge = new Uint8Array([0xaa, 0xbb, 0xcc]);
const proof = await vdf.solve(challenge, 100, DISCRIMINANT_256);
vdf.verify(challenge, 100, proof, DISCRIMINANT_256);