Skip to content

Step 3: Install the SDK

@hizi.io/engine-sdk is the typed client between your frontend and the running engine. It is on the public npm registry. You need no registry setup.

bash
npm install @hizi.io/engine-sdk

What to do

  1. Read token and login from your page's query string (see Step 2).
  2. Call login({ loginURL, launchToken }). On success, you get the long-life token, the backendURL to talk to, and the player's gameSettings.
  3. Apply gameSettings in your UI. This includes stake limits, autoplay, gamble, and other operator platform rules. The engine does not enforce these itself. Your frontend must honour them.
  4. Call loadConfig({ backendURL, token }) to get the game's configuration. This includes the available stakes, RTP (return to player), buy-feature options, and any per-game tables your client needs to render.
  5. Check the success boolean on every response before you read result.

TIP

Keep the long-life token and backendURL for the rest of the session. Every later call needs them. The short-life launch token is single-use. login spends it.

Where to read more

Next: Step 4: Place bets and collect.