Overview
Dynamic’s Node SDK provides comprehensive support for TON blockchain operations, including wallet creation, transaction signing, message signing, and key management. The SDK implements Multi-Party Computation (MPC) for enhanced security.
Key Features
- MPC Wallet Creation: Create secure TON wallets with threshold signature schemes
- Transaction Signing: Sign TON transactions (BOC format) without exposing private keys
- Message Signing: Sign messages using Ed25519, returned as base64 strings
- Key Import/Export: Import existing private keys and export wallet data
- Multiple Security Models: Choose between different threshold signature schemes
Available Threshold Signature Schemes
TWO_OF_TWO: Maximum security - requires both server and Dynamic infrastructure
TWO_OF_THREE: Balanced security and availability - requires 2 out of 3 shares
THREE_OF_FIVE: High availability - requires 3 out of 5 shares
Quick Start
Core Functions
Wallet Management
createWalletAccount() - Create new TON wallet
importPrivateKey() - Import existing private key
getWallet() - Get specific wallet details
getTonWallets() - Get all TON wallets
deriveTonAddress() - Derive TON address from a public key (synchronous)
Signing Operations
signMessage() - Sign messages (Ed25519, base64 output)
signTransaction() - Sign TON transactions (BOC format)
Key Management
exportKey() - Export wallet key data
offlineExportPrivateKey() - Export private key from key shares offline
encryptKeyShare() - Encrypt key shares
decryptKeyShare() - Decrypt key shares
Backup and Recovery
storeEncryptedBackupByWallet() - Store encrypted backup
recoverEncryptedBackupByWallet() - Recover encrypted backup
refreshWalletAccountShares() - Refresh wallet shares
Guides
Prerequisites
Before using the TON SDK, ensure you have:
- Dynamic Project Setup: Set up your Dynamic project
- Environment Configuration: Configure your environment ID and auth token
- TON Chain Enabled: Enable TON chain in your Dynamic developer console
- Dependencies Installed: Install required packages
Installation
Environment Variables
TON-Specific Concepts
TON addresses are user-friendly strings (e.g., EQD...), derived from the wallet contract. The SDK uses WalletContractV5R1 by default. You can also derive an address from a public key using deriveTonAddress().
Native Unit
TON uses nanotons as its smallest unit: 1 TON = 1,000,000,000 nanotons.
TON transactions use BOC (Bag of Cells) serialization. The signTransaction() method accepts a Cell object built with @ton/ton helpers and returns a signed BOC.
Jettons
TON’s fungible token standard is called Jettons. Transferring Jettons requires interacting with Jetton wallet contracts on-chain.
Security Considerations
- MPC Architecture: Private keys are never stored in plain text
- Threshold Signing: Multiple parties must collaborate to sign transactions
- Key Share Backup: Use
backUpToDynamic: true for secure storage
- Password Protection: Implement strong passwords for additional security layers
Network Support
The SDK currently supports TON Mainnet (workchain 0).
Error Handling
Always implement proper error handling:
Next Steps
Last modified on September 21, 2026