SignEngine class

Implemented types

Constructors

SignEngine({required ICore core, required PairingMetadata metadata, required IGenericStore<ProposalData> proposals, required ISessions sessions, required IGenericStore<SessionRequest> pendingRequests, required IGenericStore<AuthPublicKey> authKeys, required IGenericStore<String> pairingTopics, required IGenericStore<PendingAuthRequest> authRequests, required IGenericStore<StoredCacao> completeRequests, required IGenericStore<PendingSessionAuthRequest> sessionAuthRequests})

Properties

authKeys IGenericStore<AuthPublicKey>
getter/setter pairoverride-getter
authRequests IGenericStore<PendingAuthRequest>
getter/setter pairoverride-getter
completeRequests IGenericStore<StoredCacao>
getter/setter pairoverride-getter
core ICore
final
hashCode int
The hash code for this object.
no setterinherited
metadata PairingMetadata
final
onAuthRequest Event<AuthRequest>
final
onAuthResponse Event<AuthResponse>
final
onProposalExpire Event<SessionProposalEvent>
final
onSessionAuthRequest Event<SessionAuthRequest>
final
onSessionAuthResponse Event<SessionAuthResponse>
final
onSessionConnect Event<SessionConnect>
final
onSessionDelete Event<SessionDelete>
final
onSessionEvent Event<SessionEvent>
final
onSessionExpire Event<SessionExpire>
final
onSessionExtend Event<SessionExtend>
final
onSessionPing Event<SessionPing>
final
onSessionProposal Event<SessionProposalEvent>
final
onSessionProposalError Event<SessionProposalErrorEvent>
final
onSessionRequest Event<SessionRequestEvent>
final
onSessionUpdate Event<SessionUpdate>
final
pairings IPairingStore
no setteroverride
pairingTopics IGenericStore<String>
getter/setter pairoverride-getter
pendingAuthRequests List<AuthRequestCompleter>
getter/setter pair
pendingProposals List<SessionProposalCompleter>
getter/setter pair
pendingRequests IGenericStore<SessionRequest>
final
proposals IGenericStore<ProposalData>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionAuthRequests IGenericStore<PendingSessionAuthRequest>
getter/setter pairoverride-getter
sessions ISessions
final

Methods

approveSession({required int id, required Map<String, Namespace> namespaces, Map<String, String>? sessionProperties, String? relayProtocol}) Future<ApproveResponse>
Approves a proposal with the id provided in the parameters. Assumes the proposal is already created.
override
approveSessionAuthenticate({required int id, List<Cacao>? auths}) Future<ApproveResponse>
override
authenticate({required SessionAuthRequestParams params, String? pairingTopic, List<List<String>>? methods = const [[MethodConstants.WC_SESSION_AUTHENTICATE]]}) Future<SessionAuthRequestResponse>
override
checkAndExpire() Future<void>
override
connect({Map<String, RequiredNamespace>? requiredNamespaces, Map<String, RequiredNamespace>? optionalNamespaces, Map<String, String>? sessionProperties, String? pairingTopic, List<Relay>? relays, List<List<String>>? methods = DEFAULT_METHODS}) Future<ConnectResponse>
override
disconnectSession({required String topic, required WalletConnectError reason}) 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
ping({required String topic}) Future<void>
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
registerEventHandler({required String chainId, required String event, dynamic handler(String, dynamic)?}) → void
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
request({required String topic, required String chainId, required SessionRequestParams request}) Future
override
requestAuth({required AuthRequestParams params, String? pairingTopic, List<List<String>>? methods = DEFAULT_METHODS_AUTH}) Future<AuthRequestResponse>
override
requestReadContract({required DeployedContract deployedContract, required String functionName, required String rpcUrl, EthereumAddress? sender, List parameters = const []}) Future<List>
override
requestWriteContract({required String topic, required String chainId, required DeployedContract deployedContract, required String functionName, required Transaction transaction, List parameters = const [], String? method}) Future
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

Constants

DEFAULT_METHODS → const List<List<String>>
DEFAULT_METHODS_AUTH → const List<List<String>>