Skip to content

Commit

Permalink
Fixes from Ben (Its working now)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro committed Dec 19, 2023
1 parent 8453e78 commit ca76952
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ object AnoncredLib {
metadata: CredentialRequestMetadata,
linkSecret: LinkSecretWithId,
credentialDefinition: CredentialDefinition,
): Unit = {
): Credential = {
uniffi.anoncreds_wrapper
.Prover()
.processCredential(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ class PoCNewLib extends AnyFlatSpec {
)
)

println(credential)
val processedCredential = AnoncredLib.processCredential(
credential = credential,
metadata = credentialRequest.metadata,
linkSecret = linkSecret,
credentialDefinition = credentialDefinition.cd
)
println(processedCredential)

// ##############
// ### PROVER ###
Expand All @@ -92,7 +98,7 @@ class PoCNewLib extends AnyFlatSpec {
"sex":{"name":"sex", "restrictions":{"attr::sex::value":"M","cred_def_id":"$CRED_DEF_ID"}}
},
"requested_predicates":{
"age":{"name":"age", "p_type":">=", "p_value":18}
"age":{"name":"age", "p_type":">=", "p_value":32}
}
}""".stripMargin

Expand All @@ -103,7 +109,7 @@ class PoCNewLib extends AnyFlatSpec {
val presentation = AnoncredLib.createPresentation(
presentationRequest, // : PresentationRequest,
Seq(
CredentialAndRequestedAttributesPredicates(credential, Seq("sex"), Seq("age"))
CredentialAndRequestedAttributesPredicates(processedCredential, Seq("sex"), Seq("age"))
), // credentials: Seq[Credential],
Map(), // selfAttested: Map[String, String],
linkSecret.secret, // linkSecret: LinkSecret,
Expand Down

0 comments on commit ca76952

Please sign in to comment.