User Sign Up
User and attester sign up
- There are two different actors in Unirep: user and attester
- A user with a semaphore identity can perform post and comment and acts with an epoch key without revealing their semaphore identity and identity commitment
- An attester is associated with his Ethereum account. When an attester sign up, the attester has a unique attester id, and whenever the attester performs upvote and downvote, users will know the attestation comes from which attester id.
npx ts-node cli/index.ts userSignup
[-h]
[-e ETH_PROVIDER]
-c IDENTITY_COMMITMENT
-x CONTRACT
(-dp | -d ETH_PRIVKEY)
- When a user signs up, the contract will airdrop
DEFAULT_AIRDROPPED_KARMA
to the user. - So in the first epoch when user signs up, the user can spend the amount of the
DEFAULT_AIRDROPPED_KARMA
.
-e ETH_PROVIDER, --eth-provider ETH_PROVIDER
A connection string to an Ethereum provider. Default: http://localhost:8545
-c IDENTITY_COMMITMENT, --identity-commitment IDENTITY_COMMITMENT
The user's identity commitment (in hex representation)
-x CONTRACT, --contract CONTRACT
The Unirep Social contract address
-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 key
-h, --help Show this help message and exit.
npx ts-node cli/index.ts attesterSignup
[-h] [-e ETH_PROVIDER] -x CONTRACT
(-dp | -d ETH_PRIVKEY)
- When an attester signs up, the Unirep smart contract will assign an attester id to the attester.
- The attester id will start indexing from 1.
-e ETH_PROVIDER, --eth-provider ETH_PROVIDER
A connection string to an Ethereum provider. Default: http://localhost:8545
-x CONTRACT, --contract CONTRACT
The Unirep Social contract address
-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 key
-h, --help Show this help message and exit.