REST API
raffl does not run a REST API. The website reads on-chain accounts directly via Solana RPC, with the API key proxied through a Next.js route handler so it never reaches the browser.
Why no REST
Every piece of state is on-chain. A REST layer would just be a cache in front of getAccountInfo and getProgramAccounts calls. For v0.1 we punted; for v0.2, if traffic justifies it, a Helius webhook indexer feeding a thin read API is the natural shape.
What to use instead
- Read accounts. Any Solana RPC. The public devnet endpoint works for read-only access.
- Subscribe to changes. WebSocket
programNotificationsagainst the raffl program ID. The website does this via@solana/kit'srpcSubscriptions.programNotifications(...). - Decode accounts. The Codama-generated client at
web/lib/program-client/ships typed decoders forRaffle,Ticket, andRafflePlatform.
The full read pipeline (RPC + filter + decode + adapt to view models) lives in web/lib/program.ts. It is short and copyable.