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

@zanii/federation

v0.1.0

Published

Cross-ledger interop that turns a transparency log into a protocol - published witness policies (an STH counts only when M-of-N independent witnesses co-sign it), split-view gossip across vantage points, and the equivocation proof: two signed STHs, same l

Readme

@zanii/federation

Cross-ledger interop — what makes Zanii a protocol, not a service. A single transparency log has one residual trust assumption: the operator could show different histories to different people (a split view). Federation removes it, entirely client-side and offline-verifiable.

npm install @zanii/federation @zanii/core @zanii/witness
import { createWitnessPolicy, verifyFederatedSth, gossipOnce, buildEquivocationProof, verifyEquivocationProof } from '@zanii/federation';

// 1. The log publishes its own bar: "my checkpoints count only when M of these
//    named, independent witnesses co-sign them." Signed by the log's key.
const policy = createWitnessPolicy(
  { logId: log.did, witnessDids: [regulator.did, enterprise.did, competitor.did], minWitnesses: 2, createdAt: now },
  logKey,
);

// 2. Enforce it: origin signature + M DISTINCT recognised co-signatures.
//    Co-signatures from unknown DIDs are ignored, not trusted.
const r = verifyFederatedSth(sth, cosignatures, policy);
r.ok; r.valid_witnesses;

// 3. Gossip: fetch the checkpoint from several vantage points and compare.
//    Honest operation is boring — every view agrees.
const g = await gossipOnce(log.did, ['https://ledger.zanii.agency', 'https://mirror.example']);
if (!g.ok && g.equivocation) {
  // The artifact this package exists for: two validly signed STHs from the SAME
  // log key, SAME tree size, DIFFERENT roots. No innocent explanation.
  verifyEquivocationProof(g.equivocation);  // anyone re-checks it offline
}

Python: from zanii.federation import create_witness_policy, verify_federated_sth, gossip_once, ... — byte-identical JCS objects and hashes.

Why the equivocation proof matters

Everything else in a transparency log punishes rewriting history (consistency proofs, anchoring). Equivocation is the one remaining lie: maintain two internally consistent histories and show each victim only theirs. The proof is self-contained — two signatures, one key, one size, two roots — so a court or regulator needs no access to the log, no trust in Zanii, and no cryptographer to check what it means: the log signed two contradictory statements.

The limit, stated up front

Federation proves consistency between views, not completeness of coverage: a split view is caught only when the diverging checkpoints reach two parties who compare (gossip), and a witness policy is only as independent as its witnesses. What becomes impossible is quiet equivocation — lying to everyone identically forever is the only lie left, and anchoring already prices that one. Differing tree sizes across vantage points are NOT equivocation (could be honest growth between fetches) — run @zanii/monitor for append-only checking.