WalletConnect class
WalletConnect is an open source protocol for connecting decentralised applications to mobile wallets with QR code scanning or deep linking.
A user can interact securely with any Dapp from their mobile phone, making WalletConnect wallets a safer choice compared to desktop or browser extension wallets.
Constructors
- WalletConnect({String bridge = '', String uri = '', WalletConnectSession? session, SessionStorage? sessionStorage, CipherBox? cipher, SocketTransport? transport, String? clientId, PeerMeta? clientMeta})
-
WalletConnect is an open source protocol for connecting decentralised
applications to mobile wallets with QR code scanning or deep linking.
factory
Properties
- bridgeConnected → bool
-
Check if walletconnect is currently connected with the bridge.
no setter
- cipherBox ↔ CipherBox
-
The algorithm used to encrypt/decrypt payloads
getter/setter pair
- connected → bool
-
Check if a current session is connected.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- payloadId → int
-
Get a new random, payload id.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- session → WalletConnectSession
-
The current active session.
final
- sessionStorage → SessionStorage?
-
The storage when sessions can be stored and retrieved.
final
-
signingMethods
→ List<
String> -
Default signing methods (for Ethereum)
final
Methods
-
approveSession(
{required List< String> accounts, required int chainId}) → Future - Approve the session.
-
close(
{bool forceClose = false}) → Future - Close the connection This does not kill and clear the session.
-
connect(
{int? chainId, OnDisplayUriCallback? onDisplayUri}) → Future< SessionStatus> - Create a new session.
-
createSession(
{int? chainId, OnDisplayUriCallback? onDisplayUri}) → Future< SessionStatus> - Create a new session between the dApp and wallet.
-
isSilentPayload(
JsonRpcRequest request) → bool - Check if the request is a silent payload.
-
killSession(
{String? sessionError}) → Future - Kill the current session.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on<
T> (String eventName, OnEvent< T> callback) → void - Listen to internal events.
-
reconnect(
) → void - Reconnects to the web socket server.
-
registerListeners(
{OnConnectRequest? onConnect, OnSessionUpdate? onSessionUpdate, OnDisconnect? onDisconnect}) → void - Register callback listeners.
-
rejectSession(
{String? message}) → Future - Reject the session.
-
sendCustomRequest(
{int? id, required String method, required List params, String? topic}) → Future - Send a custom request.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateSession(
SessionStatus sessionStatus) → Future - Update the existing session.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited