Skip to content

Commit

Permalink
Rename 'shared' package
Browse files Browse the repository at this point in the history
Signed-off-by: FabioPinheiro <fabiomgpinheiro@gmail.com>
  • Loading branch information
FabioPinheiro committed Apr 24, 2024
1 parent 65d345d commit 0ba5306
Show file tree
Hide file tree
Showing 237 changed files with 436 additions and 723 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import io.iohk.atala.prism.protos.common_models.OperationStatus
import io.iohk.atala.prism.protos.node_models.KeyUsage
import io.iohk.atala.prism.protos.node_models.PublicKey.KeyData
import io.iohk.atala.prism.protos.{common_models, node_api, node_models}
import io.iohk.atala.shared.models.Base64UrlString
import io.iohk.atala.shared.utils.Traverse.*
import org.hyperledger.identus.shared.models.Base64UrlString
import org.hyperledger.identus.shared.utils.Traverse.*
import java.time.Instant
import scala.language.implicitConversions
import zio.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import io.iohk.atala.castor.core.model.ProtoModelHelper
import io.iohk.atala.prism.crypto.{Sha256, Sha256Digest}
import io.iohk.atala.prism.protos.node_models
import io.iohk.atala.prism.protos.node_models.AtalaOperation.Operation
import io.iohk.atala.shared.models.Base64UrlString
import io.iohk.atala.shared.models.HexString
import org.hyperledger.identus.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.HexString
import scala.util.Try
import scala.util.matching.Regex

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.iohk.atala.castor.core.model.did

import io.iohk.atala.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.Base64UrlString

final case class PublicKey(
id: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package io.iohk.atala.castor.core.model.did.w3c
import io.circe.Json
import io.iohk.atala.castor.core.model.did.*
import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint
import io.iohk.atala.shared.crypto.Apollo
import io.iohk.atala.shared.models.Base64UrlString
import io.iohk.atala.shared.models.HexString
import org.hyperledger.identus.shared.crypto.Apollo
import org.hyperledger.identus.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.HexString

import java.time.Instant
import java.time.ZoneOffset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import io.iohk.atala.castor.core.util.DIDOperationValidator
import io.iohk.atala.prism.protos.node_api.NodeServiceGrpc.NodeService
import io.iohk.atala.prism.protos.node_models.OperationOutput.OperationMaybe
import io.iohk.atala.prism.protos.{node_api, node_models}
import io.iohk.atala.shared.models.HexString
import org.hyperledger.identus.shared.models.HexString
import java.time.Instant
import scala.collection.immutable.ArraySeq
import zio.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package io.iohk.atala.castor.core.service

import io.iohk.atala.castor.core.model.did.*
import io.iohk.atala.castor.core.model.error
import io.iohk.atala.shared.crypto.Apollo
import io.iohk.atala.shared.crypto.Secp256k1KeyPair
import io.iohk.atala.shared.models.Base64UrlString
import org.hyperledger.identus.shared.crypto.Apollo
import org.hyperledger.identus.shared.crypto.Secp256k1KeyPair
import org.hyperledger.identus.shared.models.Base64UrlString
import zio.mock.{Expectation, Mock, Proxy}
import zio.test.Assertion
import zio.{IO, URLayer, ZIO, ZLayer, mock}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import io.iohk.atala.castor.core.model.did.*
import io.iohk.atala.castor.core.model.error.OperationValidationError
import io.iohk.atala.castor.core.util.DIDOperationValidator.Config
import io.iohk.atala.castor.core.util.Prelude.*
import io.iohk.atala.shared.crypto.Apollo
import org.hyperledger.identus.shared.crypto.Apollo
import zio.*

import scala.collection.immutable.ArraySeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package io.iohk.atala.castor.core.model.did
import com.google.protobuf.ByteString
import io.iohk.atala.prism.crypto.{Sha256, Sha256Digest}
import io.iohk.atala.prism.protos.node_models
import io.iohk.atala.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.Base64UrlString
import zio.*
import zio.test.*
import zio.test.Assertion.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package io.iohk.atala.castor.core.util
import io.iohk.atala.castor.core.model.did.*
import io.iohk.atala.castor.core.model.error.OperationValidationError
import io.iohk.atala.castor.core.util.DIDOperationValidator.Config
import io.iohk.atala.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.Base64UrlString
import zio.*
import zio.test.*
import zio.test.Assertion.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import io.circe.Json
import io.iohk.atala.castor.core.model.did.*
import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint
import io.iohk.atala.castor.core.model.did.ServiceEndpoint.UriValue
import io.iohk.atala.shared.crypto.Apollo
import io.iohk.atala.shared.models.Base64UrlString
import org.hyperledger.identus.shared.crypto.Apollo
import org.hyperledger.identus.shared.models.Base64UrlString
import zio.*
import zio.test.Gen

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.hyperledger.identus.connect.core.model.error

import org.hyperledger.identus.connect.core.model.ConnectionRecord.ProtocolState
import io.iohk.atala.shared.models.{Failure, StatusCode}
import org.hyperledger.identus.shared.models.{Failure, StatusCode}
import zio.NonEmptyChunk

import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.hyperledger.identus.connect.core.repository
import org.hyperledger.identus.connect.core.model.ConnectionRecord
import org.hyperledger.identus.connect.core.model.ConnectionRecord.ProtocolState
import org.hyperledger.identus.mercury.protocol.connection.*
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.UIO
import zio.URIO

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import org.hyperledger.identus.connect.core.model.ConnectionRecord
import org.hyperledger.identus.connect.core.model.ConnectionRecord.ProtocolState
import org.hyperledger.identus.mercury.protocol.connection.ConnectionRequest
import org.hyperledger.identus.mercury.protocol.connection.ConnectionResponse
import io.iohk.atala.shared.models.WalletAccessContext
import io.iohk.atala.shared.models.WalletId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletId
import zio.*

import java.time.Instant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError
import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.*
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse}
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.*

