🐰
Unirep Social
  • Welcome!
  • Introduction
  • Getting Started
  • Definition
    • Trees
    • Nullifiers
  • Command-line interface
    • Deploy Unirep Contract
    • User Identity
    • User Sign Up
    • Epoch Key And Proof
    • Reputation Proof
    • User Interaction Functions
    • Epoch Transition
    • User State Transition
Powered by GitBook
On this page
  • userStateTransition
  • Options

Was this helpful?

  1. Command-line interface

User State Transition

Every user should call user state transition to process received reputation

  • See (the definition of user state transition).

userStateTransition

npx ts-node cli/index.ts userStateTransition 
                  [-h] 
                  [-e ETH_PROVIDER] 
                  -id IDENTITY 
                  [-b START_BLOCK] 
                  -x CONTRACT 
                  [-db] 
                  (-dp | -d ETH_PRIVKEY)
  • Every user should execute user state transition by hisself before executing any action in the incoming epoch.

  • It will generate a user state transition proof and it can be verified at the Unirep smart contract.

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
  -b START_BLOCK, --start-block START_BLOCK
                        The block the Unirep contract is deployed. Default: 0
  -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 key

Options inherited from parent commands

  -h, --help            Show this help message and exit.
PreviousEpoch Transition

Last updated 3 years ago

Was this helpful?