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

kryptoexpress-sdk

v0.1.1

Published

TypeScript-first SDK for the KryptoExpress API.

Readme

kryptoexpress-sdk

TypeScript-first, production-oriented SDK for the KryptoExpress API.

Repository: https://github.com/kryptoexpress/kryptoexpress-typescript

Design goals

  • One package for both TypeScript and JavaScript users.
  • ESM-first build with CommonJS compatibility.
  • Stable, small public API centered around KryptoExpressClient.
  • Manual business-rule enforcement where the practical docs are stricter than OpenAPI.

API contract analysis

Sources used:

  • OpenAPI: https://kryptoexpress.pro/api/swagger/documentation.yaml
  • Practical docs: https://raw.githubusercontent.com/kryptoexpress/kryptoexpress/refs/heads/main/api-docs.md

Auth scheme

  • Protected endpoints use X-Api-Key.
  • Public endpoints do not require authentication.

Base URL

  • https://kryptoexpress.pro/api

Covered endpoints

  • POST /payment
  • GET /payment?hash=...
  • GET /wallet
  • POST /wallet/withdrawal
  • GET /currency
  • GET /cryptocurrency
  • GET /cryptocurrency/all
  • GET /cryptocurrency/stable
  • GET /cryptocurrency/price

Business rules applied in the SDK

  • PAYMENT requires fiatAmount.
  • DEPOSIT does not accept fiatAmount.
  • Stablecoins support only PAYMENT.
  • Stablecoin flows are treated as exact-payment-only by policy.
  • Client-side minimum payment validation applies only to USD payments and enforces a minimum of 1.00.
  • Non-USD payments are forwarded to the API without local minimum threshold validation.
  • Withdrawal dry-runs use onlyCalculate: true.
  • Callback verification uses X-Signature and HMAC-SHA512 over compact JSON.

Known ambiguities and safe decisions

  • The practical docs are treated as the source of truth for payment semantics when they are stricter than OpenAPI.
  • Stablecoin exact-payment behavior is documented as a business rule, but there is no extra request field to toggle exactness. The SDK enforces the supported mode by allowing stablecoins only for PAYMENT.
  • The fiatConverter abstraction remains available as an optional extension, but ordinary non-USD payment creation no longer depends on it.
  • Runtime validation is limited to boundary parsing and critical policy checks to keep the package light and semver-friendly.

Installation

npm install kryptoexpress-sdk

Usage

import {
  KryptoExpressClient,
  StaticRateFiatConverter,
  verifyCallbackSignature,
} from 'kryptoexpress-sdk';

const client = new KryptoExpressClient({
  apiKey: process.env.KRYPTOEXPRESS_API_KEY,
  fiatConverter: new StaticRateFiatConverter([{ from: 'EUR', to: 'USD', rate: 1.08 }]),
});

const payment = await client.payments.createPayment({
  fiatCurrency: 'USD',
  fiatAmount: 25,
  cryptoCurrency: 'BTC',
  callbackUrl: 'https://merchant.example/callback',
  callbackSecret: 'super-secret',
});

const lookup = await client.payments.getByHash(payment.hash);
const balances = await client.wallet.get();

const quote = await client.wallet.calculateAll({
  cryptoCurrency: 'BTC',
  toAddress: 'bc1destination...',
});

const isValid = verifyCallbackSignature({
  rawBody: requestBody,
  callbackSecret: 'super-secret',
  signature: request.headers['x-signature'],
});

fiatConverter is optional. The SDK only enforces the >= 1.00 minimum locally for USD payments; non-USD payment requests are forwarded to the API without local FX-based threshold validation.

Public API

const client = new KryptoExpressClient({ apiKey: '...' });

await client.payments.create(...);
await client.payments.createPayment(...);
await client.payments.createDeposit(...);
await client.payments.getByHash(...);

await client.wallet.get();
await client.wallet.withdraw(...);
await client.wallet.calculate(...);
await client.wallet.withdrawAll(...);
await client.wallet.withdrawSingle(...);
await client.wallet.calculateAll(...);
await client.wallet.calculateSingle(...);

await client.currencies.listAll();
await client.currencies.listNative();
await client.currencies.listStable();
await client.currencies.getPrices(...);

await client.fiat.list();

Configuration

const client = new KryptoExpressClient({
  apiKey: '...',
  baseUrl: 'https://kryptoexpress.pro/api',
  timeoutMs: 10_000,
  retry: {
    maxRetries: 2,
    retryStatusCodes: [408, 409, 429, 500, 502, 503, 504],
  },
  fetch,
});

Callback verification

import { verifyCallbackSignature } from 'kryptoexpress-sdk';

const ok = verifyCallbackSignature({
  rawBody,
  callbackSecret: process.env.KRYPTOEXPRESS_CALLBACK_SECRET!,
  signature: request.headers['x-signature'],
});

Development

npm install
npm run lint
npm run test
npm run build