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

@distilled.cloud/acme

v1.0.0-rc.16

Published

Readme

ACME for Effect

@distilled.cloud/acme implements the ACME account and certificate lifecycle with Effect and WebCrypto. Install it alongside effect, save this as example.ts, and run node example.ts to read Let's Encrypt's staging directory:

import * as Acme from "@distilled.cloud/acme";
import * as Effect from "effect/Effect";
import * as FetchHttpClient from "effect/http/FetchHttpClient";

const program = Effect.gen(function* () {
  const accountKey = yield* Acme.Jose.generateAccountKey();
  return yield* Acme.acme.getDirectory({}).pipe(
    Effect.provide(Acme.layer({
      directoryUrl: Acme.Directories.LetsEncryptStaging,
      accountKey,
    })),
  );
});

const directory = await Effect.runPromise(
  program.pipe(Effect.provide(FetchHttpClient.layer)),
);
console.log(directory.newOrder);

Authentication

Signed requests use a private JWK (Redacted<string>), supporting ES256/P-256 and RS256. Persist your account key securely; do not generate a new key per issuance. After acme.newAccount, supply its location as accountUrl to Acme.layer. CAs requiring External Account Binding also need externalAccountBinding: { keyId, hmacKey }; hmacKey is redacted.

CredentialsFromEnv reads ACME_ACCOUNT_KEY, ACME_ACCOUNT_URL, ACME_DIRECTORY_URL, and the optional ACME_EAB_KID / ACME_EAB_HMAC_KEY pair. The default directory is Let's Encrypt production; explicitly choose staging when testing. A staging certificate is not publicly trusted.

Responses and retries

Operations remain under Acme.acme (or the @distilled.cloud/acme/acme subpath). JSON outputs are schema-validated; HEAD nonce, PEM chain, and empty revocation responses retain their respective output shapes. Parse errors omit raw bodies and parser diagnostics that could contain secrets.

The protocol retries badNonce at most twice, re-signing with the nonce on that request's rejection. These nonces never enter the shared cache; ordinary nonces are cached by the full directory URL. Exhausted recovery surfaces AcmeBadNonce, not an indefinitely retryable server fault. Typed rate-limit errors expose retryAfter as an optional Effect Duration. Other retries use the shared SDK policy, configurable through Acme.Retry.

Unrecognized problem URNs surface as UnknownAcmeError with type, status, detail, and subproblems, plus a redacted body; they are not classified as server errors merely because their URN is unknown.

Source and limitations

scripts/convert.ts builds the Smithy model from RFC 8555, which the spec mirror specs/spec-mirror-acme snapshots: every member's name, type, requiredness and documentation comes from the RFC's field definitions, and the typed errors from its §6.7 registry. Where CAs differ from the RFC, patches/ says so. Edit the converter, patches and handwritten protocol, never generated service files; regenerate with pnpm generate acme from the workspace root.

The SDK covers directory discovery, nonces, accounts, orders, authorizations, challenge responses, certificate downloads, and revocation. It does not deploy DNS/HTTP challenges, generate CSRs, schedule renewal, implement account-key rollover, or implement ACME Renewal Information. Callers own those workflows, CA terms acceptance, polling limits, and certificate/key storage. Directory metadata is cached in-process; resetProtocolCaches from the Protocol subpath clears directory and nonce caches.