Skip to main content

POST /verifyZkpToken

Verify a Zero-Knowledge Proof (ZKP) token.

{{baseUrl}}/verifyZkpToken

Headers

HeaderTypeDescription
x-api-keystringThe API key required for authentication.

Request Body

ParameterTypeDescription
zkpTokenstringThe Zero-Knowledge Proof token to verify.
zkpDataobjectData related to the ZKP, including VC ID and conditions.
publicKeystringThe public key used to verify the ZKP token.

Sample Request Body:

{
"zkpToken": "3044022070683c64ca3b3da060c93fadab41b352bdf75c9e3176e402bc897017b4fdf23802206790e49cd934a015217633237731a78eedfa9192c4d4ab3d4377b232844bee6a",
"zkpData": {
"condition": {
"age": 18
},
"conditionMet": true,
"calculatedAge": 24
},
"publicKey": "047f422ec4c08c97af19867779b6189559c01a5430f579acee1ac6063f3ee6cc541d4719b555148aaac9f7137865be76a3bf4dc16acb11d2c336da79d9bf88975f"
}

Click Send and wait for the response.

Response (Success - 200)

ParameterTypeDescription
successbooleanIndicates if the ZKP token verification was successful.
conditionMetbooleanIndicates if the condition was met.
calculatedAgenumberThe age calculated from the credential.
messagestringA success message indicating that the ZKP token was verified.

Sample Response Body:

{
"success": true,
"conditionMet": true,
"calculatedAge": 24,
"message": "ZKP token verified successfully, condition was met."
}

Response (Server Error - 500)

ParameterTypeDescription
errorstringDescribes the error that occurred.

Sample Response Body:

{
"error": "Server error"
}