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

@offbank/sdk

v0.1.0

Published

Offbank server-side SDK — USDC invoicing, checkout sessions, payouts, and webhook verification for high-risk e-commerce & iGaming.

Readme

@offbank/sdk

Server-side SDK for Offbank — self-custodial USDC payments for merchants processors won't touch (high-risk e-commerce & iGaming). Create invoices, spin up checkout sessions, send payouts, and verify webhooks.

Server-side only. Your API key can move money — never ship it to a browser. For in-page checkout, use the <script src="https://offbankpay.com/embed.js"> widget instead.

Install

npm install @offbank/sdk

Requires Node 18+ (uses the built-in fetch).

Quick start

import { Offbank } from "@offbank/sdk";

const offbank = new Offbank({ apiKey: process.env.OFFBANK_API_KEY! });

Get an API key from your dashboard → Settings → API keys.

Invoices

const invoice = await offbank.invoices.create({
  buyerName: "DynaVap Wholesale",
  buyerEmail: "[email protected]",
  lineItems: [
    { description: "VonG (case of 24)", quantity: 10, unitPrice: 1200 },
  ],
  dueDate: "2026-08-01",
  memo: "Net 30",
});

console.log(invoice.invoiceUrl); // hosted USDC pay page

await offbank.invoices.list({ status: "sent", limit: 20 });
await offbank.invoices.get(invoice.id);

Checkout sessions

Server-fixed amount (untamperable), for a hosted or embedded checkout:

const session = await offbank.checkout.sessions.create({
  merchantWallet: "DjLF…rSQV",
  merchantName: "DynaVap Store",
  amount: 74.0,
  successUrl: "https://store.com/thanks",
  cancelUrl: "https://store.com/cart",
  webhookUrl: "https://store.com/api/offbank-webhook",
});

// Redirect the buyer to session.url, or pass session.id to the embed widget.

Payouts

Pay anyone in USDC by email — they claim via a link (great for iGaming withdrawals and affiliate payouts):

await offbank.payouts.create({
  email: "[email protected]",
  amount: 250.0,
  memo: "Tournament prize",
});

Verifying webhooks

Offbank signs each webhook with your per-merchant secret. Verify the raw request body before trusting it:

import { Offbank } from "@offbank/sdk";

// Express example — make sure you have the raw body (e.g. express.raw()).
app.post("/api/offbank-webhook", (req, res) => {
  const ok = offbank.webhooks.verify(
    req.body.toString("utf8"),                // raw body string
    req.header("X-Offbank-Signature"),        // signature header
    process.env.OFFBANK_WEBHOOK_SECRET!,      // from the dashboard
    300,                                      // optional: max age in seconds
  );
  if (!ok) return res.status(400).send("bad signature");

  const event = JSON.parse(req.body.toString("utf8"));
  if (event.event === "payment.completed") {
    // fulfil the order — payment is verified on-chain by Offbank
  }
  res.sendStatus(200);
});

verify() returns true only when the HMAC-SHA256 signature matches (constant-time) and, if you pass toleranceSeconds, the timestamp is fresh.

Errors

Failed requests throw OffbankError with .status and .code:

import { OffbankError } from "@offbank/sdk";

try {
  await offbank.invoices.create(/* … */);
} catch (e) {
  if (e instanceof OffbankError) console.error(e.status, e.code, e.message);
}

License

MIT