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

@txline-kit/client

v0.1.0

Published

TypeScript client for the TxLINE sports data API: auth, typed REST, self-healing SSE streams, and Merkle-proof helpers for the txoracle Solana program

Readme

@txline-kit/client

TypeScript client for the TxLINE sports data API: auth/activation, typed REST, self-healing SSE streams, and Merkle-proof helpers for the txoracle Solana program. Part of txline-kit — see the root README for the full SDK and the specific bugs this package exists to prevent.

Install

npm install @txline-kit/client

Quickstart

import { createTxlineClient, WORLD_CUP_COMPETITION_ID } from "@txline-kit/client";
import { STAT, isFinalised } from "@txline-kit/constants";

const tx = createTxlineClient({ network: "devnet", wallet }); // free World Cup tier, 0s delay
await tx.auth.ensureActivated(); // guest JWT -> on-chain subscribe -> token activate, cached to disk

const fixtures = await tx.fixturesSnapshot(WORLD_CUP_COMPETITION_ID);

for await (const msg of tx.scoresStream()) {
  const u = msg.data;
  if (isFinalised(u)) {
    const proof = await tx.statValidation({
      fixtureId: u.FixtureId,
      seq: u.Seq, // from a real record — never 0
      statKeys: [STAT.T1_GOALS, STAT.T2_GOALS],
    });
    // feed `proof` to buildStatValidationInput() (see "./proofs") and
    // validateStatV2 on-chain
  }
}

Replay mode (demos, backtests, judges)

const tx = createTxlineClient({ network: "replay", baseUrl: "http://localhost:8788/api" });
// identical API — see @txline-kit/replay for the server this points at

What this fixes that raw fetch/EventSource won't

  • Live records are PascalCase (FixtureId, Seq) — typed from real traffic, not just the OpenAPI examples.
  • 401s renew transparently (single-flight); 403 throws a clear TxlineNetworkMismatchError instead of retrying forever.
  • /scores/historical/{id} returns SSE-framed text on a 200 — auto-detected and parsed into a normal array.
  • SSE reconnects with jittered backoff and Last-Event-ID resume; readers are cleaned up when you break out of a for await loop.
  • Proof helpers (toBytes32, toProofNodes, PDA derivation, validateStatV2 payload/strategy builders) match the actual txoracle IDL grammar.

Author

Built by addargBackup · @addarg7

MIT licensed.