In order to allow players to verify their bets, a pair of Server Seed and Client Seed is used to calculate a roll number.
We publish a SHA-256 hashed version of the server seed for the current day so you can ensure it never changes. At the end of the day, we publish the unlashed server seed for you to verify rollswith.
function calculateHash(clientSeed, nonce, serverSeed) {
const crypto = require('crypto');
// Step 1: Calculate HMAC-SHA256 hash
const hmac = crypto
.createHmac('sha256', serverSeed)
.update(`${clientSeed}:${nonce}`)
.digest('hex');
// Step 2: Take the first 15 characters
const first15Chars = hmac.substring(0, 15);
// Step 3: Convert to decimal
const decimalValue = BigInt(`0x${first15Chars}`);
// Step 4: Perform modulus 47
const remainder = decimalValue % 47n;
// Step 5: Take 14 characters starting from the index (assume starting index = remainder)
const startIndex = Number(remainder);
const next14Chars = hmac.substring(startIndex, startIndex + 14);
// Step 6: Convert to decimal
const nextDecimalValue = BigInt(`0x${next14Chars}`);
// Step 7: Divide by 8, multiply by 2^-53, multiply by 10000
const result =
(Number(nextDecimalValue) / 8) *
Math.pow(2, -53) *
10000;
// Step 8: Take the integer part
return Math.floor(result);
}
const clientSeed = "2wzp443ewBZXa1yT";
const nonce = 0;
const serverSeed = "8SuBhXE3F2TFfAorCyE4qozN0pWUqF5p1hW5NFVJzWocs19pXUzkxTOT";
const result = calculateHash(clientSeed, nonce, serverSeed);
console.log(result); // 110.82
Validate Round result
Date | User | Public Seed | Rolls |
---|---|---|---|
2024-05-10 | 63329f6b91076e63d2196123d3189... | 63329f6b91076e63d2196123d3189 | 9628688 - 9630672 |
2024-05-10 | 63329f6b91076e63d2196123d3189... | 63329f6b91076e63d2196123d3189 | 9628688 - 9630672 |
2024-05-10 | 63329f6b91076e63d2196123d3189... | 63329f6b91076e63d2196123d3189 | 9628688 - 9630672 |
The result for each case opening is generated by the following logic.
function calculateHash(clientSeed, nonce, serverSeed) {
const crypto = require('crypto');
// Step 1: Calculate HMAC-SHA256 hash
const hmac = crypto
.createHmac('sha256', serverSeed)
.update(`${clientSeed}:${nonce}`)
.digest('hex');
// Step 2: Take the first 15 characters
const first15Chars = hmac.substring(0, 15);
// Step 3: Convert to decimal
const decimalValue = BigInt(`0x${first15Chars}`);
// Step 4: Perform modulus 47
const remainder = decimalValue % 47n;
// Step 5: Take 14 characters starting from the index (assume starting index = remainder)
const startIndex = Number(remainder);
const next14Chars = hmac.substring(startIndex, startIndex + 14);
// Step 6: Convert to decimal
const nextDecimalValue = BigInt(`0x${next14Chars}`);
// Step 7: Divide by 8, multiply by 2^-53, multiply by 10000
const result =
(Number(nextDecimalValue) / 8) *
Math.pow(2, -53) *
10000;
// Step 8: Take the integer part
return Math.floor(result);
}
const clientSeed = "2wzp443ewBZXa1yT";
const nonce = 0;
const serverSeed = "8SuBhXE3F2TFfAorCyE4qozN0pWUqF5p1hW5NFVJzWocs19pXUzkxTOT";
const result = calculateHash(clientSeed, nonce, serverSeed);
console.log(result); // 110.82
The result for each case opening is generated by the following logic.
function calculateHash(clientSeed, nonce, serverSeed) {
const crypto = require('crypto');
// Step 1: Calculate HMAC-SHA256 hash
const hmac = crypto
.createHmac('sha256', serverSeed)
.update(`${clientSeed}:${nonce}`)
.digest('hex');
// Step 2: Take the first 15 characters
const first15Chars = hmac.substring(0, 15);
// Step 3: Convert to decimal
const decimalValue = BigInt(`0x${first15Chars}`);
// Step 4: Perform modulus 47
const remainder = decimalValue % 47n;
// Step 5: Take 14 characters starting from the index (assume starting index = remainder)
const startIndex = Number(remainder);
const next14Chars = hmac.substring(startIndex, startIndex + 14);
// Step 6: Convert to decimal
const nextDecimalValue = BigInt(`0x${next14Chars}`);
// Step 7: Divide by 8, multiply by 2^-53, multiply by 10000
const result =
(Number(nextDecimalValue) / 8) *
Math.pow(2, -53) *
10000;
// Step 8: Take the integer part
return Math.floor(result);
}
const clientSeed = "2wzp443ewBZXa1yT";
const nonce = 0;
const serverSeed = "8SuBhXE3F2TFfAorCyE4qozN0pWUqF5p1hW5NFVJzWocs19pXUzkxTOT";
const result = calculateHash(clientSeed, nonce, serverSeed);
console.log(result); // 110.82
How is the data calculated?
To generate a roll number between 0 and 99,999:
The following code example can be used to verify a bet:
function calculateHash(clientSeed, nonce, serverSeed) {
const crypto = require('crypto');
// Step 1: Calculate HMAC-SHA256 hash
const hmac = crypto
.createHmac('sha256', serverSeed)
.update(`${clientSeed}:${nonce}`)
.digest('hex');
// Step 2: Take the first 15 characters
const first15Chars = hmac.substring(0, 15);
// Step 3: Convert to decimal
const decimalValue = BigInt(`0x${first15Chars}`);
// Step 4: Perform modulus 47
const remainder = decimalValue % 47n;
// Step 5: Take 14 characters starting from the index (assume starting index = remainder)
const startIndex = Number(remainder);
const next14Chars = hmac.substring(startIndex, startIndex + 14);
// Step 6: Convert to decimal
const nextDecimalValue = BigInt(`0x${next14Chars}`);
// Step 7: Divide by 8, multiply by 2^-53, multiply by 10000
const result =
(Number(nextDecimalValue) / 8) *
Math.pow(2, -53) *
10000;
// Step 8: Take the integer part
return Math.floor(result);
}
const clientSeed = "2wzp443ewBZXa1yT";
const nonce = 0;
const serverSeed = "8SuBhXE3F2TFfAorCyE4qozN0pWUqF5p1hW5NFVJzWocs19pXUzkxTOT";
const result = calculateHash(clientSeed, nonce, serverSeed);
console.log(result); // 110.82
Note: A new seed must be set to verify the previous data (the server seed is encrypted)
function calculateHash(clientSeed, nonce, serverSeed) {
const crypto = require('crypto');
// Step 1: Calculate HMAC-SHA256 hash
const hmac = crypto
.createHmac('sha256', serverSeed)
.update(`${clientSeed}:${nonce}`)
.digest('hex');
// Step 2: Take the first 15 characters
const first15Chars = hmac.substring(0, 15);
// Step 3: Convert to decimal
const decimalValue = BigInt(`0x${first15Chars}`);
// Step 4: Perform modulus 47
const remainder = decimalValue % 47n;
// Step 5: Take 14 characters starting from the index (assume starting index = remainder)
const startIndex = Number(remainder);
const next14Chars = hmac.substring(startIndex, startIndex + 14);
// Step 6: Convert to decimal
const nextDecimalValue = BigInt(`0x${next14Chars}`);
// Step 7: Divide by 8, multiply by 2^-53, multiply by 10000
const result =
(Number(nextDecimalValue) / 8) *
Math.pow(2, -53) *
10000;
// Step 8: Take the integer part
return Math.floor(result);
}
const clientSeed = "2wzp443ewBZXa1yT";
const nonce = 0;
const serverSeed = "8SuBhXE3F2TFfAorCyE4qozN0pWUqF5p1hW5NFVJzWocs19pXUzkxTOT";
const result = calculateHash(clientSeed, nonce, serverSeed);
console.log(result); // 110.82
How is the data calculated?
To generate a roll number between 0 and 99,999:
The following code example can be used to verify a bet:
function calculateHash(clientSeed, nonce, serverSeed) {
const crypto = require('crypto');
// Step 1: Calculate HMAC-SHA256 hash
const hmac = crypto
.createHmac('sha256', serverSeed)
.update(`${clientSeed}:${nonce}`)
.digest('hex');
// Step 2: Take the first 15 characters
const first15Chars = hmac.substring(0, 15);
// Step 3: Convert to decimal
const decimalValue = BigInt(`0x${first15Chars}`);
// Step 4: Perform modulus 47
const remainder = decimalValue % 47n;
// Step 5: Take 14 characters starting from the index (assume starting index = remainder)
const startIndex = Number(remainder);
const next14Chars = hmac.substring(startIndex, startIndex + 14);
// Step 6: Convert to decimal
const nextDecimalValue = BigInt(`0x${next14Chars}`);
// Step 7: Divide by 8, multiply by 2^-53, multiply by 10000
const result =
(Number(nextDecimalValue) / 8) *
Math.pow(2, -53) *
10000;
// Step 8: Take the integer part
return Math.floor(result);
}
const clientSeed = "2wzp443ewBZXa1yT";
const nonce = 0;
const serverSeed = "8SuBhXE3F2TFfAorCyE4qozN0pWUqF5p1hW5NFVJzWocs19pXUzkxTOT";
const result = calculateHash(clientSeed, nonce, serverSeed);
console.log(result); // 110.82
How is the data calculated?
To generate a roll number between 0 and 99,999:
The following code example can be used to verify a bet:
function calculateHash(clientSeed, nonce, serverSeed) {
const crypto = require('crypto');
// Step 1: Calculate HMAC-SHA256 hash
const hmac = crypto
.createHmac('sha256', serverSeed)
.update(`${clientSeed}:${nonce}`)
.digest('hex');
// Step 2: Take the first 15 characters
const first15Chars = hmac.substring(0, 15);
// Step 3: Convert to decimal
const decimalValue = BigInt(`0x${first15Chars}`);
// Step 4: Perform modulus 47
const remainder = decimalValue % 47n;
// Step 5: Take 14 characters starting from the index (assume starting index = remainder)
const startIndex = Number(remainder);
const next14Chars = hmac.substring(startIndex, startIndex + 14);
// Step 6: Convert to decimal
const nextDecimalValue = BigInt(`0x${next14Chars}`);
// Step 7: Divide by 8, multiply by 2^-53, multiply by 10000
const result =
(Number(nextDecimalValue) / 8) *
Math.pow(2, -53) *
10000;
// Step 8: Take the integer part
return Math.floor(result);
}
const clientSeed = "2wzp443ewBZXa1yT";
const nonce = 0;
const serverSeed = "8SuBhXE3F2TFfAorCyE4qozN0pWUqF5p1hW5NFVJzWocs19pXUzkxTOT";
const result = calculateHash(clientSeed, nonce, serverSeed);
console.log(result); // 110.82