Skip to Content
Advanced: Direct SDKReact IntegrationDouble

Double

A multiplayer color-betting game — pick Red, Black, or Green, place your bet, and watch the carousel spin to reveal the winning color.

Import

import { DoubleGameSDK } from '@maktubbet/sdk/double' import '@maktubbet/sdk/double/styles.css'

Usage

'use client' import { useState } from 'react' import { DoubleGameSDK } from '@maktubbet/sdk/double' import '@maktubbet/sdk/double/styles.css' export default function DoublePage() { return ( <DoubleGameSDK accessToken="user-jwt-token" user={{ betCount: 0, isAuthenticated: true }} updateBalance={(newBalance) => console.log(newBalance)} onAuthRequired={() => console.log('Auth required')} currency={{ code: 'USD', prefix: '$', rate: 1 }} language="en" logo={<span>MY LOGO</span>} onToast={(t) => console.log('Toast:', t.title)} userName="Player123" theme={{ backgroundDark: '#0D1117', backgroundDarkLight: '#161B22', inputBackground: '#0D1117', actionButtonColor: '#1C2333', buttonColor: '#FFFFFF', }} /> ) }

Demo Mode

Demo mode is automatically enabled when a user places a bet with a $0 amount. To run the game entirely client-side without a backend session, pass isDemo — see Demo Mode.

Features

  • Multiplayer rounds — bet alongside other players in real-time
  • Color selection — choose Red (x2), Black (x2), or Green (x14)
  • Carousel animation — watch the colored cards spin to reveal the result
  • Round history — view past rounds with result colors
  • Round modal — detailed provably fair data for each round
  • House edge — 6.67% (15-segment wheel: 1 green, 7 red, 7 black)

Props

See Shared PropsDoubleGameSDK accepts the standard DoubleGameSDKProps interface.

PropTypeRequiredDefault
accessTokenstring | null
userGameUser
updateBalance(balance: number) => void
onAuthRequired() => void
currencyGameCurrency{ code: 'USD', prefix: '$', rate: 1 }
languagestring'en'
logoReactNode
onToast(toast: ToastData) => void
themeGameTheme
userNamestring
Last updated on