# User state transition

## `userStateTransition`

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

* It will generate [start transition proof](https://unirep.gitbook.io/unirep/protocol/circuits/user-state-transition-proof#1.-start-transition-proof), [process attestations proof](https://unirep.gitbook.io/unirep/protocol/circuits/user-state-transition-proof#2.-process-attestations-proof)s, and the [user state transition proof](https://unirep.gitbook.io/unirep/protocol/circuits/user-state-transition-proof#3.-user-state-transition-proof).

### 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
  -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/userStateTransition.ts](https://github.com/Unirep/Unirep/blob/main/packages/core/cli/userStateTransition.ts)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://unirep.gitbook.io/unirep/package/cli/user-state-transition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
