🎲 Verifiable Raffle (drand)

Client-side, verifiable drawing. Multi-relay + signature verification. No server trust.

Live demo

Edit the parameters below and click “Compute”. The widget fetches the drand beacon, verifies its signature, maps it to winners using rejection sampling (uniform, without replacement), and prints an audit JSON for anyone to reproduce.

Embed on your site

Use a data container and load the module script from your Cloudflare Pages domain. You can prefill defaults with data attributes.

Paste into any HTTPS page.

    

How it works

`.trim(); pre.textContent = code; } [efT, efN, efK, efH].forEach(el => el.addEventListener('input', updateSnippet)); updateSnippet(); copyBtn.addEventListener('click', async () => { await navigator.clipboard.writeText(pre.textContent); const label = copyBtn.textContent; copyBtn.textContent = 'Copied ✓'; setTimeout(() => copyBtn.textContent = label, 1200); });