> For the complete documentation index, see [llms.txt](https://unirep.gitbook.io/unirep/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unirep.gitbook.io/unirep/package/cli/user-sign-up.md).

# 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 generate an epoch key without revealing the semaphore identity and identity commitment
* An ***attester*** is associated with his Ethereum account or a smart contract. When an attester sign up, the attester has a unique attester id, and whenever the attester submit attestations, other users will know the attestation comes from which attester id.

## `userSignup`

```
npx ts-node cli/index.ts userSignUp 
                  [-h] 
                  [-e ETH_PROVIDER] 
                  -c IDENTITY_COMMITMENT 
                  -x CONTRACT 
                  -d ETH_PRIVKEY
```

### Options

```
  -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 contract address
  -d ETH_PRIVKEY, --eth-privkey ETH_PRIVKEY
                        The user's Ethereum private key
```

#### Options inherited from parent commands <a href="#options-inherited-from-parent-commands" id="options-inherited-from-parent-commands"></a>

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

{% hint style="info" %}
source: [core/cli/userSignUp.ts](https://github.com/Unirep/Unirep/blob/main/packages/core/cli/userSignUp.ts)
{% endhint %}

## `attesterSignUp`

```
npx ts-node cli/index.ts attesterSignUp 
                  [-h] 
                  [-e ETH_PROVIDER] 
                  -x CONTRACT 
                  -d ETH_PRIVKEY
```

* When an attester signs up, the Unirep smart contract will record the address of the attester and assign an attester id to the attester.
* The attester id will start indexing from 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
  -d ETH_PRIVKEY, --eth-privkey ETH_PRIVKEY
                        The attester's Ethereum private keyhin
```

#### Options inherited from parent commands <a href="#options-inherited-from-parent-commands" id="options-inherited-from-parent-commands"></a>

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

{% hint style="info" %}
source: [core/cli/attesterSignUp.ts](https://github.com/Unirep/Unirep/blob/main/packages/core/cli/attesterSignUp.ts)
{% endhint %}
