Developer Boilerplate for Telegram Miniapp
Overview
This boilerplate is designed to help developers quickly integrate and interact with the UTXO Global Wallet on Telegram. It provides a foundational code structure, enabling efficient setup and functionality implementation.
Setup & Configuration
1. Create a New Repository:
Use the provided boilerplate code to get started quickly

2. Deploy to Vercel:
Follow Vercel’s instructions to link your repository, set up environment variables, and configure your deployment settings.
Once deployed, you’ll receive a public link, like: https://my-telegram-miniapp.vercel.app/. Make sure to test your link to verify everything works as expected.
3. Setting Up Your Telegram Miniapp
3.1. Setup a Telegram Bot:
Open Telegram and search for “BotFather” (the official bot to create other bots).

Start a conversation with “BotFather” and use the command

Follow the instructions to set up your bot:
You will be asked to provide a name for your bot.
Then, provide a username for your bot. The username must end with “
bot” (e.g.,MyCoolBotorMyCoolBot_bot).
3.2. Create a New App:
Start a conversation with “BotFather” and use the command:

Choose your bot just created from step 3.1
Follow the instructions to create a new web app for your bot
You will be asked to provide a title, a short description, and a photo (640x360 pixels) for the web app
Then, give the Web App URL you created from step 2. Deploy to Vercel
Once fully configured, your bot will be ready to interact with the UTXO Global Wallet on Telegram. Here is the boilerplate bot for your reference: https://t.me/utxo_global_boilerplate_bot
Example Implementations
1. If you use React for your dApp:
Step 1: Installation
Step 2: Define
customWalletwith UTXO Global Wallet Information
Step 3: Define
tonConnectvariable
Step 4: Define
tonConnectUIvariable
Step 5: Listen Status Changed
Step 6: Connect Wallet
Step 7: Transfer
CKB
2. If you use CDN for your dApp:
Step 1: Installation
Step 2: Define
customWalletwith UTXO Global Wallet Information
Step 3: Define
tonConnectUIvariable
Step 4: Listen Status Changed
Step 5: Connect Wallet
Step 6: Transfer
CKB
References
Last updated