EdgeArena

Build docs

EdgeArena integration notes.

A concise guide to the live TxLINE-backed arena, backend proxy, token activation helper, and production hardening path.

Runtime

What is live in this build.

Backend-proxied TxLINE fixtures

The browser calls /api/txline/fixtures. The server fetches a guest JWT, attaches TXLINE_API_TOKEN, and returns covered fixtures.

Per-fixture snapshots

When a fixture is selected, the app checks odds and score snapshots through /api/txline/snapshot. Empty snapshots are shown honestly.

Backend agent receipt

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.

Persistent receipt history

When DATABASE_URL is configured, each backend agent receipt is saved to Postgres and shown through /api/receipts.

Stream reachability check

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.

Live SSE proxy

The app opens /api/txline/stream with browser EventSource. The backend attaches TxLINE credentials and filters stream messages for the selected fixture.

Quote-band model

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.

Merkle proof view

The proof panel calls /api/txline/proof for fixture, odds, and score-stat validation payloads when the selected evidence includes the required identifiers.

No frontend token entry

The main app does not ask users to paste a TxLINE token. Credentials belong in backend environment variables.

Setup

Environment and deploy steps.

Required variable

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.

Local run

Use Vercel dev or another Node host that can run the API routes. Static file hosting alone will not serve /api/txline/*.

Token helper

The helper remains available for activation flows and wallet troubleshooting, but the main app should use backend credentials.

Production path

What to harden next.

Stream proxy

Serverless SSE connections reconnect periodically, so the UI treats the proxy as a live window rather than a permanent socket.

Proof views

The app retrieves Merkle proof payloads. Full Solana program simulation can be added when an in-app validator flow is required.