Exports & events ​
All exports below are server-side. Chip quantities are fictional in-game items. Client events are transport only and must not be treated as trusted integration APIs.
Exports ​
| Export | Returns | Notes |
|---|---|---|
GetChips(src) |
integer | Current casino chip count. |
GrantChips(src, amount, reason?) |
true or false, code |
Server resource call, maximum 100,000 chips per call, audited. |
OpenCasino(src) |
boolean | Opens the menu for a player. |
GetSeedCommitment() |
SHA-256 hash | Commitment to the process seed. |
GetRoundReveal(roundId) |
row or nil | Revealed round seed and result. Check sha256(seed_reveal) == seed_commit. |
HasCasinoAccess(src) |
boolean | Checks np_casino.admin. |
RecordSecurityEvent(src, kind, details?) |
boolean | Writes an audit row and routes alerts to available CCTV/surveillance integrations. |
Player events ​
| Event | Payload | Server checks |
|---|---|---|
np_casino:server:open |
none | Opens menu; claims pending refunds. |
np_casino:server:cashier |
none | Cashier proximity. |
np_casino:server:buyChips |
amount, paymentMethod |
Amount, cashier location, payment, exclusion and daily cap. |
np_casino:server:sellChips |
amount, paymentMethod |
Amount, location, chip balance and current method from np_payments:GetMethods. Personal IDs such as bank:<account-id> are credited to that selected account through np_banking. Without np_payments, use cash or bank. |
np_casino:server:play |
game, tableId, wager, choice? |
Game/table mapping, proximity, session, wager, inventory and limits. |
np_casino:server:blackjackAction |
`'hit' | 'stand'` |
np_casino:server:luckyWheel |
none | Once daily per character, location and exclusion. |
Persistence and recovery ​
casino_rounds, casino_audit, casino_daily, casino_refunds, casino_wheel_spins and casino_exclusions are created from sql/install.sql. Open wagers and recorded payouts are reconciled on restart. Cashier operations write durable cashier_*_started audit markers before value moves; unmatched markers and cashier_reconciliation_required entries need staff to compare inventory and account history after interruption. The payment, inventory and banking exports do not share one idempotent transaction, so cashier cases are not automatically reconciled.