TxLINE integration reference
API origin and authentication
Devnet origin:https://txline-dev.txodds.com
| Request | Use |
|---|---|
POST /auth/guest/start | Obtain the short-lived guest JWT. |
TxLINE subscribe(1, 4) instruction | Activate the free World Cup tier on devnet. |
POST /api/token/activate | Exchange subscription transaction plus wallet signature for an API token. |
`${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:
Data endpoints used by Slip
| Endpoint | Parameters | Consumer | Purpose |
|---|---|---|---|
GET /api/fixtures/snapshot | startEpochDay | Web | List future non-cancelled fixtures and orient home/away participants. |
GET /api/scores/snapshot/{fixtureId} | asOf | Keeper | Read latest sequence and determine terminal status. |
GET /api/scores/stat-validation | fixtureId, seq, statKey, optional statKey2 | Keeper and SDK | Retrieve one- or two-stat proof payload for resolution. |
Soccer stat keys
statKey = periodPrefix + baseKey
| Base key | Meaning |
|---|---|
| 1 | Home goals |
| 2 | Away goals |
| 3 | Home yellow cards |
| 4 | Away yellow cards |
| 5 | Home red cards |
| 6 | Away red cards |
| 7 | Home corners |
| 8 | Away corners |
| Prefix | Period |
|---|---|
| 0 | Full match |
| 1000 | First half |
| 2000 | Half time |
| 3000 | Second half |
| 4000 | Extra-time first half |
| 5000 | Extra-time second half |
| 6000 | Penalty shootout |
| 7000 | Extra time total |
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 acceptsScoreStat.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:
statToProveandstatProof→statA;- optional
statToProve2andstatProof2→statB; summary.updateStatsandsummary.eventStatsSubTreeRoot→ the committed fixture summary;subTreeProofandmainTreeProof→ the remaining proof segments.
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).