Web3App constructor
Web3App({
- required ICore core,
- required PairingMetadata metadata,
Implementation
Web3App({
required this.core,
required this.metadata,
}) {
signEngine = SignEngine(
core: core,
metadata: metadata,
proposals: GenericStore(
storage: core.storage,
context: StoreVersions.CONTEXT_PROPOSALS,
version: StoreVersions.VERSION_PROPOSALS,
fromJson: (dynamic value) {
return ProposalData.fromJson(value);
},
),
sessions: Sessions(
storage: core.storage,
context: StoreVersions.CONTEXT_SESSIONS,
version: StoreVersions.VERSION_SESSIONS,
fromJson: (dynamic value) {
return SessionData.fromJson(value);
},
),
pendingRequests: GenericStore(
storage: core.storage,
context: StoreVersions.CONTEXT_PENDING_REQUESTS,
version: StoreVersions.VERSION_PENDING_REQUESTS,
fromJson: (dynamic value) {
return SessionRequest.fromJson(value);
},
),
);
authEngine = 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;
},
),
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);
},
),
);
}