SDK
This section contains information about SDK for STON.fi protocol
Last updated
This section contains information about SDK for STON.fi protocol
Last updated
Welcome to the docs section.
The SDK is written in TypeScript and designed to be a thin wrapper on top of the STON.fi contracts, which will help STON.fi protocol to be used more easily in JS/TS projects
The SDK reflects the structure of contracts so that access to contract methods is possible through the use of the corresponding class from the SDK.
SDK is built based on the package, which provides primitives for working with data on the TON blockchain, as well as bare contract instances that our SDK expands with unique contract methods
The @ton library allows you to make on-chain requests and for that with a rate limit of 1 request per second. You can obtain higher limits by:
requesting an API key from with a 10 request per minute limit
use open TON API instance, for example, from
found a paid instance of TON API with suitable rate limits for your case
selfhost an instance of TON API
Then, add SDK package using the package manager of your choice.
Sometimes, we publish a release candidate version of the SDK package to give you early access to the next version. To install this version, you need to expressly specify that you are interested in the next version during the installation.
We recommend you check the documentation sections dedicated to the architecture of contracts and their methods to get more context about STON.fi protocol in general before starting to interact with the contracts via the SDK
The remaining sections of the documentation will demonstrate specific examples of the SDK usage:
Firstly install the package following their
We are providing a simple but fully functional demo app with the SDK usage in the next.js app to demonstrate the SDK functionality. The source code is open-sourced and can be found . Try this app at