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 🙏

© 2025 – Pkg Stats / Ryan Hefner

celeriz

v0.4.0

Published

Complete SDK for Celeriz Onramp/Offramp API with wallet integration and white-label support

Readme

Celeriz SDK

SDK for integrating with the Celeriz Onramp/Offramp API.

Installation

npm install celeriz

Initialization

// JavaScript
const { CelerizSDK } = require('celeriz');
const sdk = new CelerizSDK({ apiKey: 'YOUR_API_KEY' });
// TypeScript
import { CelerizSDK } from 'celeriz';
const sdk = new CelerizSDK({ apiKey: 'YOUR_API_KEY' });
  • apiKey (string, required): Your Celeriz API key (use the sk-... key provided).
  • baseUrl (string, optional): Override the default API base URL if needed.

Methods

Onramp

getOnrampQuote(params)

Get a quote for fiat-to-crypto conversion.

Parameters:

  • fromCurrency (string): Base currency (e.g., 'INR')
  • toCurrency (string): Crypto currency (e.g., 'USDT')
  • fromAmount (string): Fiat amount
  • chain (string): Network (e.g., 'bep20')
  • paymentMethodType (string): Payment method (e.g., 'UPI')

Example:

const quote = await sdk.getOnrampQuote({
  fromCurrency: 'INR',
  toCurrency: 'USDT',
  fromAmount: '1000',
  chain: 'bep20',
  paymentMethodType: 'UPI',
});

createOnrampTransaction(params)

Create an onramp transaction.

Parameters:

  • fromCurrency, toCurrency, chain, paymentMethodType, depositAddress, customerId, fromAmount, toAmount, rate (all strings)

Example:

const tx = await sdk.createOnrampTransaction({
  fromCurrency: 'INR',
  toCurrency: 'USDT',
  chain: 'bep20',
  paymentMethodType: 'UPI',
  depositAddress: '0x123...',
  customerId: 'cust_123',
  fromAmount: '1000',
  toAmount: '12.5',
  rate: '80.0',
});

Offramp

getOfframpQuote(params)

Get a quote for crypto-to-fiat conversion.

Parameters:

  • chain, fromCurrency, toCurrency, fromAmount (all strings)

Example:

const quote = await sdk.getOfframpQuote({
  chain: 'bep20',
  fromCurrency: 'USDT',
  toCurrency: 'INR',
  fromAmount: '10',
});

createOfframpTransaction(params)

Create an offramp transaction.

Parameters:

  • fromCurrency, toCurrency, chain, fiatAccountId, customerId, fromAmount, toAmount, rate (all strings)

Example:

const tx = await sdk.createOfframpTransaction({
  fromCurrency: 'USDT',
  toCurrency: 'INR',
  chain: 'bep20',
  fiatAccountId: 'acc_123',
  customerId: 'cust_123',
  fromAmount: '10',
  toAmount: '800',
  rate: '80.0',
});

KYC

getKycUrl(params)

Get a KYC URL for user verification.

getKycRequirements(params)

Get KYC requirements for a specific country/customer.

submitKycDetails(params)

Submit KYC details for verification.

submitKycFiles(params)

Submit KYC files for verification.

getKycStatus(params)

Get KYC verification status.

All KYC methods accept an object with the required fields as per your API docs.


KYB

getKybRequirements(country)

Get KYB requirements for a country.

Parameters:

  • country (string): Country code (e.g., 'IN')

submitKybDetails(params)

Submit KYB details (object as per API docs).

submitKybDocuments(formData)

Submit KYB documents (use a FormData object for file uploads).


Merchant

setMerchantWebhookUrl({ webhookUrl })

Set the webhook URL for your merchant account.

Parameters:

  • webhookUrl (string): The webhook URL to set

Example:

await sdk.setMerchantWebhookUrl({ webhookUrl: 'https://yourdomain.com/webhook' });

Error Handling

All methods throw if the API returns an error. Use try/catch to handle errors:

try {
  const quote = await sdk.getOnrampQuote({ ... });
} catch (err) {
  console.error('API error:', err.response?.data || err.message);
}

Troubleshooting

  • 401 Unauthorized: Ensure your API key is correct and passed as x-api-key.
  • Network errors: Check your internet connection and base URL.
  • Parameter errors: Double-check required fields for each method.

Contributing

Pull requests and issues are welcome! Please open an issue for bugs or feature requests.


License

MIT