Appearance
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-sdkWhat to do
- Read
tokenandloginfrom your page's query string (see Step 2). - Call
login({ loginURL, launchToken }). On success, you get the long-lifetoken, thebackendURLto talk to, and the player'sgameSettings. - Apply
gameSettingsin 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. - 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. - Check the
successboolean on every response before you readresult.
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
- Getting Started with hizi engine SDK: covers installation, the annotated
loginandloadConfigcode, and what you need before you start. - Endpoints: the full request and response shape of
/loginand/loadConfig, including the completegameSettingslist.