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

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

10 Apr 2024 08:29AM UTC coverage: 31.472% (+0.02%) from 31.453%
8628271896

Pull #958

patlo-iog
fix: add shared-crypto and apollo wrapper

Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io>
Pull Request #958: fix: add shared-crypto module and apollo wrapper for other key types

76 of 144 new or added lines in 9 files covered. (52.78%)

560 existing lines in 119 files now uncovered.

4480 of 14235 relevant lines covered (31.47%)

0.31 hits per line

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

72.73
/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

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

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

36
}
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