TAC SDK
JavaScript library that enables frontend developers to build hybrid dApps connecting TON wallets with EVM applications
The TAC SDK is a JavaScript/TypeScript library that makes it simple for frontend developers to create hybrid dApps. It abstracts away the complexities of cross-chain messaging, allowing developers to focus on building great user experiences while the SDK handles wallet connections, transaction routing, and asset bridging automatically.
What the SDK Solves
Building hybrid dApps traditionally requires deep understanding of multiple blockchain protocols, cross-chain messaging systems, and complex asset management.
The TAC SDK eliminates this complexity by providing a simple JavaScript interface that handles all the technical details behind the scenes.
Before TAC SDK
- Custom cross-chain message formatting
- Manual asset locking and minting logic
- Complex wallet integration across chains
- Custom transaction status tracking
- Error handling for multiple failure modes
With TAC SDK
- Single method for cross-chain transactions
- Automatic asset bridging
- Built-in TON wallet support
- Real-time status tracking
- Comprehensive error handling
Core Capabilities
The SDK provides four essential capabilities that make hybrid dApp development straightforward:
TON Wallet Integration
The SDK handles all aspects of TON wallet connectivity through the standard TON Connect protocol. Users can connect with popular wallets like Tonkeeper and Tonhub without installing additional software or managing new seed phrases.
Cross-Chain Transaction Routing
Developers specify what they want to happen on the EVM side, and the SDK handles all the complex message formatting and routing through the TON Adapter.
Automatic Asset Bridging
Token transfers between TON and TAC EVM happen automatically. The SDK manages locking tokens on TON, minting them on EVM, and handling the reverse process seamlessly.
Real-Time Status Tracking
The SDK provides comprehensive tools for monitoring cross-chain transactions, allowing applications to show users exactly what’s happening and when operations complete.
How It Works
TAC SDK connecting frontend applications to cross-chain infrastructure
The SDK acts as a bridge between your frontend application and TAC’s cross-chain infrastructure:
Developer Integration
Developers integrate the SDK into their frontend applications and specify EVM operations using familiar JavaScript patterns.
Message Preparation
The SDK formats cross-chain messages with proper encoding, handles asset preparation, and manages wallet interactions.
Cross-Chain Routing
Messages are routed through the TON Adapter’s sequencer network, which validates and processes them securely.
EVM Execution
Target EVM contracts receive properly formatted calls with bridged assets, executing the requested operations.
Status Updates
The SDK monitors progress and provides real-time updates to the frontend, handling completion or failure scenarios.
Key Components
The SDK is organized into focused components that handle different aspects of hybrid dApp functionality:
TacSdk - Main Interface
TacSdk - Main Interface
The primary class that developers interact with for all cross-chain operations. It handles SDK initialization, transaction sending, token address mapping, and balance queries.
Key features include sending cross-chain transactions, getting token addresses across chains, checking user balances, and managing SDK lifecycle.
OperationTracker - Status Monitoring
OperationTracker - Status Monitoring
Provides comprehensive tools for tracking cross-chain transaction status and progress. Applications can monitor operations in real-time and provide users with accurate updates.
Supports both simplified status checking (Pending/Successful/Failed) and detailed stage-by-stage tracking for advanced use cases.
Senders - Wallet Integration
Senders - Wallet Integration
Handles transaction signing and submission through different wallet types. Supports TON Connect for web applications and raw private keys for backend services.
Provides a unified interface regardless of the underlying wallet technology, simplifying application development.
Development Experience
The SDK is designed to feel familiar to web developers while providing powerful cross-chain capabilities:
Familiar Patterns
TypeScript Support
The SDK provides comprehensive TypeScript definitions, enabling better development experience with IDE autocompletion and compile-time error checking.
Testing Utilities
Built-in testing and simulation capabilities help developers validate their integrations before deployment:
Message Structure
The SDK uses standardized data structures that map naturally to JavaScript objects while handling the complex encoding required for cross-chain operations.
EVM Target Messages
Developers specify EVM operations using a simple structure that the SDK automatically encodes for cross-chain delivery:
Asset Bridging
Token transfers are specified using user-friendly amounts that the SDK automatically converts to the proper formats for each chain:
Error Handling
The SDK provides comprehensive error handling that protects user assets and provides meaningful feedback:
The SDK validates parameters, checks balances, and estimates gas costs before submitting transactions, preventing common failure scenarios.
The SDK validates parameters, checks balances, and estimates gas costs before submitting transactions, preventing common failure scenarios.
Built-in retry mechanisms and fallback endpoints ensure operations continue even when individual network components experience issues.
Failed transactions automatically trigger rollback mechanisms that return assets to users safely, preventing fund loss.