// Prove score > 500 without revealing exact score
async function proveScoreThreshold(user, threshold) {
const score = await zkScore.getScore(user);
const proof = await generateZKProof({
public: { threshold },
private: { actualScore: score.total }
});
return proof;
}
// Verify proof
async function verifyScoreProof(proof, threshold) {
return await verifyZKProof(proof, threshold);
}