Epoch Key And Proof
User generates an epoch key and a proof of this epoch key
An epoch key is the only way that a user can receive reputation.
A user can generate an epoch key with a nonce, the nonce should be less than
numEpochKeyNoncePerEpoch.A user generates the epoch key with a Circom circuit and the epoch key and proof can be verified by attesters in Unirep smart contract.
genEpochKeyAndProof
genEpochKeyAndProofnpx ts-node cli/index.ts genEpochKeyAndProof
[-h]
[-e ETH_PROVIDER]
-id IDENTITY
-n EPOCH_KEY_NONCE
[-b START_BLOCK]
-x CONTRACTepoch key and base64url encoded epoch key proof will be printed
A string with
Unirep.epkProofprefix is the proof of this epoch key
Options
-e ETH_PROVIDER, --eth-provider ETH_PROVIDER
A connection string to an Ethereum provider. Default: http://localhost:8545
-id IDENTITY, --identity IDENTITY
The (serialized) user's identity
-n EPOCH_KEY_NONCE, --epoch-key-nonce EPOCH_KEY_NONCE
The epoch key nonce
-b START_BLOCK, --start-block START_BLOCK
The block the Unirep contract is deployed. Default: 0
-x CONTRACT, --contract CONTRACT
The Unirep Social contract addresOptions inherited from parent commands
verifyEpochKeyProof
verifyEpochKeyProofThis command will help other users with an epoch key proof with
Unirep.epkProofprefix to call the Unirep smart contract to verify the proof.The input should match the claim that the prover provides.
Options
Options inherited from parent commands
Last updated
Was this helpful?