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

@peltier/node

v0.2.0

Published

Peltier backend SDK — HTTP 402 payment gate (Express/Fetch adapters), webhook verification, subscriptions, payment sessions, plus the full @peltier/core flow surface. Runtime-neutral: Node 18+, Bun, Deno, edge.

Readme

@peltier/node

npm license

The Peltier backend SDK — HTTP 402 payment gate, webhook verification, and subscriptions, plus a full re-export of @peltier/core so every flow drives from one server package.

React-free by construction (viem + Web Crypto only). "node" is the deployment tier, not a runtime requirement: Node 18+, Bun, Deno, and edge all work. Never ship it to the browser — it handles your sk_ secret key.

npm install @peltier/node viem

402 payment gate in three lines

import { peltier402Express } from '@peltier/node'

app.use('/paid', peltier402Express({
  apiUrl: 'https://api.peltier.dev',
  secretKey: process.env.PELTIER_SK!,
  price: '0.10',
}))

Unpaid requests receive an x402-shaped 402 challenge carrying a checkout session. Paid requests pass through with a stateless pt_ access token in X-PAYMENT-TOKEN.

Also exported:

  • peltier402Fetch — the same gate for Fetch-style handlers (Next.js route handlers, Hono, Bun.serve).
  • createPaymentGate — the framework-agnostic core, if you're wiring a different server.
  • parse402 (via the core re-export) — the agent/client side of the handshake.

Webhooks

import { verifyWebhookSignature } from '@peltier/node'

const ok = await verifyWebhookSignature(rawBody, signatureHeader, webhookSecret)

Verifies both payment.* and subscription.* deliveries. Use verifyWebhookSignatureDetailed to get { ok, reason } when you need to log why a delivery failed.

Subscriptions

EIP-712 typed-data builders that byte-match the on-chain PeltierSubscriptions singleton, plus the sk_ REST client:

import { subscriptionTypedData, subscriptionId, createSubscription } from '@peltier/node'

const typedData = subscriptionTypedData(8453, SUBSCRIPTIONS_ADDRESS, sub) // payer signs this
const subId = subscriptionId(8453, SUBSCRIPTIONS_ADDRESS, sub)            // the on-chain id
await createSubscription(apiUrl, secretKey, { chain_id: 8453, subscription: sub, signature })

cancelSubscriptionTypedData + relaySubscriptionCancel implement the payer's gasless cancel. listSubscriptions / getSubscription / cancelSubscription / triggerSubscriptionCharge / listSubscriptionCharges cover the rest of the merchant surface.

Everything from core, one install

@peltier/node re-exports the entire @peltier/core surface: createPeltierClient, payment sessions, intent signing, request creation, stealth withdrawal, quote and balance queries, typed PeltierApiError, and the supported-chain constants. No second install needed.

Related packages

| Package | For | |---|---| | @peltier/core | runtime-agnostic protocol core (already included here) | | @peltier/react | React web widgets + hooks | | @peltier/react-native | React Native widgets + hooks |

Docs

Full documentation lives at peltier.dev/docs.

License

MIT