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

@blindpay/node

v6.0.0

Published

Official Node.js SDK for Blindpay API - Stablecoin API for global payments

Readme

BlindPay Node.js SDK

The official Node.js SDK for BlindPay - Stablecoin API for global payments.

Installation

npm install @blindpay/node
# or
yarn add @blindpay/node
# or
pnpm add @blindpay/node
# or
bun add @blindpay/node

Authentication

To get started, you will need both your API key and your instance id, you can obtain your API key and instance id from the BlindPay dashboard https://app.blindpay.com/instances/{instanceId}/api-keys

import { BlindPay } from '@blindpay/node';

const blindpay = new BlindPay({
    apiKey: 'your-api-key-here',
    instanceId: 'your-instance-id-here'
  })

[!NOTE]
All api calls are going to use the provided api key and instance id

Quick Start

Check for available rails

async function getAvailableRails() {
    const blindpay = new BlindPay({
      apiKey: 'your-api-key-here',
      instanceId: 'your-instance-id-here'
    });

    const { data, error } = await blindpay.available.getRails();
    
    if (error) {
        throw new Error(error.message)
    }
    
    console.log('Rails: ', data)
 }

 getAvailableRails()

Response format

All API methods return a consistent response format

Success response

{
  data: /* your data */ ,
  error: null
}

Error response

{
  data: null,
  error: {
    message: "Error message"
  }
}

Error handling

This SDK uses a consistent error handling pattern. Always check for errors:

const { data, error } = await blindpay.payins.list();

if (error) {
  // error.code is a stable code (e.g. PAYOUTS_INSUFFICIENT_BALANCE); error.description is
  // safe to show to end users; include error.trace_id when contacting support.
  console.error('API Error:', error.code ?? error.message);
  return;
}

console.log('Success:', data); // fully typed

Safe retries (idempotency)

Every method that creates, updates or deletes something takes an optional last argument. Pass an idempotencyKey and a retry with the same key and the same input replays the original response instead of acting twice, for example when a timeout leaves you unsure whether a payout was created. Keys are kept for 24 hours.

import { randomUUID } from 'node:crypto';

const idempotencyKey = randomUUID(); // reuse it only to retry this same call

const { data, error } = await blindpay.payouts.createEvm(
  { quote_id: 'qu_000000000000', sender_wallet_address: '0x...' },
  { idempotencyKey }
);

Webhooks

constructWebhookEvent verifies the Svix signature and returns the payload typed by its webhook_event. It throws a BlindPayError when verification fails. Pass the raw request body, not a re-serialized object.

const event = blindpay.constructWebhookEvent({
  secret: process.env.BLINDPAY_WEBHOOK_SECRET as string,
  headers: {
    id: req.headers['svix-id'] as string,
    timestamp: req.headers['svix-timestamp'] as string,
    signature: req.headers['svix-signature'] as string,
  },
  payload: rawBody,
});

switch (event.webhook_event) {
  case 'tos.accept':
    console.log('ToS accepted:', event.tos_id);
    break;
  case 'customer.update':
    console.log('KYC status:', event.kyc_status);
    break;
}

verifyWebhookSignature is still available when you only need a boolean.

For detailed API documentation, visit:

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Made with ❤️ by the BlindPay team