Optionaloptions: TonConnectUiCreateOptionsReadonlyconnectionReadonlyconnectorTonConnect instance.
ReadonlymodalManages the modal window state.
Current connected account or null.
Current connection status.
Returns current modal window state.
ExperimentalReturns current single wallet modal window state.
Set and apply new UI options. Object with partial options should be passed. Passed options will be merged with current options.
Curren connected wallet app and its info or null.
ExperimentalClose the single wallet modal window.
OptionalcloseReason: WalletsModalCloseReasonDisconnect wallet and clean localstorage.
Optionaloptions: { traceId?: string }Returns available wallets list.
Generates a universal link for a send action intent and opens a modal with QR code. This allows users to complete actions via a dynamic action URL without being connected to the wallet.
action intent request.
Optionaloptions: OptionalTraceable<{ walletUniversalLink?: string }>(optional) options including traceId and wallet universal link.
universal link that can be opened in a wallet or displayed as QR code.
Generates a universal link for a send transaction intent and opens a modal with QR code. This allows users to complete transactions without being connected to the wallet.
transaction intent request.
Optionaloptions: OptionalTraceable<{ walletUniversalLink?: string }>(optional) options including traceId and wallet universal link.
universal link that can be opened in a wallet or displayed as QR code.
Generates a universal link for a sign data intent and opens a modal with QR code. This allows users to sign data without being connected to the wallet.
sign data intent request.
Optionaloptions: OptionalTraceable<{ walletUniversalLink?: string }>(optional) options including traceId and wallet universal link.
universal link that can be opened in a wallet or displayed as QR code.
Generates a universal link for a sign message intent and opens a modal with QR code. This allows users to sign messages without being connected to the wallet.
sign message intent request.
Optionaloptions: OptionalTraceable<{ walletUniversalLink?: string }>(optional) options including traceId and wallet universal link.
universal link that can be opened in a wallet or displayed as QR code.
Subscribe to intent response events. This allows you to receive responses from intents (e.g., transaction results, sign data results).
will be called when an intent response is received.
unsubscribe function.
Subscribe to the modal window state changes, returns a function which has to be called to unsubscribe.
ExperimentalSubscribe to the single wallet modal window state changes, returns a function which has to be called to unsubscribe.
Subscribe to connection status change.
OptionalerrorsHandler: (err: TonConnectError) => voidfunction which has to be called to unsubscribe.
Opens the modal window, returns a promise that resolves after the modal window is opened.
Optionaloptions: { traceId?: string }ExperimentalOpens the single wallet modal window, returns a promise that resolves after the modal window is opened.
Opens the modal window and handles the transaction sending.
transaction to send.
Optionaloptions: ActionConfiguration & { traceId?: string } & {modal and notifications behaviour settings. Default is show only 'before' modal and all notifications.
Set desired network for the connection. Can only be set before connecting. If wallet connects with a different chain, the SDK will throw an error and abort connection.
Optionalnetwork: stringdesired network id (e.g., '-239', '-3', or custom). Pass undefined to allow any network.
Use it to customize ConnectRequest and add tonProof payload.
You can call it multiply times to set updated tonProof payload if previous one is outdated.
If connectRequestParameters.state === 'loading' loader will appear instead of the qr code in the wallets modal.
If connectRequestParameters.state was changed to 'ready' or it's value has been changed, QR will be re-rendered.
Configure connect request parameters for intents.
Configuration options:
includeConnect: if true, intents will include a connect requestincludeTonProof: if true and includeConnect is true, ton_proof will be included in the connect requesttonProofPayload: optional payload for ton_proof (if not provided, will be generated automatically)Signs the data and returns the signature.
data to sign.
Optionaloptions: OptionalTraceable<{ onRequestSent?: (redirectToWallet: () => void) => void }>Signs the message and returns the signed boc.
message to sign.
Optionaloptions: ActionConfiguration & { traceId?: string } & {Staticget
Promise that resolves after end of th connection restoring process (promise will fire after
onStatusChange, so you can get actual information about wallet and session after when promise resolved). Resolved valuetrue/falseindicates if the session was restored successfully.