2020-05-08 13:34:09 +00:00
# eth2.0-deposit-cli
2020-05-21 16:18:09 +00:00
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE - RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Tutorial for users ](#tutorial-for-users )
- [Requirements ](#requirements )
- [For Linux or MacOS users ](#for-linux-or-macos-users )
- [Step 1. Install deposit-cli dependencies ](#step-1-install-deposit-cli-dependencies )
- [Step 2. Create your keys and deposit data ](#step-2-create-your-keys-and-deposit-data )
2020-05-22 08:44:34 +00:00
- [Arguments ](#arguments )
2020-05-21 16:18:09 +00:00
- [For Windows users ](#for-windows-users )
- [Step 1. Install deposit-cli dependencies ](#step-1-install-deposit-cli-dependencies-1 )
- [Step 2. Create your keys and deposit data ](#step-2-create-your-keys-and-deposit-data-1 )
2020-05-22 08:44:34 +00:00
- [Arguments ](#arguments-1 )
2020-05-21 16:18:09 +00:00
- [For `venv` users ](#for-venv-users )
- [Development ](#development )
- [Install basic requirements ](#install-basic-requirements )
- [Install testing requirements ](#install-testing-requirements )
- [Run tests ](#run-tests )
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2020-05-08 13:34:09 +00:00
## Tutorial for users
2020-05-21 16:18:09 +00:00
### Requirements
- [Python **3.7+** ](https://www.python.org/about/gettingstarted/ )
- [pip3 ](https://pip.pypa.io/en/stable/installing/ )
### For Linux or MacOS users
#### Step 1. Install deposit-cli dependencies
If it's your first time to use this tool, you need to install the Python library dependencies:
```sh
./deposit.sh install
```
#### Step 2. Create your keys and deposit data
2020-05-22 08:44:34 +00:00
Run the following command to enter the interactive CLI:
2020-05-21 16:18:09 +00:00
```sh
./deposit.sh
```
You can also run the tool with optional arguments:
2020-05-08 13:34:09 +00:00
```sh
2020-05-22 08:44:34 +00:00
./deposit.sh --num_validators=< NUM_VALIDATORS > --mnemonic_language=english --folder=< YOUR_FOLDER_PATH >
2020-05-08 13:34:09 +00:00
```
2020-05-22 08:44:34 +00:00
#### Arguments
| Argument | Type | Description |
| -------- | -------- | -------- |
| `--num_validators` | Non-negative integer | The number of signing keys you want to generate. Note that the child key(s) are generated via the same master key. |
| `--mnemonic_language` | String. Options: `czech` , `chinese_traditional` , `chinese_simplified` , `english` , `spanish` , `italian` , `korean` . Default to `english` | The mnemonic language |
| `--folder` | String. Pointing to `./validator_keys` by default | The folder path for the keystore(s) and deposit(s) |
2020-05-23 16:19:41 +00:00
| `--chain` | String. `mainnet` by defualt | The chain setting for the signing domain. |
2020-05-22 08:44:34 +00:00
2020-05-21 16:18:09 +00:00
### For Windows users
#### Step 1. Install deposit-cli dependencies
If it's your first time to use this tool, you need to install the Python library dependencies:
```sh
sh deposit.sh install
```
#### Step 2. Create your keys and deposit data
2020-05-22 08:44:34 +00:00
Run the following command to enter the interactive CLI:
2020-05-21 16:18:09 +00:00
```sh
sh deposit.sh
```
You can also run the tool with optional arguments:
```sh
2020-05-22 08:44:34 +00:00
sh deposit.sh --num_validators=< NUM_VALIDATORS > --mnemonic_language=english --folder=< YOUR_FOLDER_PATH >
2020-05-21 16:18:09 +00:00
```
2020-05-22 08:44:34 +00:00
You will see the following messages after successfully generated the keystore(s) and the deposit(s):
#### Arguments
See [here ](#arguments )
2020-05-21 16:18:09 +00:00
```
Creating your keys.
Saving your keystore(s).
Creating your deposit(s).
Verifying your keystore(s).
Verifying your deposit(s).
Success!
Your keys can be found at: < YOUR_FOLDER_PATH >
```
### For `venv` users
If you want to use Python [`venv` ](https://docs.python.org/3.7/library/venv.html ), just run:
```sh
make venv_deposit
```
2020-05-08 13:34:09 +00:00
## Development
2020-05-12 07:44:04 +00:00
### Install basic requirements
2020-05-08 13:34:09 +00:00
2020-05-12 07:44:04 +00:00
```sh
python3 -m pip install -r requirements.txt
python3 setup.py install
2020-05-08 13:34:09 +00:00
```
2020-05-12 07:44:04 +00:00
### Install testing requirements
2020-05-08 13:34:09 +00:00
2020-05-12 07:44:04 +00:00
```sh
python3 -m pip install -r requirements_test.txt
2020-05-08 13:34:09 +00:00
```
2020-05-12 07:44:04 +00:00
### Run tests
```sh
python3 -m pytest .
2020-05-08 13:34:09 +00:00
```