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

@vincenzo-bug/credential

v0.3.0

Published

Credential core: agent identity, verifiable credentials, capability tokens, enforcement, audit — local-first.

Readme

@vincenzo-bug/credential

Local-first core for Credential: a Zero-Trust control layer for AI agents and services. Identity, verifiable credentials, capability tokens, enforcement, revocation, and signed audit records — no infrastructure, no chain, no network.

pnpm add @vincenzo-bug/credential

Modules

| Area | Key exports | | --- | --- | | Identity | createIdentity, identityFromSecretKey, resolveDid, didFromPublicKey | | Keystore | InMemoryKeystore, FileKeystore, storeIdentity, loadIdentity | | Credentials | issueCredential, verifyCredential, credentialId | | Capability tokens | issueCapability, verifyToken, verifyChain, tokenId, capabilityCovers | | Revocation | InMemoryRevocationRegistry, FileRevocationRegistry | | Enforcement | Guard (authorizeallow/deny) | | App gate | CredentialGate (credential verification + capability authorization) | | Audit | AuditLog, InMemoryAuditSink, FileAuditSink, verifyAuditTrail |

Existing app example

Use CredentialGate at the boundary of an API route, worker job, tool call, or RPC method. Your application performs the protected action only when the gate returns allow.

import { CredentialGate, InMemoryRevocationRegistry } from '@vincenzo-bug/credential';

const revocation = new InMemoryRevocationRegistry();
const gate = new CredentialGate({
  trustedIssuers: [process.env.COMPANY_ISSUER_DID!],
  revocation,
});

app.post('/tools/customer-read', async (req, res) => {
  const decision = await gate.authorize({
    credential: req.body.credential,
    capability: req.body.capability,
    request: { resource: `customers/${req.body.customerId}`, action: 'read' },
  });

  if (decision.outcome !== 'allow') {
    return res.status(403).json({ reason: decision.reason });
  }

  return res.json(await readCustomer(req.body.customerId));
});

Authorization, not yet authentication. CredentialGate checks that the credential and capability are valid, consistent, and unrevoked, but does not prove the caller controls the agent DID at request time. Until the auth challenge flow lands, treat them as bearer tokens — fine for trusted server-to-server use, but add a freshness / proof-of-possession signature at an untrusted edge.

Primitive example

import {
  createIdentity, issueCapability, Guard,
  InMemoryRevocationRegistry, AuditLog, verifyAuditTrail,
} from '@vincenzo-bug/credential';

const owner = await createIdentity();
const agent = await createIdentity();

const cap = await issueCapability({
  issuer: owner,
  audience: agent.did,
  capability: { resource: 'db/users/42', actions: ['read'] },
});

const revocations = new InMemoryRevocationRegistry();
const guard = new Guard(revocations);
const audit = new AuditLog(owner);

const decision = await guard.authorize(cap, { resource: 'db/users/42', action: 'read' });
await audit.append({
  capId: decision.capId, action: 'read', resource: 'db/users/42',
  outcome: decision.outcome, reason: decision.reason,
});

console.log(decision.outcome);                         // 'allow'
console.log((await verifyAuditTrail(await audit.records())).ok); // true

See SPEC.md for the on-the-wire token and audit formats.

License

Apache-2.0