@bifrostcrypto/sdk
v0.1.0
Published
Official Bifrost Crypto API client for Node.js
Readme
@bifrostcrypto/sdk
Node.js client for the Bifrost Crypto API (https://bridge.bifrostcrypto.com).
npm install @bifrostcrypto/sdkimport { Bifrost, verifyWebhook } from "@bifrostcrypto/sdk";
const bifrost = new Bifrost({
apiKey: process.env.BIFROST_API_KEY,
signingSecret: process.env.BIFROST_SIGNING_SECRET,
});
const payout = await bifrost.payouts.create(
{
wallet: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
crypto_currency: "USDT",
crypto_amount: "100.50",
process_by: "crypto_amount",
reference_id: "order_12345",
network: "Ethereum",
feetakenfromamount: 0,
webhook_url: "https://your-site.com/webhook",
},
{ idempotencyKey: crypto.randomUUID() },
);
const event = verifyWebhook(rawBody, headers, process.env.BIFROST_WEBHOOK_KEY);Amounts stay strings. Field names match the API. Pass signingSecret only when the key was created with request signing.
