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

@kybernesis/arp-templates

v0.2.0

Published

ARP document builders — pure functions that produce validated DID documents, agent cards, arp.json, representation VCs, revocations, and handoff bundles.

Downloads

346

Readme

@kybernesis/arp-templates

Pure builder functions that produce validated ARP documents from typed inputs.

Every export in this package takes a small typed input, constructs the canonical ARP shape, validates the result against the matching Zod schema from @kybernesis/arp-spec, and returns the validated object. On validation failure, the builder throws TemplateValidationError — you should never see an invalid document leak out of a builder.

These functions are stateless: no filesystem, no network, no clock reads beyond documented optional defaults. Safe to use in registrar integrations, the ARP runtime, SDKs, or the owner app.

Install

pnpm add @kybernesis/arp-templates
# peer: @kybernesis/arp-spec is bundled as a regular dependency

Usage

Build a DID document

import { buildDidDocument } from '@kybernesis/arp-templates';

const didDoc = buildDidDocument({
  agentDid: 'did:web:samantha.agent',
  controllerDid: 'did:web:ian.example.agent',
  publicKeyMultibase: 'z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp',
  endpoints: {
    didcomm: 'https://samantha.agent/didcomm',
    agentCard: 'https://samantha.agent/.well-known/agent-card.json',
  },
  representationVcUrl: 'https://ian.samantha.agent/.well-known/representation.jwt',
});

Build an agent card

import { buildAgentCard } from '@kybernesis/arp-templates';

const card = buildAgentCard({
  name: 'Samantha',
  did: 'did:web:samantha.agent',
  endpoints: {
    didcomm: 'https://samantha.agent/didcomm',
    pairing: 'https://samantha.agent/pair',
  },
  agentOrigin: 'https://samantha.agent',
});

Build a handoff bundle (registrar integration)

import { buildHandoffBundle } from '@kybernesis/arp-templates';

const bundle = buildHandoffBundle({
  agentDid: 'did:web:samantha.agent',
  principalDid: 'did:web:ian.example.agent',
  publicKeyMultibase: 'z6Mk...',
  agentOrigin: 'https://samantha.agent',
  dnsRecordsPublished: ['A', '_arp TXT', '_did TXT', '_didcomm TXT', '_principal TXT'],
  certExpiresAt: '2026-07-22T00:00:00Z',
  bootstrapToken: bootstrapJwt,
});

Builders

| Export | Source | |---|---| | buildDidDocument | ARP-tld-integration-spec-v2.md §6.1 | | buildAgentCard | ARP-tld-integration-spec-v2.md §6.2 | | buildArpJson | ARP-tld-integration-spec-v2.md §6.3 | | buildRepresentationVc | ARP-tld-integration-spec-v2.md §6.4 | | buildRevocations | ARP-tld-integration-spec-v2.md §6.5 | | buildHandoffBundle | ARP-tld-integration-spec-v2.md §7 step 14 |

Phase

Shipped as part of Phase 1. See docs/ARP-phase-0-roadmap.md.

License

MIT.