npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@srivtx/sports-workbench

v0.1.8

Published

Verifiable sports trading workbench for the TxLINE / TxODDS World Cup hackathon. Backtest, signal, and verify on Solana. Free tier, on-chain proof-anchored.

Downloads

1,506

Readme

sports-workbench

A verifiable sports trading workbench for the TxLINE / TxODDS World Cup hackathon. Every signal is anchored to a Solana Merkle proof. Free tier, on-chain, open source.

npx -p @srivtx/sports-workbench sports-workbench --version

What it is

sports-workbench is the trading tool + agent for the TxLINE / TxODDS World Cup hackathon (Trading Tools & Agents track).

It runs against TxLINE — the only sports data feed with cryptographic Merkle proofs anchored on Solana. Every odds update, every score event, every fixture change is committed to an on-chain Merkle root. Anyone can verify that the data the agent acted on was real, was published at a specific time, and was anchored to the chain.

sports-workbench is the first tool to use that capability for backtesting and live signal generation.

Quick start

0 · try it (no install)

npx -p @srivtx/sports-workbench sports-workbench --version

1 · global install (no sudo)

curl -fsSL https://sports-workbench.srivtx.xyz/install.sh | bash
sports-workbench --version

2 · on-chain subscribe (one-time, ~0.002 SOL)

The free tier (Service Level 1 or 12, 0 TxL) is gated by an on-chain Solana subscription. One call, ~0.002 SOL one-time, 30 days of streaming + proofs.

sports-workbench subscribe --devnet --level 1 --weeks 4
# → returns { txSig, apiToken, expiresAt, wallet }
# → save the apiToken somewhere safe

export TXLINE_API_TOKEN=<apiToken from above>

3 · run the live signal agent

sports-workbench signal --devnet \
  --strategy sharpDetector \
  --threshold 0.5 \
  --state ./my-signals.json

The agent connects to the free World Cup odds stream, detects every >0.5% shift, fetches the Merkle proof for each, and persists every verifiable signal to a local JSON store. Drop the binary into a VM or a Cloudflare Worker and let it run.

4 · verify any receipt on-chain

sports-workbench verify --devnet \
  --message-id 1835131630:00003:000063-10021-stab \
  --ts 1782457169278
# → returns the full Merkle proof + sub-tree proof + on-chain tx

5 · self-heal if something is off

sports-workbench doctor --fix

Detects 8 setup issues (Node version, npm prefix, PATH, binary, wallet, token, DNS) and applies the no-sudo fix automatically. Re-installs the package if needed.


What it does

| # | | | |---|---|---| | 01 | Backtester | replay any date range through any strategy, with on-chain Merkle proofs for every signal | | 02 | Live agent | stream the free World Cup tier SSE feed, fire on thresholdPct moves, persist to JSON | | 03 | Verifiable Settlement Receipt | per signal: MessageId · ts · merkleRoot · subTreeProof · dailyBatchRootsPda | | 04 | Drop-in skill | for solana-agent-kit and any npx skills add-compatible agent |

Built-in strategies

| Strategy | When it fires | |---|---| | sharpDetector | Max abs deltaPct across all outcomes > threshold (the official one) | | momentum | Home win prob rises > threshold in the rolling window | | meanReversion | Any outcome moves > threshold (bet on snap-back) | | custom | Bring your own JS strategy |


Verifiable Settlement Receipt

Every signal carries a Verifiable Settlement Receipt:

{
  "messageId":      "1835131630:00003:000063-10021-stab",
  "ts":             1782457169278,
  "fixtureId":      17588234,
  "marketType":     "OVERUNDER_PARTICIPANT_GOALS · line=1.5",
  "updateStats":    { "updateCount": 63, "minTimestamp": ..., "maxTimestamp": ... },
  "subTreeProof":   [...5 sibling hashes...],
  "mainTreeProof":  [...12 ancestor hashes...],
  "subTreeRoot":    "0x55c2134ff179629a3d466de181f875a5c6c9d61d7fdbda4fc30ff1e508fc1648",
  "merkleRoot":     "0x7a9f3b…d441a8 (on-chain)",
  "programId":      "6pW64gN1s2uqjHkn1unFeEjAwJkPGHoppGvS715wyP2J",
  "batchRootsPda":  "F2k9…b7vm (epochDay=20367)",
  "verifyCall":     "txoracle::validate_odds · compute=1,400,000"
}

Take this to a Solana explorer and re-run the on-chain validate_odds instruction. If the data was real, the call succeeds. If anyone tampered with it, the call fails.


As a solana-agent-kit plugin

import { SolanaAgentKit, KeypairWallet } from "solana-agent-kit";
import { TxlinePlugin } from "@srivtx/sports-workbench/agent-kit";
import bs58 from "bs58";

const agent = new SolanaAgentKit(
  new KeypairWallet(Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_PRIVATE_KEY!))),
  process.env.SOLANA_RPC_URL!,
  {}
).use(new TxlinePlugin({
  strategy: "sharpDetector",
  thresholdPct: 2,
}));

const r = await agent.methods.backtestOdds(agent, {
  fromDate: Date.parse("2026-06-01"),
  toDate:   Date.parse("2026-07-10"),
  startingBankroll: 10_000,
  verifyOnChain: true,
});
console.log(r.winRate, r.proofArtifacts.length);

As an MCP-compatible skill

npx skills add srivtx/sports-workbench

Endpoints used

| Endpoint | Auth | Purpose | |---|---|---| | POST /auth/guest/start | none | 30-day JWT | | POST /api/token/activate | JWT + wallet signature | exchange on-chain subscribe tx for a 30-day X-Api-Token | | GET /api/fixtures/snapshot | JWT | fixture list | | GET /api/odds/snapshot/:fixtureId | JWT | latest canonical odds for a fixture + sub-tree proof | | GET /api/odds/updates/:epochDay/:hour/:int | JWT | 5-min historical odds | | GET /api/odds/validation?messageId=…&ts=… | JWT | Merkle proof | | GET /api/scores/historical/:fixtureId | JWT | settle backtest outcomes | | GET /api/odds/stream (SSE) | JWT + X-Api-Token (both required) | live stream |

The reference example's domain oracle.txodds.com is not in public DNS from any network we tested; we use the main txline.txodds.com / txline-dev.txodds.com host instead, and pass both auth headers — exactly what the reference example does against the dead subdomain.

Free tier

Runs entirely on the TxLINE free World Cup tier (Service Level 1 or 12, both 0 TxL). SOL cost: ~0.002 SOL one-time (for the Token-2022 ATA rent + tx fee); valid for 30 days. Mainnet works the same way — drop --devnet.

Hackathon context

TxLINE feedback

Built into docs/TXLINE_FEEDBACK.md — liked, wanted, bugs we hit (the oracle.txodds.com DNS issue, the IDL/binary account mismatch, the tweetnacl ESM import, the makeBaseUrl double-/api, etc.).

License

MIT

MIT.