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

@ajna-inc/kanon

v0.6.3

Published

Credo (Aries TS) plugin that uses the Kanon AnonCreds VDR — drop-in for any EVM chain. Works with @credo-ts/anoncreds and @hyperledger/anoncreds-shared unmodified.

Readme

Credo plugin for the Kanon AnonCreds VDR — runs on any EVM chain (Hyperledger Besu, Ethereum, L2s, private rollups). Drops into Credo agents unmodified, no changes to @credo-ts/anoncreds or anoncreds-rs.

Credo-ts 0.6.x build. This package (0.6.x) targets @credo-ts/core ^0.6.1 and uses the 0.6 KMS API + the split @credo-ts/didcomm module. If you're still on Credo-ts 0.5.x, install @ajna-inc/kanon@^0.5 instead.

What's inside:

  • did:kanon registrar + resolver
  • KanonAnonCredsRegistry — AnonCreds VDR backed by the Kanon contracts
  • Wrapped AnonCredsVerifierService — after verifyProof succeeds, ANDs an on-chain AnonCredsStatusRegistry.isRevoked(credDefId, credIdHash) check
  • KanonIssuanceTracker — subscribes to DidCommCredentialStateChanged and writes an on-chain issuance record when issuance finalises
  • Chore-hiding helpers — buildKanonSchema, buildKanonCredentialAttributes, buildKanonProofRequest so schema authors and verifier authors never type kanonCredId by hand

Install

pnpm add @ajna-inc/kanon@^0.6 ethers

(@ajna-inc/kanon-sdk is pulled in transitively from npm.)

Peer dependencies

  • @credo-ts/core ^0.6.1
  • @credo-ts/anoncreds ^0.6.1
  • @credo-ts/didcomm ^0.6.1

Usage

import { Agent, DidsModule } from '@credo-ts/core'
import { AnonCredsModule } from '@credo-ts/anoncreds'
import {
  KanonModule,
  KanonAnonCredsRegistry,
  KanonDidRegistrar,
  KanonDidResolver,
  buildKanonSchema,
} from '@ajna-inc/kanon'

const agent = new Agent({
  config: { /* … */ },
  modules: {
    anoncreds: new AnonCredsModule({
      registries: [new KanonAnonCredsRegistry()],
    }),
    dids: new DidsModule({
      registrars: [new KanonDidRegistrar()],
      resolvers: [new KanonDidResolver()],
    }),
    // KanonModule MUST come AFTER AnonCredsModule so its
    // AnonCredsVerifierService override (on-chain status check) wins.
    kanon: new KanonModule({
      rpcUrl: process.env.KANON_RPC_URL!,
      privateKey: process.env.KANON_PRIVATE_KEY!,
      // Either pass the on-chain address book (single contract for all 7
      // registries — recommended) …
      addressBook: process.env.KANON_ADDRESS_BOOK,
      // … or pass a deployment inline / by file / by chainId:
      //   deployment: { chainId, addresses: { … } }
      //   deploymentPath: './deployments/1947.json'
      //   chainId: 1947
      issuerOrgId: process.env.KANON_ISSUER_ORG_ID!, // 0x<64 hex> bytes32
    }),
  },
})

// 1. Mint the issuer DID (once per org).
const { didState } = await agent.dids.create({
  method: 'kanon',
  scope: 'org',
  orgId: process.env.KANON_ISSUER_ORG_ID!,
})
const issuerDid = didState.did!

// 2. Register a schema on the kanon VDR. buildKanonSchema prepends the
//    canonical `kanonCredId` attribute so revocation works.
await agent.modules.anoncreds.registerSchema({
  schema: buildKanonSchema({
    name: 'DriverLicense',
    version: '1.0',
    attrNames: ['fullName', 'dateOfBirth', 'licenseNumber'],
    issuerId: issuerDid,
  }),
  options: { supportRevocation: false },
})

What ships under the hood

  • kanonCredId attribute injection in buildKanonSchema / buildKanonCredentialAttributes / buildKanonProofRequest
  • Canonical hash via @ajna-inc/kanon-sdk/anoncreds (single source of truth)
  • On-chain calls via the SDK's contract bindings — Kanon ABIs, addresses, deployment loader all come from one place

Mode B (optional ZK)

Mode B (Groth16 SNARK presentations for unlinkability) is implemented in the SDK at @ajna-inc/kanon-sdk/zk. Not auto-wired into this plugin yet — see the Kanon site for the integration plan.

License

Apache-2.0.