Documentation
    Preparing search index...

    Interface TonConnectOptions

    Constructor options for the TonConnect connector.

    For most browser dApps { manifestUrl } is enough; the SDK fills in localStorage, fetches the canonical wallets list, and runs analytics in the default 'telemetry' mode.

    interface TonConnectOptions {
        analytics?: AnalyticsSettings;
        disableAutoPauseConnection?: boolean;
        environment?: IEnvironment;
        eventDispatcher?: EventDispatcher<SdkActionEvent>;
        manifestUrl?: string;
        storage?: IStorage;
        walletsListCacheTTLMs?: number;
        walletsListSource?: string;
        walletsRequiredFeatures?: RequiredFeatures;
    }
    Index

    Properties

    analytics?: AnalyticsSettings

    Analytics configuration.

    disableAutoPauseConnection?: boolean

    Disable the automatic pause / unpause of the SSE bridge connection driven by document.visibilitychange.

    environment?: IEnvironment

    Override the runtime environment (platform, user-agent, Telegram user context). The SDK auto-detects in browsers; pass an IEnvironment implementation when embedding the SDK in a non-standard host.

    eventDispatcher?: EventDispatcher<SdkActionEvent>

    Custom event dispatcher for user-action events. Defaults to window.dispatchEvent in the browser, emitting CustomEvents prefixed with ton-connect-.

    manifestUrl?: string

    HTTPS URL of the dApp's tonconnect-manifest.json. The wallet fetches this file before showing the connect prompt to extract the dApp's name, icon and policy URLs. If omitted, the SDK falls back to ${window.location.origin}/tonconnect-manifest.json.

    storage?: IStorage

    Storage backend for protocol state (session keys, last connected wallet). Defaults to window.localStorage in the browser. Required when running the SDK in Node.js.

    walletsListCacheTTLMs?: number

    In-memory cache TTL for the fetched wallets list, in milliseconds. Infinity (default) caches forever for the lifetime of the page.

    Infinity
    
    walletsListSource?: string

    Override the wallets-list JSON source. Must point to a file matching the wallets-v2 schema.

    'https://config.ton.org/wallets-v2.json'
    
    walletsRequiredFeatures?: RequiredFeatures

    Required wallet capabilities. Wallets that do not advertise every requested feature are hidden from the picker (and rejected at connect time if the user selects one through a custom flow).