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

tsp-verify

v0.1.1

Published

JavaScript port of the Trust Standard Protocol (TSP) verifier core: RFC 8785 canonicalization, trust envelope + manifest validation, Ed25519 local verification, and offline license-artifact verification (tsp.license.v1). Zero dependencies.

Readme

tsp-verify — JavaScript port of the TSP reference verifier core

Verify Trust Standard Protocol evidence from JavaScript: canonicalization (RFC 8785 JCS, byte-identical to the reference), trust envelope + trust manifest validation, Ed25519 local verification with the granular check profile, and offline license-artifact verification (tsp.license.v1, ADR-0010).

Zero dependencies — Node ≥ 20 only (uses the built-in Web Crypto API).

import { verifyLocal } from "tsp-verify";

const result = await verifyLocal(envelope, { knownPublicKey });
console.log(result.valid);                  // true / false — fail-closed
console.log(result.checks.ledgerHash);      // granular per-check verdicts

It also verifies commercial licenses (TSP License Artifact v1) — a sibling artifact validated fully offline through license → issuer → pinned license-root, reusing the same crypto substrate:

import { verifyLicense } from "tsp-verify";

const r = await verifyLicense(
  bundle,                                    // a tsp.license-bundle.v1
  {
    origin: "https://customer.example",      // this deployment's manifest origin
    trustedRootKeys: [pinnedRoot],           // [{ rootKeyId, publicKey }]
    requiredModules: ["gateway-pro"],        // default-deny per module
  },
  new Date(),                                // or an ISO-8601 string
);
console.log(r.ok, r.reason);                 // e.g. true "valid" | false "license_expired"

Conformance is the correctness claim

This port is correct because it reproduces the normative verdicts of the tsp-spec fixture suites — the v3.0 TrustEnvelope vectors (including the ADR-0002 tamper-rejection profile) and the ADR-0010 license vectors — not because anyone says so. Two separate checksum-pinned tracks, never mixed. Prove it:

npm run conformance
# integrity: 10 v3.0 fixtures match pinned SHA256SUMS
# integrity: 9 license fixtures match pinned SHA256SUMS
# ✓ all 23 conformance vectors pass against the JS port

A failure of that runner is a bug in this port, never grounds to adjust the fixtures (ADR-0008: the spec owns the truth).

API

  • canonicalize(value) — RFC 8785 JCS canonical string.
  • sha256Hex(string) — SHA-256 hex of a UTF-8 string.
  • validateTrustEnvelopeShape(envelope) / validateTrustManifest(manifest) — structural validation.
  • verifyLocal(envelope, { knownPublicKey }) — local-plane verify (schema + content + ledger + Ed25519 signatures).
  • validateLicenseBundleShape(bundle) / verifyLicense(bundle, config, now) — offline license-artifact verification.

Verification only: this package holds no private keys and signs nothing. Part of the tsp-verify family alongside the Python, Rust, and Go ports.

Releasing

Publishing is automated and runs with npm provenance (a signed attestation tying the published tarball to this repo and the exact CI run — apt for a provenance project). To cut a release:

  1. Bump version in package.json (e.g. 0.1.1) and commit to main.
  2. Tag and push: git tag v0.1.1 && git push origin v0.1.1.

The Release (npm) workflow then runs the test + conformance suites, verifies the tag matches package.json, and runs npm publish --provenance --access public.

One-time setup: add a repo secret NPM_TOKEN (npm Automation or Granular-Access token with publish rights for tsp-verify) under Settings → Secrets and variables → Actions. npm versions are immutable, so each release needs a new version number.