🐰
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

Was this helpful?

  1. Command-line interface

User Identity

Create a user identity with libsemaphore

PreviousDeploy Unirep ContractNextUser Sign Up

Last updated 3 years ago

Was this helpful?

  • Semaphore is a zero-knowledge gadget which allows users to prove their membership of a set without revealing their original identity.

  • We use here to generate users' identity and users can send their identity commitment instead of their semaphore identity to sign up.

  • Only a user has the semaphore identity and the identity commitment has signed up, the user can perform actions on Unirep contract.

This function does not require users connect to an Ethereum provider.

genUnirepIdentity

npx ts-node cli/index.ts genUnirepIdentity [-h]
  • base64url encoded identity and identity commitment will be printed

  • A string with Unirep.identity prefix is user's semaphore identity

  • A string with Unirep.identityCommitment prefix is user's semaphore identity commitment

Options inherited from parent commands

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

libsemaphore