Optional
options: TonConnectUiCreateOptionsPrivate
Optional
actionsPrivate
checkPrivate
Internal
connectInformation about the embedded wallet to connect to.
Error if the connection process fails.
Private
Internal
connectTODO: remove in the next major version. Initiates the connection process for an external wallet by opening the wallet modal and returns the connected wallet information upon successful connection.
Error if the user cancels the connection process or if the connection process fails.
Private
Optional
connectReadonly
connectionPromise 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 value true
/false
indicates if the session was restored successfully.
Readonly
connectorTonConnect instance.
Private
getPrivate
getReadonly
modalManages the modal window state.
Private
normalizePrivate
Internal
onSubscribe to the transaction modal window state changes, returns a function which has to be called to unsubscribe.
Private
Readonly
preferredPrivate
setPrivate
Readonly
singleManages the single wallet modal window state. TODO: make it public when interface will be ready for external usage.
Private
subscribePrivate
systemPrivate
Readonly
trackerEmits user action event to the EventDispatcher. By default, it uses window.dispatchEvent
for browser environment.
Private
Readonly
transactionManages the transaction modal window state. TODO: make it public when interface will be ready for external usage.
Private
updatePrivate
Internal
waitWaits for a transaction to be sent based on provided options, returning the transaction response.
Configuration for transaction statuses and errors handling. @options.transaction - Transaction to send. @options.ignoreErrors - If true, ignores errors during waiting, waiting continues until a valid transaction is sent. Default is false. @options.abortSignal - Optional AbortSignal for external cancellation. Throws TonConnectUIError if aborted.
(optional) will be called after the transaction is sent to the wallet.
TonConnectUIError if waiting is aborted or no valid transaction response is received and ignoreErrors is false.
Private
Internal
waitTODO: remove in the next major version. Waits for a wallet connection based on provided options, returning connected wallet information.
Configuration for connection statuses and errors handling. @options.ignoreErrors - If true, ignores errors during waiting, waiting continues until a valid wallet connects. Default is false. @options.abortSignal - Optional AbortSignal for external cancellation. Throws TonConnectUIError if aborted.
TonConnectUIError if waiting is aborted or no valid wallet connection is received and ignoreErrors is false.
Private
walletPrivate
Readonly
walletPrivate
Readonly
walletsCurrent 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.
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) => void)function which has to be called to unsubscribe.
Opens the modal window and handles the transaction sending.
transaction to send.
Optional
options: ActionConfigurationmodal 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.
Static
getGenerated using TypeDoc
TODO: remove in the next major version. Initiates a connection with an embedded wallet, awaits its completion, and returns the connected wallet information.