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

@postcept/receipt

v1.2.3

Published

Independently verify a Postcept Receipt, the signed proof that an AI agent's high-risk action actually happened in the system of record. Runs anywhere, needs only the public key.

Downloads

70

Readme

@postcept/receipt

A Postcept Receipt is a signed proof that an AI agent's high-risk action (a refund, a cancellation, a credit) was checked against the system of record, and of what that check found: verified, incomplete, duplicated, mismatched, or policy-failed. This is the reference library for verifying one.

It runs anywhere JavaScript runs (browser, Node, Deno, edge), and verifying a receipt needs nothing from Postcept except the published public key. No API call, and no taking the agent's word for it. A valid signature proves the receipt is authentic and unmodified since issue. See the spec for what that does and does not cover.

The format and signing scheme are written up in SPEC.md. This is the canonical JS implementation of that spec. The Postcept API signs with a byte-identical implementation in Python.

Install

npm i @postcept/receipt

Usage

import { verifyReceipt, verifyBadge, type Receipt } from "@postcept/receipt";

// Grab the public key once, or pin a key id from the receipt.
const { public_key } = await fetch("https://api.postcept.com/v1/signing-key").then((r) => r.json());

const ok = await verifyReceipt(receipt as Receipt, public_key);
// true when the receipt is authentic and unmodified.

verifyReceipt and verifyBadge are pure functions. On a bad signature or malformed input they return false instead of throwing, so they're safe to call on untrusted data.

Exports

| Export | Purpose | | --- | --- | | verifyReceipt | Verify a receipt's Ed25519 signature against a public key. | | verifyBadge | Verify a VCR-audit badge. | | verifyReceiptInLog | Verify a receipt's transparency-log inclusion and signed tree head. | | verifyInclusion / verifySignedTreeHead | Verify a Merkle inclusion proof or an STH on its own. | | verifyConsistency | Verify the log only appended between two signed tree heads. | | receiptSigningBody | The exact body the signature covers, for anyone re-implementing this. | | badgeSigningBody | The badge signing body. | | canonicalize | Deterministic JSON encoding (sorted keys, ASCII-escaped). | | @postcept/receipt/schema | JSON Schema for the receipt object. |

Why a separate package

One source of truth for the verification logic. Postcept's own site and audit tool import this same package, and so can you. The "you don't have to trust us" claim only holds if the reference implementation is open and stands on its own.

Verifying a release

Every published version carries a signed npm provenance statement linking the tarball to the commit and CI workflow that built it, plus a CycloneDX SBOM attached to the GitHub release.

# Check the installed package's provenance and registry signatures:
npm audit signatures

# Inspect what shipped (attached to the GitHub release):
#   sbom.cyclonedx.json

The receipt format is verifiable on its own with the public key, as the spec describes. Release provenance is a separate check that the code you installed is the code this repo built.

License

MIT.