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 --save-exact @hizi.io/[email protected]What to do
- Read
tokenandloginfrom your page's query string (see Step 2). - Connect once through the SDK getting-started guide. Preserve metadata needed by the operator and reality checks.
- Apply
gameSettingsin your UI. This includes stake limits, autoplay, gamble, and other operator platform rules. The engine validates financial requests. Your frontend implements the controls and disclosures. - 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 launch token can be single-use, and login() consumes it. Call login() once. Do not add a second connect path beside 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.