npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@getenginex/sdk-igaming

v0.7.0

Published

EngineX casino, bonuses, missions, loyalty, referrals and FIRST sportsbook on top of the @getenginex/sdk client

Readme

@getenginex/sdk-igaming

Casino, bonuses, missions, loyalty, referrals and the FIRST sportsbook for EngineX, built on the @getenginex/sdk client.

Docs · Português · Español

Namespaces: casino (catalog, launch game, sessions, history, winners ranking), bonus (campaigns, opt-in, claim, promo codes), missions, loyalty (points, tier, redeem), referrals and sportsbook (FIRST session for the iframe).

Install

Install it next to the core. The core is a peer dependency, so the app has a single copy of it (one session, tenant, hooks and validation for everything):

npm i @getenginex/sdk @getenginex/sdk-igaming

Peer: @getenginex/sdk >=0.6.0 <1.0.0. A client created by a core copy with an incompatible transport contract makes createIgaming throw CONFIGURATION_ERROR. zod 4 is shared with the core: keep a single zod 4 in the project.

Quick start

import { createEnginexClient } from '@getenginex/sdk'
import { createIgaming } from '@getenginex/sdk-igaming'

export const enginex = createEnginexClient({ locale: 'pt-BR' })
export const igaming = createIgaming(enginex)

const games = await igaming.casino.listGames({ category: 'slots', perPage: 24 })
const { gameUrl } = await igaming.casino.launchGame({ gameId: games.items[0].id }) // requires login

const offers = await igaming.bonus.listOffers() // requires login
await igaming.bonus.redeemPromoCode({ code: 'WELCOME' }, { idempotencyKey: crypto.randomUUID() })

gameUrl carries the game session token: the SDK returns it only as a result (never in hooks), so do not log it.

createIgaming creates no session, tenant or transport of its own and makes no request: every method goes through the app's client. Create one per client (one per app in the browser; one per request on the server). A value that is not a client created by createEnginexClient (for example a copy { ...enginex }) is rejected with CONFIGURATION_ERROR.

Entry points

| Subpath | Purpose | | --- | --- | | @getenginex/sdk-igaming | createIgaming and the casino, bonus, missions, loyalty, referrals and sportsbook namespaces | | @getenginex/sdk-igaming/testing | Mock routes for iGaming (withIgamingRoutes) on top of the core's createMockFetch | | @getenginex/sdk-igaming/first-frame | Origin-checked postMessage events and commands for the FIRST sportsbook iframe | | @getenginex/sdk-igaming/query | Query and mutation factories for TanStack Query v5 |

Queries and mutations

import { createIgamingMutations, createIgamingQueries } from '@getenginex/sdk-igaming/query'

const q = createIgamingQueries(igaming)
const m = createIgamingMutations(igaming)

q.casino.listGames({ page: 1 }) // { queryKey: ['enginex', 'public', 'casino', 'listGames', { page: 1 }], queryFn }
m.loyalty.redeem() // { mutationKey, mutationFn, invalidates }: loyalty and the core wallet

The casino catalog and public bonus offers use the public key; other reads use the user key. bonus.optIn/claim/redeemPromoCode and loyalty.redeem send an Idempotency-Key that is reused only after an ambiguous failure, with the same input and in the same mutation (Idempotency). The entry requires @getenginex/sdk >=0.6.0 and is not in the bundle of anyone who imports only the main entry.

FIRST iframe events

import { connectFirstFrame } from '@getenginex/sdk-igaming/first-frame'

const frame = connectFirstFrame(iframe, {
  onBetPlaced: () => void enginex.wallet.getBalance().then(showBalance),
  onLoginRequired: () => openLoginModal(),
})
frame.dispose() // on unmount

Details in Sportsbook (FIRST).

Testing

withIgamingRoutes adds the iGaming mock routes to the core's createMockFetch:

import { createEnginexClient } from '@getenginex/sdk'
import { createMockFetch } from '@getenginex/sdk/testing'
import { createIgaming } from '@getenginex/sdk-igaming'
import { withIgamingRoutes } from '@getenginex/sdk-igaming/testing'

const enginex = createEnginexClient({
  baseUrl: 'https://gateway.test', // in Node: absolute baseUrl + tenantHost (optional in the browser)
  tenantHost: 'casino.test',
  fetch: createMockFetch(withIgamingRoutes({ withdrawalOtp: true })),
})
const igaming = createIgaming(enginex)

Core routes still apply and options.routes win over the iGaming ones. To build the routes object by hand, use createIgamingRoutes(). See Testing and mocks.

Versions

While the major version is 0, minor versions may contain breaking changes and patch versions do not. Pin a tilde range (for example ~0.x.0, with the minor you use) to take only fixes, and read the upgrade guide and the changelog before upgrading.

License

Apache License 2.0.