Skip to main content

Overview

This comprehensive example demonstrates all available functions in the Dynamic TON SDK, showing the actual API usage patterns and how to handle common operations.

Complete Example Code

Key API Patterns

1. Wallet Creation

2. Message Signing

3. Transaction Signing

4. Derive TON Address

5. Wallet Retrieval

6. Getting All Wallets

Available Functions

The TON SDK provides the following main functions:
  • 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 hex
  • signMessage() - Sign messages (Ed25519, base64 output)
  • signTransaction() - Sign TON transactions (returns signed BOC)
  • exportKey() - Export wallet key data
  • offlineExportPrivateKey() - Export private key from key shares offline

Error Handling

Always implement proper error handling:

Environment Setup

Make sure you have these environment variables:

Dependencies

Install required packages:

Next Steps

Last modified on May 21, 2026