Backend-proxied TxLINE fixtures
The browser calls /api/txline/fixtures. The server fetches a guest JWT, attaches TXLINE_API_TOKEN, and returns covered fixtures.
Build docs
A concise guide to the live TxLINE-backed arena, backend proxy, token activation helper, and production hardening path.
Runtime
The browser calls /api/txline/fixtures. The server fetches a guest JWT, attaches TXLINE_API_TOKEN, and returns covered fixtures.
When a fixture is selected, the app checks odds and score snapshots through /api/txline/snapshot. Empty snapshots are shown honestly.
The selected fixture is sent to /api/txline/agent, where SharpScout, MarketMaker, and RiskGuard return a deterministic action, evidence counts, quote-band data when odds are available, and a receipt ID.
When DATABASE_URL is configured, each backend agent receipt is saved to Postgres and shown through /api/receipts.
The app calls /api/txline/stream-status for odds and scores so the UI can show whether TxLINE SSE paths are reachable from the backend.
The app opens /api/txline/stream with browser EventSource. The backend attaches TxLINE credentials and filters stream messages for the selected fixture.
When TxLINE returns odds price points, MarketMaker computes a bounded quote band, midpoint, spread, and sample size. If odds are unavailable, it refuses to quote.
The proof panel calls /api/txline/proof for fixture, odds, and score-stat validation payloads when the selected evidence includes the required identifiers.
The main app does not ask users to paste a TxLINE token. Credentials belong in backend environment variables.
Setup
Set this on Vercel and in local development:
TXLINE_API_TOKEN - activated TxLINE API token.DATABASE_URL - Neon/Postgres pooled connection string for receipt history.Use Vercel dev or another Node host that can run the API routes. Static file hosting alone will not serve /api/txline/*.
The helper remains available for activation flows and wallet troubleshooting, but the main app should use backend credentials.
Production path
Serverless SSE connections reconnect periodically, so the UI treats the proxy as a live window rather than a permanent socket.
The app retrieves Merkle proof payloads. Full Solana program simulation can be added when an in-app validator flow is required.