Install Ton wallet package
To get started, install the latest version of Ton package.Basic example
The example below shows how to preconfigure a basic wallet management with native widget package.Ton configs
TON API Key
ThetonApiKey is required to interact with the TON blockchain network. It’s used for:
- Fetching wallet balances
- Initiating transactions
- Accessing TON Center’s HTTP API
Getting Your API Key
To obtain a TON API key:- Open Telegram and navigate to the @tonapibot bot
- Follow the bot’s instructions to register and generate your API key
- Copy the API key provided by the bot
Without an API key, usage is limited to 1 request per second. Registering for an API key provides access to higher rate limits necessary for production applications. Visit TON Center for more information.
Using the API Key
Once you have your API key, add it to your TON configs:Manifest URL Configuration
ThemanifestUrl is required by TON Connect and points to a tonconnect-manifest.json file that contains essential metadata about your application.
Creating the Manifest File
Create atonconnect-manifest.json file in your project’s public directory with the following structure:
Your application’s URL. This should match the domain where your app is hosted.
The name of your application as it will appear to users in TON wallets.
URL to your application’s icon/logo. Should be a publicly accessible image file.
Optional URL to your terms of use page.
Optional URL to your privacy policy page.
Setting the Manifest URL
Once you’ve created and deployed your manifest file, provide its URL in the TON configs:The manifest file must be publicly accessible. For local development, you may need to host it on a development server or use a public URL. Learn more in the TON Connect documentation.