Skip to main content

Crate nyx_txodds_verifier

Crate nyx_txodds_verifier 

Source
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 txoracle program, its IDL, and all data belong to TxODDS.

What you get:

Structs§

GeometricTarget
A geometric target for distance-based strategies. Mirrors GeometricTarget.
NDimensionalStrategy
The strategy applied to the proven stats. Mirrors NDimensionalStrategy.
ProofNode
A single Merkle proof node. Mirrors ProofNode.
ScoreStat
A provable key/value statistic. Mirrors ScoreStat.
ScoresBatchSummary
Per-fixture scores summary within a 5-minute batch. Mirrors ScoresBatchSummary.
ScoresUpdateStats
Update statistics for a fixture batch. Mirrors ScoresUpdateStats.
StatLeaf
A stat plus its Merkle proof. Mirrors StatLeaf.
StatValidationInput
Full input for validate_stat_v2. Mirrors StatValidationInput.
TraderPredicate
A threshold comparison. Mirrors TraderPredicate.

Enums§

BinaryExpression
Binary arithmetic op between two stats. Variant order matches the IDL.
Comparison
Comparison operator. Variant order matches the IDL.
StatPredicate
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_day PDA seed.
TXORACLE_DEVNET
txoracle program id on devnet.
TXORACLE_MAINNET
txoracle program 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_v2 instruction data: 8-byte discriminator + borsh(payload) + borsh(strategy).
derive_daily_scores_roots_pda
Derive the daily_scores_roots PDA for the given epoch_day.
epoch_day_from_millis
Compute epoch_day (u16) from a millisecond timestamp.
validate_stat_v2_instruction
Build a ready-to-send validate_stat_v2 Instruction.
verify_stat_cpi
CPI into txoracle::validate_stat_v2 and 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.