TonConnect class

Constructors

TonConnect(String _manifestUrl, {IStorage? customStorage, String? walletsListSource, int? walletsListCacheTtl})

Properties

account → dynamic
Current connected account or None if no account is connected.
no setter
connected bool
Shows if the wallet is connected right now.
no setter
hashCode int
The hash code for this object.
no setterinherited
provider BridgeProvider?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage IStorage
getter/setter pair
wallet WalletInfo?
getter/setter pair

Methods

connect(WalletApp wallet, [dynamic request]) Future<String>
Generates universal link for an external wallet and subscribes to the wallet's bridge, or sends connect request to the injected wallet.
disconnect() Future<void>
Disconnect from wallet and drop current session.
getWallets() Future<List<WalletApp>>
Return available wallets list.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onStatusChange(void callback(dynamic value), [void errorsHandler(dynamic value)?]) Function
Allows to subscribe to connection status changes and handle connection errors.
pauseConnection() → void
Pause bridge HTTP connection. Might be helpful, if you use SDK on backend and want to save server resources.
restoreConnection() Future<bool>
Try to restore existing session and reconnect to the corresponding wallet. Call it immediately when your app is loaded.
sendTransaction(Map<String, dynamic> transaction) Future
Asks connected wallet to sign and send the transaction.
toString() String
A string representation of this object.
inherited
unpauseConnection() Future<void>
Unpause bridge HTTP connection if it is paused.

Operators

operator ==(Object other) bool
The equality operator.
inherited