diff --git a/pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/AnoncredLib.scala b/pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/AnoncredLib.scala index 102b829f87..aa6e49ebda 100644 --- a/pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/AnoncredLib.scala +++ b/pollux/lib/anoncreds/src/main/scala/io/iohk/atala/pollux/anoncreds/AnoncredLib.scala @@ -92,7 +92,7 @@ object AnoncredLib { metadata: CredentialRequestMetadata, linkSecret: LinkSecretWithId, credentialDefinition: CredentialDefinition, - ): Unit = { + ): Credential = { uniffi.anoncreds_wrapper .Prover() .processCredential( diff --git a/pollux/lib/anoncredsTest/src/test/scala/io/iohk/atala/pollux/anoncreds/PoCNewLib.scala b/pollux/lib/anoncredsTest/src/test/scala/io/iohk/atala/pollux/anoncreds/PoCNewLib.scala index bf74b7e97d..ed5401aed4 100644 --- a/pollux/lib/anoncredsTest/src/test/scala/io/iohk/atala/pollux/anoncreds/PoCNewLib.scala +++ b/pollux/lib/anoncredsTest/src/test/scala/io/iohk/atala/pollux/anoncreds/PoCNewLib.scala @@ -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 ### @@ -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 @@ -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,