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

@ronnakamoto/warrant-x402

v0.1.0

Published

Wrap a Hono POST with Warrant + Hedera Exact x402.

Readme

@ronnakamoto/warrant-x402

Wrap a Hono POST with Warrant + Hedera Exact x402.

We do not host a reverse proxy and do not “protect any URL” you paste. Wrap your own Hono POST with createWarrantShop + warrantHono. The request body stays in your process.

import { Hono } from "hono";
import { FETCH, SnarkjsVerifier } from "@ronnakamoto/warrant-core";
import {
  createWarrantShop,
  initializeWarrantShop,
  CurrentRootChecker,
  FileNullifierStore,
  FileChallengeStore,
  warrantHono,
} from "@ronnakamoto/warrant-x402";

const roots = new CurrentRootChecker({
  rpcUrl: process.env.BASE_SEPOLIA_RPC!,
  registry: process.env.REGISTRY_ADDRESS as `0x${string}`,
});
const shop = createWarrantShop({
  route: "POST /v1/orders",
  description: "orders",
  policy: { requireScope: FETCH, minTier: 0, freeCallsPerHuman: 0 },
  amount: process.env.X402_AMOUNT ?? "100000",
  payTo: process.env.HEDERA_PAY_TO!,
  verifier: SnarkjsVerifier.fromPath(process.env.WARRANT_VKEY_PATH!),
  roots,
  getMerkleRoot: async () => (await roots.currentRoot()).toString(),
  nullifiers: new FileNullifierStore(process.env.WARRANT_NULLIFIER_PATH!),
  challenges: new FileChallengeStore(process.env.WARRANT_CHALLENGE_PATH!),
  defaultPath: "/v1/orders",
});
await initializeWarrantShop(shop);

const app = new Hono();
app.use("/v1/*", warrantHono(shop));
app.post("/v1/orders", async (c) => {
  const order = await createOrder(await c.req.json());
  return c.json(order);
});

Any machine

  1. Node 20.18+ (macOS, Linux, or Windows).
  2. npm i @ronnakamoto/warrant-core @ronnakamoto/warrant-x402 hono viem
  3. Put the Groth16 vkey on disk. Set WARRANT_VKEY_PATH to an absolute path.
  4. Set BASE_SEPOLIA_RPC, REGISTRY_ADDRESS, HEDERA_PAY_TO, nullifier and challenge file paths.
  5. initializeWarrantShop(shop) after construct. Registering ExactHedera happens inside the factory before initialize.

This package does not include a zkey. It does not protect a URL you paste. Your process wraps your route.

See LICENSE (Apache-2.0).