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

trustlayer-verify

v0.1.0

Published

Independent, offline verification of TrustLayer evidence bundles — no service, no database, no network.

Readme

trustlayer-verify

Independent, offline verification of TrustLayer evidence bundles — no service, no database, no network. Point it at an exported bundle and it re-checks the cryptography itself.

The whole premise of TrustLayer is don't trust the operator — verify the math. That only holds if the verifier is open and anyone can re-implement it. This is that verifier, in JavaScript. It is byte-for-byte compatible with the reference implementation in Elixir.

Install

npm install trustlayer-verify

Zero runtime dependencies. Works on Node.js ≥ 18 (uses only the built-in node:crypto).

CLI

npx trustlayer-verify ./evidence-bundle.json

Exit code 0 if every self-contained check passed, 1 if any failed.

Library

const { verifyBundle, canonicalHash } = require('trustlayer-verify');

const report = verifyBundle(bundle);
report.verified;          // => true | false
report.checks.identity;   // => { status: 'ok', detail: '...' }

// recompute a payload hash yourself, in one line:
canonicalHash({ amount: 4200, currency: 'EUR' });
// => '…' (lowercase hex SHA-256 of the canonical JSON)

What it checks (offline)

| Check | Meaning | |---|---| | bundle_integrity | Recomputes bundle_hash over the whole bundle (minus that field) — the export has not been altered. | | payload_integrity | Recomputes SHA-256 over the canonical JSON of event.payload; it must equal event.payload_hash. | | identity | The agent credential's Ed25519 signature verifies against the did:key issuer. | | authority | The mandate's signature verifies and the recorded action stayed within its scope. | | delegation | Credential and mandate share one issuing principal and reference the same agent. |

identity, authority and delegation report not_applicable when the bundle carries no credential/mandate — that does not fail a bundle.

Anchors (Hedera, an RFC 6962 transparency log, an RFC 3161 timestamp) are external witnesses on online media, so they are listed with their medium for separate online re-verification rather than re-checked here. verified reflects the offline, self-contained checks — enough to trust a record's integrity and provenance on your own.

How compatibility is guaranteed

sample-bundle.json is a real bundle produced by the Elixir reference implementation. The test suite recomputes its bundle_hash and payload_hash here in JavaScript and asserts they match the values the Elixir side wrote — so the canonical-JSON encoder, the hash, and the Ed25519 proof scheme are all verified to agree across languages.

npm test

The bundle format

See ../SPEC.md for the full, language-neutral specification — enough to write a verifier in any language.

License

Apache-2.0.