feat(miniapp): add telegram-authenticated shell

This commit is contained in:
2026-03-08 22:30:59 +04:00
parent fd0680c8ef
commit f8478b717b
20 changed files with 1205 additions and 12 deletions

View File

@@ -0,0 +1,27 @@
export interface TelegramWebAppUser {
id: number
first_name?: string
username?: string
language_code?: string
}
export interface TelegramWebApp {
initData: string
initDataUnsafe?: {
user?: TelegramWebAppUser
}
ready?: () => void
expand?: () => void
}
declare global {
interface Window {
Telegram?: {
WebApp?: TelegramWebApp
}
}
}
export function getTelegramWebApp(): TelegramWebApp | undefined {
return window.Telegram?.WebApp
}