Skip to main content
GET
/
scores
/
stat-validation
Get a three-stage Merkle proof for a single score statistic
curl --request GET \
  --url https://api.example.com/scores/stat-validation
{
  "scoresEvent": {},
  "stat1": {},
  "stat2": {},
  "eventSubTreeProof": [
    {}
  ],
  "fixtureSubTreeProof": [
    {}
  ],
  "batchMainTreeProof": [
    {}
  ],
  "fixtureSummary": {},
  "batchMetadata": {}
}

Documentation Index

Fetch the complete documentation index at: https://txline-docs.txodds.com/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint provides a deep cryptographic proof for one or two statistics within a single scores update. The TxLINE’s data is structured in a three-level Merkle hierarchy:
  1. A main batch contains summaries for multiple fixtures.
  2. Each fixture summary is the root of a sub-tree of all score update events for that fixture.
  3. Each score update event is the root of a sub-tree of all the individual statistics it contains.
This endpoint returns the full set of proofs needed to connect the stat(s) all the way to the main batch root published on-chain. To request a proof for a second stat (for use in two-stat predicates like comparing home vs. away scores), include the optional statKey2 query parameter. With the returned data in hand, the user can execute an on-chain transaction to validate that a supplied TraderPredicate with optional BinaryOperation holds against the supplied stat(s), for example, in the case of the single stat, validating that the team’s number of touchdowns exceeded 2 at the end of the first quarter, or, in the case of two stats, validating that the scores difference exceeded 2—see the public repository for on-chain examples: https://github.com/txodds/tx-on-chain.

Query Parameters

fixtureId
int32
required
The ID of the fixture for the scores event.
seq
int32
required
The sequence number of the specific scores event within the fixture’s history.
statKey
int32
required
The key identifying the specific statistic to validate (e.g., 1 for ‘Participant1_Score’).
statKey2
int32
The key identifying an optional second statistic to validate for two-stat predicates.

Response

scoresEvent
Scores
The scores event record being validated
stat1
object
First statistic details including key, value, and proof
stat2
object
Optional second statistic details (only if statKey2 was provided)
eventSubTreeProof
array
Merkle proof connecting the stats to the event root
fixtureSubTreeProof
array
Merkle proof connecting the event to the fixture summary root
batchMainTreeProof
array
Merkle proof connecting the fixture summary to the batch root
fixtureSummary
object
Summary information about the fixture’s score updates
batchMetadata
object
Metadata about the batch containing this scores event