Mines
Uncover tiles on a grid to find gems while avoiding hidden mines. Cash out at any time to lock in your winnings.
Import
import { MinesGameSDK } from '@maktubbet/sdk/mines'
import '@maktubbet/sdk/mines/styles.css'Usage
'use client'
import { useState } from 'react'
import { MinesGameSDK } from '@maktubbet/sdk/mines'
import '@maktubbet/sdk/mines/styles.css'
export default function MinesPage() {
return (
<MinesGameSDK
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)}
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
- 5×5 grid — 25 tiles to uncover
- Configurable mine count — choose how many mines are hidden
- Progressive multiplier — payout increases with each gem uncovered
- Cash out — collect winnings at any point during the round
- Autobet — automated consecutive rounds
Props
See Shared Props — MinesGameSDK accepts the standard MinesGameSDKProps interface.
| Prop | Type | Required | Default |
|---|---|---|---|
accessToken | string | null | ✅ | — |
user | GameUser | ✅ | — |
updateBalance | (balance: number) => void | ✅ | — |
onAuthRequired | () => void | ✅ | — |
currency | GameCurrency | — | { code: 'USD', prefix: '$', rate: 1 } |
language | string | — | 'en' |
logo | ReactNode | — | — |
onToast | (toast: ToastData) => void | — | — |
theme | GameTheme | — | — |
Last updated on