Web3Wallet class

Implemented types
Annotations
  • @Deprecated('walletconnect_flutter_v2 package is no longer maintened, please upgrade to reown_walletkit. Read more at: https://docs.reown.com/advanced/walletconnect-deprecations#flutter')

Constructors

Web3Wallet({required ICore core, required PairingMetadata metadata})

Properties

authEngine IAuthEngine
getter/setter pairoverride-getter
authKeys IGenericStore<AuthPublicKey>
no setteroverride
authRequests IGenericStore<PendingAuthRequest>
no setteroverride
completeRequests IGenericStore<StoredCacao>
no setteroverride
core ICore
final
hashCode int
The hash code for this object.
no setterinherited
metadata PairingMetadata
final
onAuthRequest Event<AuthRequest>
---------- (DEPRECATED) AUTH ENGINE ----------///
no setteroverride
onProposalExpire Event<SessionProposalEvent>
no setteroverride
onSessionAuthRequest Event<SessionAuthRequest>
no setteroverride
onSessionConnect Event<SessionConnect>
---------- SIGN ENGINE ----------///
no setteroverride
onSessionDelete Event<SessionDelete>
no setteroverride
onSessionExpire Event<SessionExpire>
no setteroverride
onSessionPing Event<SessionPing>
no setteroverride
onSessionProposal Event<SessionProposalEvent>
no setteroverride
onSessionProposalError Event<SessionProposalErrorEvent>
no setteroverride
onSessionRequest Event<SessionRequestEvent>
no setteroverride
pairings IPairingStore
no setteroverride
pairingTopics IGenericStore<String>
no setteroverride
pendingRequests IGenericStore<SessionRequest>
no setteroverride
proposals IGenericStore<ProposalData>
no setteroverride
protocol String
---------- GENERIC ----------///
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionAuthRequests IGenericStore<PendingSessionAuthRequest>
---------- ONE-CLICK AUTH SIGN ENGINE ----------///
no setteroverride
sessions ISessions
no setteroverride
signEngine ISignEngine
getter/setter pairoverride-getter
version int
final

Methods

approveSession({required int id, required Map<String, Namespace> namespaces, Map<String, String>? sessionProperties, String? relayProtocol}) Future<ApproveResponse>
override
approveSessionAuthenticate({required int id, List<Cacao>? auths}) Future<ApproveResponse>
override
disconnectSession({required String topic, required WalletConnectError reason}) Future<void>
override
dispatchEnvelope(String url) Future<void>
override
emitSessionEvent({required String topic, required String chainId, required SessionEventParams event}) Future<void>
override
extendSession({required String topic}) Future<void>
override
find({required Map<String, RequiredNamespace> requiredNamespaces}) SessionData?
override
formatAuthMessage({required String iss, required CacaoRequestPayload cacaoPayload}) String
override
getActiveSessions() Map<String, SessionData>
override
getCompletedRequestsForPairing({required String pairingTopic}) Map<int, StoredCacao>
override
getPendingAuthRequests() Map<int, PendingAuthRequest>
override
getPendingSessionAuthRequests() Map<int, PendingSessionAuthRequest>
override
getPendingSessionProposals() Map<String, ProposalData>
override
getPendingSessionRequests() Map<String, SessionRequest>
override
getSessionsForPairing({required String pairingTopic}) Map<String, SessionData>
override
init() Future<void>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pair({required Uri uri}) Future<PairingInfo>
override
redirectToDapp({required String topic, required Redirect? redirect}) Future<bool>
override
registerAccount({required String chainId, required String accountAddress}) → void
Register accounts for a given namespace or chainId. Used to construct the Namespaces map for the session proposal. Each account must follow the namespace:chainId:address format or this will throw an error.
override
registerEventEmitter({required String chainId, required String event}) → void
Register event emitters for a given namespace or chainId Used to construct the Namespaces map for the session proposal
override
registerRequestHandler({required String chainId, required String method, dynamic handler(String, dynamic)?}) → void
override
rejectSession({required int id, required WalletConnectError reason}) Future<void>
override
rejectSessionAuthenticate({required int id, required WalletConnectError reason}) Future<void>
override
respondAuthRequest({required int id, required String iss, CacaoSignature? signature, WalletConnectError? error}) Future<void>
Construct the Namespaces map for a session proposal. Uses the registered methods, events, and keys to build them. If the required namespaces is not satisfied, this function will throw a WalletConnectError. The optional namespaces are included if they exist in the registered information.
override
respondSessionRequest({required String topic, required JsonRpcResponse response}) Future<void>
override
toString() String
A string representation of this object.
inherited
updateSession({required String topic, required Map<String, Namespace> namespaces}) Future<void>
override
validateSignedCacao({required Cacao cacao, required String projectId}) Future<bool>
override

Operators

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

Static Methods

createInstance({required String projectId, String relayUrl = WalletConnectConstants.DEFAULT_RELAY_URL, String pushUrl = WalletConnectConstants.DEFAULT_PUSH_URL, required PairingMetadata metadata, bool memoryStore = false, LogLevel logLevel = LogLevel.nothing, IHttpClient httpClient = const HttpWrapper()}) Future<Web3Wallet>