Optional
options: TonConnectUiCreateOptionsReadonly
connectionReadonly
connectorTonConnect instance.
Readonly
modalManages the modal window state.
Current connected account or null.
Current connection status.
Returns current modal window state.
Experimental
Returns 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.
Experimental
Close the single wallet modal window.
Optional
closeReason: WalletsModalCloseReasonConnected wallet.
Disconnect wallet and clean localstorage.
Returns available wallets list.
Subscribe to the modal window state changes, returns a function which has to be called to unsubscribe.
Experimental
Subscribe to the single wallet modal window state changes, returns a function which has to be called to unsubscribe.
Subscribe to connection status change.
Optional
errorsHandler: (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.
Experimental
Opens 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.
Optional
options: ActionConfiguration & { onRequestSent?: (redirectToWallet: () => void) => void }modal and notifications behaviour settings. Default is show only 'before' modal and all notifications.
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.
Signs the data and returns the signature.
data to sign.
Optional
options: { onRequestSent?: (redirectToWallet: () => void) => void }Static
get
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
/false
indicates if the session was restored successfully.