Generate Proof

Prerequisites

Before using the Generating Proof Endpoint, There are three essential items you'll need to use the endpoint:

  1. encryptedUserDataToken : This token contains your encrypted user data

  2. encryptedDvrToken : This token holds your encrypted DVR data

  3. apiToken : This unique identifier authenticates your requests with the zkPass API

apiToken is the base64 form of YOUR_API_KEY:YOUR_API_SECRET.

Generating Encrypted Tokens:

For instructions on creating the encryptedUserDataToken and encryptedDvrToken, refer to our Utilities section. It provides a step-by-step guide that covers:

  1. Generating a Key Pair: This creates the keys you'll use for signing your data.

  2. Signing User Data and DVR: This step adds a digital signature to your data tokens, ensuring their authenticity.

  3. Encrypting User Data and DVR: This encrypts your data tokens, making them unreadable by anyone without the decryption key.

Endpoint

TypeValue

HTTP Method

POST

API endpoint (Playground)

https://playground-zkpass.ssi.id/v1/proof

Request Header

Authorization: Basic [apiToken]
Content-Type: application/json
X-zkPass-Client: [zkPass current version] (Optional)
ParameterDescription

Authorization

base64 form of YOUR_API_KEY:YOUR_API_SECRET

Content-Type

Indicates that the content being sent or received is JSON data

X-zkPass-Client (Optional)

Optional Header, zkPass WS checks the zkPass client version if provided. The current supported version is 1.0.0

Request Body

{
    "user_data_token": "[encryptedUserDataToken]",
    "dvr_token": "[encryptedDvrToken]"
}

ParameterTypeMandatoryDescription

user_data_token

string

Mandatory

encrypted user data token in JWE format

dvr_token

string

Mandatory

encrypted dvr token in JWE format

Response

{
    "status": 200,
    "proof": "eyJ0e..."
}

Last updated