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

@dantber/openclaw-agent-did

v0.2.1

Published

OpenClaw plugin for W3C-compliant DID and Verifiable Credential management for AI agents

Downloads

98

Readme

npm version License: MIT

agent-did OpenClaw Plugin

OpenClaw plugin for W3C-compliant DID and Verifiable Credential management for AI agents.

Installation

openclaw plugins install dantber/openclaw-agent-did

Usage

Set your passphrase as an environment variable:

export AGENT_DID_PASSPHRASE="your-secure-passphrase"

Or use --no-encryption flag (not recommended for production).

Create Identities

# Create owner identity
openclaw agent-did create owner --name "Alice"

# Create agent identity
openclaw agent-did create agent --name "Assistant" --owner <owner-did>

List and Inspect Identities

# List all identities
openclaw agent-did list

# Inspect specific identity
openclaw agent-did inspect --did <did>

# Delete identity
openclaw agent-did delete --did <did>

Issue Verifiable Credentials

# Issue ownership credential
openclaw agent-did vc issue ownership \
  --issuer <owner-did> \
  --subject <agent-did> \
  --out ownership.jwt

# Issue capability credential
openclaw agent-did vc issue capability \
  --issuer <owner-did> \
  --subject <agent-did> \
  --scopes read,write,execute \
  --audience https://api.example.com \
  --expires 2026-12-31T23:59:59Z \
  --out capability.jwt

Verify Credentials

# Verify credential
openclaw agent-did vc verify --file ownership.jwt

# Verify with expected issuer/subject
openclaw agent-did vc verify \
  --file ownership.jwt \
  --issuer <expected-issuer-did> \
  --subject <expected-subject-did>

Manage Credentials

# List stored credentials
openclaw agent-did vc list

# Inspect credential without verifying
openclaw agent-did vc inspect --file ownership.jwt

# Delete stored credential
openclaw agent-did vc delete --id <credential-id> --yes

Authentication

# Sign authentication challenge
openclaw agent-did auth sign \
  --did <agent-did> \
  --challenge <nonce> \
  --audience https://api.example.com \
  --domain example.com \
  --expires-in 300

# Verify authentication signature
openclaw agent-did auth verify \
  --did <agent-did> \
  --payload <base64url-payload> \
  --signature <base64url-signature> \
  --nonce <expected-nonce>

Command Reference

Create Commands

  • openclaw agent-did create owner --name <name> - Create owner identity
    • Options: -s/--store <path>, --no-encryption, --json
  • openclaw agent-did create agent --name <name> --owner <did> - Create agent identity
    • Options: -s/--store <path>, --no-encryption, --json

Identity Commands

  • openclaw agent-did list - List all identities
    • Options: -s/--store <path>, --no-encryption, --json
  • openclaw agent-did inspect --did <did> - Inspect specific identity
    • Options: -s/--store <path>, --no-encryption, --json
  • openclaw agent-did delete --did <did> - Delete identity
    • Options: -s/--store <path>, --no-encryption, --json

VC Commands

  • openclaw agent-did vc issue ownership --issuer <did> --subject <did> - Issue ownership credential
    • Options: --out <file>, -s/--store <path>, --no-encryption, --json
  • openclaw agent-did vc issue capability --issuer <did> --subject <did> --scopes <scopes> - Issue capability credential
    • Options: --audience <string>, --expires <date>, --out <file>, -s/--store <path>, --no-encryption, --json
  • openclaw agent-did vc verify --file <file> - Verify credential
    • Options: --issuer <did>, --subject <did>, --json
  • openclaw agent-did vc list - List stored credentials in keystore
    • Options: -s/--store <path>, --no-encryption, --json
  • openclaw agent-did vc inspect --file <file> - Decode credential without verifying
    • Options: --json
    • Returns: Decoded header and payload (no signature verification)
  • openclaw agent-did vc delete --id <id> --yes - Delete stored credential
    • Required: --yes flag to confirm deletion
    • Options: -s/--store <path>, --no-encryption, --json

Auth Commands

  • openclaw agent-did auth sign --did <did> --challenge <nonce> - Sign authentication challenge
    • Options: --audience <string>, --domain <string>, --expires-in <seconds>, -s/--store <path>, --no-encryption, --json
    • Returns: Signed payload and signature (base64url encoded)
  • openclaw agent-did auth verify --did <did> --payload <b64> --signature <b64> - Verify authentication signature
    • Options: --nonce <expected>, --audience <expected>, --domain <expected>, --json
    • Returns: Verification result with payload details

Environment Variables

  • AGENT_DID_HOME - Custom keystore path (default: ~/.agent-did)
  • AGENT_DID_PASSPHRASE - Passphrase for keystore encryption

Architecture

This plugin uses library imports from the agent-did package instead of subprocess calls:

  • Better Performance - No process spawning overhead
  • Type Safety - Full TypeScript type checking
  • Error Handling - Structured exceptions vs parsing stderr
  • Shared State - Singleton keystore manager prevents re-initialization

Key Components

  • KeystoreManager - Singleton pattern for keystore instances
  • Commands - Commander.js command handlers that import agent-did functions
  • Utils - Output formatting and error normalization

Development

# Watch mode (auto-rebuild on changes)
npm run dev

# Build
npm run build

# After changes, reload plugin in OpenClaw
openclaw plugin reload agent-did

Compatibility

The plugin shares keystores with the standalone agent-did CLI. You can use both interchangeably:

# Create with plugin
openclaw agent-did create owner --name "Alice"

# List with standalone CLI
agent-did list

# Both work with the same keystore

License

MIT