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

hyperledger / identus-cloud-agent / 10793991050

10 Sep 2024 01:56PM UTC coverage: 48.504% (-4.5%) from 52.962%
10793991050

push

web-flow
build: sbt and plugins dependency update (#1337)

Signed-off-by: Hyperledger Bot <hyperledger-bot@hyperledger.org>
Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>
Co-authored-by: Hyperledger Bot <hyperledger-bot@hyperledger.org>
Co-authored-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>

7406 of 15269 relevant lines covered (48.5%)

0.49 hits per line

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

53.33
/castor/src/main/scala/org/hyperledger/identus/castor/core/model/did/w3c/package.scala
1
package org.hyperledger.identus.castor.core.model.did
2

3
import org.hyperledger.identus.castor.core.model.error.DIDResolutionError
4
import org.hyperledger.identus.castor.core.service.DIDService
5
import zio.*
6

7
package object w3c {
8

9
  import W3CModelHelper.*
10

11
  /** A wrapper for DID resolution in W3C format */
12
  def makeW3CResolver(
1✔
13
      service: DIDService
14
  )(did: String): IO[DIDResolutionErrorRepr, (DIDDocumentMetadataRepr, DIDDocumentRepr)] = {
15
    import DIDResolutionError.*
16
    for {
1✔
17
      prismDID <- ZIO
1✔
18
        .fromEither(PrismDID.fromString(did))
1✔
19
        .mapError(e => DIDResolutionErrorRepr.InvalidDID(e))
20
      didData <- service
1✔
21
        .resolveDID(prismDID)
1✔
22
        .tapError {
23
          case ValidationError(_) => ZIO.unit
×
24
          case error              => ZIO.logError(error.toString)
×
25
        }
26
        .mapBoth(
27
          {
28
            case ex: DLTProxyError =>
×
29
              DIDResolutionErrorRepr.InternalError(s"Error occurred while connecting to Prism Node: ${ex.getMessage}")
×
30
            case UnexpectedDLTResult(msg) =>
×
31
              DIDResolutionErrorRepr.InternalError(s"Unexpected result obtained from Prism Node: $msg")
×
32
            case ValidationError(e) => DIDResolutionErrorRepr.InvalidDID(e.toString)
×
33
          },
34
          _.toRight(DIDResolutionErrorRepr.NotFound)
1✔
35
        )
36
        .absolve
37
    } yield {
38
      // https://www.w3.org/TR/did-core/#dfn-diddocument
39
      // The value of id in the resolved DID document MUST match the DID that was resolved.
40
      (didData._1.toW3C, didData._2.toW3C(prismDID))
1✔
41
    }
42
  }
43

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