Skip to Content
API ReferenceOverview

API Reference

This section documents all types, interfaces, and exports provided by @maktubbet/sdk.

Package Exports

React Components (tree-shakeable subpaths)

ExportComponentCSS
@maktubbet/sdk/diceDiceGameSDK@maktubbet/sdk/dice/styles.css
@maktubbet/sdk/kenoKenoGameSDK@maktubbet/sdk/keno/styles.css
@maktubbet/sdk/plinkoPlinkoGameSDK@maktubbet/sdk/plinko/styles.css
@maktubbet/sdk/limboLimboGameSDK@maktubbet/sdk/limbo/styles.css
@maktubbet/sdk/minesMinesGameSDK@maktubbet/sdk/mines/styles.css
@maktubbet/sdk/rouletteRouletteGameSDK@maktubbet/sdk/roulette/styles.css
@maktubbet/sdk/wheelWheelGameSDK@maktubbet/sdk/wheel/styles.css
@maktubbet/sdk/coinflipCoinFlipGameSDK@maktubbet/sdk/coinflip/styles.css
@maktubbet/sdk/blackjackBlackjackGameSDK@maktubbet/sdk/blackjack/styles.css
@maktubbet/sdk/hiloHiLoGameSDK@maktubbet/sdk/hilo/styles.css
@maktubbet/sdk/towerTowerGameSDK@maktubbet/sdk/tower/styles.css
@maktubbet/sdk/baccaratBaccaratGameSDK@maktubbet/sdk/baccarat/styles.css
@maktubbet/sdk/diamondsDiamondsGameSDK@maktubbet/sdk/diamonds/styles.css
@maktubbet/sdk/chickenChickenGameSDK@maktubbet/sdk/chicken/styles.css
@maktubbet/sdk/crashCrashGameSDK@maktubbet/sdk/crash/styles.css
@maktubbet/sdk/futuresFuturesGameSDK@maktubbet/sdk/futures/styles.css

The table lists a representative set. Every game in Available Games has a matching @maktubbet/sdk/<game> subpath, <Game>GameSDK component, and styles.css.

Root Export

@maktubbet/sdk re-exports all game components and their prop types:

import { DiceGameSDK, KenoGameSDK, PlinkoGameSDK, LimboGameSDK, MinesGameSDK, RouletteGameSDK, WheelGameSDK, CoinFlipGameSDK, BlackjackGameSDK, HiLoGameSDK, TowerGameSDK, BaccaratGameSDK, DiamondsGameSDK, ChickenGameSDK, CrashGameSDK, StairsGameSDK, } from '@maktubbet/sdk' import type { DiceGameSDKProps, KenoGameSDKProps, PlinkoGameSDKProps, LimboGameSDKProps, MinesGameSDKProps, RouletteGameSDKProps, WheelGameSDKProps, CoinFlipGameSDKProps, BlackjackGameSDKProps, HiLoGameSDKProps, TowerGameSDKProps, BaccaratGameSDKProps, DiamondsGameSDKProps, ChickenGameSDKProps, CrashGameSDKProps, StairsGameSDKProps, GameUser, GameCurrency, ToastData, } from '@maktubbet/sdk'

Vanilla JS Export

import MaktubSDK from '@maktubbet/sdk/vanilla' // or via IIFE global: @maktubbet/sdk/vanilla.global.js

The MaktubSDK object exposes:

MaktubSDK.dice(element, options): GameInstance MaktubSDK.keno(element, options): GameInstance MaktubSDK.plinko(element, options): GameInstance MaktubSDK.limbo(element, options): GameInstance MaktubSDK.mines(element, options): GameInstance MaktubSDK.roulette(element, options): GameInstance MaktubSDK.wheel(element, options): GameInstance MaktubSDK.coinflip(element, options): GameInstance MaktubSDK.blackjack(element, options): GameInstance MaktubSDK.hilo(element, options): GameInstance MaktubSDK.tower(element, options): GameInstance MaktubSDK.baccarat(element, options): GameInstance MaktubSDK.diamonds(element, options): GameInstance MaktubSDK.chicken(element, options): GameInstance MaktubSDK.crash(element, options): GameInstance

Shared Types

GameUser

type GameUser = { betCount: number // Total number of bets placed isAuthenticated: boolean // Whether the user is logged in }

GameCurrency

type GameCurrency = { code: string // Currency code, e.g. 'USD', 'BTC', 'ETH' prefix: string // Display prefix, e.g. '$', '₿' rate: number // Conversion rate relative to base currency }

ToastData

type ToastData = { title: string description?: string type?: 'info' | 'error' | 'success' | 'loading' }

GameSDKOptions (Vanilla JS)

interface GameSDKOptions { accessToken: string | null user: { betCount: number; isAuthenticated: boolean } updateBalance: (balance: number) => void onAuthRequired: () => void currency?: { code: string; prefix: string; rate: number } language?: string logo?: any onToast?: (toast: { title: string; description?: string }) => void }

GameInstance (Vanilla JS)

interface GameInstance { update(props: Partial<GameSDKOptions>): void destroy(): void }
Last updated on