@tetherto/wdk-wallet-ton
v1.0.0-beta.9
Published
A simple package to manage BIP-32 wallets for the ton blockchain.
Downloads
1,719
Readme
@tetherto/wdk-wallet-ton
Note: This package is currently in beta. Please test thoroughly in development environments before using in production.
A simple and secure package to manage BIP-44 wallets for the TON blockchain. This package provides a clean API for creating, managing, and interacting with TON wallets using BIP-39 seed phrases and TON-specific derivation paths.
About WDK
This module is part of the WDK (Wallet Development Kit) project, which empowers developers to build secure, non-custodial wallets with unified blockchain access, stateless architecture, and complete user control.
For detailed documentation about the complete WDK ecosystem, visit docs.wdk.tether.io.
Installation
npm install @tetherto/wdk-wallet-tonQuick Start
import WalletManagerTon from '@tetherto/wdk-wallet-ton'
const seedPhrase = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'
const wallet = new WalletManagerTon(seedPhrase, {
tonClient: {
url: 'https://testnet.toncenter.com/api/v2/jsonRPC',
},
transferMaxFee: 1_000_000_000n,
})
const account = await wallet.getAccount(0)
const address = await account.getAddress()
console.log('Address:', address)
wallet.dispose()Key Capabilities
- BIP-44 Derivation Paths: Standard TON derivation support (
m/44'/607') - Multi-Account Management: Derive multiple accounts from a single seed phrase
- Native TON Transactions: Quote and send TON transfers through a unified wallet API
- Jetton Support: Query balances and transfer Jettons
- Message Signing: Sign messages and verify signatures with TON accounts
- Fee Estimation: Retrieve current network fee rates and quote transaction costs
- Read-Only Accounts: Monitor TON wallets from public keys without private-key access
- Secure Memory Disposal: Clear private keys from memory when done
Compatibility
- TON Mainnet
- TON Testnet
- TON Center-compatible clients for balance, transaction, and fee queries
Documentation
| Topic | Description | Link | |-------|-------------|------| | Overview | Module overview and feature summary | Wallet TON Overview | | Usage | End-to-end integration walkthrough | Wallet TON Usage | | Configuration | TON client and transfer configuration | Wallet TON Configuration | | API Reference | Complete class and type reference | Wallet TON API Reference |
Examples
| Example | Description | |---------|-------------| | Create Wallet | Initialize a wallet manager and derive TON accounts from a seed phrase | | Manage Accounts | Work with multiple accounts and custom BIP-44 derivation paths | | Check Balances | Query native TON and Jetton balances for owned accounts | | Read-Only Account | Monitor balances for any TON wallet without a private key | | Send Transaction | Estimate fees and send native TON transactions | | Token Transfer | Transfer Jettons and estimate transfer fees | | Sign & Verify Message | Sign messages and verify signatures | | Fee Management | Retrieve current network fee rates | | Memory Management | Securely dispose wallets and clear private keys from memory |
For detailed walkthroughs, see the Usage Guide. See all runnable examples in the wdk-examples repository.
Community
Join the WDK Discord to connect with other developers.
Support
For support, please open an issue on GitHub or reach out via email.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
