ConsoleAPI & Webhooks
API ONLINE

Integration

Drop-in embed, operator config, wallet webhooks, and provably-fair verification.

1. Iframe Embed / SDK

One script tag mounts the full game and streams round events to your wallet.

<div id="rrx" style="height:720px"></div>
<script src="https://rocketrushx.app/sdk.js"></script>
<script>
  RocketRushX.mount('#rrx', {
    operatorId: 'RX-DEMO-001',
    currency:   'SOL',
    onRound: async (e) => {
      // e.type = 'round_committed' | 'round_started' | 'cashout' | 'round_settled'
      if (e.type === 'round_started')  await wallet.debit(e.bet);
      if (e.type === 'cashout')        await wallet.credit(e.payout);
      if (e.type === 'round_settled')  await ledger.write(e);
    },
  });
</script>
round_committed
Seed hash locked
round_started
Debit player bet
cashout
Credit winnings
round_settled
Reveal & ledger
2. Operator Config

One JSON document per operator key. Hot-loaded on every round — brand, currency, limits, locale, and webhook target.

{
  "operatorId": "RX-DEMO-001",
  "brand": {
    "name": "Rocket Rush X",
    "primary": "oklch(0.85 0.18 210)",
    "accent": "oklch(0.7 0.32 340)",
    "logo": "RX"
  },
  "currency": {
    "code": "SOL",
    "min": 0.001,
    "max": 5
  },
  "locale": "en",
  "walletWebhookUrl": "https://acme-casino.example/hooks/rrx",
  "embedOrigin": "*",
  "rtp": 0.97
}
3. Wallet Webhook Contract

Every settled round is also POSTed server-to-server, signed with your operator secret. Verify the signature, then reconcile with the cashout the player received in the iframe.

POST {walletWebhookUrl}
X-RRX-Signature: t=<unix>,v1=<hmac_sha256(secret, body)>
Content-Type: application/json

{
  "event":      "round.settled",
  "operatorId": "RX-DEMO-001",
  "playerId":   "p_8f2…",
  "roundId":    "r_01HXYZ…",
  "bet":        0.05,
  "payout":     0.12,
  "currency":   "SOL",
  "pick":       "cyan",
  "fairness": {
    "serverSeed":     "<revealed-hex-32>",
    "serverSeedHash": "<sha256-hex>",
    "clientSeed":     "<hex-8>",
    "nonce":          42,
    "digest":         "<hmac-hex>"
  }
}
4. Provably-Fair Verifier

Round outcome is locked by HMAC_SHA256(serverSeed, `${operatorId}:${clientSeed}:${nonce}`). Players can recompute every round at /verify. Nothing the server does after launch can change the result.

5. API Keys
Productionlive
rx_live_9a2c••••••••••••f0c1
Stagingtest
rx_test_4f81••••••••••••a3b2