POST /verifyZkpToken
Verify a Zero-Knowledge Proof (ZKP) token.
{{baseUrl}}/verifyZkpToken
Headers
Header | Type | Description |
---|---|---|
x-api-key | string | The API key required for authentication. |
Request Body
Parameter | Type | Description |
---|---|---|
zkpToken | string | The Zero-Knowledge Proof token to verify. |
zkpData | object | Data related to the ZKP, including VC ID and conditions. |
publicKey | string | The 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)
Parameter | Type | Description |
---|---|---|
success | boolean | Indicates if the ZKP token verification was successful. |
conditionMet | boolean | Indicates if the condition was met. |
calculatedAge | number | The age calculated from the credential. |
message | string | A 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)
Parameter | Type | Description |
---|---|---|
error | string | Describes the error that occurred. |
Sample Response Body:
{
"error": "Server error"
}