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

@proof-layer/verify

v1.0.1

Published

Standalone offline verifier for Proof Layer receipt bundles. Ed25519 signature verification, SHA-256 hash chain validation, and Merkle root computation. Zero external dependencies.

Downloads

233

Readme

@proof-layer/verify

Standalone offline verifier for Proof Layer receipt bundles. Zero external dependencies. Runs anywhere Node.js 18+ runs.

npm install @proof-layer/verify

Anyone with the public key can verify a Proof Layer receipt — without trusting Proof Layer, without a network connection, and without installing anything beyond this package.


What this does

A Proof Layer receipt is an Ed25519-signed, hash-chained record of a governed AI agent action. This package verifies them — one at a time or as full chains — using only the Node.js standard library.

It checks three things:

  1. Signature integrity — every receipt's Ed25519 signature validates against the published public key
  2. Chain integrity — every receipt's previousReceiptHash matches the SHA-256 of the previous receipt's canonical form
  3. Payload integrity — the payloadHash recorded in each receipt matches a fresh hash of its canonical content

If any of these fail, the verifier reports exactly which receipt and why.


Quick start

Verify a single receipt

import { verifyReceipt } from "@proof-layer/verify";

const result = verifyReceipt(receipt, publicKeyPem);
// → { valid: true, seq: 47, receiptId: "rcpt_…", payloadHash: "…" }

Verify a full chain

import { verifyBundle } from "@proof-layer/verify";

const result = verifyBundle(ndjsonString, publicKeyPem);
// → {
//     pass: 147,
//     fail: 0,
//     total: 147,
//     chainBroken: false,
//     merkleRoot: "ab12…",
//     firstFailSeq: null,
//     errors: []
//   }

Get a receipt bundle to verify

# Export your chain as NDJSON (one receipt per line)
curl -H "x-api-key: $PROOF_LAYER_API_KEY" \
  https://prooflayer.world999labs.com/v1/receipts/export \
  > chain.ndjson

# Fetch the public key (no auth required)
curl https://prooflayer.world999labs.com/v1/public-key \
  > public-key.pem

Then verify locally — the verifier never makes a network call.


API

verifyReceipt(line, publicKeyPem)

Verifies a single parsed receipt object. Returns:

interface VerifyReceiptResult {
  valid:        boolean;
  seq:          number;
  receiptId:    string | undefined;
  payloadHash:  string;
  error?:       string;
}

verifyBundle(ndjson, publicKeyPem, options?)

Verifies a complete NDJSON receipt bundle. Each line must be a JSON object containing payloadHash, previousReceiptHash, signature, and seq. Returns:

interface VerifyBundleResult {
  pass:         number;
  fail:         number;
  total:        number;
  chainBroken:  boolean;
  merkleRoot:   string | null;
  firstFailSeq: number | null;
  errors:       string[];
}

Options:

  • initialPrevHash — expected previousReceiptHash of the first line (default: "genesis"). Set when verifying a partial export that does not start at seq 1.

computeMerkleRoot(hashes)

Computes the SHA-256 Merkle root of an array of hex-encoded hashes. Returns the root hex string, or null for an empty input.


Why a separate verifier exists

The whole point of the receipt is that it is verifiable without trusting the system that issued it. That guarantee only holds if the verification code is independently inspectable, dependency-free, and small enough to read in one sitting.

This package is under 250 lines of TypeScript with zero runtime dependencies. The cryptographic primitives come from Node.js's built-in crypto module — the same module browsers, regulators, and security auditors already audit. Read the source. The math is the math.


Independent implementation

If you don't want to run JavaScript at all, the Proof Layer cryptographic specification is sufficient to implement an independent verifier in any language. Field list, canonicalization algorithm, chain linkage invariant, NDJSON format, key rotation protocol, and SHA-256 test vectors are all published. Independent implementations are welcome.


License

MIT — © WORLD999_LABS

Built by Proof Layer.