Skip to main content

Logging

Servers SHOULD log the following for operational visibility:
  • All authenticate and authenticated events (with wallet address, session ID)
  • All error and game_error messages sent
  • Session lifecycle events (connect, disconnect, reconnect, session_expiring)
  • Timeout events (which client, which table, what default action was applied)
  • Account linkage changes (link, unlink, permission modifications)
Servers MUST NOT log authentication tokens or wallet private keys.

Metrics

Key metrics to track:

Traceability

The messageId field on every message provides end-to-end traceability. Link game actions to their outcomes via messageIdrelatedMessageId chains in error messages and round results.

Audit Trail

For regulatory compliance, maintain an audit trail that includes:
  • Complete game histories (all messages per round)
  • Fund movements (deposits, withdrawals, game wins/losses, rake)
  • Session lifecycle (connect, authenticate, disconnect, timeout)
  • Account linkage events (link, unlink, permission changes)
The transaction history endpoint (GET /api/wallet/transactions) provides the financial audit trail. Supplement this with game-level event logging for complete coverage.