The beacon API
Every batch that beats Einstein’s limit by more than 3σ becomes a pulse: certified random bits, hash-chained to the previous pulse. Everything here is public, JSON, and CORS-open.
Read the latest pulse
const pulse = await (await fetch("https://getbell.fun/api/beacon/latest")).json();
const bytes = pulse.value; // hex, pulse.bits bits long
const check = await (await fetch(`https://getbell.fun/api/beacon/${pulse.n}/verify`)).json(); // check.ok
To use a pulse fairly, commit to a future pulse number before it exists (for a raffle: “winners are drawn from pulse #n+3”), then read it when it appears.
Endpoints
GET /api/beacon/latest- The newest pulse.
GET /api/beacon/:n- Pulse number n:
n, batch, time, backend, settingsHash, outcomesHash, S, sigma, hmin, bits, curby, value, prev, hash, posted, tx. GET /api/beacon/:n/verify- Recomputes the pulse from the batch’s stored raw outcomes: S, the bit count, the Toeplitz extraction, the CURBy mixin, the chain and the hash. Simulator batches are also re-simulated from their public seed.
GET /api/beacon?limit=10- Recent pulses, newest first.
GET /api/batches?limit=12·GET /api/batches/:id- Batches (experiments), with settings, raw outcomes (hex), the 16-angle sweep, S and σ.
GET /api/cards/:batch/:side- The data behind a result card, including its inscription.
GET /api/stats- Counts, the inverse-variance weighted global S, waiting holders, backend.
How a pulse is made
- Two holders each choose 16 settings (a/a′ or b/b′). A cron pairs them every minute; after 10 minutes alone, the partner’s settings come from the CURBy pulse.
- The batch runs on IBM Quantum (Sampler, 16 rounds × 256 shots plus a 16-angle sweep) or, before hardware is connected, on an exact simulator seeded by
SHA-256(“BELL simulator v1|curby:…|drand:…|batch:…”)driving xoshiro128**. - S and σ are computed from the four setting pairs. If S − 3σ > 2, each of the 4,096 outcomes of side A carries at least 1 − log₂(1 + √(2 − S²/4)) bits of min-entropy.
- A Toeplitz hash seeded by SHA-256 of the previous pulse hash extracts ⌊4096 · Hmin⌋ − 64 bits, XORed with a stream derived from the CURBy pulse.
- The pulse body is hashed (SHA-256 of its canonical JSON) and chained. With a beacon key configured, each pulse is posted as a Solana memo.
Caveats: on one chip, certification assumes the two qubits don’t signal each other. The min-entropy bound is asymptotic. Before IBM credentials are set, batches run on the simulator and say so.