To generate the ZkPass Proof, the Data Holder needs to use the zkpass-client SDK library. The following section illustrates how the coding is done.
zkPass-client Integration
The Data Holder generates the proof by using the zkpass-client SDK library, as shown here.
...
//
// Step 1: Instantiate the zkpass_client object.
//
let service_url = "https://playground-zkpass.ssi.id/proof";
let api_key = ZkPassApiKey {
api_key: "5ecb2229-ddee-460e-b598-a0001c10fff1".to_string(),
secret_api_key: "074a53a8-a252-45de-a9d5-0961a6362df6".to_string(),
};
let zkpass_client = ZkPassClient::new(service_url, api_key);
//
// Step 2: Call the zkpass_client.generate_zk_pass_proof
// to get the zkpass_proof_token.
//
let proof = zkpass_client
.generate_zkpass_proof(&user_data_token, &dvr_token)
.await
.unwrap();
...