Sign In

@postcept/receipt

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

@postcept/receipt

Open reference implementation for verifying Postcept Receipts and VCR-audit badges — independent, in any environment.

unpublished
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
29
190%
Maintainers
1
Weekly downloads
 
Created
Source

@postcept/receipt

The open reference implementation for verifying Postcept Receipts and VCR-audit badges — independently, in any JavaScript environment (browser, Node, Deno, edge). No Postcept API call and no trust required: a receipt is proof you can check yourself with nothing but the published public key.

The receipt format and signing scheme are specified in SPEC.md. This package is the canonical JS implementation of that standard; the Postcept API signs with the byte-for-byte equivalent in Python.

Usage

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

// Fetch the current 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);
// ok === true  → authentic and unmodified, signed by Postcept's key.

verifyReceipt and verifyBadge are pure and side-effect-free: they return false on a bad signature or malformed input rather than throwing.

Exports

ExportPurpose
verifyReceiptVerify a receipt's Ed25519 signature against a public key.
verifyBadgeVerify a VCR-audit badge.
verifyReceiptInLogVerify a receipt's transparency-log inclusion + signed tree head.
verifyInclusion / verifySignedTreeHeadVerify a Merkle inclusion proof / an STH.
receiptSigningBodyThe exact body the signature covers (for re-implementers).
badgeSigningBodyThe badge signing body.
canonicalizeDeterministic JSON encoding (sorted keys, ASCII-escaped).
@postcept/receipt/schemaJSON Schema for the receipt object.

Why a separate package?

So the verification logic has exactly one source of truth. Postcept's own website verifier and free-audit tool import it; so can you. The trust story only holds if the reference implementation is open and self-contained.

Keywords

postcept

FAQs

Package last updated on 29 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts