Setup
Installation
yarn add @torch-finance/sdk @ton/ton @ton/crypto @ton/core
Initialize (Mainnet)
import { TorchSDK } from '@torch-finance/sdk';
const sdk = new TorchSDK();
Initialize (Testnet / Custom Network)
import { TonClient4 } from '@ton/ton';
import { TorchSDK, TorchSDKOptions } from '@torch-finance/sdk';
const tonClient = new TonClient4({ endpoint: "https://testnet-v4.tonhubapi.com/" });
const factoryAddress = Address.parse("testnet factory address")
const testnetOracle = "https://testnet-oracle.torch.finance"
const testnetAPI = "https://testnet-api.torch.finance"
const config: TorchSDKOptions = {
tonClient: tonClient,
factoryAddress: factoryAddress,
oracleEndpoint: testnetOracle,
apiEndpoint: testnetAPI,
};
const sdk = new TorchSDK(config)
Configuration
Factory Address
Network
Factory Address
Mainnet
EQDQIhFLSzUlaHKM9L2ZQS-o0iNHTbOSBtzNC0VLxPbNFH6E
Testnet
EQCNvyhu-VxeL7i-Uk5Uu0m7TO0qQaWQlHmGOUyUh1hoF7au
Indexer Endpoint
Network
Indexer Endpoint
Oracle Endpoint
Network
Oracle Endpoint
Last updated