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

@receiptprotocol/open-receipt

v0.2.1

Published

Canonicalization, historical verification, and issuer trust for Open Receipt

Downloads

435

Readme

Open Receipt verifier

@receiptprotocol/open-receipt canonicalizes, signs, and verifies Open Receipt events locally. Open Receipt is an open, versioned specification for portable, verifiable commercial evidence.

Open Receipt 0.2 adds issuer trust resolution, key lifecycle semantics, historical verification, and issuance attestations. Conformance is defined by the published schemas, test vectors, and verifier behavior for each version.

Trust-aware v0.2 verification

import { createHttpsWebPkiResolver, verifyOpenReceiptTrust } from "@receiptprotocol/open-receipt";

const resolver = createHttpsWebPkiResolver({
  allowedIssuerOrigins: ["https://receiptprotocol.com"],
});

const result = await verifyOpenReceiptTrust(receipt, {
  trustMode: "https_webpki",
  resolver,
});

result.signature.valid reports mathematical signature validity separately from result.issuer.trusted. The result also reports the metadata snapshot and freshness, the key's state at issuance, its current state as known by that snapshot, and any issuance attestation.

Trust modes:

  • embedded_only checks signature consistency using the embedded public key. It does not establish a trusted issuer identity.
  • pinned_metadata uses an explicitly trusted signed metadata snapshot and hash. It supports controlled and fully offline verification.
  • https_webpki resolves exact, versioned metadata from an allowlisted issuer HTTPS origin and validates the signed metadata hash chain.

An offline result describes its knowledge boundary. It cannot discover a revocation or compromise published after the cached snapshot:

{
  "metadata_as_of": "2026-07-30T12:00:00.000Z",
  "metadata_freshness": "stale",
  "key_valid_as_of_metadata": true
}

Keys rotate; existing signatures do not. Each Receipt keeps its original signature and signing_key_id. Retired public keys remain available for historical verification, while retired private keys must not create new signatures. Revocation and compromise are evaluated against the issuance time and their effective times. A separate issuance-log signature makes fraudulent backdating harder after an evidence-key compromise.

v0.1 compatibility

The v0.1 API and vectors remain supported:

import { verifyOpenReceipt } from "@receiptprotocol/open-receipt";

const result = await verifyOpenReceipt(receipt, {
  issuerMetadata: cachedV01Metadata,
});
if (!result.valid) throw new Error(result.errors.join(", "));

Existing v0.1 Receipts are not rewritten or re-signed. A v0.1 Receipt without an issuance attestation remains cryptographically verifiable with lower trust assurance.

Schemas

  • schemas/event.schema.json — v0.1 event
  • schemas/bundle.schema.json — v0.1 bundle
  • schemas/issuer.schema.json — v0.1 issuer metadata
  • schemas/event-v02.schema.json — v0.2 event
  • schemas/issuer-metadata-v02.schema.json — signed v0.2 issuer metadata
  • schemas/issuance-attestation.schema.json — v0.2 issuance attestation

No private key, provider credential, raw private payload, or buyer PII belongs in an Open Receipt or public issuer document.