diff --git a/edge-agent-sdk/src/androidInstrumentedTest/kotlin/org/hyperledger/identus/walletsdk/edgeagent/AnoncredsTests.kt b/edge-agent-sdk/src/androidInstrumentedTest/kotlin/org/hyperledger/identus/walletsdk/edgeagent/AnoncredsTests.kt index 837c7d2a2..b2c61a84d 100644 --- a/edge-agent-sdk/src/androidInstrumentedTest/kotlin/org/hyperledger/identus/walletsdk/edgeagent/AnoncredsTests.kt +++ b/edge-agent-sdk/src/androidInstrumentedTest/kotlin/org/hyperledger/identus/walletsdk/edgeagent/AnoncredsTests.kt @@ -40,7 +40,7 @@ import org.hyperledger.identus.walletsdk.edgeagent.protocols.issueCredential.Off import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.PresentationSubmission import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.RequestPresentation import org.hyperledger.identus.walletsdk.domain.models.KeyValue -import org.hyperledger.identus.walletsdk.logger.PrismLoggerMock +import org.hyperledger.identus.walletsdk.logger.LoggerMock import org.hyperledger.identus.walletsdk.mercury.ApiMock import org.hyperledger.identus.walletsdk.pollux.PolluxImpl import org.hyperledger.identus.walletsdk.pollux.models.AnonCredential @@ -114,7 +114,7 @@ class AnoncredsTests { connectionManager = connectionManager, seed = null, api = ApiMock(statusCode = HttpStatusCode.OK, response = "{\"success\":\"true\"}"), - logger = PrismLoggerMock() + logger = LoggerMock() ) val attachmentDescriptor = @@ -192,7 +192,7 @@ class AnoncredsTests { connectionManager = connectionManager, seed = null, api = ApiMock(HttpStatusCode.OK, "{\"success\":\"true\"}"), - logger = PrismLoggerMock() + logger = LoggerMock() ) val attachmentDescriptor = @@ -263,7 +263,7 @@ class AnoncredsTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) val credential = AnonCredential.fromStorableData( @@ -355,7 +355,7 @@ class AnoncredsTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) ) diff --git a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/apollo/ApolloImpl.kt b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/apollo/ApolloImpl.kt index 65dcbe168..11c67a738 100644 --- a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/apollo/ApolloImpl.kt +++ b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/apollo/ApolloImpl.kt @@ -40,11 +40,17 @@ import org.hyperledger.identus.walletsdk.domain.models.keyManagement.SeedKey import org.hyperledger.identus.walletsdk.domain.models.keyManagement.StorableKey import org.hyperledger.identus.walletsdk.domain.models.keyManagement.StorablePrivateKey import org.hyperledger.identus.walletsdk.domain.models.keyManagement.TypeKey +import org.hyperledger.identus.walletsdk.logger.LogComponent +import org.hyperledger.identus.walletsdk.logger.LogLevel +import org.hyperledger.identus.walletsdk.logger.Logger +import org.hyperledger.identus.walletsdk.logger.LoggerImpl /** * Apollo defines the set of cryptographic operations that are used in the Atala PRISM. */ -class ApolloImpl : Apollo { +class ApolloImpl( + val logger: Logger = LoggerImpl(LogComponent.APOLLO) +) : Apollo { /** * Creates a random set of mnemonic phrases that can be used as a seed for generating a private key. @@ -52,6 +58,7 @@ class ApolloImpl : Apollo { * @return An array of mnemonic phrases. */ override fun createRandomMnemonics(): Array { + LogComponent.APOLLO.logLevel = LogLevel.INFO return MnemonicHelper.createRandomMnemonics().toTypedArray() } diff --git a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/castor/CastorImpl.kt b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/castor/CastorImpl.kt index 254df2860..67a348b62 100644 --- a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/castor/CastorImpl.kt +++ b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/castor/CastorImpl.kt @@ -24,8 +24,8 @@ import org.hyperledger.identus.walletsdk.domain.models.keyManagement.PublicKey import org.hyperledger.identus.walletsdk.logger.LogComponent import org.hyperledger.identus.walletsdk.logger.LogLevel import org.hyperledger.identus.walletsdk.logger.Metadata -import org.hyperledger.identus.walletsdk.logger.PrismLogger -import org.hyperledger.identus.walletsdk.logger.PrismLoggerImpl +import org.hyperledger.identus.walletsdk.logger.Logger +import org.hyperledger.identus.walletsdk.logger.LoggerImpl /** * Castor is a powerful and flexible library for working with DIDs. Whether you are building a decentralised application @@ -36,7 +36,7 @@ class CastorImpl @JvmOverloads constructor( val apollo: Apollo, - private val logger: PrismLogger = PrismLoggerImpl(LogComponent.CASTOR) + private val logger: Logger = LoggerImpl(LogComponent.CASTOR) ) : Castor { var resolvers: Array = arrayOf( LongFormPrismDIDResolver(this.apollo), diff --git a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/castor/shared/CastorShared.kt b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/castor/shared/CastorShared.kt index 8cd2a21fd..bfc976a57 100644 --- a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/castor/shared/CastorShared.kt +++ b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/castor/shared/CastorShared.kt @@ -44,8 +44,8 @@ import org.hyperledger.identus.walletsdk.domain.models.keyManagement.KeyPair import org.hyperledger.identus.walletsdk.domain.models.keyManagement.PublicKey import org.hyperledger.identus.walletsdk.logger.LogComponent import org.hyperledger.identus.walletsdk.logger.LogLevel +import org.hyperledger.identus.walletsdk.logger.LoggerImpl import org.hyperledger.identus.walletsdk.logger.Metadata -import org.hyperledger.identus.walletsdk.logger.PrismLoggerImpl import org.kotlincrypto.hash.sha2.SHA256 import pbandk.decodeFromByteArray import pbandk.encodeToByteArray @@ -64,7 +64,7 @@ internal class CastorShared { * * @property logger The logger instance. */ - private val logger = PrismLoggerImpl(LogComponent.CASTOR) + private val logger = LoggerImpl(LogComponent.CASTOR) /** * parseDID parses a string representation of a Decentralized Identifier (DID) into a DID object. diff --git a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/edgeagent/EdgeAgent.kt b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/edgeagent/EdgeAgent.kt index 38f407de2..aa57cb30a 100644 --- a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/edgeagent/EdgeAgent.kt +++ b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/edgeagent/EdgeAgent.kt @@ -111,8 +111,8 @@ import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.RequestPresentation import org.hyperledger.identus.walletsdk.logger.LogComponent import org.hyperledger.identus.walletsdk.logger.Metadata -import org.hyperledger.identus.walletsdk.logger.PrismLogger -import org.hyperledger.identus.walletsdk.logger.PrismLoggerImpl +import org.hyperledger.identus.walletsdk.logger.Logger +import org.hyperledger.identus.walletsdk.logger.LoggerImpl import org.hyperledger.identus.walletsdk.pluto.PlutoBackupTask import org.hyperledger.identus.walletsdk.pluto.PlutoRestoreTask import org.hyperledger.identus.walletsdk.pluto.models.backup.BackupV0_0_1 @@ -157,7 +157,7 @@ open class EdgeAgent { private val edgeAgentScope: CoroutineScope = CoroutineScope(Dispatchers.Default) private val api: Api internal var connectionManager: ConnectionManager - private var logger: PrismLogger + private var logger: Logger private val agentOptions: AgentOptions /** @@ -185,7 +185,7 @@ open class EdgeAgent { connectionManager: ConnectionManager, seed: Seed?, api: Api?, - logger: PrismLogger = PrismLoggerImpl(LogComponent.PRISM_AGENT), + logger: Logger = LoggerImpl(LogComponent.EDGE_AGENT), agentOptions: AgentOptions = AgentOptions() ) { edgeAgentScope.launch { @@ -239,7 +239,7 @@ open class EdgeAgent { seed: Seed? = null, api: Api? = null, mediatorHandler: MediationHandler, - logger: PrismLogger = PrismLoggerImpl(LogComponent.PRISM_AGENT), + logger: Logger = LoggerImpl(LogComponent.EDGE_AGENT), agentOptions: AgentOptions = AgentOptions() ) { edgeAgentScope.launch { diff --git a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/logger/PrismLogger.kt b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/logger/Logger.kt similarity index 92% rename from edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/logger/PrismLogger.kt rename to edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/logger/Logger.kt index e62bf099a..9412cbd2e 100644 --- a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/logger/PrismLogger.kt +++ b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/logger/Logger.kt @@ -24,10 +24,10 @@ private const val METADATA_PRIVACY_STR = "------" private val hashingLog = UUID.randomUUID().toString() /** - * PrismLogger is an interface that defines methods for logging messages + * Logger is an interface that defines methods for logging messages * with different log levels and metadata. */ -interface PrismLogger { +interface Logger { /** * Logs a debug message with optional metadata. * @@ -66,22 +66,24 @@ interface PrismLogger { * @param error The error to be logged. * @param metadata An array of metadata objects to be included in the log message. Defaults to an empty array if not provided. * - * @see PrismLogger.error + * @see Logger.error * @see Metadata */ fun error(error: Error, metadata: Array = arrayOf()) } /** - * Implementation of the PrismLogger interface. + * Implementation of the Logger interface. * * @property category the LogComponent category for this logger */ -class PrismLoggerImpl(category: LogComponent) : PrismLogger { +class LoggerImpl(private val category: LogComponent) : + Logger { - private val log = logging("[io.prism.kmm.sdk.$category]") + private val log = logging( + "[${category::class.qualifiedName}.$category]" - private var logLevel: LogLevel = LogLevel.INFO + ) /** * Logs a debug message with optional metadata. @@ -90,7 +92,7 @@ class PrismLoggerImpl(category: LogComponent) : PrismLogger { * @param metadata An array of metadata objects associated with the message (optional). */ override fun debug(message: String, metadata: Array) { - if (logLevel != LogLevel.NONE) { + if (category.logLevel != LogLevel.NONE) { log.debug { message } if (metadata.isNotEmpty()) { log.debug { "Metadata: ${arrayToString(metadata)}" } @@ -105,7 +107,7 @@ class PrismLoggerImpl(category: LogComponent) : PrismLogger { * @param metadata An array of metadata objects to be associated with the information message. */ override fun info(message: String, metadata: Array) { - if (logLevel != LogLevel.NONE) { + if (category.logLevel != LogLevel.NONE) { log.info { message } if (metadata.isNotEmpty()) { log.info { "Metadata: ${arrayToString(metadata)}" } @@ -120,7 +122,7 @@ class PrismLoggerImpl(category: LogComponent) : PrismLogger { * @param metadata An array of metadata objects associated with the warning message. */ override fun warning(message: String, metadata: Array) { - if (logLevel != LogLevel.NONE) { + if (category.logLevel != LogLevel.NONE) { log.warn { message } if (metadata.isNotEmpty()) { log.warn { "Metadata: ${arrayToString(metadata)}" } @@ -135,7 +137,7 @@ class PrismLoggerImpl(category: LogComponent) : PrismLogger { * @param metadata An array of metadata objects to be associated with the error message (optional). */ override fun error(message: String, metadata: Array) { - if (logLevel != LogLevel.NONE) { + if (category.logLevel != LogLevel.NONE) { log.error { message } if (metadata.isNotEmpty()) { log.error { "Metadata: ${arrayToString(metadata)}" } @@ -150,7 +152,7 @@ class PrismLoggerImpl(category: LogComponent) : PrismLogger { * @param metadata An array of metadata objects associated with the error (optional). */ override fun error(error: Error, metadata: Array) { - if (logLevel != LogLevel.NONE) { + if (category.logLevel != LogLevel.NONE) { log.error { error.message } if (metadata.isNotEmpty()) { log.error { "Metadata: ${arrayToString(metadata)}" } @@ -165,7 +167,7 @@ class PrismLoggerImpl(category: LogComponent) : PrismLogger { * @return The converted String representation of the Metadata objects, with each object's value separated by a new line. */ private fun arrayToString(array: Array): String { - return array.joinToString { "${it.getValue(logLevel)}\n" } + return array.joinToString { "${it.getValue(category.logLevel)}\n" } } } @@ -333,13 +335,13 @@ enum class LogLevel(val value: Int) { * - MERCURY * - PLUTO * - POLLUX - * - PRISM_AGENT + * - EDGE_AGENT */ -enum class LogComponent { - APOLLO, - CASTOR, - MERCURY, - PLUTO, - POLLUX, - PRISM_AGENT +enum class LogComponent(var logLevel: LogLevel) { + APOLLO(LogLevel.DEBUG), + CASTOR(LogLevel.DEBUG), + MERCURY(LogLevel.DEBUG), + PLUTO(LogLevel.DEBUG), + POLLUX(LogLevel.DEBUG), + EDGE_AGENT(LogLevel.DEBUG) } diff --git a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/mercury/MercuryImpl.kt b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/mercury/MercuryImpl.kt index ae7d49ff1..d6a1c74a7 100644 --- a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/mercury/MercuryImpl.kt +++ b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/mercury/MercuryImpl.kt @@ -15,9 +15,9 @@ import org.hyperledger.identus.walletsdk.domain.models.MercuryError import org.hyperledger.identus.walletsdk.domain.models.Message import org.hyperledger.identus.walletsdk.logger.LogComponent import org.hyperledger.identus.walletsdk.logger.LogLevel +import org.hyperledger.identus.walletsdk.logger.Logger +import org.hyperledger.identus.walletsdk.logger.LoggerImpl import org.hyperledger.identus.walletsdk.logger.Metadata -import org.hyperledger.identus.walletsdk.logger.PrismLogger -import org.hyperledger.identus.walletsdk.logger.PrismLoggerImpl import org.hyperledger.identus.walletsdk.mercury.forward.ForwardMessage /** @@ -55,7 +55,7 @@ constructor( private val castor: Castor, private val protocol: DIDCommProtocol, private val api: Api, - private val logger: PrismLogger = PrismLoggerImpl(LogComponent.MERCURY) + private val logger: Logger = LoggerImpl(LogComponent.MERCURY) ) : Mercury { /** diff --git a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/mercury/resolvers/DIDCommWrapper.kt b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/mercury/resolvers/DIDCommWrapper.kt index af8dc6190..c0d5566ad 100644 --- a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/mercury/resolvers/DIDCommWrapper.kt +++ b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/mercury/resolvers/DIDCommWrapper.kt @@ -35,8 +35,8 @@ import org.hyperledger.identus.walletsdk.domain.models.MercuryError import org.hyperledger.identus.walletsdk.domain.models.Message import org.hyperledger.identus.walletsdk.logger.LogComponent import org.hyperledger.identus.walletsdk.logger.LogLevel +import org.hyperledger.identus.walletsdk.logger.LoggerImpl import org.hyperledger.identus.walletsdk.logger.Metadata -import org.hyperledger.identus.walletsdk.logger.PrismLoggerImpl import org.hyperledger.identus.walletsdk.mercury.ATTACHMENT_SEPARATOR import org.hyperledger.identus.walletsdk.mercury.BASE64 import org.hyperledger.identus.walletsdk.mercury.DIDCommProtocol @@ -44,7 +44,6 @@ import org.hyperledger.identus.walletsdk.mercury.HASH import org.hyperledger.identus.walletsdk.mercury.JSON import org.hyperledger.identus.walletsdk.mercury.LINKS import java.time.Instant.now -import kotlin.jvm.Throws /** * Wrapper class for the DIDComm functionality. @@ -57,7 +56,7 @@ class DIDCommWrapper(castor: Castor, pluto: Pluto, apollo: Apollo) : DIDCommProt private val didDocResolver = DIDCommDIDResolver(castor) private val secretsResolver = DIDCommSecretsResolver(pluto, apollo) private val didComm = DIDComm(didDocResolver, secretsResolver) - private val logger = PrismLoggerImpl(LogComponent.MERCURY) + private val logger = LoggerImpl(LogComponent.MERCURY) /** * Converts a JSON element to a map. diff --git a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/pluto/PlutoImpl.kt b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/pluto/PlutoImpl.kt index 986b40b64..b20485109 100644 --- a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/pluto/PlutoImpl.kt +++ b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/pluto/PlutoImpl.kt @@ -35,6 +35,9 @@ import org.hyperledger.identus.walletsdk.domain.models.keyManagement.JWK import org.hyperledger.identus.walletsdk.domain.models.keyManagement.PrivateKey import org.hyperledger.identus.walletsdk.domain.models.keyManagement.StorableKey import org.hyperledger.identus.walletsdk.domain.models.keyManagement.StorablePrivateKey +import org.hyperledger.identus.walletsdk.logger.Logger +import org.hyperledger.identus.walletsdk.logger.LoggerImpl +import org.hyperledger.identus.walletsdk.logger.LogComponent import org.hyperledger.identus.walletsdk.pluto.models.backup.BackupV0_0_1 import org.hyperledger.identus.walletsdk.pluto.data.DbConnection import org.hyperledger.identus.walletsdk.pluto.data.isConnected @@ -55,7 +58,10 @@ import org.hyperledger.identus.walletsdk.pluto.data.StorableCredential as Storab * @property db The instance of `SdkPlutoDb` representing the connection to the database. * @property isConnected A flag to indicate whether the database connection is established or not. */ -class PlutoImpl(private val connection: DbConnection) : Pluto { +class PlutoImpl( + private val connection: DbConnection, + private val logger: Logger = LoggerImpl(LogComponent.PLUTO) +) : Pluto { private var db: SdkPlutoDb? = null init { diff --git a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/pollux/PolluxImpl.kt b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/pollux/PolluxImpl.kt index a16b32d49..3f1c96a18 100644 --- a/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/pollux/PolluxImpl.kt +++ b/edge-agent-sdk/src/commonMain/kotlin/org/hyperledger/identus/walletsdk/pollux/PolluxImpl.kt @@ -95,6 +95,9 @@ import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.PresentationSubmissionOptions import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.PresentationSubmissionOptionsAnoncreds import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.PresentationSubmissionOptionsJWT +import org.hyperledger.identus.walletsdk.logger.Logger +import org.hyperledger.identus.walletsdk.logger.LoggerImpl +import org.hyperledger.identus.walletsdk.logger.LogComponent import org.hyperledger.identus.walletsdk.pluto.RestorationID import org.hyperledger.identus.walletsdk.pollux.models.AnonCredential import org.hyperledger.identus.walletsdk.pollux.models.AnoncredsPresentationDefinitionRequest @@ -117,7 +120,8 @@ import org.hyperledger.identus.walletsdk.pollux.utils.BitString open class PolluxImpl( val apollo: Apollo, val castor: Castor, - private val api: Api = ApiImpl(httpClient()) + private val api: Api = ApiImpl(httpClient()), + private val logger: Logger = LoggerImpl(LogComponent.POLLUX) ) : Pollux { /** diff --git a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/edgeagent/EdgeAgentTests.kt b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/edgeagent/EdgeAgentTests.kt index efcab27ed..a11936bd4 100644 --- a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/edgeagent/EdgeAgentTests.kt +++ b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/edgeagent/EdgeAgentTests.kt @@ -72,7 +72,7 @@ import org.hyperledger.identus.walletsdk.edgeagent.protocols.issueCredential.Off import org.hyperledger.identus.walletsdk.edgeagent.protocols.outOfBand.OutOfBandInvitation import org.hyperledger.identus.walletsdk.edgeagent.protocols.outOfBand.PrismOnboardingInvitation import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.RequestPresentation -import org.hyperledger.identus.walletsdk.logger.PrismLoggerMock +import org.hyperledger.identus.walletsdk.logger.LoggerMock import org.hyperledger.identus.walletsdk.mercury.ApiMock import org.hyperledger.identus.walletsdk.pluto.CredentialRecovery import org.hyperledger.identus.walletsdk.pluto.PlutoBackupTask @@ -188,7 +188,7 @@ class EdgeAgentTests { connectionManager = connectionManager, seed = null, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) ) @@ -230,7 +230,7 @@ class EdgeAgentTests { connectionManager = connectionManager, seed = null, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) ) @@ -264,7 +264,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) ) @@ -284,7 +284,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = null, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) ) @@ -306,7 +306,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = null, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) ) @@ -329,7 +329,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = null, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) ) @@ -354,7 +354,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = seed, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) plutoMockOld.getPrismLastKeyPathIndexReturn = flow { emit(0) } @@ -377,7 +377,7 @@ class EdgeAgentTests { connectionManagerMock, seed, null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) ) @@ -393,7 +393,7 @@ class EdgeAgentTests { @Test fun testCreateNewPeerDID_whenUpdateMediatorFalse_thenShouldUseProvidedServices() = runTest { val apollo = ApolloImpl() - val castor = CastorImpl(apollo = apollo, logger = PrismLoggerMock()) + val castor = CastorImpl(apollo = apollo, logger = LoggerMock()) val agent = EdgeAgent( apollo, castor, @@ -403,7 +403,7 @@ class EdgeAgentTests { connectionManagerOld, null, null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) @@ -439,7 +439,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = ApiMock(HttpStatusCode.OK, "{\"success\":\"true\"}"), - logger = PrismLoggerMock() + logger = LoggerMock() ) val invitationString = """ { @@ -466,7 +466,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = api, - logger = PrismLoggerMock() + logger = LoggerMock() ) val invitationString = """ { @@ -493,7 +493,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = ApiMock(HttpStatusCode.OK, "{\"success\":\"true\"}"), - logger = PrismLoggerMock() + logger = LoggerMock() ) val invitationString = """ { @@ -519,7 +519,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = null, - logger = PrismLoggerMock() + logger = LoggerMock() ) plutoMockOld.getDIDPrivateKeysReturn = flow { emit(listOf(null)) } @@ -545,7 +545,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) @@ -588,7 +588,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) @@ -630,7 +630,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) @@ -671,7 +671,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) @@ -718,7 +718,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = null, - logger = PrismLoggerMock() + logger = LoggerMock() ) val invitationString = """ @@ -748,7 +748,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) assertEquals(EdgeAgent.State.STOPPED, agent.state) @@ -767,7 +767,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) agent.stop() @@ -787,7 +787,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = null, - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) val x = agent.parseInvitation(oob) @@ -849,7 +849,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = seed, api = ApiMock(HttpStatusCode.OK, "{\"success\":\"true\"}"), - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) @@ -891,7 +891,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = seed, api = ApiMock(HttpStatusCode.OK, "{\"success\":\"true\"}"), - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) @@ -919,7 +919,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = seed, api = ApiMock(HttpStatusCode.OK, "{\"success\":\"true\"}"), - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) @@ -965,7 +965,7 @@ class EdgeAgentTests { connectionManager = connectionManagerOld, seed = null, api = ApiMock(HttpStatusCode.OK, "{\"success\":\"true\"}"), - logger = PrismLoggerMock(), + logger = LoggerMock(), agentOptions = AgentOptions() ) @@ -1039,7 +1039,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) val vmAuthentication = DIDDocument.VerificationMethod( @@ -1137,7 +1137,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) val vmAuthentication = DIDDocument.VerificationMethod( @@ -1255,7 +1255,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) val msg = Json.decodeFromString( "{\"id\":\"00000000-685c-4004-0000-000036ac64ee\",\"piuri\":\"https://didcomm.atalaprism.io/present-proof/3.0/request-presentation\",\"from\":{\"method\":\"peer\",\"methodId\":\"asdfasdf\"},\"to\":{\"method\":\"peer\",\"methodId\":\"fdsafdsa\"},\"fromPrior\":null,\"body\":\"{}\",\"createdTime\":\"2024-03-08T19:27:38.196506Z\",\"expiresTimePlus\":\"2024-03-09T19:27:38.196559Z\",\"attachments\":[{\"id\":\"00000000-9c2e-4249-0000-0000c1176949\",\"mediaType\":\"application/json\",\"data\":{\"type\":\"org.hyperledger.identus.walletsdk.domain.models.AttachmentBase64\",\"base64\":\"eyJwcmVzZW50YXRpb25fZGVmaW5pdGlvbiI6eyJpZCI6IjMyZjU0MTYzLTcxNjYtNDhmMS05M2Q4LWZmMjE3YmRiMDY1MyIsImlucHV0X2Rlc2NyaXB0b3JzIjpbeyJpZCI6IndhX2RyaXZlcl9saWNlbnNlIiwibmFtZSI6Ildhc2hpbmd0b24gU3RhdGUgQnVzaW5lc3MgTGljZW5zZSIsInB1cnBvc2UiOiJXZSBjYW4gb25seSBhbGxvdyBsaWNlbnNlZCBXYXNoaW5ndG9uIFN0YXRlIGJ1c2luZXNzIHJlcHJlc2VudGF0aXZlcyBpbnRvIHRoZSBXQSBCdXNpbmVzcyBDb25mZXJlbmNlIiwiY29uc3RyYWludHMiOnsiZmllbGRzIjpbeyJwYXRoIjpbIiQuY3JlZGVudGlhbFN1YmplY3QuZGF0ZU9mQmlydGgiLCIkLmNyZWRlbnRpYWxTdWJqZWN0LmRvYiIsIiQudmMuY3JlZGVudGlhbFN1YmplY3QuZGF0ZU9mQmlydGgiLCIkLnZjLmNyZWRlbnRpYWxTdWJqZWN0LmRvYiJdfV19fV0sImZvcm1hdCI6eyJqd3QiOnsiYWxnIjpbIkVTMjU2SyJdfX19LCAib3B0aW9ucyI6IHsiZG9tYWluIjogImRvbWFpbiIsICJjaGFsbGVuZ2UiOiAiY2hhbGxlbmdlIn19\"},\"format\":\"dif/presentation-exchange/fail_test@v1.0\"}],\"thid\":\"00000000-ef9d-4722-0000-00003b1bc908\",\"ack\":[]}" @@ -1295,7 +1295,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) val msg = Json.decodeFromString( "{\"id\":\"00000000-685c-4004-0000-000036ac64ee\",\"piuri\":\"https://didcomm.atalaprism.io/present-proof/3.0/presentation\",\"from\":{\"method\":\"peer\",\"methodId\":\"asdfasdf\"},\"to\":{\"method\":\"peer\",\"methodId\":\"fdsafdsa\"},\"fromPrior\":null,\"body\":\"{}\",\"createdTime\":\"2024-03-08T19:27:38.196506Z\",\"expiresTimePlus\":\"2024-03-09T19:27:38.196559Z\",\"attachments\":[{\"id\":\"00000000-9c2e-4249-0000-0000c1176949\",\"mediaType\":\"application/json\",\"data\":{\"type\":\"org.hyperledger.identus.walletsdk.domain.models.AttachmentBase64\",\"base64\":\"eyJ2ZXJpZmlhYmxlUHJlc2VudGF0aW9uIjpbImV5SmhiR2NpT2lKRlV6STFOa3NpZlEuZXlKcGMzTWlPaUprYVdRNmNISnBjMjA2TWpVM01UbGhPVFppTVRVeE1qQTNNVFk1T0RGaE9EUXpNR0ZrTUdOaU9UWTRaR1ExTXpRd056TTFPVE5qT0dOa00yWXhaREkzWVRZNE1EUmxZelV3WlRwRGNHOURRM0JqUTBWc2IwdENWM1JzWlZNd2VFVkJTa05VZDI5S1l6SldhbU5FU1RGT2JYTjRSV2xCUlc5VFEyNDFkSGxFWVRaWk5uSXRTVzFUY1hCS09Ga3hiV28zU2tNelgyOVZla1V3VG5sNVJXbERRbTluYzJkT1lXVlNaR05EVWtkUWJHVTRNbFoyT1hSS1prNTNiRFp5WnpaV1kyaFNNMDl4YUdsV1lsUmhPRk5YZDI5SFdWaFdNR0ZETUhoRlFWSkRWSGR2U21NeVZtcGpSRWt4VG0xemVFVnBSRTFyUW1RMlJuUnBiMHByTTFoUFJuVXRYMk41TlZodFVpMDBkRlZSTWs1TVIybFhPR0ZKVTI5dGExSnZaelpUWkdVNVVIZHVSekJSTUZOQ1ZHMUdVMVJFWWxOTFFuWkpWalpEVkV4WWNtcEpTblIwWlVkSmJVRlRXRUZ2U0dKWFJucGtSMVo1VFVKQlFsRnJPRXREV0U1c1dUTkJlVTVVV25KTlVrbG5UemN4TUcxME1WZGZhWGhFZVZGTk0zaEpjemRVY0dwTVEwNVBSRkY0WjFab2VEVnphR1pMVGxneGIyRkpTRmRRY25jM1NWVkxiR1pwWWxGMGVEWkthelJVVTJwblkxZE9UMlpqVDNSVk9VUTVVSFZhTjFRNWRDSXNJbk4xWWlJNkltUnBaRHB3Y21semJUcGlaV1ZoTlRJek5HRm1ORFk0TURRM01UUmtPR1ZoT0dWak56ZGlOalpqWXpkbU0yVTRNVFZqTmpoaFltSTBOelZtTWpVMFkyWTVZek13TmpJMk56WXpPa056WTBKRGMxRkNSVzFSUzBReVJqRmtSMmhzWW01U2NGa3lSakJoVnpsMVRVSkJSVkZyT0V0RFdFNXNXVE5CZVU1VVduSk5Va2xuWlZObkxUSlBUekZLWkc1d2VsVlBRbWwwZWtscFkxaGtabnBsUVdOVVpsZEJUaTFaUTJWMVEySjVTV0ZKU2xFMFIxUkpNekIwWVZacGQyTm9WRE5sTUc1TVdFSlRORE5DTkdvNWFteHpiRXR2TWxwc1pGaDZha1ZzZDB0Q01qRm9Zek5TYkdOcVFWRkJWVXBRUTJkc2VscFhUbmROYWxVeVlYcEZVMGxJYTI5UWRHcHFkRk5ZV2paak1VUm5XWEpqZVVsdVJqTllPRE5uU0VVek1XZEVabTFCYm5KbmJUaHBSMmxEVlU5Q2EzbE9PVXhYYkZselNFbFZPVE4wU25reGQxVjFUbmRsU1Y5Wk5XSktVM0ZPYlZwWVZqZzBkeUlzSW01aVppSTZNVFk0TlRZek1UazVOU3dpWlhod0lqb3hOamcxTmpNMU5UazFMQ0oyWXlJNmV5SmpjbVZrWlc1MGFXRnNVM1ZpYW1WamRDSTZleUpoWkdScGRHbHZibUZzVUhKdmNESWlPaUpVWlhOME15SXNJbWxrSWpvaVpHbGtPbkJ5YVhOdE9tSmxaV0UxTWpNMFlXWTBOamd3TkRjeE5HUTRaV0U0WldNM04ySTJObU5qTjJZelpUZ3hOV00yT0dGaVlqUTNOV1l5TlRSalpqbGpNekEyTWpZM05qTTZRM05qUWtOelVVSkZiVkZMUkRKR01XUkhhR3hpYmxKd1dUSkdNR0ZYT1hWTlFrRkZVV3M0UzBOWVRteFpNMEY1VGxSYWNrMVNTV2RsVTJjdE1rOVBNVXBrYm5CNlZVOUNhWFI2U1dsaldHUm1lbVZCWTFSbVYwRk9MVmxEWlhWRFlubEpZVWxLVVRSSFZFa3pNSFJoVm1sM1kyaFVNMlV3Ymt4WVFsTTBNMEkwYWpscWJITnNTMjh5V214a1dIcHFSV3gzUzBJeU1XaGpNMUpzWTJwQlVVRlZTbEJEWjJ4NldsZE9kMDFxVlRKaGVrVlRTVWhyYjFCMGFtcDBVMWhhTm1NeFJHZFpjbU41U1c1R00xZzRNMmRJUlRNeFowUm1iVUZ1Y21kdE9HbEhhVU5WVDBKcmVVNDVURmRzV1hOSVNWVTVNM1JLZVRGM1ZYVk9kMlZKWDFrMVlrcFRjVTV0V2xoV09EUjNJbjBzSW5SNWNHVWlPbHNpVm1WeWFXWnBZV0pzWlVOeVpXUmxiblJwWVd3aVhTd2lRR052Ym5SbGVIUWlPbHNpYUhSMGNITTZYQzljTDNkM2R5NTNNeTV2Y21kY0x6SXdNVGhjTDJOeVpXUmxiblJwWVd4elhDOTJNU0pkZlgwLngwU0YxN1kwVkNEbXQ3SGNlT2RUeGZIbG9mc1ptWTE4Um42VlFiMC1yLWtfQm0zaFRpMS1rMnZrZGpCMjVoZHh5VEN2eGFtLUFrQVAtQWczQWhuNU5nIl19\"},\"format\":\"dif/presentation-exchange/definitions@v1.0\"}],\"thid\":\"00000000-ef9d-4722-0000-00003b1bc908\",\"ack\":[]}" @@ -1367,7 +1367,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) val msg = Json.decodeFromString( """{"id":"00000000-685c-4004-0000-000036ac64ee","piuri":"https://didcomm.atalaprism.io/present-proof/3.0/request-presentation","from":{"method":"peer","methodId":"asdfasdf"},"to":{"method":"peer","methodId":"fdsafdsa"},"fromPrior":null,"body":"{}","createdTime":"2024-03-08T19:27:38.196506Z","expiresTimePlus":"2024-03-09T19:27:38.196559Z","attachments":[{"id":"00000000-9c2e-4249-0000-0000c1176949","mediaType":"application/json","data":{"type":"org.hyperledger.identus.walletsdk.domain.models.AttachmentBase64","base64":"eyJwcmVzZW50YXRpb25fZGVmaW5pdGlvbiI6eyJpZCI6IjMyZjU0MTYzLTcxNjYtNDhmMS05M2Q4LWZmMjE3YmRiMDY1MyIsImlucHV0X2Rlc2NyaXB0b3JzIjpbeyJpZCI6IndhX2RyaXZlcl9saWNlbnNlIiwibmFtZSI6Ildhc2hpbmd0b24gU3RhdGUgQnVzaW5lc3MgTGljZW5zZSIsInB1cnBvc2UiOiJXZSBjYW4gb25seSBhbGxvdyBsaWNlbnNlZCBXYXNoaW5ndG9uIFN0YXRlIGJ1c2luZXNzIHJlcHJlc2VudGF0aXZlcyBpbnRvIHRoZSBXQSBCdXNpbmVzcyBDb25mZXJlbmNlIiwiY29uc3RyYWludHMiOnsiZmllbGRzIjpbeyJwYXRoIjpbIiQuY3JlZGVudGlhbFN1YmplY3QuZGF0ZU9mQmlydGgiLCIkLmNyZWRlbnRpYWxTdWJqZWN0LmRvYiIsIiQudmMuY3JlZGVudGlhbFN1YmplY3QuZGF0ZU9mQmlydGgiLCIkLnZjLmNyZWRlbnRpYWxTdWJqZWN0LmRvYiJdfV19fV0sImZvcm1hdCI6eyJqd3QiOnsiYWxnIjpbIkVTMjU2SyJdfX19LCAib3B0aW9ucyI6IHsiZG9tYWluIjogImRvbWFpbiIsICJjaGFsbGVuZ2UiOiAiY2hhbGxlbmdlIn19"},"format":"dif/presentation-exchange/definitions@v1.0"}],"thid":"00000000-ef9d-4722-0000-00003b1bc908","ack":[]}""" @@ -1421,7 +1421,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) val credential = JWTCredential.fromJwtString( @@ -1530,7 +1530,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) val msgString = @@ -1653,7 +1653,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = apiMock, - logger = PrismLoggerMock() + logger = LoggerMock() ) val msgString = @@ -1674,7 +1674,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = null, - logger = PrismLoggerMock() + logger = LoggerMock() ) `when`( apolloMock.createPrivateKey( @@ -1868,7 +1868,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = null, - logger = PrismLoggerMock() + logger = LoggerMock() ) ) @@ -1896,7 +1896,7 @@ class EdgeAgentTests { connectionManager = connectionManagerMock, seed = seed, api = null, - logger = PrismLoggerMock() + logger = LoggerMock() ) ) diff --git a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/logger/PrismLoggerMock.kt b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/logger/LoggerMock.kt similarity index 97% rename from edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/logger/PrismLoggerMock.kt rename to edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/logger/LoggerMock.kt index cad70ab24..5a6eaa2cd 100644 --- a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/logger/PrismLoggerMock.kt +++ b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/logger/LoggerMock.kt @@ -1,6 +1,6 @@ package org.hyperledger.identus.walletsdk.logger -class PrismLoggerMock : PrismLogger { +class LoggerMock : Logger { private var logLevel: LogLevel = LogLevel.NONE diff --git a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/mercury/MercuryTests.kt b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/mercury/MercuryTests.kt index 5d8f5e535..eb42ae62a 100644 --- a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/mercury/MercuryTests.kt +++ b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/mercury/MercuryTests.kt @@ -6,7 +6,7 @@ import org.hyperledger.identus.walletsdk.domain.models.DID import org.hyperledger.identus.walletsdk.domain.models.DIDDocument import org.hyperledger.identus.walletsdk.domain.models.MercuryError import org.hyperledger.identus.walletsdk.domain.models.Message -import org.hyperledger.identus.walletsdk.logger.PrismLoggerMock +import org.hyperledger.identus.walletsdk.logger.LoggerMock import kotlin.test.BeforeTest import kotlin.test.Test import kotlin.test.assertFailsWith @@ -24,7 +24,7 @@ class MercuryTests { apiMock = ApiMock(HttpStatusCode.OK, "") castorMock = CastorMock() protocolMock = ProtocolMock() - sut = MercuryImpl(castorMock, protocolMock, apiMock, PrismLoggerMock()) + sut = MercuryImpl(castorMock, protocolMock, apiMock, LoggerMock()) } @Test diff --git a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/pluto/BackupRestorationTests.kt b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/pluto/BackupRestorationTests.kt index d0be7d4b7..ad678b453 100644 --- a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/pluto/BackupRestorationTests.kt +++ b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/pluto/BackupRestorationTests.kt @@ -32,7 +32,7 @@ import org.hyperledger.identus.walletsdk.domain.models.keyManagement.TypeKey import org.hyperledger.identus.walletsdk.edgeagent.EdgeAgent import org.hyperledger.identus.walletsdk.edgeagent.MediationHandlerMock import org.hyperledger.identus.walletsdk.edgeagent.MercuryMock -import org.hyperledger.identus.walletsdk.logger.PrismLoggerMock +import org.hyperledger.identus.walletsdk.logger.LoggerMock import org.hyperledger.identus.walletsdk.pluto.models.backup.BackupV0_0_1 import org.hyperledger.identus.walletsdk.pollux.PolluxImpl import org.hyperledger.identus.walletsdk.pollux.models.JWTCredential @@ -578,7 +578,8 @@ class BackupRestorationTests { @Test fun restoreFromTS_Swift() = runTest { val realPluto = PlutoImpl(DbConnectionInMemory()) - val logger = PrismLoggerMock() + val logger = LoggerMock() + val realCastor = CastorImpl(apollo, logger) edgeAgent = EdgeAgent( diff --git a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/pollux/PolluxImplTest.kt b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/pollux/PolluxImplTest.kt index b0e720c4a..037aec172 100644 --- a/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/pollux/PolluxImplTest.kt +++ b/edge-agent-sdk/src/commonTest/kotlin/org/hyperledger/identus/walletsdk/pollux/PolluxImplTest.kt @@ -53,7 +53,7 @@ import org.hyperledger.identus.walletsdk.domain.models.keyManagement.PrivateKey import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.AnoncredsPresentationOptions import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.JWTPresentationOptions import org.hyperledger.identus.walletsdk.edgeagent.protocols.proofOfPresentation.PresentationSubmissionOptionsJWT -import org.hyperledger.identus.walletsdk.logger.PrismLogger +import org.hyperledger.identus.walletsdk.logger.Logger import org.hyperledger.identus.walletsdk.pollux.models.AnonCredential import org.hyperledger.identus.walletsdk.pollux.models.AnoncredsPresentationDefinitionRequest import org.hyperledger.identus.walletsdk.pollux.models.JWTCredential @@ -84,7 +84,7 @@ class PolluxImplTest { lateinit var castorMock: Castor @Mock - lateinit var loggerMock: PrismLogger + lateinit var loggerMock: Logger @Before fun setup() { @@ -333,7 +333,7 @@ class PolluxImplTest { @Test fun testCreatePresentationSubmission_whenAllCorrect_thenPresentationSubmissionProofWellFormed() = runTest { - val loggerMock = mock() + val loggerMock = mock() val castor: Castor = CastorImpl(apollo = ApolloImpl(), loggerMock) val issuerKeyPair = diff --git a/sampleapp/src/main/java/org/hyperledger/identus/walletsdk/sampleapp/Sdk.kt b/sampleapp/src/main/java/org/hyperledger/identus/walletsdk/sampleapp/Sdk.kt index 4d76e439e..76f38f7a5 100644 --- a/sampleapp/src/main/java/org/hyperledger/identus/walletsdk/sampleapp/Sdk.kt +++ b/sampleapp/src/main/java/org/hyperledger/identus/walletsdk/sampleapp/Sdk.kt @@ -178,7 +178,7 @@ class Sdk { mercury = mercury, pollux = pollux, seed = seed, - mediatorHandler = handler + mediatorHandler = handler, ) }