curby
- Verifier
CurbyPulseVerifier- Documents
- the chain, the pulse and its predecessor
GuidesCheck a draw offline
Recompute a published draw from the documents its beacon served, without the network, and confirm they are the committed round.
A published draw is only worth trusting when anyone can check it, and the vendor that served the round may stop serving it long before someone wants to. The documents a beacon served for the round are enough: each beacon adapter has a verifier that makes every check its beacon makes, with no network, and returns the pulse the beacon returns for that round. This page shows how to save the documents, how to verify them for each beacon, how to compare the result with the commitment, and what to watch for.
Save every document byte for byte, exactly as the vendor’s API served it, and publish or archive them with the result.
curbyCurbyPulseVerifiercurby-qCurbyQuantumRoundVerifiernistNistPulseVerifierdrandDrandRoundVerifierThe CURBy chain is at https://api.entwine.me/chains/<chain>, its pulse at .../chains/<chain>/pulses/<round> and the predecessor at .../chains/<chain>/pulses/<round - 1>. A drand round is at https://api.drand.sh/<chain hash>/public/<round>. Reproducible Draws lists every URL, including the CURBy-Q and NIST documents.
CurbyPulseVerifier, in NCode.Randomness.Curby, takes the chain, the pulse and its predecessor.
var pulse = new CurbyPulseVerifier().Verify( chainJson, pulseJson, predecessorJson);using var draw = VerifiableRandom.Create(pulse, context);var bytes = draw.GetBytes(32);var first = Convert.ToHexStringLower(bytes);var rolls = Enumerable .Range(0, 5) .Select(_ => draw.NextInteger(1, 101)) .ToArray();// first is e43e360c9e2b9cd6a094e04a64e65922a3581ba6864da1cb1490244522f9986e,// and rolls is 80, 38, 69, 95, 91, the values the reference// implementation in docs/draws.md prints for this pulse and context.CurbyQuantumRoundVerifier, in NCode.Randomness.Curby, takes the round, its parameters, and the chain and pulse documents the round links to, in any order. It checks the round as CURBy’s client does, but it leaves the Bell-test certificate and the extraction to curby_verify, as ADR-1007 records.
var pulse = new CurbyQuantumRoundVerifier().Verify( roundJson, parameters, documents);using var draw = VerifiableRandom.Create(pulse, "example-raffle-2026-11-25");NistPulseVerifier, in NCode.Randomness.Nist, takes the pulse, its predecessor and the certificate the pulse names. When the predecessor names another certificate, as across a certificate rotation, pass the predecessor’s certificate too.
var pulse = new NistPulseVerifier().Verify( pulseJson, predecessorJson, certificate);using var draw = VerifiableRandom.Create(pulse, "example-raffle-2026-11-25");DrandRoundVerifier, in NCode.Randomness.Drand, takes the round. The quicknet chain’s key is a constant, so it needs no chain document.
var pulse = new DrandRoundVerifier().Verify(roundJson);using var draw = VerifiableRandom.Create(pulse, "example-raffle-2026-11-25");A verifier proves the documents are authentic, not that they are the round the draw committed to. Compare the pulse’s beacon, Round and Id with the ones published before the round existed.
// The documents are authentic, but are they the round// the draw committed to?if ( pulse.Beacon != "curby" || pulse.Round != committedRound || pulse.Id != committedId){ throw new InvalidOperationException( "The documents are authentic, but not the committed round." );}Every verifier makes its beacon’s checks against the same pinned anchor, and throws BeaconException with InvalidPulse when any check fails. No check depends on the clock: a NIST certificate must cover the pulse’s timestamp, not today, so a draw stays checkable after its certificate expires. Supplied beacon documents are verified offline by each beacon’s own checks records why.
VerifiableRandom.Create(pulse, context) straight after a verifier returns.Beacon, Round and Id with the commitment before you draw.BeaconException with InvalidPulse.CurbyQuantumRoundVerifier and treat a returned pulse as a checked Bell test.curby_verify on the round when you need those checked.