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

@thothsupport/webhook

v0.1.0

Published

Verify signed webhook requests from Thoth custom tools

Downloads

113

Readme

@thothsupport/webhook

Verify signed webhook requests from Thoth custom tools.

Install

npm install @thothsupport/webhook

In this monorepo:

pnpm add @thothsupport/webhook --workspace

Usage

Thoth signs each webhook with HMAC-SHA256 over timestamp + "." + raw JSON body. Verify the signature before handling the request.

import { verifyThothWebhook, type ThothWebhookPayload } from '@thothsupport/webhook';

const secret = process.env.THOTH_SIGNING_SECRET!;

export async function handleWebhook(request: Request): Promise<Response> {
	const rawBody = await request.text();
	const signature = request.headers.get('X-Thoth-Signature') ?? undefined;
	const authorization = request.headers.get('Authorization') ?? undefined;

	if (
		!verifyThothWebhook({
			rawBody,
			signatureHeader: signature,
			authorizationHeader: authorization,
			secret
		})
	) {
		return Response.json({ error: 'Invalid signature' }, { status: 401 });
	}

	const payload = JSON.parse(rawBody) as ThothWebhookPayload;
	// Look up data and return JSON
	return Response.json({ status: 'ok', tool: payload.tool });
}

Use the raw request body string when verifying. Do not re-serialize parsed JSON.

Options

| Option | Required | Description | | --- | --- | --- | | rawBody | yes | Raw request body string | | signatureHeader | yes | Value of X-Thoth-Signature | | authorizationHeader | no | Value of Authorization; bearer token must match secret when present | | secret | yes | Signing secret from the Thoth dashboard | | maxAgeSeconds | no | Max age for timestamp (default: 300) |

Examples

See examples/node-express.ts for a minimal Express handler.

License

ISC

Publishing (maintainers)

This package is published to npm via trusted publishing (OIDC) — no long-lived NPM_TOKEN in GitHub secrets.

One-time npm setup

  1. Sign in at npmjs.com and ensure the @thothsupport scope exists (create an npm org if needed).
  2. Open @thothsupport/webhookSettingsPublishing accessAdd GitHub Actions trusted publisher:
    • Organization or user: KieranHolroyd
    • Repository: thoth
    • Workflow filename: publish-webhook.yml
    • Environment: leave empty
  3. Save. npm will accept publishes only from that workflow on this repo.

Release a version

  1. Bump version in packages/thoth-webhook/package.json.
  2. Commit and push to main.
  3. Tag and push (tag must match the package version):
git tag webhook-v0.1.0
git push origin webhook-v0.1.0

GitHub Actions runs .github/workflows/publish-webhook.yml, verifies the tag matches package.json, runs tests, builds, and publishes with --provenance (provenance only works in CI, not from your laptop).

For a one-off local publish (no provenance badge):

pnpm build
npm publish --access public