Skip to main content

Recommended: JavaScript SDK with React Hooks

For new React apps, we recommend the JavaScript SDK with React Hooks (@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.
We covered how to access wallets in the Accessing Wallets section. TON wallets have different capabilities and requirements than EVM wallets, so we cover TON-specific behavior here.

Checking if a wallet is a TON wallet

import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
import { isTonWallet } from '@dynamic-labs/ton';

// the wallet object is the wallet you want to use
// you can access the available wallets via the `useUserWallets` hook
// or get the primaryWallet via the `useDynamicContext` hook
if (!isTonWallet(wallet)) {
  throw new Error('This wallet is not a TON wallet');
}

// Now you can use TON-specific methods
await wallet.signMessage('Hello, TON!');

What is a nanoton?

The smallest unit of TON is called a nanoton. This allows for transactions involving very small amounts of TON.
1 TON = 1,000,000,000 Nanotons (10^9)

Examples

We’ve included several examples of how to use TON wallets in this section:
Last modified on June 25, 2026