v0.5 (deprecated)
This section contains information about SDK for STON.fi protocol
v0.5
version of the SDK is deprecated. Please use latest SDK version instead
STON.fi SDK
Welcome to the STON.fi SDK docs section.
Getting Started
Overview
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.
TonWeb
SDK is built based on the TonWeb library, 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 TonWeb library allows you to make on-chain requests and for that uses toncenter API with a rate limit of 1 request per second. You can obtain higher limits by:
requesting an API key from toncenter with a 10 request per minute limit
use open TON API instance, for example, from ORBS
found a paid instance of TON API with suitable rate limits for your case
selfhost an instance of TON API
Installation
To install SDK via npm
use:
To install SDK with yarn
use:
To install SDK with pnpm
use:
Usage
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:
Last updated