Skip to main content
Version: 1.0.1

11. User generates reputation proof

npx ts-node cli/index.ts genReputationProof \
-x $UNIREP_CONTRACT_ADDRESS \
-id $USER_IDENTITY \
-a $ATTESTER_ID \
-mr 1 \
-n 0 \
-gp 0
info

NOTE:

-a is attester's id

-mr is the minimum reputation score, i.e, user wants to prove that the attester gave the user a (positive reputation - negative reputation) score that's larger than the minimum reputation score

-gp is the pre-image of the graffiti for the reputation. gp in this case, 0 being the hash pre-image of 19014214495641488759237505126948346942972912379615652741039992445865937985820 (See: attest)

-n is the nonce of the output epoch key, it can be used to receive attestation

See: cli/genReputationProof for more genReputationProof options

The proof will be printed and it should be handed to the receiver of this proof, for example,

Proof of reputation from attester 1:
Epoch key of the user: 3914435768
Unirep.reputation.proof.WyIxNzY3NTA1MDExMjYxODM2NTk3NDA5OTY3NzEyNjY1OTcwNDg5NDM5MzE2NjgxMTQzNTQzMDU4MjgxMzUwNjQxOTkwMDUxMDA0Njk0MiIsIjE1NDk2NTE1NzM1MTY4NzgyMDg0MDI5MjEwNTExNjgwNDAxMDQ4OTI4MjM4NzMxODYxMTcxMzUxMTUxMTIzODkzNTE3MzAyNzczNDE2IiwiMTQ5MzYzODI3Nzc4MDY2MDUyMDk3Nzc2ODA2NDE4NTY1Mzc0ODE0MTg5NDkyMDg3NTgyMTU5MDYwMzc1NzM4OTUwNDQ3MjI4MjkyMTIiLCI1Njg5NzAxMTY0NTQ1MTcwMzM5MzQyMTcwNDQ0NjYwNTIwMTAzNzg3MDA0ODc2MDQyMDUxNDUzNDkwNTAxNjM2MzM5MTM1MjAwNTYxIiwiMjAzODczMTI2Nzk3Mzc3MzM4NjMzNTY3MTA3MjQxNDAxNjU0MzgyMjI5NzExNjUyMDAzMDA4ODQ1NjkwNzE0NDQ2NzAzOTI5NDYzNzkiLCIyMDM2MDg2MjM1MDYzMjAzNzc1MzI4NTU5MTE2MzQzMjc1MzEzNzI3ODM4NjExODA5MzA0ODMwMjEzNjc4OTM0MDQ0NTYzNzAzNDE0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