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

vitaledger-verifier

v0.3.0

Published

Reference verifier and specification for VitaLedger food-evidence records anchored on Cardano

Readme

vitaledger-verifier

Reference specification and verifier for VitaLedger food-evidence records anchored on Cardano.

Testnet only. Records are anchored on Cardano Preprod during the pilot. Nothing here is live on mainnet.

An issuer (brand, lab, certifier or recall authority) publishes a record about a product. VitaLedger takes the record's SHA-256 digest, batches the digests into a Merkle tree, and writes the root into Cardano transaction metadata. Anyone can check later that a record is unchanged. That check needs no wallet, account or VitaLedger server.

Verify a record

npm ci
npm run verify -- bundle.json          # from a clone
npx -p vitaledger-verifier vitaledger-verify bundle.json   # from npm, no clone needed

A bundle is { record, proof, anchor: { network, txHash, label? } } (SPEC §6). The verifier:

  1. recomputes the digest;
  2. walks the proof;
  3. fetches the transaction's raw CBOR from Koios (by default; pass --blockfrost <id> or set BLOCKFROST_PROJECT_ID to use Blockfrost), and checks those bytes hash to the transaction id;
  4. compares the anchored Merkle root with the one it computed.

Exit codes: 0 valid, 1 invalid, 2 error. Pass --json for machine-readable output.

No indexer trust: add --mithril to also prove the transaction is on chain with a Mithril certificate, verified back to the network's genesis key (pinned in the package). It needs the optional Mithril client:

npx -p vitaledger-verifier -p @mithril-dev/mithril-client-wasm vitaledger-verify bundle.json --mithril

For issuers

Brands, labs, certifiers and recall authorities publish records with vitaledger-issuer (keygen, check, sign, submit). See issuer-pack/ISSUERS.md and the templates in issuer-pack/templates/.

Library

import { recordDigest, merkleRoot, inclusionProof, verifyBundle } from "vitaledger-verifier";

The package's only runtime dependency is @noble/hashes. The CBOR reader is built in, and all the code runs in both Node and browsers.

Independent implementation

python/ holds a second verifier written from SPEC.md alone, without reading the TypeScript source. It uses only the Python standard library. It reproduces every test vector and verifies live Preprod anchors:

python3 python/test_vectors.py
python3 python/vitaledger_verify.py python/bundle-live.json   # exit 0 = valid

Develop

npm test          # unit tests, test vectors, real Preprod transaction fixture
npm run typecheck
npm run vectors   # regenerate test-vectors/v1.json

Licence: Apache-2.0.

Releasing

Bump version in package.json, commit, then push a matching tag:

git tag -a v0.2.1 -m "vitaledger-verifier 0.2.1" && git push origin v0.2.1

.github/workflows/release.yml runs the tests (TypeScript and the independent Python implementation) and publishes to npm through Trusted Publishing, with provenance. No npm token is stored anywhere.