The operator cannot bias which holder wins. The result is reproducible by anyone who downloads the snapshot. Every value used in the roll exists on a public ledger before it is used.
The widget loads three shipped draws and runs the same HMAC-SHA-256 routine the worker runs. The proof is the recompute - if our published roll does not match the one your browser computes, the badge turns red.
Try #647, #645, #642
import { createHmac } from 'node:crypto';
export function rollFromSeed(
serverSeedHex: string,
slotHashHex: string,
drawId: number,
): string {
const mac = createHmac('sha256', Buffer.from(serverSeedHex, 'hex'));
mac.update(Buffer.from(slotHashHex, 'hex'));
mac.update(Buffer.from(String(drawId), 'utf8'));
return mac.digest('hex');
}Node ≥ 20 - no dependencies - same output as the browser widget.