z-ts-telegram-mini-app
Installation
SKILL.md
Telegram Mini App (TypeScript)
Client side only. The bot token, createInvoiceLink, and initData HMAC/Ed25519
verification live server-side — see [[z-go-telegram-bot]].
SDK choice
| Option | Pick when |
|---|---|
@tma.js/sdk (+ @tma.js/sdk-react for React) |
Default. Any Mini App with a bundler — typed, tree-shakeable (sideEffects: false), one component per concern (backButton, mainButton, viewport, themeParams, hapticFeedback, invoice) |
Raw window.Telegram.WebApp |
A single static page with one or two calls (ready(), expand()) and no bundler in play |
| Existing SDK | Preserve it unless a required feature or support issue justifies migration |
Check the installed package name and major version against its migration guide. Tutorials for @telegram-apps/sdk or an earlier @tma.js/sdk major are not interchangeable API contracts. The examples below illustrate the component-style SDK; adapt them to verified installed signatures.