• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

input-output-hk / atala-prism-building-blocks / 8645457575

11 Apr 2024 10:44AM UTC coverage: 31.344% (-0.1%) from 31.453%
8645457575

push

web-flow
docs(adr): ATL-6599 update ADR based on first implementation experience (#952)

Signed-off-by: Benjamin Voiturier <benjamin.voiturier@iohk.io>
Signed-off-by: bvoiturier <benjamin.voiturier@iohk.io>
Co-authored-by: Pete Vielhaber <peter.vielhaber@iohk.io>

4465 of 14245 relevant lines covered (31.34%)

0.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

63.64
/pollux/lib/vc-jwt/src/main/scala/io/iohk/atala/pollux/vc/jwt/MultiKey.scala
1
package io.iohk.atala.pollux.vc.jwt
2

3
import io.circe.*
4
import io.circe.syntax.*
5
import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder}
6

7
case class MultiKey(
×
8
    publicKeyMultibase: Option[MultiBaseString] = None,
1✔
9
    secretKeyMultibase: Option[MultiBaseString] = None
10
) {
11
  val `type`: String = "Multikey"
×
12
  val `@context`: Set[String] = Set("https://w3id.org/security/multikey/v1")
13
}
14
object MultiKey {
15
  given multiKeyEncoder: Encoder[MultiKey] =
16
    (multiKey: MultiKey) =>
17
      Json
1✔
18
        .obj(
1✔
19
          ("@context", multiKey.`@context`.asJson),
1✔
20
          ("type", multiKey.`type`.asJson),
1✔
21
          ("publicKeyMultibase", multiKey.publicKeyMultibase.asJson),
1✔
22
          ("secretKeyMultibase", multiKey.secretKeyMultibase.asJson),
23
        )
24

25
  given multiKeyDecoder: Decoder[MultiKey] =
26
    (c: HCursor) =>
1✔
27
      for {
×
28
        publicKeyMultibase <- c.downField("publicKeyMultibase").as[Option[MultiBaseString]]
×
29
        secretKeyMultibase <- c.downField("secretKeyMultibase").as[Option[MultiBaseString]]
30
      } yield {
31
        MultiKey(
32
          publicKeyMultibase = publicKeyMultibase,
33
          secretKeyMultibase = secretKeyMultibase,
34
        )
35
      }
36

37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc