# Operation references

## Download the Client

Execute the following command to clone the repository :

```
git clone -b test https://github.com/exsat-network/exsat-client
```

## Build the client

```
cd exsat-client
yarn install && yarn build
```

## Edit the .env configuration file

Please generate ".env" file by coping from ".env.example":

```
cp .env.example .env
```

If you're following all the [below steps](#execute-the-client), you don't need to modify the .env file.

If you already have a keystore file and wish to [run the client directly](#execute-the-client), you may wish to configure below items:

```
BTC_RPC_URL=
SYNCHRONIZER_KEYSTORE_FILE=
SYNCHRONIZER_KEYSTORE_PASSWORD=
```

Please find the details of the configurations [here](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/common-operations/environment-variables).

## Execute the client

### 1. Initiate the synchronizer account

#### Create or import the account

If you don't have a synchronizer account, please [create a new account](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/synchronizer-operations/create-new-synchronizer-account).

If you already have a synchronizer account, and wish to import it to your client, please [import seed phase](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/common-operations/import-from-seed-phrase) or [import private key](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/common-operations/import-from-private-key).

#### Register account as synchronizer

If you didn't register your account as synchronizer, please [register as synchronizer.](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/synchronizer-operations/synchronizer-registration)

#### Set Reward Address

If you didn't set reward address for your synchronizer account, please [set reward address](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/synchronizer-operations/change-reward-address).

### 2. Configurations

You can complete some client configurations or perform operations on your account:

* [Set BTC RPC Node](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/common-operations/set-btc-rpc-node) (**must**)
* [Bridge BTC for gas fee ](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/common-operations/refill-btc-for-gas-fees)(optional)
* [Export private key](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/common-operations/export-private-key) (optional)
* [Remove your account](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/common-operations/remove-your-account) (optional)
* [New version check](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/common-operations/upgrade-to-new-version) (optional)

### 3. Execute the client

Once the above operations are completed, your account and client are ready, and you can [start it for long-term running](#execute-the-client).

### 4. Check and claim rewards

You could [check and claim rewards ](https://docs.exsat.network/guides-of-data-consensus/others/operation-references/synchronizer-operations/check-and-claim-rewards-for-synchronizer)on the front-page with the reward address.
