SignApiValidatorUtils class

Constructors

SignApiValidatorUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

isConformingNamespaces({required Map<String, RequiredNamespace> requiredNamespaces, required Map<String, Namespace> namespaces, required String context}) bool
Makes sure that the chains, methods and events of the required namespaces are contained in the namespaces
isContainedIn({required List container, required List contained}) bool
isSessionCompatible({required SessionData session, required Map<String, RequiredNamespace> requiredNamespaces}) bool
isValidAccounts({required List<String> accounts, required String context}) bool
Loops through each account, and validates it Context is used to provide more information in the error message
isValidChains({required String nsOrChainId, List<String>? chains, required String context}) bool
This function will throw an error if
isValidNamespaces({required Map<String, Namespace> namespaces, required String context}) bool
Validates the data of the Namespaces, ensuring it conforms to CAIP-25
isValidNamespacesChainId({required Map<String, Namespace> namespaces, required String chainId}) bool
Validates the provided chainId, then ensures that the chainId is contained in the namespaces
isValidNamespacesEvent({required Map<String, Namespace> namespaces, required String chainId, required String eventName}) bool
Validates the provided chainId, then gets the events for that chainId and ensures that the event request is contained in the events
isValidNamespacesRequest({required Map<String, Namespace> namespaces, required String chainId, required String method}) bool
Validates the provided chainId, then gets the methods for that chainId and ensures that the method request is contained in the methods
isValidRequiredNamespaces({required Map<String, RequiredNamespace> requiredNamespaces, required String context}) bool
Validates the data of the Required Namespaces, ensuring it conforms to CAIP-25