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

@jiaozi-protocol/sdk

v0.3.0

Published

JIAOZI Protocol TypeScript SDK — register / attest / resolve / verify AI-agent verifiable credentials

Readme

@jiaozi-protocol/sdk

TypeScript SDK for JIAOZI — register, attest, resolve and verify AI-agent credentials. The underlying protocol is open: specs and reference implementations live in the jiaozi-protocol GitHub org.

npm install @jiaozi-protocol/sdk
import { Gdid } from "@jiaozi-protocol/sdk";

const gdid = new Gdid({
  baseUrl: "https://www.jiaozi.io",       // or https://www.jiaozi.tech (China)
  apiKey: process.env.JIAOZI_API_KEY,
});

await gdid.register({ name: "MyAgent", ownerPubkey: "zOwner..." });
await gdid.attest(summary);          // local health-check report
await gdid.resolve("JIAOZI-2026-000001");
await gdid.verify("did:web:...");    // authenticity check

Core surface: register / verify / resolve / attest.

Credential → permission: requireTrust

Certified agents get more permissions. Gate your tools on the visiting agent's live jiaozi.status.v1 credential — signature, freshness (short TTL), revocation/suspension, trust level and the agent's self-declared attest.v1 behaviorBoundary are all checked locally, no network call needed.

Trust ladder (same medals as the portal): Bronze = software < Silver = cloud_attest < Gold = tee / tpm.

import { requireTrust, presentationFromHeaders } from "@jiaozi-protocol/sdk";

// Framework-agnostic pure function
const writeGate = requireTrust({
  minLevel: "cloud_attest",          // Silver or above
  behaviors: ["write"],              // must sit inside the declared boundary
  verify: { trustedKeys: ["z..."], expectedIssuer: "https://www.jiaozi.io" },
});

const decision = writeGate(presentationFromHeaders(req.headers));
// → { allowed: true, trustLevel, certId, payload }
// → { allowed: false, reasonCode, reason, trustLevel }

Deny codes (each with a bilingual human-readable reason): no_credential · expired · insufficient_level · behavior_out_of_boundary, refined by revoked / suspended / invalid_credential for fail-closed paths.

Three verification policies (policy option): "online" (default — embedded key + short-TTL freshness check), "pinned" (verify against locally pinned issuerKeys, no did.json resolution, freshness still enforced) and "offline" (pinned keys, freshness check skipped — the allow is explicitly marked freshness: "unverified", never a silent downgrade). pinned and offline fail closed at build time without issuerKeys. A fetchStatusCredential helper fetches a live credential from the default or a custom status source.

Express-style one-liner (answers 401/403 with the readable reason itself):

import { requireTrustExpress } from "@jiaozi-protocol/sdk";

app.post("/api/write",
  requireTrustExpress({ minLevel: "cloud_attest", behaviors: ["write"] }),
  (req, res) => res.json({ ok: true, caller: req.jiaoziTrust }));

Credentials travel in the x-jiaozi-status header (raw or base64url JSON), the optional boundary declaration in x-jiaozi-boundary. A runnable three-tier MCP-style demo lives in examples/mcp-trust-demo.

Verifying revocation freshness (no account needed)

Any relying party can verify a credential's live status offline:

import { verifyStatusCredential } from "@jiaozi-protocol/gdid-core/status";

const cred = await (await fetch("https://www.jiaozi.io/api/status/JIAOZI-2026-000001")).json();
const result = verifyStatusCredential(cred); // Ed25519 + TTL + serial checks

The status credential format is an open spec: jiaozi.status.v1.

Python

The Python SDK lives in packages/gdid-sdk-py (jiaozi-gdid on PyPI):

from jiaozi_gdid import Gdid

gdid = Gdid(base_url="https://www.jiaozi.io", api_key="...")
gdid.resolve("JIAOZI-2026-000001")

License

MIT