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

@altimist/did-publisher

v0.3.0

Published

Mounts altimist-id's Resolver API on altimist-web's resolver-surface paths (DID document, revocations, team issuer keys). Phase 2a of F-010.

Readme

@altimist/did-publisher

Proxy altimist-id's Resolver API to the public did:web URLs (<handle>.altimist.com/.well-known/did.json, altimist.com/users/<handle>/did.json, altimist.com/.well-known/revocations.json, altimist.com/.well-known/team-issuers/<team>.json). Two consumption shapes:

  • routeResolverRequest() — single fetch handler dispatcher for Cloudflare Workers / Bun.serve / Deno.serve. The recommended path (ADR-012 Option W).
  • didJsonHandler / revocationsHandler / teamIssuersHandler — Next.js App Router route-handler factories. v0.1 API; retained for any consumer that wants to mount per-route handlers under file-based routing.

Decision rationale in ADR-011 (original placement on altimist-web, never deployed) and ADR-012 (Cloudflare Worker placement, current direction).

Install

npm install @altimist/did-publisher

Usage — Cloudflare Workers (recommended)

// src/index.ts
import { routeResolverRequest } from '@altimist/did-publisher';

export default {
  async fetch(request: Request, env: Env): Promise<Response> {
    const response = await routeResolverRequest(request, {
      origin: env.ALTIMIST_ID_ORIGIN,    // e.g. "https://id.altimist.ai"
      apex: env.ALTIMIST_ID_APEX,        // "altimist.com" / "staging.altimist.com"
    });
    return response ?? new Response('Not Found', { status: 404 });
  },
};

routeResolverRequest() returns:

  • A Response for the three resolver-surface URLs.
  • null for everything else — the caller decides what to do (404, fall through to another origin, etc).

Usage — Next.js App Router (v0.1 API)

In a Next.js project that owns *.altimist.com, mount three route handlers:

// app/.well-known/did.json/route.ts
import { didJsonHandler } from '@altimist/did-publisher';

export const GET = didJsonHandler({
  origin: process.env.ALTIMIST_ID_URL!,        // e.g. "https://id.altimist.ai"
  apex: process.env.RESOLVER_APEX || 'altimist.com',
});
// app/.well-known/revocations.json/route.ts
import { revocationsHandler } from '@altimist/did-publisher';

export const GET = revocationsHandler({
  origin: process.env.ALTIMIST_ID_URL!,
});
// app/.well-known/team-issuers/[team]/route.ts
import { teamIssuersHandler } from '@altimist/did-publisher';

export const GET = teamIssuersHandler({
  origin: process.env.ALTIMIST_ID_URL!,
});

What each route does

| Path | Behaviour | Cache | |---|---|---| | <handle>.<apex>/.well-known/did.json | Proxies ${origin}/api/resolver/did/<handle> | s-maxage=300, stale-while-revalidate=86400 | | <apex>/users/<handle>/did.json | Proxies ${origin}/api/resolver/did/<handle>?form=path (F-011 path-form DID hosting) | s-maxage=300, stale-while-revalidate=86400 | | <apex>/.well-known/revocations.json | Proxies ${origin}/api/resolver/revocations | s-maxage=60, stale-while-revalidate=86400 (per F-010's 60s revocation-latency AC) | | <apex>/.well-known/team-issuers/<team>.json | Proxies ${origin}/api/resolver/team-issuers/<team> | s-maxage=300, stale-while-revalidate=86400 |

<apex> is configured per environment (altimist.com for production, staging.altimist.com for staging). Handle URLs require a single-label subdomain (patrick.altimist.com); apex paths require the host to be exactly the apex (returns 404 otherwise).

Failure modes

  • Upstream 4xx (404 unknown handle, etc.): pass through with the same status, no cache header.
  • Upstream 5xx or timeout: returns 503 so consumer apps fail-closed (DID resolution unavailable).

Cloudflare cache purge

altimist-id is responsible for purging the edge cache on every mutation (device enrolment, revocation, etc.). This package is read-only — see altimist-id's src/lib/cache-purge.ts for the purge side.

License

UNLICENSED — internal Altimist.