ReownSignClient constructor

ReownSignClient({
  1. required IReownCore core,
  2. required PairingMetadata metadata,
})

Implementation

ReownSignClient({
  required IReownCore core,
  required PairingMetadata metadata,
}) {
  engine = ReownSign(
    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);
      },
    ),
    pairingTopics: GenericStore(
      storage: core.storage,
      context: StoreVersions.CONTEXT_PAIRING_TOPICS,
      version: StoreVersions.VERSION_PAIRING_TOPICS,
      fromJson: (dynamic value) {
        return value;
      },
    ),
    authKeys: GenericStore(
      storage: core.storage,
      context: StoreVersions.CONTEXT_AUTH_KEYS,
      version: StoreVersions.VERSION_AUTH_KEYS,
      fromJson: (dynamic value) {
        return AuthPublicKey.fromJson(value);
      },
    ),
    sessionAuthRequests: GenericStore(
      storage: core.storage,
      context: StoreVersions.CONTEXT_AUTH_REQUESTS,
      version: StoreVersions.VERSION_AUTH_REQUESTS,
      fromJson: (dynamic value) {
        return PendingSessionAuthRequest.fromJson(value);
      },
    ),
  );
}