6. User generates epoch key and epoch key proof

npx ts-node cli/index.ts genEpochKeyAndProof \
    -x $UNIREP_CONTRACT_ADDRESS  \
    -id $USER_IDENTITY  \
    -n 0

NOTE: -id is user's identity and -n is epoch key nonce which should be less than the system parameter maxEpochKeyNonce

See: cli/genEpochKeyAndProof for more genEpochKeyAndProof options.

NOTE: epoch key and base64url encoded epoch key proof and public signals will be printed and they should be handed to attester to be verified, for example:

Epoch key of epoch 1 and nonce 0: 1421637519
Unirep.epk.proof.WyIyMTA5NTc4NDAyNzkwNTE1NTM4MTQ3NzE5ODAwMjMzNTU0ODgxMTkzOTk4NjcxNzE1NzY0MDU1MTQ2MTY4MTQ3Nzg4Mjc5MjAxMDM2NiIsIjEyMzYzNTc3NjM0NDc1MzM2NDQ2MjkyNjg3NTk5NTYyODU1MjY5ODA1MDUzNTE0OTExNjMwMjY1MzIwOTYyNDAxNTkxNjY0OTI0NzA1IiwiMTEzOTkxNzYwMTgzOTY0ODM1NjM4OTY3NzIzMzg1MTg1NzA2MzYxOTI2MTk1OTkyMDA3MjcwNDU0MTAzODExMDE1MzI5MDMwNzMxNjEiLCIxMzk5NTQ0NzUzMjMxMTE0OTM4MDU4NTQ1MjI1Mzg3MDk0MzQ1MzM1NDM3MjU5MjYyNjk4NjI1NDAzNTM4ODU1NDY5MjgwMzIyNjE4MSIsIjE0MDc0NDk5OTIyMDE1NTgzNzMwNjMyMjEzNjc5NDYyNTQ0NTk0NzE5MDI0NzIyMTQyNjg1Mzg3MjIzOTA3NDkzMTE0MTc0ODA1OTQiLCIxMDQ4NzU1NjIxMzIxNDM4MTMzMjgyODUwOTA3ODgzMzYzOTIwMjI1NjMwMTgwNDU5MjA0NDk1ODE3NTk0NjE3MDYyMjIyMDU4NzAyNSIsIjU4NDQxMzU5NjgwOTI1MjU5ODA4MzgxNTU1MTg2OTgwMzc1NzkyMzc1NzI5NzgwMzYxMTY0NTI5MDM1MjMwOTM0MDQyMjY3MzA1MDAiLCIxNDQxMTk1NDU0NzM0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