createProof
This function orchestrates all the API calls in sequence to generate a proof.Submit your Signing request
Use
commitAPI and pass the hash and public description to create a blinded signature.Make a ZK proof for Content
Retrieve a ZK challenge for the commitment signature using the
getChallengeAPI.1. fileToBase64
Purpose:
Converts a file into a base64-encoded string without the metadata portion (data:…). This is the first step before sending the file content to any API.messageHashAPI for hashing.
2. messageHashAPI
Purpose:
Hashes the base64-encoded file content by sending it to an API.3. commitAPI
Purpose:
Creates a blinded signature by sending the hashed message and a description to the API.4. getChallengeAPI
Purpose:
Requests a ZK challenge from the API using the blinded signature created earlier.5. solveChallengeAPI
Purpose:
Solves the ZK challenge using the challenge format returned by the previous step.6. unblindSignatureAPI
Purpose:
Unblinds the signature using the ZK challenge solution recieved.verifyProof
This function is used to verify the proof.verifySignatureAPI
Purpose:
Verifies the signature and returntrue/false.