> For the complete documentation index, see [llms.txt](https://docs-sdk.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-sdk.crypto-chief.com/processing/js.md).

# Node.js / TypeScript SDK

The official Node.js & TypeScript SDK for the Crypto Chief crypto processing API — accept payments, send payouts, sign transactions, and verify webhooks across 25+ chains.

The official Node.js / TypeScript client for the [Crypto Chief](https://crypto-chief.com/processing/) crypto processing API. One install gives you fully typed access to payments, payouts, on-chain transactions, wallets, and webhooks across 25+ chains.

[![npm](https://img.shields.io/npm/v/@cryptochiefs/cryptochief-crypto-processing-node.svg)](https://www.npmjs.com/package/@cryptochiefs/cryptochief-crypto-processing-node)

## Requirements

* Node.js **18+** (uses the built-in `fetch`)
* A Crypto Chief **Merchant ID** and **API key** (Dashboard → Integration)

## Installation

```bash
npm install @cryptochiefs/cryptochief-crypto-processing-node
```

```ts
// ESM / TypeScript
import { CryptoChiefClient, Chain } from '@cryptochiefs/cryptochief-crypto-processing-node';
// CommonJS
const { CryptoChiefClient, Chain } = require('@cryptochiefs/cryptochief-crypto-processing-node');
```

The package ships **ESM, CommonJS, and type definitions** — it works the same in TypeScript and plain JavaScript.

## Quickstart

```ts
const client = new CryptoChiefClient({
  merchantId: process.env.MERCHANT_ID!,
  apiKey: process.env.API_KEY!,
});

const est = await client.payouts.estimate({
  network: Chain.EthSepolia,
  coin: 'ETH',
  amount: '0.0001',
  toAddress: '0xRecipient...',
});
console.log('amount to receive:', est.amountToReceive);
```

{% hint style="success" %}
If `estimate` resolves without throwing, your credentials and request signing are working end-to-end.
{% endhint %}

## What you can do

| Domain                       | Service                                       | Key methods                                                                                                             |
| ---------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Single & batch payouts       | `client.payouts`                              | `estimate`, `execute`, `batchExecute`, `info`, `history`, `waitFor`                                                     |
| Sign / execute arbitrary txs | `client.transactions`                         | `sign`, `execute`, `signEvmCall`, `jettonTransfer`                                                                      |
| Accept payments              | `client.payIns`                               | `create`, `selectAsset`, `cancel`, `info`, `history`, `waitFor`                                                         |
| Wallets + RSA decrypt        | `client.wallets`                              | `generate`, `list`, `info`, `freeze`, `payInHistory`, `rebindMaster`, `setCallbackUrl`, `setLabel`, `decryptPrivateKey` |
| Treasury sweeps              | `client.sweeps`                               | `force`, `history`, `walletHistory`, `settings`, `updateSettings`                                                       |
| On-chain queries             | `client.blockchain`                           | `contractsAvailable`, `contractsList`, `supportedBlockchains`, `walletBalance`, `transactionStatus`                     |
| Deposits & withdrawals       | `client.staticDeposits`, `client.withdrawals` | `info`, `history`                                                                                                       |
| API credits                  | `client.credits`                              | `balance`, `topup`                                                                                                      |
| Fiat ↔ crypto rates          | `client.currencies`                           | `fiatToCrypto`, `cryptoToFiat`, `fiats`, `cryptos`                                                                      |

Anything the typed services do not cover goes through `client.request<T>(path, body)`, the same signed POST they are built on. It sends the body verbatim and returns the response untouched, so field names there are the wire's snake\_case.

## Explore the guides

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>🔑 Authentication</strong></td><td>Credentials, client setup, and request signing.</td><td><a href="/processing/js/authentication.md">Authentication</a></td></tr><tr><td><strong>💸 Send a payout</strong></td><td>Estimate, execute idempotently, and confirm.</td><td><a href="/processing/js/guides/payouts.md">Send a payout</a></td></tr><tr><td><strong>📥 Accept payments</strong></td><td>Create PayIn invoices and read deposits.</td><td><a href="/processing/js/guides/accept-payments.md">Accept crypto payments</a></td></tr><tr><td><strong>📡 Webhooks</strong></td><td>Verify signatures and handle typed events.</td><td><a href="/processing/js/guides/webhooks.md">Webhooks</a></td></tr><tr><td><strong>🧩 Contract calls</strong></td><td>EVM / TRON ABI calls with no hand-encoded calldata.</td><td><a href="/processing/js/guides/contract-calls.md">Contract calls (EVM / TRON)</a></td></tr><tr><td><strong>💎 TON transfers</strong></td><td>Jetton, NFT, and comment transfers in one call.</td><td><a href="/processing/js/guides/ton.md">TON: Jetton, NFT &amp; comments</a></td></tr></tbody></table>
