diff --git a/lib/common/domain/entities/env_config_entity.dart b/lib/common/domain/entities/env_config_entity.dart index f1ccf9de..c20e9ac8 100644 --- a/lib/common/domain/entities/env_config_entity.dart +++ b/lib/common/domain/entities/env_config_entity.dart @@ -1,23 +1,39 @@ import 'package:polygonid_flutter_sdk/common/domain/entities/chain_config_entity.dart'; import 'package:polygonid_flutter_sdk/common/domain/entities/did_method_entity.dart'; +/// https://github.com/0xPolygonID/c-polygonid?tab=readme-ov-file#configuration class EnvConfigEntity { final String ipfsNodeUrl; final Map chainConfigs; final List didMethods; + final String? cacheDir; EnvConfigEntity({ required this.ipfsNodeUrl, this.chainConfigs = const {}, this.didMethods = const [], + this.cacheDir, }); + factory EnvConfigEntity.fromJson(Map json) { + return EnvConfigEntity( + ipfsNodeUrl: json['ipfsNodeUrl'], + chainConfigs: (json['chainConfigs'] as Map).map( + (key, value) => MapEntry(key, ChainConfigEntity.fromJson(value))), + didMethods: (json['didMethods'] as List) + .map((value) => DidMethodEntity.fromJson(value)) + .toList(), + cacheDir: json['cacheDir'], + ); + } + Map toJson() { return { 'ipfsNodeUrl': ipfsNodeUrl, 'chainConfigs': chainConfigs.map((key, value) => MapEntry(key, value.toJson())), 'didMethods': didMethods.map((e) => e.toJson()).toList(), + 'cacheDir': cacheDir, }; } } diff --git a/lib/common/domain/entities/env_entity.dart b/lib/common/domain/entities/env_entity.dart index f25d66e4..bb94a752 100644 --- a/lib/common/domain/entities/env_entity.dart +++ b/lib/common/domain/entities/env_entity.dart @@ -14,6 +14,8 @@ class EnvEntity { final String? pinataGateway; final String? pinataGatewayToken; + final String? cacheDir; + EnvEntity._({ required this.pushUrl, required this.ipfsUrl, @@ -22,6 +24,7 @@ class EnvEntity { this.stacktraceEncryptionKey, this.pinataGateway, this.pinataGatewayToken, + this.cacheDir, }); EnvEntity({ @@ -32,6 +35,7 @@ class EnvEntity { this.stacktraceEncryptionKey, this.pinataGateway, this.pinataGatewayToken, + this.cacheDir, }); factory EnvEntity.fromJson(Map json) { @@ -50,6 +54,7 @@ class EnvEntity { stacktraceEncryptionKey: json['stacktraceEncryptionKey'], pinataGateway: json['pinataGateway'], pinataGatewayToken: json['pinataGatewayToken'], + cacheDir: json['cacheDir'], ); } @@ -67,11 +72,12 @@ class EnvEntity { 'stacktraceEncryptionKey': stacktraceEncryptionKey, 'pinataGateway': pinataGateway, 'pinataGatewayToken': pinataGatewayToken, + 'cacheDir': cacheDir, }; @override String toString() { - return 'EnvEntity{pushUrl: $pushUrl, ipfsUrl: $ipfsUrl, chainConfig: $chainConfigs, didMethods: $didMethods, stacktraceEncryptionKey: $stacktraceEncryptionKey, , pinataGateway: $pinataGateway, pinataGatewayToken: $pinataGatewayToken}'; + return 'EnvEntity{pushUrl: $pushUrl, ipfsUrl: $ipfsUrl, chainConfig: $chainConfigs, didMethods: $didMethods, stacktraceEncryptionKey: $stacktraceEncryptionKey, , pinataGateway: $pinataGateway, pinataGatewayToken: $pinataGatewayToken, cacheDir: $cacheDir}'; } @override @@ -84,7 +90,8 @@ class EnvEntity { listEquals(didMethods, other.didMethods) && stacktraceEncryptionKey == other.stacktraceEncryptionKey && pinataGateway == other.pinataGateway && - pinataGatewayToken == other.pinataGatewayToken; + pinataGatewayToken == other.pinataGatewayToken && + cacheDir == other.cacheDir; @override int get hashCode => runtimeType.hashCode; @@ -101,6 +108,7 @@ class EnvEntity { String? stacktraceEncryptionKey, String? pinataGateway, String? pinataGatewayToken, + String? cacheDir, }) { return EnvEntity._( pushUrl: pushUrl ?? this.pushUrl, @@ -111,16 +119,16 @@ class EnvEntity { stacktraceEncryptionKey ?? this.stacktraceEncryptionKey, pinataGateway: pinataGateway ?? this.pinataGateway, pinataGatewayToken: pinataGatewayToken ?? this.pinataGatewayToken, + cacheDir: cacheDir ?? this.cacheDir, ); } -} -extension EnvEntityExtension on EnvEntity { EnvConfigEntity get config { return EnvConfigEntity( ipfsNodeUrl: ipfsUrl, chainConfigs: chainConfigs, didMethods: didMethods, + cacheDir: cacheDir, ); } } diff --git a/lib/credential/domain/use_cases/cache_credential_use_case.dart b/lib/credential/domain/use_cases/cache_credential_use_case.dart index 2b3cfac2..663384d8 100644 --- a/lib/credential/domain/use_cases/cache_credential_use_case.dart +++ b/lib/credential/domain/use_cases/cache_credential_use_case.dart @@ -1,13 +1,13 @@ import 'dart:convert'; +import 'package:polygonid_flutter_sdk/common/domain/entities/env_config_entity.dart'; import 'package:polygonid_flutter_sdk/common/domain/use_case.dart'; import 'package:polygonid_flutter_sdk/credential/domain/entities/claim_entity.dart'; import 'package:polygonid_flutter_sdk/credential/domain/repositories/credential_repository.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; class CacheCredentialParam { final ClaimEntity credential; - final ConfigParam? config; + final EnvConfigEntity? config; CacheCredentialParam({ required this.credential, diff --git a/lib/credential/domain/use_cases/cache_credentials_use_case.dart b/lib/credential/domain/use_cases/cache_credentials_use_case.dart index 92814575..603e7b1c 100644 --- a/lib/credential/domain/use_cases/cache_credentials_use_case.dart +++ b/lib/credential/domain/use_cases/cache_credentials_use_case.dart @@ -1,9 +1,9 @@ import 'package:polygonid_flutter_sdk/common/domain/domain_logger.dart'; +import 'package:polygonid_flutter_sdk/common/domain/entities/env_config_entity.dart'; import 'package:polygonid_flutter_sdk/common/domain/use_cases/get_env_use_case.dart'; import 'package:polygonid_flutter_sdk/common/infrastructure/stacktrace_stream_manager.dart'; import 'package:polygonid_flutter_sdk/credential/domain/entities/claim_entity.dart'; import 'package:polygonid_flutter_sdk/credential/domain/use_cases/cache_credential_use_case.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; class CacheCredentialsUseCase { final CacheCredentialUseCase _cacheCredentialUseCase; @@ -18,16 +18,12 @@ class CacheCredentialsUseCase { Future execute({ required List credentials, - ConfigParam? configParam, + EnvConfigEntity? configParam, }) async { // if we don't have the configParam, we get it from the environment if (configParam == null) { final env = await _getEnvUseCase.execute(); - configParam = ConfigParam( - ipfsNodeURL: env.ipfsUrl, - chainConfigs: env.chainConfigs, - didMethods: env.didMethods, - ); + configParam = env.config; } for (var credential in credentials) { diff --git a/lib/iden3comm/authenticate.dart b/lib/iden3comm/authenticate.dart index 0b43c913..daa016ad 100644 --- a/lib/iden3comm/authenticate.dart +++ b/lib/iden3comm/authenticate.dart @@ -69,7 +69,6 @@ import 'package:polygonid_flutter_sdk/identity/domain/repositories/smt_repositor import 'package:polygonid_flutter_sdk/identity/domain/use_cases/get_did_identifier_use_case.dart'; import 'package:polygonid_flutter_sdk/proof/data/data_sources/circuits_files_data_source.dart'; import 'package:polygonid_flutter_sdk/proof/data/data_sources/gist_mtproof_data_source.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import 'package:polygonid_flutter_sdk/proof/data/dtos/gist_mtproof_entity.dart'; import 'package:polygonid_flutter_sdk/proof/domain/entities/circuit_data_entity.dart'; import 'package:polygonid_flutter_sdk/proof/data/dtos/mtproof_dto.dart'; @@ -428,7 +427,7 @@ class Authenticate { ); } - config = ConfigParam.fromEnv(env).toJson(); + config = env.config.toJson(); List splittedDid = genesisDid.split(":"); String id = splittedDid[4]; diff --git a/lib/iden3comm/domain/use_cases/fetch_and_save_claims_use_case.dart b/lib/iden3comm/domain/use_cases/fetch_and_save_claims_use_case.dart index c3db3e76..50b296c6 100644 --- a/lib/iden3comm/domain/use_cases/fetch_and_save_claims_use_case.dart +++ b/lib/iden3comm/domain/use_cases/fetch_and_save_claims_use_case.dart @@ -24,7 +24,6 @@ import 'package:polygonid_flutter_sdk/iden3comm/domain/entities/credential/reque import 'package:polygonid_flutter_sdk/iden3comm/domain/use_cases/get_auth_token_use_case.dart'; import 'package:polygonid_flutter_sdk/iden3comm/domain/use_cases/get_fetch_requests_use_case.dart'; import 'package:polygonid_flutter_sdk/identity/domain/use_cases/get_did_use_case.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import 'package:polygonid_flutter_sdk/sdk/di/injector.dart'; import 'package:web3dart/crypto.dart'; import 'package:web3dart/web3dart.dart'; @@ -134,12 +133,7 @@ class FetchAndSaveClaimsUseCase _stacktraceManager.addTrace( "[FetchAndSaveClaimsUseCase] All claims have been saved: claimsLength ${claims.length}"); - final config = ConfigParam( - ipfsNodeURL: env.ipfsUrl, - chainConfigs: env.chainConfigs, - didMethods: env.didMethods, - ); - + final config = env.config; for (final claim in claims) { // cache claim try { @@ -251,7 +245,7 @@ class FetchAndSaveClaimsUseCase final issuerIdInt = await getIssuerId.getId(); final issuerDid = (await _identityRepository.describeId( id: issuerIdInt, - config: ConfigParam.fromEnv(env), + config: env.config, )) .did; diff --git a/lib/iden3comm/domain/use_cases/fetch_credentials_use_case.dart b/lib/iden3comm/domain/use_cases/fetch_credentials_use_case.dart index d3316f83..efb72e4a 100644 --- a/lib/iden3comm/domain/use_cases/fetch_credentials_use_case.dart +++ b/lib/iden3comm/domain/use_cases/fetch_credentials_use_case.dart @@ -20,7 +20,6 @@ import 'package:polygonid_flutter_sdk/identity/data/data_sources/local_contract_ import 'package:polygonid_flutter_sdk/identity/domain/repositories/identity_repository.dart'; import 'package:polygonid_flutter_sdk/identity/domain/use_cases/get_did_identifier_use_case.dart'; import 'package:polygonid_flutter_sdk/identity/domain/use_cases/get_did_use_case.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import 'package:polygonid_flutter_sdk/sdk/di/injector.dart'; import 'package:web3dart/crypto.dart'; import 'package:web3dart/web3dart.dart'; @@ -210,7 +209,7 @@ class FetchCredentialsUseCase { final issuerIdInt = await getIssuerId.getId(); final issuerDid = (await _identityRepository.describeId( id: issuerIdInt, - config: ConfigParam.fromEnv(env), + config: env.config, )) .did; diff --git a/lib/iden3comm/domain/use_cases/fetch_onchain_claim_use_case.dart b/lib/iden3comm/domain/use_cases/fetch_onchain_claim_use_case.dart index aa8f4f58..83fef794 100644 --- a/lib/iden3comm/domain/use_cases/fetch_onchain_claim_use_case.dart +++ b/lib/iden3comm/domain/use_cases/fetch_onchain_claim_use_case.dart @@ -16,7 +16,6 @@ import 'package:polygonid_flutter_sdk/credential/domain/entities/claim_entity.da import 'package:polygonid_flutter_sdk/iden3comm/data/data_sources/remote_iden3comm_data_source.dart'; import 'package:polygonid_flutter_sdk/iden3comm/domain/exceptions/iden3comm_exceptions.dart'; import 'package:polygonid_flutter_sdk/identity/data/data_sources/local_contract_files_data_source.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import 'package:polygonid_flutter_sdk/sdk/di/injector.dart'; import 'package:web3dart/crypto.dart'; import 'package:web3dart/web3dart.dart'; @@ -116,7 +115,7 @@ class FetchOnchainClaimUseCase issuerDID: param.issuerDid, hexdata: rawCredential, version: param.adapterVersion, - config: ConfigParam.fromEnv(env).toJsonString(), + config: jsonEncode(env.config), ); final claimJson = jsonDecode(rawClaim); diff --git a/lib/iden3comm/domain/use_cases/fetch_onchain_claims_use_case.dart b/lib/iden3comm/domain/use_cases/fetch_onchain_claims_use_case.dart index 2e002ad2..b3c40d4f 100644 --- a/lib/iden3comm/domain/use_cases/fetch_onchain_claims_use_case.dart +++ b/lib/iden3comm/domain/use_cases/fetch_onchain_claims_use_case.dart @@ -16,7 +16,6 @@ import 'package:polygonid_flutter_sdk/common/domain/domain_logger.dart'; import 'package:polygonid_flutter_sdk/common/domain/use_case.dart'; import 'package:polygonid_flutter_sdk/credential/domain/entities/claim_entity.dart'; import 'package:polygonid_flutter_sdk/identity/domain/use_cases/get_did_use_case.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import 'package:polygonid_flutter_sdk/sdk/di/injector.dart'; import 'package:web3dart/crypto.dart'; import 'package:web3dart/web3dart.dart'; @@ -138,7 +137,7 @@ class FetchOnchainClaimsUseCase final issuerIdInt = await getIssuerId.getId(); final issuerDid = (await _identityRepository.describeId( id: issuerIdInt, - config: ConfigParam.fromEnv(env), + config: env.config, )) .did; diff --git a/lib/iden3comm/domain/use_cases/generate_iden3comm_proof_use_case.dart b/lib/iden3comm/domain/use_cases/generate_iden3comm_proof_use_case.dart index a02ff667..03753306 100644 --- a/lib/iden3comm/domain/use_cases/generate_iden3comm_proof_use_case.dart +++ b/lib/iden3comm/domain/use_cases/generate_iden3comm_proof_use_case.dart @@ -24,7 +24,6 @@ import 'package:polygonid_flutter_sdk/identity/domain/use_cases/get_identity_aut import 'package:polygonid_flutter_sdk/identity/domain/use_cases/get_latest_state_use_case.dart'; import 'package:polygonid_flutter_sdk/identity/domain/use_cases/identity/get_identity_use_case.dart'; import 'package:polygonid_flutter_sdk/identity/domain/use_cases/identity/sign_message_use_case.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import 'package:polygonid_flutter_sdk/proof/domain/entities/circuit_data_entity.dart'; import 'package:polygonid_flutter_sdk/proof/data/dtos/gist_mtproof_entity.dart'; import 'package:polygonid_flutter_sdk/proof/data/dtos/mtproof_dto.dart'; @@ -196,11 +195,7 @@ class GenerateIden3commProofUseCase final envConfig = param.config; if (envConfig != null) { - config = ConfigParam( - ipfsNodeURL: envConfig.ipfsNodeUrl, - chainConfigs: envConfig.chainConfigs, - didMethods: envConfig.didMethods, - ).toJson(); + config = envConfig.toJson(); _stacktraceManager.addTrace( "[GenerateIden3commProofUseCase] AtomicQueryInputsConfigParam: success"); } diff --git a/lib/identity/data/repositories/identity_repository_impl.dart b/lib/identity/data/repositories/identity_repository_impl.dart index 8594c63b..e9eaaa86 100644 --- a/lib/identity/data/repositories/identity_repository_impl.dart +++ b/lib/identity/data/repositories/identity_repository_impl.dart @@ -23,7 +23,6 @@ import 'package:polygonid_flutter_sdk/identity/domain/entities/identity_entity.d import 'package:polygonid_flutter_sdk/identity/domain/entities/rhs_node_entity.dart'; import 'package:polygonid_flutter_sdk/identity/domain/exceptions/identity_exceptions.dart'; import 'package:polygonid_flutter_sdk/identity/domain/repositories/identity_repository.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import 'package:poseidon/poseidon.dart'; import 'package:web3dart/crypto.dart'; @@ -265,8 +264,10 @@ class IdentityRepositoryImpl extends IdentityRepository { } @override - Future describeId( - {required BigInt id, ConfigParam? config}) async { + Future describeId({ + required BigInt id, + EnvConfigEntity? config, + }) async { final idDescriptionJson = _libPolygonIdCoreIdentityDataSource.describeId( idAsInt: id.toString(), config: config == null ? null : jsonEncode(config.toJson()), diff --git a/lib/identity/domain/repositories/identity_repository.dart b/lib/identity/domain/repositories/identity_repository.dart index d4591894..9cd2a075 100644 --- a/lib/identity/domain/repositories/identity_repository.dart +++ b/lib/identity/domain/repositories/identity_repository.dart @@ -1,7 +1,6 @@ import 'package:polygonid_flutter_sdk/common/domain/entities/env_config_entity.dart'; import 'package:polygonid_flutter_sdk/identity/data/dtos/id_description.dart'; import 'package:polygonid_flutter_sdk/identity/domain/entities/node_entity.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import '../entities/identity_entity.dart'; import '../entities/rhs_node_entity.dart'; @@ -52,7 +51,8 @@ abstract class IdentityRepository { Future convertIdToBigInt({required String id}); - Future describeId({required BigInt id, ConfigParam? config}); + Future describeId( + {required BigInt id, EnvConfigEntity? config}); Future getStateRoots({required String url}); diff --git a/lib/identity/domain/use_cases/get_did_identifier_use_case.dart b/lib/identity/domain/use_cases/get_did_identifier_use_case.dart index be5c6a4d..005d3430 100644 --- a/lib/identity/domain/use_cases/get_did_identifier_use_case.dart +++ b/lib/identity/domain/use_cases/get_did_identifier_use_case.dart @@ -1,4 +1,3 @@ -import 'package:polygonid_flutter_sdk/common/domain/entities/env_entity.dart'; import 'package:polygonid_flutter_sdk/common/domain/use_cases/get_env_use_case.dart'; import 'package:polygonid_flutter_sdk/common/infrastructure/stacktrace_stream_manager.dart'; import 'package:polygonid_flutter_sdk/identity/domain/use_cases/get_genesis_state_use_case.dart'; diff --git a/lib/proof/data/data_sources/lib_pidcore_proof_data_source.dart b/lib/proof/data/data_sources/lib_pidcore_proof_data_source.dart index e42dfc17..06dceeef 100644 --- a/lib/proof/data/data_sources/lib_pidcore_proof_data_source.dart +++ b/lib/proof/data/data_sources/lib_pidcore_proof_data_source.dart @@ -3,18 +3,18 @@ import 'dart:convert'; import 'package:flutter/foundation.dart'; import 'package:injectable/injectable.dart'; import 'package:polygonid_flutter_sdk/common/domain/domain_logger.dart'; +import 'package:polygonid_flutter_sdk/common/domain/entities/env_config_entity.dart'; import 'package:polygonid_flutter_sdk/common/domain/error_exception.dart'; import 'package:polygonid_flutter_sdk/common/infrastructure/stacktrace_stream_manager.dart'; import 'package:polygonid_flutter_sdk/credential/data/dtos/claim_info_dto.dart'; import 'package:polygonid_flutter_sdk/identity/data/dtos/circuit_type.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_param.dart'; import 'package:polygonid_flutter_sdk/proof/domain/exceptions/proof_generation_exceptions.dart'; import 'package:polygonid_flutter_sdk/proof/libs/polygonidcore/pidcore_proof.dart'; class ComputeAtomicQueryInputs { final AtomicQueryInputsParam param; - final ConfigParam? configParam; + final EnvConfigEntity? configParam; ComputeAtomicQueryInputs({ required this.param, @@ -39,7 +39,7 @@ class LibPolygonIdCoreWrapper { Future getProofInputs( AtomicQueryInputsParam atomicQueryInputsParam, - ConfigParam? atomicQueryInputsConfigParam, + EnvConfigEntity? atomicQueryInputsConfigParam, ) async { ComputeAtomicQueryInputs param = ComputeAtomicQueryInputs( param: atomicQueryInputsParam, @@ -245,9 +245,9 @@ class LibPolygonIdCoreProofDataSource { _stacktraceManager.addTrace( "[LibPolygonIdCoreProofDataSource][MainFlow]getProofInputs input param: ${jsonEncode(inputParam.toJson())}"); - ConfigParam? configParam; + EnvConfigEntity? configParam; if (config != null) { - configParam = ConfigParam.fromJson(config); + configParam = EnvConfigEntity.fromJson(config); logger().i( "[LibPolygonIdCoreProofDataSource][MainFlow]getProofInputs config param: ${jsonEncode(inputParam.toJson())}"); diff --git a/lib/proof/data/dtos/atomic_query_inputs_config_param.dart b/lib/proof/data/dtos/atomic_query_inputs_config_param.dart deleted file mode 100644 index db3398d9..00000000 --- a/lib/proof/data/dtos/atomic_query_inputs_config_param.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'dart:convert'; - -import 'package:polygonid_flutter_sdk/common/domain/entities/chain_config_entity.dart'; -import 'package:polygonid_flutter_sdk/common/domain/entities/did_method_entity.dart'; -import 'package:polygonid_flutter_sdk/common/domain/entities/env_entity.dart'; - -class ConfigParam { - final String ipfsNodeURL; - final Map chainConfigs; - final List didMethods; - - ConfigParam({ - required this.ipfsNodeURL, - this.chainConfigs = const {}, - this.didMethods = const [], - }); - - factory ConfigParam.fromEnv(EnvEntity env) { - return ConfigParam( - ipfsNodeURL: env.ipfsUrl, - chainConfigs: env.chainConfigs, - didMethods: env.didMethods, - ); - } - - Map toJson() => { - "IPFSNodeURL": ipfsNodeURL, - "chainConfigs": - chainConfigs.map((key, value) => MapEntry(key, value.toJson())), - "didMethods": didMethods.map((value) => value.toJson()).toList(), - }..removeWhere( - (dynamic key, dynamic value) => key == null || value == null); - - String toJsonString() => jsonEncode(toJson()); - - factory ConfigParam.fromJson(Map json) { - return ConfigParam( - ipfsNodeURL: json['IPFSNodeURL'], - chainConfigs: (json['chainConfigs'] as Map).map( - (key, value) => MapEntry(key, ChainConfigEntity.fromJson(value))), - didMethods: (json['didMethods'] as List) - .map((value) => DidMethodEntity.fromJson(value)) - .toList(), - ); - } -} diff --git a/lib/sdk/credential.dart b/lib/sdk/credential.dart index 58a76a09..6206b0c6 100644 --- a/lib/sdk/credential.dart +++ b/lib/sdk/credential.dart @@ -1,5 +1,6 @@ import 'package:injectable/injectable.dart'; import 'package:polygonid_flutter_sdk/common/domain/domain_constants.dart'; +import 'package:polygonid_flutter_sdk/common/domain/entities/env_config_entity.dart'; import 'package:polygonid_flutter_sdk/common/domain/entities/filter_entity.dart'; import 'package:polygonid_flutter_sdk/common/infrastructure/stacktrace_stream_manager.dart'; import 'package:polygonid_flutter_sdk/common/utils/credential_sort_order.dart'; @@ -14,7 +15,6 @@ import 'package:polygonid_flutter_sdk/credential/domain/use_cases/get_credential import 'package:polygonid_flutter_sdk/credential/domain/use_cases/refresh_credential_use_case.dart'; import 'package:polygonid_flutter_sdk/credential/domain/use_cases/remove_claims_use_case.dart'; import 'package:polygonid_flutter_sdk/credential/domain/use_cases/update_claim_use_case.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import '../credential/domain/use_cases/save_claims_use_case.dart'; @@ -138,12 +138,12 @@ abstract class PolygonIdSdkCredential { Future cacheCredential({ required ClaimEntity credential, - ConfigParam? configParam, + EnvConfigEntity? configParam, }); Future cacheCredentials({ required List credentials, - ConfigParam? configParam, + EnvConfigEntity? configParam, }); } @@ -361,7 +361,7 @@ class Credential implements PolygonIdSdkCredential { @override Future cacheCredential({ required ClaimEntity credential, - ConfigParam? configParam, + EnvConfigEntity? configParam, }) { return _cacheCredentialUseCase.execute( param: CacheCredentialParam( @@ -373,7 +373,7 @@ class Credential implements PolygonIdSdkCredential { @override Future cacheCredentials({ required List credentials, - ConfigParam? configParam, + EnvConfigEntity? configParam, }) { return _cacheCredentialsUseCase.execute( credentials: credentials, diff --git a/lib/sdk/polygonid_flutter_channel.dart b/lib/sdk/polygonid_flutter_channel.dart index d7573125..050eed5f 100644 --- a/lib/sdk/polygonid_flutter_channel.dart +++ b/lib/sdk/polygonid_flutter_channel.dart @@ -19,7 +19,6 @@ import 'package:polygonid_flutter_sdk/iden3comm/domain/entities/proof/response/i import 'package:polygonid_flutter_sdk/identity/domain/entities/did_entity.dart'; import 'package:polygonid_flutter_sdk/identity/domain/entities/identity_entity.dart'; import 'package:polygonid_flutter_sdk/identity/domain/entities/private_identity_entity.dart'; -import 'package:polygonid_flutter_sdk/proof/data/dtos/atomic_query_inputs_config_param.dart'; import 'package:polygonid_flutter_sdk/proof/data/dtos/circuits_to_download_param.dart'; import 'package:polygonid_flutter_sdk/proof/data/dtos/mtproof_dto.dart'; import 'package:polygonid_flutter_sdk/proof/domain/entities/circuit_data_entity.dart'; @@ -968,14 +967,14 @@ class PolygonIdFlutterChannel @override Future cacheCredential( - {required ClaimEntity credential, ConfigParam? configParam}) { + {required ClaimEntity credential, EnvConfigEntity? configParam}) { // TODO: implement cacheCredential throw UnimplementedError(); } @override Future cacheCredentials( - {required List credentials, ConfigParam? configParam}) { + {required List credentials, EnvConfigEntity? configParam}) { // TODO: implement cacheCredentials throw UnimplementedError(); }