Quick Start

Get Wave Casino API running in your environment in under 5 minutes.

Prerequisites

  • Node.js β‰₯ 18 and pnpm
  • A Solana wallet (Phantom or Solflare)
  • Optional: MySQL database for Pragmatic/PGSoft legacy integration

1. Clone & install

git clone https://github.com/WAVEweb3/wave.git
cd wave
pnpm install

2. Configure environment

Copy the example env file for the API:

cp apps/api/.env.example apps/api/.env

Edit apps/api/.env:

# Your Solana wallet that owns the casino (Level 1 β€” Wave Creator)
PLATFORM_CREATOR_ADDRESS=YourWalletBase58Here

# SQLite DB path (created automatically)
SQLITE_DB_PATH=./casino.db

# House edge in basis points (default 200 = 2%)
HOUSE_EDGE_BPS=200

# Optional: Level 2 wallets (Platform Creators)
# CASINO_PLATFORM_CREATORS_JSON={"WalletBase58":true}

# Optional: Level 3 wallets (Integrators) mapped to agent codes
# CASINO_OPERATORS_JSON={"WalletBase58":"agent_code"}

# Legacy MySQL for Pragmatic/PGSoft (optional)
# MYSQL_HOST=localhost
# MYSQL_USER=root
# MYSQL_PASSWORD=secret
# MYSQL_DATABASE=igamewin

3. Start the API

pnpm api-dev
# β†’ API running on http://localhost:7000

4. Start the admin panel

pnpm --filter wave-admin dev
# β†’ Admin running on http://localhost:7003

Open http://localhost:7003 and connect your wallet (the one set in PLATFORM_CREATOR_ADDRESS). You’ll have full Level 1 access.

5. Create your first agent (operator)

In the admin panel:

  1. Go to Agents in the sidebar
  2. Click + Create
  3. Fill in Agent Code, Name, Email, Password
  4. The agent receives an API token to integrate their frontend

6. Launch a game

Use the Transfer API to launch a game for a user:

const res = await fetch('http://localhost:7000/casino/legacy/launch', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${agentToken}`,
  },
  body: JSON.stringify({
    gameCode: 'vs20fruitswx',  // Pragmatic game code
    userCode: 'user_123',
    language: 'pt',
  }),
})
 
const { url } = await res.json()
// Redirect user to `url`

Next steps