Optional
options: TonConnectOptionsStatic
istarget wallet's js bridge key.
Static
isCheck if specified wallet is injected and available to use with the app.
target wallet's js bridge key.
Current connected account or null if no account is connected.
Shows if the wallet is connected right now.
Generates universal link for an external wallet and subscribes to the wallet's bridge, or sends connect request to the injected wallet.
wallet's bridge url and universal link for an external wallet or jsBridge key for the injected wallet.
Optional
options: {(optional) openingDeadlineMS for the connection opening deadline and signal for the connection abort.
universal link if external wallet was passed or void for the injected wallet.
Optional
request: ConnectAdditionalRequestOptional
options: { openingDeadlineMS?: number; signal?: AbortSignal }Disconnect form thw connected wallet and drop current session.
Optional
options: { signal?: AbortSignal }Returns available wallets list.
Allows to subscribe to connection status changes and handle connection errors.
will be called after connections status changes with actual wallet or null.
Optional
errorsHandler: (err: TonConnectError) => void(optional) will be called with some instance of TonConnectError when connect error is received.
unsubscribe callback.
Pause bridge HTTP connection. Might be helpful, if you want to pause connections while browser tab is unfocused, or if you use SDK with NodeJS and want to save server resources.
Try to restore existing session and reconnect to the corresponding wallet. Call it immediately when your app is loaded.
Optional
options: { openingDeadlineMS?: number; signal?: AbortSignal }Asks connected wallet to sign and send the transaction.
transaction to send.
Optional
options: { onRequestSent?: () => void; signal?: AbortSignal }(optional) onRequestSent will be called after the request was sent to the wallet and signal for the transaction abort.
signed transaction boc that allows you to find the transaction in the blockchain. If user rejects transaction, method will throw the corresponding error.
Optional
onRequestSent: () => voidOptional
options: { onRequestSent?: () => void; signal?: AbortSignal }Unpause bridge HTTP connection if it is paused.
Static
getReturns available wallets list.
Check if the app is opened inside specified wallet's browser.