Currently connected Account, or null when no wallet is connected.
true while a wallet session is active. Equivalent to wallet !== null.
Currently connected Wallet, or null when no wallet is connected.
Begin a wallet-connect flow.
void; the call sends
the connect request to the injected wallet, which replies via
onStatusChange.— connection source for a single wallet, or an array of
{ bridgeUrl } entries for a multi-wallet connection.
Optionalrequest: ConnectAdditionalRequest— additional ConnectItems to attach.
Optionaloptions: OptionalTraceable<— openingDeadlineMS deadline, signal for cancellation,
embeddedRequest to fold an action into the connect URL, linkDisplayOnly when the
call only builds a link to display, and the common traceId analytics id.
End the session. Clears the local session state, fires the disconnected
onStatusChange event immediately, and sends a disconnect RPC to the
wallet so it can clean up its side too.
Optionaloptions: OptionalTraceable<{ signal?: AbortSignal }>WalletNotConnectedError when no wallet is connected.
Current bridge session ID, or null if no session is open.
Fetch the wallets-list registry, merged with any JS-injectable wallets detected on the page.
Subscribe to connection state changes. The callback fires after every
connect, disconnect, restore. errorsHandler, when
provided, is called with a TonConnectError subclass when the
connector observes a connect failure (manifest fetch error, user
rejection, wrong network, missing features).
OptionalerrorsHandler: (err: TonConnectError) => voidUnsubscribe function. Call it to stop receiving updates.
Try to restore the previous session from storage. Call this once on dApp startup, before deciding whether to show the connect modal.
Resolves when the restore attempt has settled — either with a successful
onStatusChange emission (session restored) or with the connector
remaining disconnected (no session, or the wallet ended it).
Optionaloptions: OptionalTraceable<{ openingDeadlineMS?: number; signal?: AbortSignal }>Ask the connected wallet to sign and broadcast a transaction.
Optionaloptions: OptionalTraceable<{ onRequestSent?: () => void; signal?: AbortSignal }>The signed BoC plus, when available, the traceId the SDK
* propagated through the bridge.
*
*
WalletNotConnectedError — no wallet is connected. *
WalletNotSupportFeatureError — wallet does not advertise the
* required SendTransaction capabilities.
*
UserRejectsError — user declined in the wallet. *
WalletWrongNetworkError — wallet network differs from the request. *
TonConnectError — bridge / validation error. * *
OptionalonRequestSent: () => voidConstrain the network the connector will accept. Must be set before calling ITonConnect.connect — attempting to change it while a wallet is connected throws.
If the wallet replies with a different chain id, the SDK aborts the
connection and surfaces WalletWrongNetworkError to
ITonConnect.onStatusChange's error handler.
Pass undefined to clear the restriction and accept any network.
Optionalnetwork: string— desired network. See ChainId.
Ask the connected wallet to sign opaque data (SignDataPayload). The signature is bound to the user's wallet address, the dApp's domain, a timestamp, and the payload — verify on the backend or on-chain.
Optionaloptions: OptionalTraceable<{ onRequestSent?: () => void; signal?: AbortSignal }>The SignDataResponse plus, when available, the traceId
* the SDK propagated through the bridge.
*
*
WalletNotConnectedError — no wallet is connected. *
WalletNotSupportFeatureError — wallet does not advertise the
* requested SignData.types.
*
UserRejectsError — user declined. *
WalletWrongNetworkError — wallet network differs from the request. *
TonConnectError — bridge / validation error. * *
Ask the connected wallet to sign an internal message without broadcasting it.
Same payload shape as sendTransaction; supported by wallets that
advertise the SignMessage feature (typically Wallet V5).
Optionaloptions: OptionalTraceable<{ onRequestSent?: () => void; signal?: AbortSignal }>a signed BoC the dApp can wrap in an external * message and submit through a relayer (e.g. for a gasless jetton * transfer). * *
WalletNotConnectedError — no wallet is connected. *
WalletNotSupportFeatureError — wallet does not advertise SignMessage.
*
UserRejectsError — user declined. *
WalletWrongNetworkError — wallet network differs from the request. *
TonConnectError — bridge / validation error. * *
Resume a connection paused with ITonConnect.pauseConnection.
Public contract of the TON Connect connector.
See
TON Connect overview (docs)