import java.time.Duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import org.hyperledger.identus.*
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.mercury.protocol.connection.*
import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation
import io.iohk.atala.shared.models.WalletAccessContext
import io.iohk.atala.shared.utils.Base64Utils
import io.iohk.atala.shared.utils.aspects.CustomMetricsAspect
import io.iohk.atala.shared.validation.ValidationUtils
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.utils.Base64Utils
import org.hyperledger.identus.shared.utils.aspects.CustomMetricsAspect
import org.hyperledger.identus.shared.validation.ValidationUtils
import zio.*
import zio.prelude.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.*
import org.hyperledger.identus.event.notification.{Event, EventNotificationService}
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse}
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.{UIO, URIO, URLayer, ZIO, ZLayer}

import java.time.Duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError
import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.*
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse}
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.mock.{Mock, Proxy}
import zio.{UIO, URIO, URLayer, ZIO, ZLayer, mock}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.hyperledger.identus.connect.core.model.ConnectionRecord.*
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse}
import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation
import io.iohk.atala.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import zio.Exit.Failure
import zio.test.*
import zio.{Cause, Exit, ZIO, ZLayer}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.hyperledger.identus.connect.core.model.error.ConnectionServiceError.I
import org.hyperledger.identus.connect.core.repository.ConnectionRepositoryInMemory
import org.hyperledger.identus.mercury.model.{DidId, Message}
import org.hyperledger.identus.mercury.protocol.connection.ConnectionResponse
import io.iohk.atala.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import zio.*
import zio.test.*
import zio.test.Assertion.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.hyperledger.identus.event.notification.*
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.mercury.protocol.connection.{ConnectionRequest, ConnectionResponse}
import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation
import io.iohk.atala.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import zio.*
import zio.ZIO.*
import zio.mock.Expectation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import org.hyperledger.identus.connect.core.model.ConnectionRecord.{ProtocolStat
import org.hyperledger.identus.connect.core.repository.ConnectionRepository
import org.hyperledger.identus.mercury.protocol.connection.*
import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation
import io.iohk.atala.shared.db.ContextAwareTask
import io.iohk.atala.shared.db.Implicits.*
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.db.ContextAwareTask
import org.hyperledger.identus.shared.db.Implicits.*
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.*
import zio.interop.catz.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package org.hyperledger.identus.connect.sql.repository
import doobie.*
import doobie.implicits.*
import doobie.util.transactor.Transactor
import io.iohk.atala.shared.db.ContextAwareTask
import io.iohk.atala.shared.db.DbConfig
import io.iohk.atala.shared.db.Implicits.*
import org.hyperledger.identus.shared.db.ContextAwareTask
import org.hyperledger.identus.shared.db.DbConfig
import org.hyperledger.identus.shared.db.Implicits.*
import org.flywaydb.core.Flyway
import zio.*
import zio.interop.catz.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.hyperledger.identus.connect.sql.repository

import com.dimafeng.testcontainers.PostgreSQLContainer
import org.hyperledger.identus.connect.core.repository.{ConnectionRepository, ConnectionRepositorySpecSuite}
import io.iohk.atala.shared.db.DbConfig
import io.iohk.atala.sharedtest.containers.PostgresTestContainerSupport
import org.hyperledger.identus.shared.db.DbConfig
import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport
import zio.*
import zio.test.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.hyperledger.identus.test.container

import com.dimafeng.testcontainers.PostgreSQLContainer
import io.iohk.atala.sharedtest.containers.PostgresTestContainer.postgresContainer
import org.hyperledger.identus.sharedtest.containers.PostgresTestContainer.postgresContainer
import zio.*
import zio.ZIO.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.hyperledger.identus.event.notification

import io.iohk.atala.shared.models.WalletId
import org.hyperledger.identus.shared.models.WalletId
import java.time.Instant
import java.util.UUID

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.hyperledger.identus.event.notification

import io.iohk.atala.shared.models.WalletAccessContext
import io.iohk.atala.shared.models.WalletId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletId
import zio.*

import java.net.URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.hyperledger.identus.event.notification

import zio.*
import zio.test.*
import io.iohk.atala.shared.models.WalletId
import org.hyperledger.identus.shared.models.WalletId

object EventNotificationServiceImplSpec extends ZIOSpecDefault {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.hyperledger.identus.pollux.core.model

import io.iohk.atala.castor.core.model.did.CanonicalPrismDID
import org.hyperledger.identus.pollux.vc.jwt.StatusPurpose
import io.iohk.atala.shared.models.WalletId
import org.hyperledger.identus.shared.models.WalletId
import java.time.Instant
import java.util.UUID

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.hyperledger.identus.pollux.core.repository

import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition
import org.hyperledger.identus.pollux.core.repository.Repository.SearchCapability
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.{RIO, Task}

import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.hyperledger.identus.pollux.core.repository
import org.hyperledger.identus.pollux.core.model.*
import org.hyperledger.identus.pollux.core.model.error.CredentialRepositoryError.*
import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition
import io.iohk.atala.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import zio.*

import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.hyperledger.identus.mercury.protocol.issuecredential.{IssueCredential
import org.hyperledger.identus.pollux.anoncreds.AnoncredCredentialRequestMetadata
import org.hyperledger.identus.pollux.core.model.*
import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.ProtocolState
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.*

trait CredentialRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.hyperledger.identus.pollux.anoncreds.AnoncredCredentialRequestMetadat
import org.hyperledger.identus.pollux.core.model.*
import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.ProtocolState
import org.hyperledger.identus.pollux.core.model.error.CredentialRepositoryError.*
import io.iohk.atala.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import zio.*

import java.time.Instant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.hyperledger.identus.pollux.core.repository
import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema
import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema.*
import org.hyperledger.identus.pollux.core.repository.Repository.SearchCapability
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.{RIO, Task}

import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.hyperledger.identus.pollux.core.repository

import org.hyperledger.identus.pollux.core.model.*
import org.hyperledger.identus.pollux.vc.jwt.Issuer
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.*

import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.hyperledger.identus.pollux.core.repository

import org.hyperledger.identus.pollux.core.model.CredentialStatusList
import org.hyperledger.identus.pollux.vc.jwt.{Issuer, StatusPurpose, revocation}
import io.iohk.atala.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import zio.*
import org.hyperledger.identus.pollux.core.model.*
import org.hyperledger.identus.pollux.vc.jwt.revocation.BitStringError.{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.hyperledger.identus.pollux.core.repository
import org.hyperledger.identus.mercury.protocol.presentproof.*
import org.hyperledger.identus.pollux.core.model.*
import org.hyperledger.identus.pollux.core.model.PresentationRecord.ProtocolState
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.*

trait PresentationRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.hyperledger.identus.mercury.protocol.presentproof.*
import org.hyperledger.identus.pollux.core.model.*
import org.hyperledger.identus.pollux.core.model.PresentationRecord.ProtocolState
import org.hyperledger.identus.pollux.core.model.error.PresentationError.*
import io.iohk.atala.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import zio.*

import java.time.Instant
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.hyperledger.identus.pollux.core.repository

import org.hyperledger.identus.pollux.core.model.VerificationPolicy
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.*

import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.hyperledger.identus.pollux.core.repository

import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.RIO

trait Repository[F[_], T]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.hyperledger.identus.pollux.core.service
import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError
import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition
import org.hyperledger.identus.pollux.core.model.schema.CredentialDefinition.*
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.{IO, ZIO}

import java.util.UUID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.hyperledger.identus.pollux.core.model.error.CredentialSchemaError
import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema
import org.hyperledger.identus.pollux.core.model.schema.CredentialSchema.*
import zio.{IO, ZIO}
import io.iohk.atala.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.WalletAccessContext

import java.util.UUID
trait CredentialSchemaService {
Expand Down
Loading

0 comments on commit 0ba5306

Please sign in to comment.