Verify Hookedin rounds offline
These standalone Node.js scripts let partners and players fetch round data, reproduce the winning ticket calculation, and verify the winning slip. They use only Node.js built-in modules.
Recommended workflow
- Open a settled round in the Hookedin website or choose a round number from /rounds.
- Download the public verification JSON for that round with get-round-info.cjs.
- Run verify-round-winner.cjs against the downloaded JSON.
- Compare the utility output with the website's displayed winning ticket and winning slip.
- Store the JSON and utility output if the partner needs an audit artifact.
node get-round-info.cjs https://hookedin.example 840 > round-840.json node verify-round-winner.cjs round-840.json
Command examples
Fetch round JSON
Downloads the exact public verification payload for round 840.
node get-round-info.cjs https://hookedin.example 840 > round-840.jsonDownloads the exact public verification payload for round 840.
Calculate only the winning ticket
Useful when a partner wants to reproduce the draw math from known public fields.
node verify-winning-ticket.cjs --round-number 840 --closing-block-hash <hash> --sold-ticket-count <count> --hashes-per-bisection 10000Useful when a partner wants to reproduce the draw math from known public fields.
Verify the full winner
Checks ticket-range continuity, calculates the winning ticket, and prints the winning slip.
node verify-round-winner.cjs round-840.jsonChecks ticket-range continuity, calculates the winning ticket, and prints the winning slip.
Verification JSON fields
round.roundNumberThe public round number being verified.
round.closingBlockHashThe Bitcoin block hash used as the deterministic draw input.
round.soldTicketCountThe total number of tickets sold in the shared round.
algorithmThe recorded winner algorithm ID for this round.
hashesPerBisectionThe recorded SHA-256 chain length used for each bisection.
stretchedHashThe public 32-character L/H bisection path for the draw.
winnerCalculationRecorded block-hash seed, initial/final digests, stretched hash, and bisection counts.
slips[].firstTicketNumberThe first ticket assigned to a public slip.
slips[].lastTicketNumberThe last ticket assigned to a public slip.
slips[].partnerPublic partner display metadata for the slip.
slips[].endUser.publicIdentifierDisplay-safe partner-supplied user identifier when present.
payoutLatest public payout status when a payout transaction exists.
What is verified
- the closing block hash format
- the recorded winner algorithm ID
- the stretched SHA-256 bisection message
- the public `stretchedHash` path when present
- the winning ticket inside the sold ticket count
- continuous ticket ranges with no gaps or overlaps
- the winning slip containing the winning ticket
- the public payout status when payout data is present
What is not verified
- whether a partner's public/private user identifiers map to a real casino account
- whether a partner credited that user correctly
- whether a payout transaction has been confirmed
- whether a public payout address belongs to the partner