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

build(pollux): upgrade mercury to 0.16.0 #328

Merged
merged 1 commit into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ import java.security.SecureRandom
import java.security.spec.ECGenParameterSpec
import java.time.Instant
import java.util.UUID
import io.iohk.atala.mercury.DidAgent
import io.iohk.atala.mercury.model._
import io.iohk.atala.mercury.protocol.presentproof._
import io.iohk.atala.mercury.model.AttachmentDescriptor
import io.iohk.atala.mercury.DidComm
import io.iohk.atala.mercury.model.DidId
import io.iohk.atala.mercury.model.Message
import java.time.Instant
import io.iohk.atala.mercury.protocol.presentproof.RequestPresentation
import java.security.PublicKey
import io.iohk.atala.mercury.protocol.issuecredential.IssueCredential
import io.iohk.atala.pollux.core.model.IssueCredentialRecord
import io.iohk.atala.pollux.core.repository.CredentialRepository
import org.didcommx.didcomm.message.Attachment.Data.Base64
import org.didcommx.didcomm.message.Attachment.Data.Base64 //FIXME create interface so we do not have to use it directly
import java.{util => ju}

trait PresentationService {
Expand Down Expand Up @@ -103,14 +101,14 @@ trait PresentationService {
}

object PresentationServiceImpl {
val layer: URLayer[PresentationRepository[Task] & CredentialRepository[Task] & DidComm, PresentationService] =
val layer: URLayer[PresentationRepository[Task] & CredentialRepository[Task] & DidAgent, PresentationService] =
ZLayer.fromFunction(PresentationServiceImpl(_, _, _))
}

private class PresentationServiceImpl(
presentationRepository: PresentationRepository[Task],
credentialRepository: CredentialRepository[Task],
didComm: DidComm
didAgent: DidAgent
) extends PresentationService {

import PresentationRecord._
Expand Down Expand Up @@ -494,7 +492,7 @@ private class PresentationServiceImpl(
proof_types = proofTypes
),
attachments = Seq.empty,
from = didComm.myDid,
from = didAgent.id,
to = subjectDId,
thid = Some(thid.toString)
)
Expand All @@ -509,7 +507,7 @@ private class PresentationServiceImpl(
RequestPresentation(
body = body,
attachments = proposePresentation.attachments,
from = didComm.myDid,
from = didAgent.id,
to = proposePresentation.from,
thid = proposePresentation.thid
)
Expand Down Expand Up @@ -542,7 +540,7 @@ private class PresentationServiceImpl(
),
attachments = Seq(
AttachmentDescriptor
.buildAttachment(payload = jwtPresentation.value, mediaType = Some("prism/jwt"))
.buildJsonAttachment(payload = jwtPresentation.value, mediaType = Some("prism/jwt"))
),
thid = request.thid.orElse(Some(request.id)),
from = request.to,
Expand Down
8 changes: 5 additions & 3 deletions pollux/lib/project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object Dependencies {
val prismSdk = "v1.4.1" // scala-steward:off
val iris = "0.1.0"
val shared = "0.2.0"
val mercury = "0.15.0"
val mercury = "0.16.0"
val flyway = "9.8.3"
val testContainersScalaPostgresql = "0.40.11"
val quill = "4.6.0"
Expand All @@ -30,8 +30,10 @@ object Dependencies {

private lazy val flyway = "org.flywaydb" % "flyway-core" % Versions.flyway

private lazy val quillDoobie = "io.getquill" %% "quill-doobie" % Versions.quill exclude("org.scala-lang.modules", "scala-java8-compat_3")
private lazy val testcontainers = "com.dimafeng" %% "testcontainers-scala-postgresql" % Versions.testContainersScalaPostgresql % Test
private lazy val quillDoobie =
"io.getquill" %% "quill-doobie" % Versions.quill exclude ("org.scala-lang.modules", "scala-java8-compat_3")
private lazy val testcontainers =
"com.dimafeng" %% "testcontainers-scala-postgresql" % Versions.testContainersScalaPostgresql % Test

// We have to exclude bouncycastle since for some reason bitcoinj depends on bouncycastle jdk15to18
// (i.e. JDK 1.5 to 1.8), but we are using JDK 11
Expand Down