2. Providing Proof Verification API

Providing a REST API to verify ZkPass Proof

zkpass-client Integration

In the proof verification API implementation, the Proof Verifier needs to verify the received ZkPass Proof object by using the zkpass-client's verify_zkpass_proof method, as shown here.

...

//
// Step 1: Instantiate the zkpass_client object.
//
let zkpass_client = ZkPassClient::new(
    "",
    ZkPassApiKey {
        api_key: "".to_string(),
        secret_api_key: "".to_string(),
    },
);

//
// Step 2: Call zkpass_client.verify_zkpass_proof to verify the proof.
//
let (result, _zkpass_proof) = zkpass_client
    .verify_zkpass_proof(
        zkpass_proof_token,
        &proof_metadata_validator)
    .unwrap();
    
...

Last updated