Skip to content

Sandbox Controls

Registry of all sandbox-only simulation controls. Sandbox is a fully self-contained environment for building and testing your frontend. Every control is null outside sandbox.

Platform time controls (sandbox)

One platform-wide control family (no module owns time):

ControlSignatureEffect
advanceTimesdk.sandbox.advanceTime(ms: number): Promise<void>Moves sandbox time forward by ms, driving every time-based transition platform-wide at once: bonus expiry, promotion scheduling, tournament start/end, tier maintenance and decay, RG limit cooling-off, self-exclusion start and expiry, reality checks
forceTransitionsdk.sandbox.forceTransition(entity: 'bonus' | 'promotion' | 'tournament' | 'rg-limit' | 'self-exclusion', id: string, targetStatus: string): Promise<void>Forces one seeded entity directly into a target status, for demonstrating a single transition without moving global time

Module controls (sandbox)

ModuleControlSignatureEffect
engagementsimulateWagersimulateWager(amount: number, currency: string, gameId?: string, balanceSource?: 'REAL' | 'BONUS'): Promise<void>Feeds the wagering pipeline: bonus wagering progress, XP & points, tournament scores. balanceSource defaults to 'REAL'; pass 'BONUS' to prove the real-money-only rule (nothing advances). See Engagement Overview.
authapproveKycapproveKyc(): Promise<void>Moves the current user's KYC PENDING → VERIFIED
authrejectKycrejectKyc(): Promise<void>Moves the current user's KYC PENDING → REJECTED
authgetResetTokengetResetToken(identifier: string): Promise<string>Retrieves the pending reset token for the given identifier (no email provider in the sandbox)
authgetVerificationCodegetVerificationCode(identifier: string): Promise<string>Retrieves the pending email/phone verification code for the given identifier (no email/SMS provider in the sandbox)
walletapproveWithdrawalapproveWithdrawal(transactionId: string): Promise<void>Withdrawal PENDING → COMPLETED; held funds are paid out
walletrejectWithdrawalrejectWithdrawal(transactionId: string): Promise<void>Withdrawal PENDING → REJECTED; held funds return to realBalance
walletsetWalletStatussetWalletStatus(walletId: string, status: 'ACTIVE' | 'FROZEN' | 'CLOSED'): Promise<void>Sets wallet status, to demonstrate FROZEN/CLOSED gating
walletconfirmQrDepositconfirmQrDeposit(transactionId: string): Promise<void>QR deposit intent → COMPLETED; balance credited; payment event fired
walletfailQrDepositfailQrDeposit(transactionId: string): Promise<void>QR deposit intent → FAILED; payment event fired
walletconfirmManualDepositconfirmManualDeposit(transactionId: string): Promise<void>Manual bank/crypto deposit PENDING_VERIFICATION → COMPLETED; balance credited; payment event fired
walletfailManualDepositfailManualDeposit(transactionId: string): Promise<void>Manual bank/crypto deposit PENDING_VERIFICATION → FAILED; payment event fired
engagementcompleteRedemptioncompleteRedemption(redemptionId: string): Promise<void>Loyalty merch fulfillment: redemption PENDING → COMPLETED (sets shippedAt), so physical-redemption tracking is demonstrable end-to-end
engagementseedsn/a (data, not a control)Near-boundary seeds: a bonus expiring in seconds (→ EXPIRED), a promotion activating in seconds (SCHEDULED→ACTIVE), a tournament starting in seconds (UPCOMING→ACTIVE), so time-based UI is demonstrable without any call at all
gamescompleteRoundcompleteRound(roundId: string, winAmount: number): Promise<void>Resolves a PENDING round server-side style: PENDING → COMPLETED, writes the WIN ledger entry when winAmount > 0, fires the round-resolved event
gamesfailRoundfailRound(roundId: string): Promise<void>Resolves a PENDING round: PENDING → FAILED; stake returned; fires the round-resolved event
messagingsimulateNotificationsimulateNotification(type: NotificationType, title: string, body: string): Promise<void>Delivers a real-time notification through the sandbox in-process channel, also persisted to the inbox
messagingdeliverInboxMessagedeliverInboxMessage(type: NotificationType, title: string, body: string): Promise<void>Adds an inbox message WITHOUT the real-time push, for testing the inbox-read flows alone
analyticsgetReceivedEventsgetReceivedEvents(): Promise<AnalyticsEvent[]>Returns every analytics event flushed into the sandbox sink: inspect your tracking without reaching into internals

Rules

  • Controls exist only in sandbox; sdk.sandbox and sdk.<module>.sandbox are null in staging/production.
  • Controls operate on the current sandbox user's data.
  • The platform time controls (sdk.sandbox.advanceTime, forceTransition) cover all time-based transitions across every module, so no behavior requires waiting on a clock to be demonstrated.