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

@systynlabs/vaultnuban

v0.2.0

Published

Official TypeScript/Node SDK for the VaultNUBAN virtual account API

Readme

@systynlabs/vaultnuban

Official TypeScript/Node SDK for the VaultNUBAN virtual account API. Works in Node ≥18 (plain Node, NestJS, Express, Next.js API routes).

npm install @systynlabs/vaultnuban

Quick start

import { VaultNuban } from "@systynlabs/vaultnuban";

const vn = new VaultNuban({ apiKey: process.env.VAULTNUBAN_API_KEY! });

// Onboard a customer and give them a dedicated NUBAN
const customer = await vn.customers.create({
  external_ref: "user_12345",
  display_name: "Amaka Obi",
  identity: { bvn_masked: "****78901", kyc_tier: 1 },
});
const va = await vn.virtualAccounts.provision(customer.id);
console.log(`Fund ${va.nuban} (${va.bank_name})`);

// Check the wallet
const balance = await vn.transactions.balance(customer.id);
console.log(balance.balance_ngn);

// Pay out
const payee = await vn.withdrawals.resolvePayee("058", "0123456789");
await vn.withdrawals.create(customer.id, {
  amount_kobo: 250_000,
  destination_bank_code: "058",
  destination_account_number: payee.account_number,
  destination_account_name: payee.account_name,
});

Receiving webhooks

Register an endpoint once, then verify every delivery with the raw request body and the X-VaultNUBAN-Signature header:

import express from "express";
import * as webhooks from "@systynlabs/vaultnuban/webhooks";

await vn.webhooks.createEndpoint({
  url: "https://example.com/vaultnuban/webhook",
  secret: process.env.VAULTNUBAN_WEBHOOK_SECRET!,
});

const app = express();
app.post("/vaultnuban/webhook", express.raw({ type: "*/*" }), (req, res) => {
  let event;
  try {
    event = webhooks.constructEvent(
      req.body, // raw Buffer — do not JSON-parse before verifying
      req.header("X-VaultNUBAN-Signature"),
      process.env.VAULTNUBAN_WEBHOOK_SECRET!,
    );
  } catch {
    return res.sendStatus(400);
  }

  if (event.event_type === "payment_success") {
    // credit received on event.transaction.nuban
  }
  res.sendStatus(200); // 2xx acknowledges; anything else is retried
});

Behavior

  • Idempotency — every POST/PATCH/DELETE automatically sends an Idempotency-Key (override via options.idempotencyKey). Replays within 24 h return the cached response.
  • Retries — 429 and 5xx responses and network failures are retried with exponential backoff (default 2 retries; safe because of the idempotency key).
  • Paginationlist() returns one page ({ data, next_cursor }); listAll() returns an async iterator over every item:
    for await (const tx of vn.transactions.listAll({ direction: "credit" })) { … }
  • Errors — non-2xx responses throw typed errors (AuthenticationError, NotFoundError, ValidationError, ConflictError, RateLimitError, ServerError) carrying the RFC-9457 problem body and X-Request-ID.

NestJS

No separate package needed — inject the client as a provider:

@Module({
  providers: [
    {
      provide: VaultNuban,
      useFactory: () => new VaultNuban({ apiKey: process.env.VAULTNUBAN_API_KEY! }),
    },
  ],
  exports: [VaultNuban],
})
export class VaultNubanModule {}

Development

npm install
npm run typecheck
npm test
npm run build