Expand description
§txodds-verifier (unofficial)
Verify TxODDS TxLINE sports data on Solana through an on-chain
Cross-Program Invocation (CPI) into the txoracle program’s
validate_stat_v2 instruction.
Unofficial / community project. Not affiliated with or endorsed by TxODDS. The
txoracleprogram, its IDL, and all data belong to TxODDS.
What you get:
- Borsh types matching the txoracle IDL byte-for-byte
(
StatValidationInput,NDimensionalStrategy,StatPredicate, …). build_validate_stat_v2_data— exact instruction data (discriminator + args).validate_stat_v2_instruction— a ready-to-sendInstruction.verify_stat_cpi/verify_stat_cpi_raw— CPI from your program, read thebool.derive_daily_scores_roots_pda— the daily scores root PDA.
Structs§
- Geometric
Target - A geometric target for distance-based strategies. Mirrors
GeometricTarget. - NDimensional
Strategy - The strategy applied to the proven stats. Mirrors
NDimensionalStrategy. - Proof
Node - A single Merkle proof node. Mirrors
ProofNode. - Score
Stat - A provable key/value statistic. Mirrors
ScoreStat. - Scores
Batch Summary - Per-fixture scores summary within a 5-minute batch. Mirrors
ScoresBatchSummary. - Scores
Update Stats - Update statistics for a fixture batch. Mirrors
ScoresUpdateStats. - Stat
Leaf - A stat plus its Merkle proof. Mirrors
StatLeaf. - Stat
Validation Input - Full input for
validate_stat_v2. MirrorsStatValidationInput. - Trader
Predicate - A threshold comparison. Mirrors
TraderPredicate.
Enums§
- Binary
Expression - Binary arithmetic op between two stats. Variant order matches the IDL.
- Comparison
- Comparison operator. Variant order matches the IDL.
- Stat
Predicate - A discrete predicate over one or two stats. Mirrors
StatPredicate.
Constants§
- DAILY_
SCORES_ ROOTS_ SEED - PDA seed prefix for the daily scores merkle roots account.
- MS_
PER_ DAY - Milliseconds per day, used for the
epoch_dayPDA seed. - TXORACLE_
DEVNET txoracleprogram id on devnet.- TXORACLE_
MAINNET txoracleprogram id on mainnet-beta.- VALIDATE_
STAT_ V2_ DISCRIMINATOR - Anchor discriminator for
validate_stat_v2= sha256(“global:validate_stat_v2”)[..8].
Functions§
- build_
validate_ stat_ v2_ data - Serialize the full
validate_stat_v2instruction data: 8-byte discriminator + borsh(payload) + borsh(strategy). - derive_
daily_ scores_ roots_ pda - Derive the
daily_scores_rootsPDA for the givenepoch_day. - epoch_
day_ from_ millis - Compute
epoch_day(u16) from a millisecond timestamp. - validate_
stat_ v2_ instruction - Build a ready-to-send
validate_stat_v2Instruction. - verify_
stat_ cpi - CPI into
txoracle::validate_stat_v2and return the verified boolean. - verify_
stat_ cpi_ raw - Same as
verify_stat_cpi, but takes pre-serialized instruction data (discriminator + borsh args), e.g. produced by the companion JS client.