Skip to content

AI prompts

For agents without skill support, or when you would rather steer it yourself. Paste one of these into your assistant inside the project you are integrating.

Integrate the Beexar casino platform into this project using the official SDK.
Install: npm install @beexar/sdk (zero dependencies, ESM + CJS, Node 18+)
Docs: https://docs.beexar.com/tools/sdk-node/
1. ANALYSE
Find the HTTP router, the configuration layer, and the ledger/wallet code
that owns player balances. Report what you found before writing anything.
2. IMPLEMENT
a. Launcher — `new Client({ casinoId, apiSecret })` from BEEXAR_CASINO_ID and
BEEXAR_API_SECRET. `launchReal()` returns { launch_url } for an iframe.
b. Wallet callbacks — implement WalletHandler's four methods (balance,
betWin, rollback, finish) against the existing ledger, and mount with
`beexarWallet(new WalletServer(handler, { apiSecret }))` from
'@beexar/sdk/express'. Mount it BEFORE any JSON body parser; if the app
already uses express.json(), switch it to
express.json({ verify: captureRawBody }).
c. Inside betWin, in ONE database transaction: look up id_provider (return
the stored id and stored balance if found); check the rollback tombstone
(throw WalletError.alreadyRolledBack() if set); then apply, all-or-nothing.
d. Money is the SDK's Money type — never a number, never parseFloat.
e. Errors: throw WalletError.insufficientFunds(balance) and friends. Codes
100/105/106 require the balance as an argument.
3. VERIFY
List changed files and the env vars I must set. Confirm it builds and any
tests you added pass. Tell me to run the Integration Test Game
(https://docs.beexar.com/guides/testing/) against the live callbacks.
Do not invent method names. If something in the SDK does not match this prompt,
stop and tell me.