Skip to content

Commit

Permalink
chore: fix and fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Pat Losoponkul <[email protected]>
  • Loading branch information
Pat Losoponkul committed Sep 18, 2024
1 parent fac638e commit 8e0a2f8
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ import org.hyperledger.identus.castor.core.model.did.{
UpdateDIDAction,
VerificationRelationship
}
import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.value
import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.UriOrJsonEndpoint
import org.hyperledger.identus.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.{value, UriOrJsonEndpoint}
import org.hyperledger.identus.shared.models.{Base64UrlString, KeyId}
import org.hyperledger.identus.shared.utils.Traverse.*
import zio.*

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

import org.hyperledger.identus.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{Base64UrlString, KeyId}

final case class PublicKey(
id: KeyId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package org.hyperledger.identus.castor.core.service
import org.hyperledger.identus.castor.core.model.did.*
import org.hyperledger.identus.castor.core.model.error
import org.hyperledger.identus.shared.crypto.{Apollo, Secp256k1KeyPair}
import org.hyperledger.identus.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{Base64UrlString, KeyId}
import zio.{mock, IO, URLayer, ZIO, ZLayer}
import zio.mock.{Expectation, Mock, Proxy}
import zio.test.Assertion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package org.hyperledger.identus.castor.core.util
import org.hyperledger.identus.castor.core.model.did.*
import org.hyperledger.identus.castor.core.model.error.OperationValidationError
import org.hyperledger.identus.castor.core.util.DIDOperationValidator.Config
import org.hyperledger.identus.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{Base64UrlString, KeyId}
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,7 @@ import io.circe.Json
import org.hyperledger.identus.castor.core.model.did.*
import org.hyperledger.identus.castor.core.model.did.ServiceEndpoint.{UriOrJsonEndpoint, UriValue}
import org.hyperledger.identus.shared.crypto.Apollo
import org.hyperledger.identus.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{Base64UrlString, KeyId}
import zio.*
import zio.test.Gen

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import org.hyperledger.identus.mercury.*
import org.hyperledger.identus.mercury.protocol.revocationnotificaiton.RevocationNotification
import org.hyperledger.identus.pollux.core.service.{CredentialService, CredentialStatusListService}
import org.hyperledger.identus.pollux.vc.jwt.revocation.{VCStatusList2021, VCStatusList2021Error}
import org.hyperledger.identus.shared.models.*
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.{WalletAccessContext, *}
import org.hyperledger.identus.shared.utils.DurationOps.toMetricsSeconds
import zio.*
import zio.metrics.Metric
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package org.hyperledger.identus.didcomm.controller

import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.shared.models.{Failure, StatusCode}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{Failure, KeyId, StatusCode}

sealed trait DIDCommControllerError extends Failure {
override def namespace = "DIDCommControllerError"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import org.hyperledger.identus.mercury.protocol.invitation.v2.Invitation
import org.hyperledger.identus.pollux.core.model.{CredentialFormat, DidCommID, IssueCredentialRecord}
import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.{ProtocolState, Role}
import org.hyperledger.identus.pollux.core.service.MockCredentialService
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.WalletId
import org.hyperledger.identus.shared.models.{KeyId, WalletId}
import sttp.client3.{basicRequest, DeserializationException, UriContext}
import sttp.client3.ziojson.*
import sttp.model.StatusCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import org.hyperledger.identus.castor.core.model.did.*
import org.hyperledger.identus.mercury.model.*
import org.hyperledger.identus.mercury.PeerDID
import org.hyperledger.identus.shared.crypto.{Ed25519KeyPair, Secp256k1KeyPair, X25519KeyPair}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext}
import zio.*

/** A wrapper around Castor's DIDService providing key-management capability. Analogous to the secretAPI in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import org.hyperledger.identus.castor.core.util.DIDOperationValidator
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.mercury.PeerDID
import org.hyperledger.identus.shared.crypto.{Apollo, Ed25519KeyPair, Secp256k1KeyPair, X25519KeyPair}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext}
import zio.*

import scala.collection.immutable.ArraySeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import org.hyperledger.identus.agent.walletapi.storage.{DIDNonSecretStorage, DID
import org.hyperledger.identus.agent.walletapi.util.OperationFactory
import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation
import org.hyperledger.identus.shared.crypto.{Apollo, Ed25519KeyPair, X25519KeyPair}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext}
import zio.*

private[walletapi] class DIDCreateHandler(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ import org.hyperledger.identus.castor.core.model.did.{
}
import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation.Update
import org.hyperledger.identus.shared.crypto.{Apollo, Ed25519KeyPair, X25519KeyPair}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext}
import zio.*

import scala.collection.immutable.ArraySeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import org.hyperledger.identus.castor.core.model.did.{
import org.hyperledger.identus.castor.core.model.error.DIDOperationError
import org.hyperledger.identus.castor.core.service.DIDService
import org.hyperledger.identus.shared.crypto.Secp256k1KeyPair
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext}
import zio.*

import scala.collection.immutable.ArraySeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.shared.db.ContextAwareTask
import org.hyperledger.identus.shared.db.Implicits.*
import org.hyperledger.identus.shared.db.Implicits.given
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext, WalletId}
import zio.*
import zio.interop.catz.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.shared.crypto.jwk.{FromJWK, JWK}
import org.hyperledger.identus.shared.db.ContextAwareTask
import org.hyperledger.identus.shared.db.Implicits.*
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext}
import zio.*

import java.time.Instant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package org.hyperledger.identus.agent.walletapi.storage
import org.hyperledger.identus.agent.walletapi.model.*
import org.hyperledger.identus.castor.core.model.did.{PrismDID, ScheduledDIDOperationStatus}
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext, WalletId}
import zio.*

trait DIDNonSecretStorage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import com.nimbusds.jose.jwk.OctetKeyPair
import org.hyperledger.identus.castor.core.model.did.PrismDID
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.shared.crypto.jwk.{FromJWK, JWK}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext}
import zio.*

/** A simple single-user DID key storage */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import org.hyperledger.identus.agent.walletapi.model.{
import org.hyperledger.identus.agent.walletapi.storage.{DIDNonSecretStorage, DIDSecretStorage, WalletSecretStorage}
import org.hyperledger.identus.castor.core.model.did.{EllipticCurve, PrismDID}
import org.hyperledger.identus.shared.crypto.{Apollo, Ed25519KeyPair, Secp256k1KeyPair, X25519KeyPair}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.WalletAccessContext
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext}
import zio.*

class KeyResolver(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import org.hyperledger.identus.shared.crypto.{
Secp256k1PublicKey,
X25519PublicKey
}
import org.hyperledger.identus.shared.models.Base64UrlString
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{Base64UrlString, KeyId}
import zio.*

import scala.collection.immutable.ArraySeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import org.hyperledger.identus.castor.core.model.did.PrismDID
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.shared.crypto.jwk.{FromJWK, JWK}
import org.hyperledger.identus.shared.crypto.Sha256Hash
import org.hyperledger.identus.shared.models.{HexString, WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{HexString, KeyId, WalletAccessContext, WalletId}
import zio.*

import java.nio.charset.StandardCharsets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import org.hyperledger.identus.castor.core.model.error
import org.hyperledger.identus.castor.core.service.DIDService
import org.hyperledger.identus.castor.core.util.DIDOperationValidator
import org.hyperledger.identus.shared.crypto.{ApolloSpecHelper, Ed25519KeyPair, Secp256k1KeyPair, X25519KeyPair}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletAdministrationContext}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext, WalletAdministrationContext}
import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport
import org.hyperledger.identus.test.container.{DBTestUtils, VaultTestContainerSupport}
import zio.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import org.hyperledger.identus.agent.walletapi.vault.{VaultDIDSecretStorage, Vau
import org.hyperledger.identus.castor.core.model.did.PrismDIDOperation
import org.hyperledger.identus.mercury.PeerDID
import org.hyperledger.identus.shared.crypto.{Apollo, ApolloSpecHelper, Ed25519KeyPair, X25519KeyPair}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletAdministrationContext}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext, WalletAdministrationContext}
import org.hyperledger.identus.sharedtest.containers.PostgresTestContainerSupport
import org.hyperledger.identus.test.container.{DBTestUtils, VaultTestContainerSupport}
import zio.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package org.hyperledger.identus.agent.walletapi.storage
import org.hyperledger.identus.agent.walletapi.model.*
import org.hyperledger.identus.castor.core.model.did.{PrismDID, ScheduledDIDOperationStatus}
import org.hyperledger.identus.mercury.model.DidId
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext, WalletId}
import zio.*
import zio.mock.{Expectation, Mock, Proxy}
import zio.test.Assertion.equalTo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import org.hyperledger.identus.castor.core.model.did.{
VerificationRelationship
}
import org.hyperledger.identus.shared.crypto.ApolloSpecHelper
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletAdministrationContext}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{KeyId, WalletAccessContext, WalletAdministrationContext}
import zio.*
import zio.test.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package org.hyperledger.identus.agent.walletapi.util
import org.hyperledger.identus.agent.walletapi.model.*
import org.hyperledger.identus.castor.core.model.did.*
import org.hyperledger.identus.shared.crypto.{ApolloSpecHelper, Ed25519KeyPair, X25519KeyPair}
import org.hyperledger.identus.shared.models.HexString
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{HexString, KeyId}
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,7 @@ import org.hyperledger.identus.agent.walletapi.model.PublicationState
import org.hyperledger.identus.castor.core.model.did.{PrismDID, VerificationRelationship}
import org.hyperledger.identus.pollux.core.model.DidCommID
import org.hyperledger.identus.pollux.core.model.IssueCredentialRecord.ProtocolState
import org.hyperledger.identus.shared.models.{Failure, StatusCode}
import org.hyperledger.identus.shared.models.KeyId
import org.hyperledger.identus.shared.models.{Failure, KeyId, StatusCode}

import java.util.UUID

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

import zio.json._
import zio.json.*

opaque type KeyId = String
object KeyId:
Expand Down

0 comments on commit 8e0a2f8

Please sign in to comment.