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

bk-verify

v0.1.1

Published

Trustless CLI verifier for BK Credential System (W3C VC + SD-JWT + Sepolia anchors).

Readme

bk-verify — Trustless CLI Verifier

Standalone CLI for the BK Credential System (W3C VC + SD-JWT + Sepolia Merkle anchors). Verifies a credential file with no HCMUT backend in the trust path — only a public Sepolia RPC endpoint is required.

This is the canonical demonstration of Decision 1 (trustless verification) and Decision 22 (one shared verify SDK, multiple distributions). Same six checks as the Web Verify Portal; identical results.

Install / Run

No global install needed:

npx bk-verify <file.vc.json>
npx bk-verify <credId> --api-base https://issuer.example.com

Requires Node.js ≥ 20.

Usage

Verify a downloaded .vc.json

npx bk-verify ./alice.vc.json

Accepts either a raw SD-JWT compact string or a JSON wrapper with one of { sdJwt | compact | presentation }.

Verify by credential ID (via issuer API)

npx bk-verify bk_2024_abc123 --api-base https://issuer.bk.edu.vn

The CLI fetches the public canonical view (PCV + Merkle proof, no disclosures) and runs the same on-chain checks. Disclosed claim values still require the holder to share the full .vc.json.

Output

Human-readable (default, TTY-detected color):

  ✓ Issuer signature
  ✓ Issuer registered on-chain
  ✓ Merkle proof
  ✓ Batch anchored on-chain
  ✓ Not revoked
  ✓ Not expired

Verified: did:ethr:0xabc…  credId: bk_2024_abc123

Machine-readable (--json):

npx bk-verify ./alice.vc.json --json

Emits the full VerifyResult shape:

{
  "valid": true,
  "checks": {
    "issuerSignature": true,
    "issuerRegistered": true,
    "merkleProof": true,
    "anchored": true,
    "notRevoked": true,
    "notExpired": true
  },
  "credential": {
    "credId": "bk_2024_abc123",
    "vct": "BKISC_MEMBER",
    "issuer": { "did": "did:ethr:0x…", "address": "0x…", "name": "" },
    "iat": 1717000000,
    "disclosedClaims": { "full_name": "Alice", "student_id": "BK001" }
  },
  "errors": []
}

Flags

| Flag | Env | Default | | ----------------------------- | ------------------------- | --------------------------------------------- | | --rpc <url> | BK_RPC_URL | https://ethereum-sepolia.publicnode.com | | --registry <addr> | BK_CREDENTIAL_REGISTRY | Sepolia deployment | | --issuer-registry <addr> | BK_ISSUER_REGISTRY | Sepolia deployment | | --api-base <url> | BK_API_BASE | (required for credId mode) | | --ipfs-gateway <url> | BK_IPFS_GATEWAY | https://gateway.pinata.cloud/ipfs/ | | --json | — | Off (emit human-readable summary) | | --quiet | — | Off (suppress non-error output) | | --no-color | NO_COLOR | Color on if TTY, off otherwise | | -V, --version | — | | | -h, --help | — | |

Default registry addresses come from packages/contracts/deployments/sepolia.json and are baked into the published bundle.

Exit codes

| Code | Meaning | | ---- | --------------------------------------------------------------- | | 0 | Valid — all six checks passed | | 1 | Invalid — at least one check failed (signature, anchor, etc.) | | 2 | Usage error — missing/unknown flag or argument | | 3 | I/O error — file not found, RPC unreachable, network failure |

CI-friendly: npx bk-verify file.vc.json --quiet && echo ok works.

What gets checked

  1. Issuer signature — ES256K recovery against the issuer's Ethereum address (no public key needed on chain).
  2. Issuer registered on-chainIssuerRegistry.isIssuer(addr).
  3. Merkle proof — re-derive the leaf from the PCV claims, verify against the signed merkleRoot.
  4. Batch anchored on-chainCredentialRegistry.getAnchor(root).
  5. Not revokedCredentialRegistry.isRevoked(keccak256(credId)).
  6. Not expired — local exp check against system clock.

License

MIT