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

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

30 Apr 2024 04:48PM UTC coverage: 49.277% (-0.3%) from 49.553%
8898614027

Pull #993

FabioPinheiro
ci: fix scala-steward after moving repo to hyperledger

Signed-off-by: FabioPinheiro <fabiomgpinheiro@gmail.com>

Update logback-classic to 1.4.14 in main

Update testcontainers-scala-postgresql to 0.41.3 in main

Update sbt-buildinfo to 0.12.0 in main

Update jwt-circe to 9.4.6 in main

Update munit-zio to 0.2.0 in main

Update sbt-native-packager to 1.9.16 in main

Update sbt-release to 1.4.0 in main

Update json-schema-validator to 1.3.3 in main

Update zio-json to 3.8.16 in main

Update tapir-http4s-server-zio to 1.10.5 in main

Update sbt-protoc to 1.0.7 in main

Update compilerplugin to 0.11.15 in main

Update typesafe:config to 1.4.3 in main

Update monocle-core to 3.2.0 in main

Update zio to 2.0.22 in main

Update zio-http to 3.0.0-RC6 in main

Update zio-interop-cats to 23.1.0.2 in main

Update zio-json to 0.6.2 in main

Update zio-logging to 2.1.17 in main

Update zio-metrics-connectors-micrometer to 2.3.1 in main

Update zio-mock to 1.0.0-RC12 in main

Update zio-prelude to 1.0.0-RC24 in main

Update circe-core to 0.14.7 in main

Update quill-doobie to 4.8.3 in main

Update micrometer-core to 1.11.11 in main

Update circe-json-schema to 0.4.1 in main

Update bcpkix-jdk15on to 1.78.1 in main

Update bcprov-jdk15on to 1.78.1 in main

Update didcomm to 0.3.2 in main

Update flyway-core to 9.22.3 in main

Update http4s-blaze-server to 0.23.16 in main

Update keycloak-authz-client to 24.0.3 in main

Update postgresql to 42.2.29 in main

Update sbt to 1.9.9 in main

Update munit to 1.0.0-RC1 in main

Update sbt-scalafmt to 2.5.2 in main

Update scalafmt-core to 3.7.17 in main

Reformat with scalafmt 3.7.17

Executed command: scalafmt --non-interactive

Add 'Reformat with scalafmt 3.7.17' to .git-blame-ignore-revs

Update scalatest to 3.2.18 in main

Update mockito-4-11 to 3.2.18.0 in main

Update sbt-coveralls to 1.3.11 in main

Update sbt-scoverage to 2.0.11 in main

Update slf4j-api to 2.0.13 in main

Update doobie-hikari to 1.0.0-RC5 in main
... (continued)
Pull Request #993: ci: fix scala-steward after moving repo to hyperledger

7 of 29 new or added lines in 3 files covered. (24.14%)

255 existing lines in 77 files now uncovered.

7296 of 14806 relevant lines covered (49.28%)

0.49 hits per line

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

75.0
/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/PresentationRecord.scala
1
package org.hyperledger.identus.pollux.core.model
2

3
import org.hyperledger.identus.mercury.model.DidId
4
import org.hyperledger.identus.mercury.protocol.presentproof.{Presentation, ProposePresentation, RequestPresentation}
5

6
import java.time.Instant
7
import java.time.temporal.ChronoUnit
8

9
type AnoncredCredentialProofs = zio.json.ast.Json
10

11
final case class PresentationRecord(
12
    id: DidCommID,
13
    createdAt: Instant,
14
    updatedAt: Option[Instant],
15
    thid: DidCommID,
16
    schemaId: Option[String],
17
    connectionId: Option[String],
18
    role: PresentationRecord.Role,
19
    subjectId: DidId,
20
    protocolState: PresentationRecord.ProtocolState,
21
    credentialFormat: CredentialFormat,
22
    requestPresentationData: Option[RequestPresentation],
23
    proposePresentationData: Option[ProposePresentation],
24
    presentationData: Option[Presentation],
25
    credentialsToUse: Option[List[String]],
26
    anoncredCredentialsToUseJsonSchemaId: Option[String],
27
    anoncredCredentialsToUse: Option[AnoncredCredentialProofs],
28
    metaRetries: Int,
29
    metaNextRetry: Option[Instant],
30
    metaLastFailure: Option[String],
31
) {
32
  def withTruncatedTimestamp(unit: ChronoUnit = ChronoUnit.MICROS): PresentationRecord =
1✔
33
    copy(
34
      createdAt = createdAt.truncatedTo(unit),
1✔
UNCOV
35
      updatedAt = updatedAt.map(_.truncatedTo(unit)),
×
36
      metaNextRetry = metaNextRetry.map(_.truncatedTo(unit)),
1✔
37
    )
38
}
39

40
object PresentationRecord {
41

42
  enum Role:
43
    case Verifier extends Role
44
    case Prover extends Role
45

46
  enum ProtocolState:
47
    // Prover has created a Proposal in a database, but it has not been sent yet (in Prover DB)
48
    case ProposalPending extends ProtocolState
49
    // Prover has sent an proposal to a Verifier (in Prover DB)
50
    case ProposalSent extends ProtocolState
51
    // Verifier has received a proposal (In Verifier DB)
52
    case ProposalReceived extends ProtocolState
53
    // Verifier has received a proposal and has rejected (In Verifier DB)
54
    case ProposalRejected extends ProtocolState // TODO start propose presentation
55

56
    // Verifier has created a Presentation request  (in Verfier DB)
57
    case RequestPending extends ProtocolState
58
    // Verifier has sent a request to a an Prover (in Verfier DB)
59
    case RequestSent extends ProtocolState
60
    // Prover has received a request from the Verifier (In Verifier DB)
61
    case RequestReceived extends ProtocolState
62
    // Prover has rejected a presentation request from the Verifier (In prover DB)
63
    case RequestRejected extends ProtocolState // TODO start propose presentation
64

65
    // Prover/Verifier declined the Presentation request/ Proposed Presenation  by Verifier/Prover (DB)
66
    case ProblemReportPending extends ProtocolState
67
    // Prover/Verifier has sent problem report to Verifier/Prover (Verifier/Prover DB)
68
    case ProblemReportSent extends ProtocolState
69
    // Prover/Verifier has received problem resport from Verifier/Prover (DB)
70
    case ProblemReportReceived extends ProtocolState
71

72
    // Prover has "accepted" a Presentation request received from a Verifier (Prover DB)
73
    case PresentationPending extends ProtocolState
74
    // Prover has generated (signed) the VC  and is now ready to send it to the Verifier (Prover DB)
75
    case PresentationGenerated extends ProtocolState
76
    // Prover has sent the Presentation (Prover DB)
77
    case PresentationSent extends ProtocolState
78
    // Verifier has received the presentation (Verifier DB)
79
    case PresentationReceived extends ProtocolState
80
    // Verifier has verified the presentation (proof) (Verifier DB)
81
    case PresentationVerified extends ProtocolState
82
    // Verifier has updated Verification failed in the presentation (proof) (Verifier DB)
83
    case PresentationVerificationFailed extends ProtocolState
84
    // Verifier has accepted the verified presentation (proof) (Verifier DB)
85
    case PresentationAccepted extends ProtocolState
86
    // Verifier has rejected the presentation (proof) (Verifier DB)
87
    case PresentationRejected extends ProtocolState // TODO send problem report
88

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