12. 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

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 176ff05d9c7c4528b04553217098a71cd076d52623dab894a7f7ee34116ca170

-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: 364193153
Unirep.reputation.proof.WyI5MDkwMzIyMjgxNDIyNTU0NjMwOTk3NTg2MDA1NzU0MjAwODMwMjk1OTk1MTMyNjI0MjE3Njk2ODYzMzAxODQ1OTMxOTU1ODMzMDIwIiwiMTA0NzExNjQ3Nzk1Mjk0NjI5NzM0NDU2ODE5MDQ0NjgwMzQ0Mzc3NDYzNjk0ODY3NjQzNzY0Mjg5NDgwNjE4NTY3Mjg5ODU4NzMzMTUiLCIyMDI4NTA0MTM0NTUyOTc5Nzg4NjcyOTgyNDIzNzUwOTQ5MjYyODQ4NDQ5ODY1ODAzMDgzNTM0MjQ3NjU3MjU2NTE1MjIyMDkwNjcxOCIsIjIwMTYxMzc4NjcyODA2MzQxNjM3ODMzODA2NDIwNDQwMjc0NDg2ODA2NTQyNjA4NjM0MDc2MDM4MDQ1NzAzMzgxOTYwNDkxNDg5NDIiLCI0NzA5NTM0NzQzMTI1Njc5MzAzMjMwMTEzNzI1NzYzNTExNDI3MjM1MTA0NTc0NzcxNDcyNTEwNDgxNTcwMDc2ODY4NjY4MTcxOTY2IiwiMTk3MzcxMDE1Nzg0MTgwODMwMTExMjE0MzE1ODc2ODY3NjgwNDM1MTcxOTU5ODcwOTk3ODgyOTU2OTcwMTYyMzAwNjU0NTcxOTI1MDYi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