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/chain-bridge

v0.1.0

Published

One keypair, two products: bridge the Zanii L1 (blockchain.zanii.agency) to the Zanii transparency ledger. A chain wallet's Ed25519 pubkey IS a ledger did:key, so the bridge PROVES a registered chain agent's claimed DID controls its wallet (address = bech

Downloads

47

Readme

@zanii/chain-bridge

One keypair, two products. The Zanii L1 (blockchain.zanii.agency) and the Zanii transparency ledger both use Ed25519 — a chain wallet's public key is a ledger did:key, and the chain address derives from the same bytes: bech32("zan", blake3(pubkey)[:20]). This bridge turns that fact into a verifiable claim: the agent paying you on-chain is provably the agent whose entire action history you can audit on the ledger.

npm install @zanii/chain-bridge @zanii/core @zanii/a2a-directory
import { chainAddressFromDid, verifyChainAgentBinding, resolveChainAgent } from '@zanii/chain-bridge';

// the chain's agent registry stores metadata like {"did":"did:key:z6Mk…"} — on its
// own that's just a string anyone can paste. The binding check closes it:
const check = verifyChainAgentBinding(entry);   // entry from GET /agents
check.ok;    // the claimed DID's key derives EXACTLY the registered zan1… address —
             // the wallet key IS the ledger identity, not a name-drop
check.did;   // the verified ledger identity (null unless ok)

// end to end: find on chain → verify binding → pull ledger reputation
const r = await resolveChainAgent('payments-router');       // or a zan1… address
r.binding.ok && r.ledger;   // { receipts, distinct_counterparties, revoked, … }
// a failed binding NEVER reaches the ledger — no reputation for a name-dropper

// utilities for provisioning one identity across both products:
chainAddressFromDid(agent.did);        // the wallet this ledger agent controls

Python (pip install "zanii[chain]" — blake3): from zanii.chain_bridge import verify_chain_agent_binding, resolve_chain_agent, ... — identical derivation, locked by a live-captured vector asserted in both languages.

Why the binding is strong

The registration tx on the chain is signed by the wallet key. So when the claimed DID's public key derives exactly the registered address, the registrant is the DID's key holder — one Ed25519 keypair provably controls both the money (session keys, streams, transfers on the L1) and the accountability record (receipts, delegation, reputation on the ledger). Compose with @zanii/x402's zaniiChainTxFetcher to verify the payment itself, and @zanii/kya to screen before transacting.

The limit, stated up front

The binding proves key identity — nothing more. Everything else in the registry metadata (role, capabilities) is self-asserted; a chain agent name is first-come-first-served, not a trademark; and the ledger summary returned here is the server's aggregate — full offline acceptance still means following audit_bundle with verifyAuditBundle (resolveAndVerify). Read-only: this package never holds keys or funds.