Verification compares a recorded result with the inputs and algorithm used for that round. It is not a promise of a win. Use the actual seeds, nonce, item ranges and ticket total from the game record; do not reuse inputs from a different round.
The server seed is secret while it is active. A seed hash is a commitment to that value. After the seed is revealed, compare its hash with the commitment recorded before play. Verification that needs an unrevealed seed cannot be completed yet. Pack openings use a client seed and nonce; EOS-based battles and Jackpot use the recorded future-block hash as the client seed.
Keep the round ID, seed commitment, revealed seed when available, client seed, nonce and result. Account history and game result details show the available records. Older records may use a different algorithm; check the record's version instead of assuming every game uses the example below.
Current pack openings and battle item drops use HMAC-SHA256 with the server seed as key and clientSeed:nonce as the message. The first 15 hexadecimal characters are converted to a JavaScript number, reduced modulo 100,000, then increased by 1. Match the result to the inclusive item ticket range. Each opening has its own recorded nonce.
const crypto = require('node:crypto');
function openingHash(serverSeed, clientSeed, nonce) {
return crypto.createHmac('sha256', serverSeed)
.update(`${clientSeed}:${nonce}`).digest('hex');
}
function packTicket(serverSeed, clientSeed, nonce) {
const hash = openingHash(serverSeed, clientSeed, nonce);
// Matches the current pack/battle-opening algorithm, including its numeric conversion.
return (parseInt(hash.slice(0, 15), 16) % 100000) + 1;
}
// Match this 1-based ticket to the item's inclusive startTicket/endTicket range.
module.exports = { openingHash, packTicket };Main Jackpot uses the actual inclusive ticket ranges recorded by the server. Current rounds assign one ticket per cent staked. A player's chance is their ticket count divided by all tickets, including multiple entries by that player. Player roles do not multiply those ticket counts.
Jackpot battles derive ticket ranges from drop values and select a winning team. The team's winning pot is shared between its members. The recorded jackpot metadata identifies the ticket and ranges; the battle wheel displays them with 1 added to each endpoint. If every drop is zero, the server uses its recorded zero-value fallback.
For main Jackpot, create the hash with mainJackpotHash below. Jackpot battles use openingHash from the pack example with the recorded settlement nonce to derive the hash. Pass that complete 64-character hash, not a pack ticket, into jackpotTicket. For the current sha256-rejection-v1 algorithm, the returned server ticket starts at 0.
const crypto = require('node:crypto');
function jackpotTicket(hash, totalTickets) {
if (!Number.isSafeInteger(totalTickets) || totalTickets < 1)
throw Error('Invalid ticket total');
const n = BigInt(totalTickets);
const space = 1n << 256n;
const limit = space - space % n;
let current = hash;
for (let i = 0; i < 100; i++) {
const value = BigInt('0x' + current);
if (value < limit) return Number(value % n);
current = crypto.createHash('sha256')
.update(hash + ':retry:' + i).digest('hex');
}
throw Error('Ticket rejection limit');
}
function mainJackpotHash(serverSeed, clientSeed) {
return crypto.createHmac('sha256', serverSeed)
.update(clientSeed).digest('hex');
}
// Jackpot tickets are 0-based in server records.
// The battle wheel adds 1 to the ticket and both range endpoints for display.
module.exports = { jackpotTicket, mainJackpotHash };Keno, Mines, Roulette and Coinflip have their own result rules. The pack verifier above is not a universal verifier for those games. Use each game's recorded inputs and algorithm. If the displayed reel, ticket, result or credited amount disagree, keep the round ID and contact support. Animation is a presentation of the result; it does not select a second winner.
Contact GalaxyBets support ↗