Documentation
    Preparing search index...

    Type Alias TmaPlatform

    TmaPlatform:
        | "android"
        | "ios"
        | "macos"
        | "tdesktop"
        | "weba"
        | "web"
        | "unknown"

    Telegram Mini App environment detection.

    Lives in core rather than in @tonconnect/ui so that client_environment is answered the same way for every dApp. Previously only the UI package could tell a Mini App from a web page, so dApps on the bare SDK reported an empty value — and that is exactly the population the connection events exist to make visible.

    Everything is computed once, on first use rather than at import: resolving it reads location.hash and both reads and writes sessionStorage, which should not happen merely because someone imported the SDK.