SDK
Overview
Installation
Configuration
import {Api, HttpClient} from "tonapi-sdk-js";
import {Address} from "@ton/core";
import { BclSDK, simpleTonapiProvider } from "ton-bcl-sdk";
const TONAPI_TOKEN = 'YOUR_TONAPI_TOKEN'
let sdk = BclSDK.create({
apiProvider: simpleTonapiProvider(new Api(
new HttpClient({
baseUrl: 'https://tonapi.io',
baseApiParams: {
headers: {
"Content-type": "application/json",
Authorization: `Bearer ${TONAPI_TOKEN}`
},
},
})
)),
clientOptions: {
endpoint: 'https://test-indexer-3a4wy.ondigitalocean.app/api/v1',
},
masterAddress: Address.parse('EQBSMwczMFUb789uqNvebKBvemkRaAQJdzTFq6565Ef9rW2k')
});Test environment
SDK Reference
Last updated