Start Here
TypeScript SDK Quick Start
Install the TypeScript SDK and post your first transaction.
Install the SDK, initialize the client, and post your first transaction.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Install the TypeScript SDK and post your first transaction.
Install the SDK
npm init -y
npm install @blnkfinance/blnk-typescript
Create a script
index.js:const { BlnkInit } = require('@blnkfinance/blnk-typescript');
const blnk = BlnkInit('', { baseUrl: 'http://localhost:5001' });
async function main() {
const response = await blnk.Transactions.create({
precise_amount: 100000,
reference: 'first_txn_001',
currency: 'USD',
precision: 100,
source: '@FundingPool',
destination: '@MyBalance',
description: 'My first Blnk transaction',
allow_overdraft: true,
});
if (response.status !== 201 || !response.data) {
throw new Error(response.message);
}
console.log(response.data.transaction_id);
}
main();
Was this page helpful?