Skip to main content
Your game server runs the games, the bets and the proofs. Your side implements three steps, and the dashboard’s Integration page names them the same way: You install nothing from npm and write no game logic. The element, the games, the Provably fair dialog and every proof come from your game server.

The Integration page

The Integration page has three sections, in this order:
  1. Instructions for your coding agent (#agent): one text that covers the steps with your casino’s values and no secrets, with Copy instructions. See Use an AI agent.
  2. Steps: the three steps above, one open at a time, with a counter of the steps done. Each step shows its code with your values and links to these docs. A link ending in #embed, #session or #wallet opens that step.
  3. Secrets (#secrets): your SESSION_SECRET and WALLET_SECRET, their fingerprints and the date they were shown.
A second tab, Wallet contract, has the contract your wallet keeps.

The values you need

All of these come from the dashboard. The Integration page fills them into its code and its instructions for your coding agent. After the secrets have been shown, the page keeps only each one’s fingerprint: the first 12 hex digits of HMAC-SHA256 over the text kinematic-secret-fingerprint, keyed with the secret. Compute it from your copy to check that you hold the right one. See Settings for the allowed origins, the session issuer and the mode.

The order to build in

1

Put the games on your page

Add the element and the loader to a page whose origin is in Allowed origins. If your pages send a Content-Security-Policy, merge the directives the step shows under Content Security Policy, for pages that send one.
2

Sign session tokens

Answer POST /api/game-session with a token for the signed-in player. In sandbox the game server keeps test balances, so players can bet as soon as the first two steps work. The quickstart walks through both.
3

Connect your wallet

Implement /debit, /credit and /balance at your wallet URL with atomic, persistent idempotency. Test it with the cases in Test your integration.
4

Go live

Switch your casino to live mode in Settings, then run Check my wallet in the Connect your wallet step. See Go live.

When a step shows Done

  • Put the games on your page and Sign session tokens show Done once your game server reports your casino’s first bet. Until then they read No bet yet.
  • Connect your wallet shows Done once Check my wallet passes all its checks against your current wallet URL. In sandbox it reads Needed for live mode; in live mode Not checked yet, or Check failed after a check that did not pass. A check against an earlier wallet URL does not count.

How one bet flows

  1. The player presses BET. The element signs the bet with a key kept in the player’s browser and sends it to your game server.
  2. Your game server checks the session, the limits and the signature, then debits your wallet. In sandbox it debits its own test balance.
  3. Once the debit applies, the game server signs its acceptance of the bet. Only then does the browser reveal the seed that decides the outcome.
  4. The game server computes the outcome with your casino’s VRF key, stores the result and credits a win to your wallet.
  5. The element shows the result. The player can check the bet in the Provably fair dialog.
How it works describes each step and what it guarantees.