Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: remove unused imports #1135

Merged
merged 9 commits into from
Jun 6, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.hyperledger.identus.pollux.credentialdefinition.http.{
CredentialDefinitionResponsePage
}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import sttp.client3.{basicRequest, DeserializationException, Response, UriContext}
import sttp.client3.{basicRequest, Response, UriContext}
import sttp.client3.ziojson.*
import sttp.model.{StatusCode, Uri}
import zio.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.hyperledger.identus.pollux.credentialschema.http.{
CredentialSchemaResponsePage
}
import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId}
import sttp.client3.{basicRequest, DeserializationException, Response, UriContext}
import sttp.client3.{basicRequest, Response, UriContext}
import sttp.client3.ziojson.*
import sttp.model.{StatusCode, Uri}
import zio.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import org.hyperledger.identus.agent.walletapi.model.error.{CreateManagedDIDErro
import org.hyperledger.identus.castor.core.model.did.*
import org.hyperledger.identus.shared.crypto.{
Apollo,
Ed25519KeyPair,
Ed25519PublicKey,
Secp256k1KeyPair,
Secp256k1PublicKey,
X25519KeyPair,
X25519PublicKey
}
import org.hyperledger.identus.shared.models.Base64UrlString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.hyperledger.identus.pollux.core.model.presentation

import org.hyperledger.identus.pollux.core.model.presentation.Options
import org.hyperledger.identus.pollux.sdjwt.PresentationJson
import zio.json.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ import io.circe.Json
import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState}
import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService
import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage
import org.hyperledger.identus.castor.core.model.did.{
CanonicalPrismDID,
EllipticCurve,
PrismDID,
VerificationRelationship
}
import org.hyperledger.identus.castor.core.model.did.{CanonicalPrismDID, PrismDID, VerificationRelationship}
import org.hyperledger.identus.castor.core.service.DIDService
import org.hyperledger.identus.mercury.model.*
import org.hyperledger.identus.mercury.protocol.issuecredential.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import org.hyperledger.identus.pollux.core.model.{DidCommID, PresentationRecord}
import org.hyperledger.identus.pollux.core.model.error.PresentationError
import org.hyperledger.identus.pollux.core.model.presentation.{Options, SdJwtPresentationPayload}
import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1}
import org.hyperledger.identus.pollux.sdjwt.PresentationJson
import org.hyperledger.identus.pollux.vc.jwt.{Issuer, PresentationPayload, W3cCredentialPayload}
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.{mock, IO, URLayer, ZIO, ZLayer}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import org.hyperledger.identus.pollux.core.model.*
import org.hyperledger.identus.pollux.core.model.error.PresentationError
import org.hyperledger.identus.pollux.core.model.presentation.*
import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1}
import org.hyperledger.identus.pollux.sdjwt.PresentationJson
import org.hyperledger.identus.pollux.vc.jwt.*
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import org.hyperledger.identus.pollux.core.model.{DidCommID, PresentationRecord}
import org.hyperledger.identus.pollux.core.model.error.PresentationError
import org.hyperledger.identus.pollux.core.model.presentation.{Options, SdJwtPresentationPayload}
import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1}
import org.hyperledger.identus.pollux.sdjwt.PresentationJson
import org.hyperledger.identus.pollux.vc.jwt.{Issuer, PresentationPayload, W3cCredentialPayload}
import org.hyperledger.identus.shared.models.WalletAccessContext
import zio.{IO, URLayer, ZIO, ZLayer}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ object SDJWTSpec extends ZIOSpecDefault {
test("get iss field from PresentationJson") {
val ed25519KeyPair = KmpEd25519KeyOps.generateKeyPair
val issuerKey = IssuerPrivateKey(ed25519KeyPair.privateKey)
val issuerPublicKey = IssuerPublicKey(ed25519KeyPair.publicKey)
IssuerPublicKey(ed25519KeyPair.publicKey)

val credential = SDJWT.issueCredential(issuerKey, CLAIMS)
val presentation = SDJWT.createPresentation(credential, CLAIMS_PRESENTED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@ import com.nimbusds.jose.JWSVerifier
import com.nimbusds.jwt.SignedJWT
import io.circe
import io.circe.generic.auto.*
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo
import org.bouncycastle.crypto.params.Ed25519PublicKeyParameters
import org.bouncycastle.crypto.util.SubjectPublicKeyInfoFactory
import org.hyperledger.identus.castor.core.model.did.VerificationRelationship
import org.hyperledger.identus.shared.crypto.Ed25519PublicKey
import pdi.jwt.*
import zio.*
import zio.prelude.*

import java.security.{KeyFactory, PublicKey}
import java.security.interfaces.{ECPublicKey, EdECPublicKey}
import java.security.spec.X509EncodedKeySpec
import java.security.PublicKey
import scala.util.{Failure, Success, Try}

object JWTVerification {
Expand Down
Loading