Skip to main content

TxLINE integration reference

API origin and authentication

Devnet origin: https://txline-dev.txodds.com Activation signs the exact UTF-8 preimage `${txSig}:${leagues.join(",")}:${jwt}` with a detached Ed25519 signature encoded as base64. With no leagues, the preimage contains txSig::jwt. Authenticated data requests include both headers:
The guest JWT is renewed on HTTP 401. The activated API token is retained.

Data endpoints used by Slip

Slip does not require TxLINE consensus odds. Parimutuel pool balances are the price input.

Soccer stat keys

statKey = periodPrefix + baseKey Full-match expressions store canonical period tag 100; period-prefixed expressions store their prefix. The ScoreStat.period inside a proof is different: it is the live match phase at the time of the record.

Terminal phases

Settlement accepts ScoreStat.period 5, 10, 13, or 100. Values 11 and 12 are live penalty phases, not terminal states. The keeper also recognizes action=game_finalised as terminal.

Proof payload mapping

stat-validation returns number arrays for hashes. The SDK maps the response into ScoresProof:
  • statToProve and statProofstatA;
  • optional statToProve2 and statProof2statB;
  • summary.updateStats and summary.eventStatsSubTreeRoot → the committed fixture summary;
  • subTreeProof and mainTreeProof → the remaining proof segments.
The independent verifier uses SHA-256 with these byte layouts:

Daily roots account

PDA seeds: ["daily_scores_roots", epochDay_u16_le], where epoch day derives from the proof’s summary.updateStats.minTimestamp, not wall clock. Account layout: [8-byte discriminator][u16 epoch day][288 × 32-byte roots]. Each root represents a five-minute slot. Slot index is hour * 12 + floor(minute / 5).

Absence and replay constraints

A zero-valued stat can be absent from a record’s tree. An absent leaf cannot produce a valid proof; Slip treats that as proof unavailability, not as a proved zero. TxLINE devnet replays fixtures and can rewrite the current virtual five-minute root. The keeper fetches and submits promptly and uses durable retries. A transient mismatch does not permit an early void.