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

@growth-labs/foundry-signing

v0.1.0

Published

The Foundry route-family HMAC: the legacy dot string and the host-bound foundry-cms-v2 string, one verifier, and the shared golden vectors.

Readme

@growth-labs/foundry-signing

The Foundry route-family HMAC, in one place. Foundry (fulcrum-labs/foundry articlechain/publishauth.go) signs every request to a site's Foundry routes with one estate-wide secret; every Workers-side verifier imports this package instead of keeping its own copy.

| Form | Signed string | Used by | | --- | --- | --- | | legacy | METHOD.PATH.TIMESTAMP.sha256hex(body) | cms Foundry routes on publications that have not opted in | | foundry-cms-v2 | "foundry-cms-v2\nMETHOD\nHOST\nPATH\nTIMESTAMP\nsha256hex(body)" (no trailing newline) | cms Foundry routes on opted-in publications; the video import route |

HOST is the site's configured canonical host (lowercase, no scheme or port), never the request's Host header. The secret is shared by every site, so binding the host is what stops a request signed for one site verifying on another. The signature is lowercase hex HMAC-SHA256 in X-Foundry-Signature (an optional sha256= prefix is accepted); X-Foundry-Timestamp is unix seconds within ±300 s, and the string is verified over the timestamp text the request carried.

import { isCanonicalHost, verifyFoundryRequest } from '@growth-labs/foundry-signing'

const ok = await verifyFoundryRequest(secret, {
  method: request.method,
  host: isCanonicalHost(configuredHost) ? configuredHost : null, // null = legacy string
  path: new URL(request.url).pathname,
  timestampHeader: request.headers.get('X-Foundry-Timestamp'),
  signatureHeader: request.headers.get('X-Foundry-Signature'),
  body: rawBody,
})

Also exported: signFoundryRequest (the producer side, for tests and tools), foundrySignedString, sha256Hex, isCanonicalHost, FOUNDRY_CMS_V2 and FOUNDRY_SIGNATURE_MAX_SKEW_SECONDS.

Golden vectors

@growth-labs/foundry-signing/fixtures exports GOLDEN_SECRET, GOLDEN_TIMESTAMP and GOLDEN_VECTORS: the foundry-cms-v2 vectors agreed with Foundry's Go signer (SignPublishRequestV2). Every consumer's tests import them, so the TypeScript and Go halves are proven byte-equal and cannot drift.

Zero runtime dependencies; WebCrypto only, so it runs unchanged in Workers and Node.