8. Reputation proof
Generate a reputation proof
const attesterID = await contract.attesters(attester.address)
const epkNonce = 0
const rep = userState.getRepByAttester(BigInt(attesterId))
const minRep = Number(rep.posRep) - Number(rep.negRep)
const proveGraffiti = 0 // 0 then it will not prove the pre-image
const nonceList = 0 // 0 or [-1,..,-1] with length 'maxReputationBudget' means the proof will not generate reputation nullifiers.
const proof = await userState.genProveReputationProof(
attesterId,
epkNonce,
minRep,
proveGraffiti,
graffitiPreImage,
nonceList
)Spend reputation
Verify the proof
Verify UniRep state
Last updated