Skip to main content
Before initializing the TON Connect’s WalletKit, install it in your web project:
Alternatively, explore the complete demo wallet with WalletKit integration:

Demo wallet, deployed

Demo wallet, GitHub

Initialization

The basic kit initialization consists of creating a corresponding object by passing it a minimal set of necessary arguments. One needs to pick a TON network to operate on, provide the necessary device and wallet manifest configurations.
See also: TON Connect’s wallet manifest.

Configuration parameters

Required

CHAIN.TESTNET | CHAIN.MAINNET
required
The TON network to use.
DeviceInfo
required
Core information and constraints of the given wallet.
There, Feature type is defined as:
The maxMessages number depends on the TON wallet used, because every wallet has its own limit on the volume of messages.For example,
  • Ledger wallet would only handle 1 message per transaction
  • Wallet v4r2 handles up to 4 messages
  • Wallet v5r1 handles up to 255 messages
WalletInfo
required
How your wallet interacts with the TON Connect. This field is closely related to the corresponding JSON manifest file.

Optional

object | ApiClient
Which API or RPC provider to use to interact with TON Blockchain.
BridgeConfig
Connectivity options: either an HTTP or JavaScript bridge setup. The former’s bridgeUrl points to the publicly exposed bridge URL, while the latter’s jsBridgeKey points to the property name within the window object on the same web page.Bridges are used for dApp communication — if the dApp exists in the same web environment as the wallet, then the JavaScript bridge is enough. Otherwise, use an HTTP bridge setup.
StorageConfig | StorageAdapter
How to store intermediate events.
EventProcessorConfig
How TON Connect events are processed. This is useful for background scripts in browser extensions that process incoming events and log them, but do so outside a queue.
AnalyticsConfig
Collect and gather analytical data.
object
Extra configuration used when developing WalletKit itself. Irrelevant in other cases.

Next steps

Manage TON wallets

See also