AuthClient constructor
AuthClient({
- required ICore core,
- required PairingMetadata metadata,
Implementation
AuthClient({
required ICore core,
required PairingMetadata metadata,
}) {
engine = AuthEngine(
core: core,
metadata: metadata,
authKeys: GenericStore(
storage: core.storage,
context: StoreVersions.CONTEXT_AUTH_KEYS,
version: StoreVersions.VERSION_AUTH_KEYS,
fromJson: (dynamic value) {
return AuthPublicKey.fromJson(value);
},
),
pairingTopics: GenericStore(
storage: core.storage,
context: StoreVersions.CONTEXT_PAIRING_TOPICS,
version: StoreVersions.VERSION_PAIRING_TOPICS,
fromJson: (dynamic value) {
return value as String;
},
),
authRequests: GenericStore(
storage: core.storage,
context: StoreVersions.CONTEXT_AUTH_REQUESTS,
version: StoreVersions.VERSION_AUTH_REQUESTS,
fromJson: (dynamic value) {
return PendingAuthRequest.fromJson(value);
},
),
completeRequests: GenericStore(
storage: core.storage,
context: StoreVersions.CONTEXT_COMPLETE_REQUESTS,
version: StoreVersions.VERSION_COMPLETE_REQUESTS,
fromJson: (dynamic value) {
return StoredCacao.fromJson(value);
},
),
);
}