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

@atlasauth/pca-notary

v0.4.3

Published

External-fact attestation (zkTLS/TLSNotary direction) for PCA: a notary signs the observed response of an external request, selectively redactable, bound into a PCActn so an agent proves 'the external API returned X' as part of its proof-carrying action.

Readme

@atlasauth/pca-notary

External-fact attestation for Proof-Carrying Authority (PCA), in the direction of zkTLS / TLSNotary. A notary witnesses one HTTP request/response and signs a canonical record of it (method, URL, request-header digest, status, and a salted Merkle commitment to the response body). The agent can then disclose a single response field with an inclusion proof while every other field stays hidden, and bind that fact to a specific PCActn. A policy can then gate an action on what an external API actually returned, not on what the agent claims it returned.

Install

npm i @atlasauth/pca-notary @atlasauth/pca

Node.js only (uses node:crypto for salts).

Usage

import { generateKeyPair } from '@atlasauth/pca';
import {
  notarizeResponse, discloseField, verifyDisclosedField,
  requireAttestedFact, evaluateAttestedFactCaveat,
} from '@atlasauth/pca-notary';

const notaryKey = generateKeyPair();   // the notary's signing key

// Notary side: witness the exchange and sign it.
const { attestation, witness } = notarizeResponse(
  {
    request: { method: 'GET', url: 'https://api.shop.example/orders/42' },
    response: { status: 200, body: { order: { id: 42, status: 'shipped' }, customer: { email: '[email protected]' } } },
  },
  { notaryKey },
);

// Prover side: reveal only order.status (paths are arrays of keys / indexes).
const disclosure = discloseField(attestation, witness, ['order', 'status']);

// Verifier side: trust only the notary's public key.
verifyDisclosedField(attestation, disclosure, { notaryKey: notaryKey.publicKey }); // true

// A policy caveat: "only if the notarized order status is 'shipped'".
const caveat = requireAttestedFact({
  notary: notaryKey,
  path: ['order', 'status'],
  equals: 'shipped',
  url: 'https://api.shop.example/orders/42',
});
evaluateAttestedFactCaveat(caveat, { attestation, disclosure }); // { ok: true }

To tie a fact to one action, call bindFactToPcActn(attestation, pcactn) and have the agent include factRef(attestation) in the PCActn's provenance.trusted_refs; factMatchesPcActn then checks both directions, and the caveat's bindToPcActn: true requires it (pass the pcActn in the evidence).

API

notarizeResponse, discloseField, verifyNotaryAttestation, verifyDisclosedField, factRef, bindFactToPcActn, factMatchesPcActn, requireAttestedFact, evaluateAttestedFactCaveat, isAttestedFactCaveat, and the ATTESTED_FACT_CAVEAT constant. All verification functions fail closed (return false / { ok: false, reason }).

Status

The trust boundary is the notary. The relying party trusts that the notary reported the response faithfully and is not colluding with the agent. This is not trustless zkTLS: the notary does not take part in an MPC-TLS handshake, so it attests to what it observed rather than to a transcript it could not have forged. Selective redaction and the binding into a PCActn are real cryptographic checks, but the notary remains the trust assumption. PCA cryptography has not been independently audited.

License

MIT - see LICENSE