For more up-to-date information, please refer to the TAC SDK GitHub repository.

To begin using the TAC-SDK, you need to create an instance of the TacSdk class. This class is the main entry point for all cross-chain operations.

Basic Setup

import { TacSdk } from "tac-sdk";
import { Network } from "tac-sdk";

const sdkParams: SDKParams = {
  network: Network.Testnet,
};
const tacSdk = await TacSdk.create(sdkParams);

Configuration Options

The TacSdk constructor accepts a TacSDKTonClientParams object with the following options:

type TacSDKTonClientParams = {
  tonClientParameters?: TonClientParameters;
  network?: Network;
  delay?: number;
};

Parameters Explained

  • network: Choose between Network.Testnet or Network.Mainnet
    • Default: Network.Testnet
  • delay: Time delay (in seconds) for requests to the TON client
    • Default: 0
    • Recommended: 5 when using default tonClientParameters
  • tonClientParameters: Optional custom parameters for the TON client configuration

HTTP API Endpoints

The SDK uses these default public endpoints:

Usage Example

// Create SDK instance
const sdkParams: SDKParams = {
  network: Network.Testnet,
};
const tacSdk = await TacSdk.create(sdkParams);

// Now you can use the instance for transactions
// For example:
await tacSdk.sendCrossChainTransaction(/* parameters */);