Learn how to work with the Blnk SDK for TypeScript.
Welcome to the Blnk SDK for TypeScript Developer Guide. In this guide, you’ll learn how to install Blnk and work with our Blnk TypeScript SDK. To view the open-source file, see the following: Blnk TypeScript SDK.
You’ll also find examples of running different fintech use cases with our TypeScript SDK.
Ensure that you have the following installed on your machine.
Once you’re good to go with the prerequisites, you can set up your Blnk server and SDK in 5 steps:
Run the following command in your terminal to clone Blnk to your local machine:
Create a blnk.json
file in your blnk
project folder, paste the following configuration settings, and save.
This configuration sets up the required connections to PostgreSQL and Redis, specifies your server details, and allows Slack notifications if needed.
Launch the Blnk server with the following command:
Once running, your server will be accessible at http://localhost:5001.
The Blnk CLI helps you to quickly test and manage your Blnk backend directly from your command line. You can also use it to perform create actions or view your data tables. To install and use the Blnk CLI, see the following in: Installing the Blnk CLI.
To confirm that the CLI has been installed, run the following command:
In your blnk
project folder, install Blnk Typescript SDK.
A ledger is a folder for grouping balances together in your Blnk server. To learn more, see the following: Introduction to Ledgers
To create a ledger using the TypeScript SDK:
You can confirm that the ledger has been created with the Blnk CLI:
A balance is used to represent a store of value in your Blnk server, e.g., wallet or account. To learn more, see the following: Introduction to Balances
To create a balance using the TypeScript SDK:
You can confirm that the balance has been created with the Blnk CLI:
Transaction records represent all financial activities (money in and money out) happening within your Blnk ledger. All transactions are immutable (cannot be modified or deleted) and idempotent (producing the same result no matter how many times an operation is performed).
To record a transaction using the TypeScript SDK:
You can confirm that the transaction has been created with the Blnk CLI:
We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.
To ask questions or discuss issues, please contact us or join our Discord community.
If you encounter any issues while installing or using this SDK, please report them on Github.