Skip to main content

Documentation Index

Fetch the complete documentation index at: https://companyname-a7d5b98e-feature-fumodocs.mintlify.app/llms.txt

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

Declare every chain the app can read. A network in AppKit is the chain context AppKit uses to read data and to compare wallet state against the app’s expected chain — each network is identified by a Network value with a chainId and carries an apiClient that reads chain state for that chain. A single AppKit instance can hold more than one network. The user picks at connect time, and a flow can move between networks without rebuilding the instance.

Before you begin

Install AppKit first. See Prepare your project.

Basic configuration

By default, AppKit constructs a mainnet-only ApiClientToncenter with no API key when networks is omitted. That is enough to start exploring AppKit, but production traffic will hit TON Center’s public rate limits — apps that ship to users should supply their own key. Pass an apiClient entry on the network with a key to lift the limits. AppKit has preset URLs for mainnet (https://toncenter.com) and testnet (https://testnet.toncenter.com), so url can be omitted for those. For other networks, specify url explicitly.
const appKit = new AppKit({
  networks: {
    [Network.mainnet().chainId]: {
      apiClient: {
        key: 'your-key',
      },
    },
  },
});

Use TonAPI instead

Besides TON Center, AppKit ships ApiClientTonApi for TonAPI and compatible deployments. The inline { url, key } shape is TON Center-only. To use TonAPI, pass a constructed instance into apiClient.
import { AppKit, ApiClientTonApi, Network } from '@ton/appkit';

const appKit = new AppKit({
  networks: {
    [Network.mainnet().chainId]: {
      apiClient: new ApiClientTonApi({
        network: Network.mainnet(),
        apiKey: 'your-key',
      }),
    },
  },
});

What to do next

  • Continue to Use basic getter hooks to read the connected wallet’s state from the configured networks.
  • For multiple networks, custom chains, the default network, and mismatch handling, see Networks.