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

@tillstack/sdk-notary-node

v0.1.0

Published

TillNotary verifying client — submit an opaque hash, get back a receipt this SDK has ALREADY cryptographically verified (hybrid checkpoint signature, witness cosignature threshold, RFC 6962 inclusion proof) against a trust store you pin at construction. I

Readme

@tillstack/sdk-notary-node

Verifying client for TillNotary, a tamper-evident transparency log.

Submit a hash and get back a receipt the SDK has already checked: the checkpoint signature (hybrid Ed25519 + ML-DSA), the witness cosignature threshold, and the RFC 6962 inclusion proof. All of it is checked against keys you pin, so you don't have to take the server's word. Receipts export as portable evidence bundles that verify offline.

Install

npm install @tillstack/sdk-notary-node

Node 18+.

Pin trust

tilldev notary trust-init <log> writes a trust file with the log's public key and its witnesses. Check the key fingerprints out of band once, commit the file, then load it:

import { NotaryClient, parseTrustFile, trustFromFile } from '@tillstack/sdk-notary-node'
import { readFile } from 'node:fs/promises'

const trust = parseTrustFile(await readFile('./notary-trust.json', 'utf8'), 'notary-trust.json')
const notary = new NotaryClient({
  baseUrl: trust.base_url ?? 'https://notary.tilldev.dev',
  token: process.env.TILLDEV_NOTARY_TOKEN,
  logs: trustFromFile(trust),
})

Submit and verify

import { createHash } from 'node:crypto'
import { writeFile } from 'node:fs/promises'

const digest = createHash('sha256').update(artifact).digest('hex')
const receipt = await notary.submit('acme-releases', digest)

receipt.leafIndex // position in the log
receipt.complete  // true once the witness threshold is met
await writeFile('release.evidence.json', JSON.stringify(receipt.evidence))

Only the hash leaves your process. Submitting a value the log already holds returns its original receipt, so a retried submit never logs twice.

Look up entries

const leaf = await notary.findLeaf('acme-releases', digest) // verified, or null if absent
const again = await notary.getLeaf('acme-releases', 41)      // verified
const page = await notary.listLeaves('acme-releases', { limit: 50 }) // newest first, as served

listLeaves returns entries unverified; use getLeaf or findLeaf for a proof, or a mirror to check every entry.

Detect a rewritten log

Keep the last checkpoint you trusted and prove each new one extends it:

const head = await notary.verifyConsistencyFrom('acme-releases', { treeSize: 4096, rootHash: storedRootHex })

If the log shrank, forked or was rewritten, it throws NotaryVerificationError.

Keep a mirror

A mirror is a full local copy of a log in which every entry must rebuild the signed root. Each pass fetches only new entries:

import { MirrorAlarm, mirrorPass, verifyMirror } from '@tillstack/sdk-notary-node/mirror'

try {
  const pass = await mirrorPass(notary, 'acme-releases', './notary-mirror/acme-releases')
  console.log(pass.treeSize, pass.appended)
} catch (err) {
  if (err instanceof MirrorAlarm) console.error(err.record.reason) // shrank, forked, rewritten or entries-mismatch
  throw err
}

await verifyMirror('./notary-mirror/acme-releases', trustFromFile(trust)['acme-releases']) // offline

On an alarm, the log's conflicting signed heads are kept in alarms.jsonl in the mirror directory as evidence.

Verify offline

import { verifyEvidence } from '@tillstack/sdk-notary-node'

const checkpoint = verifyEvidence(bundle, trustFromFile(trust)['acme-releases'])

This makes no network calls. It throws if any check fails.

Errors and retries

  • NotaryClientError: transport or usage problems (network, 401/403/429, bad input), with code, requestId and retryAfterMs. Reads and submissions are retried on network errors, 429 and 502 to 504, honouring Retry-After (retry: { retries, maxDelayMs } on the client; retries: 0 turns it off).
  • NotaryIncompleteError: the answer verified, but witnesses have not yet cosigned a head that covers it. Retry after their next pass, or pass { allowIncomplete: true } to accept the log's signature alone. It extends NotaryVerificationError, so catch it first.
  • NotaryVerificationError: the server returned something the math rejects. Never catch this and carry on.

Docs

https://tilldev.dev/docs/tillnotary/sdk

License

Apache-2.0