Issued a credential that has an attribute with the mime type "text/plain" and the value "088003297" (a string that starts with "0" and has only digits).
The holder successfully accepted and stored this credential.
Created a presentation using this document and this attribute value. The created Proof JSON contains the following revealed attribute:
"RegistrationDocumentNumber": { "sub_proof_index": 0, "raw": "088003297", "encoded": "88003297" },
The "encoded" value have lost it's "0".
When the verifier calls _proofService.VerifyProofAsync(context, proof.RequestJson, proof.ProofJson), an error is thrown saying:
"The encoded value for 'RegistrationDocumentNumber' is invalid. Expected '88003297'. Actual '88003297'".
When emit a document with the RegistrationDocumentNumber = "55454" for example, everything works as expected.
Expected result:
Must be able to create a valid presentation using an attribute with the string value "088003297" (starting with 0, only digits).
Not sure if the issue is in Aries or Indy. Theoretically the issue occurs when the Proof is created at the Hyperledger.Indy.AnonCredsApi.AnonCreds.ProverCreateProofAsync method that calls the NativeMethods.indy_prover_create_proof from Indy.
Steps to reproduce:
"RegistrationDocumentNumber": { "sub_proof_index": 0, "raw": "088003297", "encoded": "88003297" },
The "encoded" value have lost it's "0"."The encoded value for 'RegistrationDocumentNumber' is invalid. Expected '88003297'. Actual '88003297'".
When emit a document with the RegistrationDocumentNumber = "55454" for example, everything works as expected.Expected result:
Not sure if the issue is in Aries or Indy. Theoretically the issue occurs when the Proof is created at the Hyperledger.Indy.AnonCredsApi.AnonCreds.ProverCreateProofAsync method that calls the NativeMethods.indy_prover_create_proof from Indy.