OptionalanalyticsAnalytics configuration.
OptionaldisableDisable the automatic pause / unpause of the SSE bridge connection
driven by document.visibilitychange.
OptionalenvironmentOverride 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.
OptionaleventCustom event dispatcher for user-action events. Defaults to
window.dispatchEvent in the browser, emitting CustomEvents prefixed
with ton-connect-.
OptionalmanifestHTTPS 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.
OptionalstorageStorage backend for protocol state (session keys, last connected
wallet). Defaults to window.localStorage in the browser. Required
when running the SDK in Node.js.
OptionalwalletsIn-memory cache TTL for the fetched wallets list, in milliseconds.
Infinity (default) caches forever for the lifetime of the page.
OptionalwalletsOverride the wallets-list JSON source. Must point to a file matching the wallets-v2 schema.
OptionalwalletsRequired 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).
Constructor options for the
TonConnectconnector.For most browser dApps
{ manifestUrl }is enough; the SDK fills inlocalStorage, fetches the canonical wallets list, and runs analytics in the default'telemetry'mode.