Unirep
  • 👏Welcome
  • 🧩Introduction
  • 🎮Getting Started
    • Install & build 🛠
    • Start with cli commands 🔌
      • 0. Install and build
      • 1. Spin up the testing chain
      • 2. Deploy Unirep contract
      • 3. User generates semaphore identity
      • 4. User signs up
      • 5. Attester signs up
      • 6. User generates epoch key and epoch key proof
      • 7. Attesters/Users verify epoch key proof
      • 8. Submit epoch key proof to Unirep smart contract
      • 9. Attester attest to epoch key
      • 10. Epoch transition
      • 11. User state transition
      • 12. User generates reputation proof
      • 13. Attesters/ Users verify the reputation proof
      • 14. User generates sign up proof
      • 15. Attesters/ Users verify the sign up proof
    • Start with Typescript 📠
      • 0. Install packages
      • 1. deploy
      • 2. User signs up
      • 3. Attester signs up
      • 4. Epoch key proof
      • 5. Attest
      • 6. Epoch transition
      • 7. User state transition
      • 8. Reputation proof
    • Computation happens off-chain â„šī¸
  • â˜€ī¸Protocol
    • Glossary
      • Users and Attesters
      • Epoch
      • Epoch Key
      • Reputation
      • Trees
      • Nullifiers
      • Epoch Transition
      • User State Transition
    • Circuits
      • Epoch Key Proof
      • Reputation Proof
      • User Sign Up Proof
      • User State Transition Proof
    • Contract
      • Sign up
      • Attestations
      • Epoch transition
      • User state transition
      • Verify proofs
  • 🌈Package usage
    • @unirep/crypto
    • @unirep/circuits
    • @unirep/contracts
    • @unirep/core
    • @unirep/subgraph
    • cli
      • Deploy Unirep Contract
      • User Identity
      • User Sign Up
      • Epoch Key And Proof
      • Attestation
      • Epoch transition
      • User state transition
      • Reputation Proof
      • Airdrop Reputation
      • Spend Reputation
  • đŸŒģApplications
    • Unirep Social
Powered by GitBook
On this page
  • attest
  • Options

Was this helpful?

Edit on GitHub
  1. Package usage
  2. cli

Attestation

Attester gives reputation to an epoch key

attest

npx ts-node cli/index.ts attest
                  [-h] 
                  [-e ETH_PROVIDER] 
                  -toi TO_PROOF_INDEX 
                  [-fromi FROM_PROOF_INDEX] 
                  -epk EPOCH_KEY 
                  [-pr POS_REP] 
                  [-nr NEG_REP] 
                  [-gf GRAFFITI]
                  [-s SIGN_UP] 
                  -x CONTRACT 
                  -d ETH_PRIVKEY

Options

  -e ETH_PROVIDER, --eth-provider ETH_PROVIDER
                        A connection string to an Ethereum provider. Default: http://localhost:8545
  -toi TO_PROOF_INDEX, --to-proof-index TO_PROOF_INDEX
                        The proof index of the receiver's epoch key
  -fromi FROM_PROOF_INDEX, --from-proof-index FROM_PROOF_INDEX
                        The proof index of the sender's epoch key
  -epk EPOCH_KEY, --epoch-key EPOCH_KEY
                        The user's epoch key to attest to (in hex representation)
  -pr POS_REP, --pos-rep POS_REP
                        Score of positive reputation to give to the user
  -nr NEG_REP, --neg-rep NEG_REP
                        Score of negative reputation to give to the user
  -gf GRAFFITI, --graffiti GRAFFITI
                        Graffiti for the reputation given to the user (in hex representation)
  -s SIGN_UP, --sign-up SIGN_UP
                        Whether to set sign up flag to the user
  -x CONTRACT, --contract CONTRACT
                        The Unirep contract address
  -d ETH_PRIVKEY, --eth-privkey ETH_PRIVKEY
                        The attester's Ethereum private key

Options inherited from parent commands

  -h, --help            Show this help message and exit.
PreviousEpoch Key And ProofNextEpoch transition

Last updated 2 years ago

Was this helpful?

source:

🌈
core/cli/attest.ts