Skip to main content
The repository includes runnable devnet scripts under examples/devnet. They exercise the current activation, streaming, fixture validation, and score validation flows against https://txline-dev.txodds.com.
The scripts use the devnet IDL and generated types in examples/devnet/idl/txoracle.json and examples/devnet/types/txoracle.ts. For mainnet integrations, use the root idl/txoracle.json and types/txoracle.ts, which include the latest mainnet program types.

Requirements

  • Node.js 20 or newer. The current lockfile resolves eventsource@4.1.0, which declares node >=20.0.0.
  • A funded devnet wallet for ANCHOR_WALLET.
  • ANCHOR_PROVIDER_URL="https://api.devnet.solana.com".
  • TOKEN_MINT_ADDRESS=4Zao8ocPhmMgq7PdsYWyxvqySMGx7xb9cMftPMkEokRG.
Install dependencies from the repository root:
Run a script with the devnet environment values:

Script Index

The shared helpers are in examples/devnet/common:

Score Validation Paths

There are two score validation styles: For V2, the statKeys order is part of the proof contract. The response arrays statsToProve and statProofs are mapped by position, and strategy fields such as index, indexA, indexB, and statIndex refer to those same 0..N positions.
The fixed fixtureId and seq pairs in the example scripts are demo fixtures. In production, derive fixtureId, seq, phase, and status from an observed score record from snapshot, updates, historical data, or the scores stream.

Final Outcome and Fixtures

On the current devnet and mainnet releases, final scores records use action=game_finalised with statusId=100 and period=100. Use those records when validating or settling the final match outcome, regardless of whether the match ended after regulation time, extra time, penalties, or abandonment. Fixture payloads include a backward-compatible GameState field. Current values are: Use fixture_validation_view_only.ts for the runnable fixture proof flow. The script demonstrates fetching fixture validation data, deriving the ten-day fixture roots PDA, and simulating validateFixture.