import { BridgeConnectionRequest, ConnectWalletType, OpenAppLinkType } from "../protocol"; import { GlobalWallet } from "../inject"; type TelegramWebviewProxy = { postEvent(eventType: string, eventData: string): void; }; export type TmaPlatform = 'android' | 'ios' | 'macos' | 'tdesktop' | 'weba' | 'web' | 'unknown'; export type TelegramWebview = unknown; declare global { interface External { notify: (message: string) => void; } interface Window { TelegramWebviewProxy?: TelegramWebviewProxy; TelegramWebview?: TelegramWebview; Telegram?: { WebApp?: { platform?: TmaPlatform; version?: string; openTelegramLink(url: string): void; close(): void; initDataUnsafe?: { start_param: string; }; }; }; okxwallet?: any; okxTonWallet?: any; okxGlobalWallet: GlobalWallet; } } export declare function removeUrlLastSlash(url: string): string; export declare function addPathToUrl(url: string, path: string): string; export declare function openOKXDeeplink(deeplinkUrl: string, universalLink: string, linkType: OpenAppLinkType): void; export declare function openOKXDeeplinkWithFallback(deeplinkUrl: string, universalLink: string, linkType: OpenAppLinkType, shouldFallback?: boolean): void; export declare function getWindow(): Window | undefined; export declare function isTelegramUrl(link: string | undefined): link is string; export declare function encodeTelegramUrlParameters(parameters: string): string; export declare function encodeConnectParams(connectRequest: BridgeConnectionRequest): string; export declare function encodeTWAConnectURLParams(connectRequest: BridgeConnectionRequest): string; export declare function openOKXTMAWalletlinkWithFallback(twaDeepLink: string): void; export declare function isInTMA(): boolean; /** * Returns true if the app is running in the Telegram browser. */ export declare function isInTelegramBrowser(): boolean; export declare function getOKXLink(connectRequest: BridgeConnectionRequest | undefined, walletType?: ConnectWalletType, tmaReturnUrl?: string | undefined): { universalLink: string; deepLink?: string; }; export {};