# 8. Submit epoch key proof to Unirep smart contract

The epoch key proof should be submitted to the Unirep smart contract, and obtain a proof index from Unirep smart contract, then it can be verified by others and be sent attestations.

```bash
npx ts-node cli/index.ts submitEpochKeyProof \
    -x $UNIREP_CONTRACT_ADDRESS  \
    -d $USER_PRIVATE_KEY  \
    -pf $EPOCH_KEY_PROOF  \
    -p $EPOCH_PUBLIC_SIGNALS
```

{% hint style="info" %}
**NOTE:** See [cli/submitEpochKeyProof](https://unirep.gitbook.io/unirep/package/cli/epoch-key-and-proof#submitepochkeyproof) for more `submitEpochKeyProof` options.
{% endhint %}

* The proof index will be printed, for example:

```
Proof index:  1
```

* Then the epoch key with the proof index should be handed to attester to be attested.


---

# 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/getting-started/start-with-cli-commands/8.-submit-epoch-key-proof-to-unirep-smart-contract.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.
