Airdrop Reputation
Attester sets airdrop amount and users can get airdrop reputation
setAirdropAmount
setAirdropAmountnpx ts-node cli/index.ts setAirdropAmount
[-h]
[-e ETH_PROVIDER]
-x CONTRACT
-a AIRDROP
-d ETH_PRIVKEYThe attester that has registered in UniRep can set the airdrop amount and give it to users that register through the attester's account/smart contract.
UniRep contract will also set the sign up flag to
1.
Options
-e ETH_PROVIDER, --eth-provider ETH_PROVIDER
A connection string to an Ethereum provider. Default: http://localhost:8545
-x CONTRACT, --contract CONTRACT
The Unirep contract address
-a AIRDROP, --airdrop AIRDROP
The amount of airdrop positive reputation given by the attester
-d ETH_PRIVKEY, --eth-privkey ETH_PRIVKEY
The attester's Ethereum private keyOptions inherited from parent commands
-h, --help Show this help message and exit.genUserSignUpProof
genUserSignUpProofnpx ts-node cli/index.ts genUserSignUpProof
[-h]
[-e ETH_PROVIDER]
-id IDENTITY
-a ATTESTER_ID
-x CONTRACTAttester can give user a sign up flag to indicate the user is one of the membership of the attester's application (or event).
Then user can generate a sign up proof to show that he has been authenticated by the attester.
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
-a ATTESTER_ID, --attester-id ATTESTER_ID
The attester id (in hex representation)
-x CONTRACT, --contract CONTRACT
The Unirep contract addressOptions inherited from parent commands
-h, --help Show this help message and exit.verifyUserSignUpProof
verifyUserSignUpProofnpx ts-node cli/index.ts verifyUserSignUpProof
[-h]
[-e ETH_PROVIDER]
[-ep EPOCH]
-p PUBLIC_SIGNALS
-pf PROOF
-x CONTRACT -e ETH_PROVIDER, --eth-provider ETH_PROVIDER
A connection string to an Ethereum provider. Default: http://localhost:8545
-ep EPOCH, --epoch EPOCH
The latest epoch user transitioned to. Default: current epoch
-p PUBLIC_SIGNALS, --public-signals PUBLIC_SIGNALS
The snark public signals of the user's epoch key
-pf PROOF, --proof PROOF
The snark proof of the user's epoch key
-x CONTRACT, --contract CONTRACT
The Unirep contract addressOptions inherited from parent commands
-h, --help Show this help message and exit.giveAirdrop
giveAirdropnpx ts-node cli/index.ts giveAirdrop
[-h]
[-e ETH_PROVIDER]
-p PUBLIC_SIGNALS
-pf PROOF
-x CONTRACT
-d ETH_PRIVKEYAfter receiving the user sign up proof, the attester knows that the user has been authenticated before and the attester can give the attester the airdrop reputation to let the user spend the reputation.
Options
-e ETH_PROVIDER, --eth-provider ETH_PROVIDER
A connection string to an Ethereum provider. Default: http://localhost:8545
-p PUBLIC_SIGNALS, --public-signals PUBLIC_SIGNALS
The snark public signals of the user's epoch key
-pf PROOF, --proof PROOF
The snark proof of the user's epoch key
-x CONTRACT, --contract CONTRACT
The Unirep contract address
-d ETH_PRIVKEY, --eth-privkey ETH_PRIVKEY
The attester's Ethereum private keyOptions inherited from parent commands
-h, --help Show this help message and exit.Last updated
Was this helpful?