const isGSTRootExisted = await unirepState.GSTRootExists(
proof.globalStateTree,
proof.epoch
)
console.log(isGSTRootExisted) // false then the proof will be invalid
Verify reputation nullifiers.
const repNullifiers = proof.repNullifiers.map((i) => i.toString())
for (const nullifier of repNullifiers) {
if (await unirepState.nullifierExist(nullifier)) {
return false // then the proof will be invalid
}
}
Use the reputation proof to attest others. To construct another attestation, epochKey, and index, see