User Interaction Functions
How user can interact in the Unirep protocol
Publish a post
User can use the command to generate a reputation proof, and call Unirep smart contract to publish a post.
publishPost
publishPostnpx ts-node cli/index.ts publishPost
[-h]
[-e ETH_PROVIDER]
-tx TEXT
-id IDENTITY
-n EPOCH_KEY_NONCE
[-mr MIN_REP]
-x CONTRACT
[-db]
(-dp | -d ETH_PRIVKEY)The transaction hash and reputation proof will be printed.
The reputation proof can be verified by a
verifyReputationProofcommand.
Options
-e ETH_PROVIDER, --eth-provider ETH_PROVIDER
A connection string to an Ethereum provider. Default: http://localhost:8545
-tx TEXT, --text TEXT
The text written in the post
-id IDENTITY, --identity IDENTITY
The (serialized) user's identity
-n EPOCH_KEY_NONCE, --epoch-key-nonce EPOCH_KEY_NONCE
The epoch key nonce
-mr MIN_REP, --min-rep MIN_REP
The minimum reputation score the user has
-x CONTRACT, --contract CONTRACT
The Unirep Social contract address
-db, --from-database Indicate if to generate proving circuit from database
-dp, --prompt-for-eth-privkey
Whether to prompt for the user's Ethereum private key and ignore -d / --eth-privkey
-d ETH_PRIVKEY, --eth-privkey ETH_PRIVKEY
The deployer's Ethereum private keyOptions inherited from parent commands
Leave a comment
User can use the command to generate a reputation proof, and call Unirep smart contract to publish a comment to a specified post.
leaveComment
leaveCommentThe transaction hash and reputation proof will be printed.
The reputation proof can be verified by a
verifyReputationProofcommand.
Options
Options inherited from parent commands
Upvote and downvote
User can use the command to generate a reputation proof, and call Unirep smart contract to upvote or downvote an epoch key.
vote
voteThe transaction hash and reputation proof will be printed.
The reputation proof can be verified by a
verifyReputationProofcommand.A user should choose either an upvote value or a downvote value.
Options
Options inherited from parent commands
Last updated
Was this helpful?