Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt

Use this file to discover all available pages before exploring further.

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: