Go to file
2020-07-28 14:31:58 +08:00
.circleci Sadly install 3.7.5 with --enable-shared flag 2020-07-28 13:26:49 +08:00
build_configs Update Window build spec and requriements.txt: fix datas path and add pywin32-ctypes version hashes 2020-07-27 20:23:08 +08:00
eth2deposit Add network (chain) name selection to prompt 2020-07-28 00:32:40 +08:00
tests Add network (chain) name selection to prompt 2020-07-28 00:32:40 +08:00
.gitignore gitignore dist/ 2020-05-25 15:02:44 +02:00
deposit.sh Do not retreat pip as a module 2020-07-09 22:49:57 +08:00
flake8.ini Fix typing error 2020-05-07 15:13:09 +08:00
LICENSE Adds CC0 Licence 2020-02-26 16:53:57 +00:00
Makefile Update Window build spec and requriements.txt: fix datas path and add pywin32-ctypes version hashes 2020-07-27 20:23:08 +08:00
mypy.ini Use more strict mypy setting and update KeystoreModule type (#17) 2020-05-19 21:34:16 +08:00
README.md pip3/pip 2020-07-28 14:27:05 +08:00
requirements_test.txt Adds MacOS build capablilities 2020-07-24 14:23:37 +02:00
requirements.txt Bump py_ecc to 4.0.0 (Eth2 spec v0.12.0, IETF BLS v2 + hash-to-curve v7) 2020-05-26 16:03:32 +08:00
setup.py Bump app version from v0.1.0 -> v0.2.0 to align with release versioning 2020-07-23 13:32:44 +02:00
test_deposit_script.py Add network (chain) name selection to prompt 2020-07-28 00:32:40 +08:00
tox.ini Fix tox and windows tests 2020-05-23 22:28:41 +08:00

eth2.0-deposit-cli

Pre-production warning

This software is a pre-release version which has not yet been audited and therefore should not yet be trusted to generate keys with the intent of securing actual ETH.

Tutorial for users

Build requirements

For Linux or MacOS users

Option 1. Download binary executable file

Step 1. Installation

See releases page to download and decompress the corresponding binary files.

Step 2. Create keys and deposit_data-*.json

Run the following command to enter the interactive CLI:

./deposit

You can also run the tool with optional arguments:

./deposit --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
Arguments

You can use --help flag to see all 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)
--chain String. mainnet by default The chain setting for the signing domain.
Successful message

You will see the following messages after successfully generated the keystore(s) and the deposit(s):

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>

Option 2. Build deposit-cli with native Python

Step 0. Python version checking

Ensure you are using Python version >= Python3.7:

python3 -V
Step 1. Installation

Install the dependencies:

pip3 install -r requirements.txt
python3 setup.py install

Or use the helper script:

./deposit.sh install
Step 2. Create keys and deposit_data-*.json

Run the following command to enter the interactive CLI:

./deposit.sh

You can also run the tool with optional arguments:

./deposit.sh --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
Arguments

See here

Successful message

See here

Option 3. Build deposit-cli with virtualenv

Step 0. Python version checking

Ensure you are using Python version >= Python3.7:

python3 -V
Step 1. Installation

For the virtualenv users, you can create a new venv:

pip3 install virtualenv
virtualenv venv
./venv/bin/activate

and install the dependencies:

python setup.py install
pip install -r requirements.txt
Step 2. Create keys and deposit_data-*.json

Run the following command to enter the interactive CLI:

python ./eth2deposit/deposit.py

You can also run the tool with optional arguments:

python ./eth2deposit/deposit.py --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
Arguments

See here

Successful message

See here


For Windows users

Option 1. Download binary executable file

Step 1. Installation

See releases page to download and decompress the corresponding binary files.

Step 2. Create keys and deposit_data-*.json

Run the following command to enter the interactive CLI:

deposit.exe

You can also run the tool with optional arguments:

deposit.exe --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
Arguments

See here

Successful message

See here

Option 2. Build deposit-cli with native Python

Step 0. Python version checking

Ensure you are using Python version >= Python3.7:

python -V
Step 1. Installation

Install the dependencies:

pip install -r requirements.txt
python setup.py install

Or use the helper script:

sh deposit.sh install
Step 2. Create keys and deposit_data-*.json

Run the following command to enter the interactive CLI:

sh deposit.sh

You can also run the tool with optional arguments:

sh deposit.sh --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
Arguments

See here

Successful message

See here

Option 3. Build deposit-cli with virtualenv

Step 0. Python version checking

Ensure you are using Python version >= Python3.7:

python -V
Step 1. Installation

For the virtualenv users, you can create a new venv:

pip install virtualenv
virtualenv venv
./venv/bin/activate

and install the dependencies:

python setup.py install
pip install -r requirements.txt
Step 2. Create keys and deposit_data-*.json

Run the following command to enter the interactive CLI:

python ./eth2deposit/deposit.py

You can also run the tool with optional arguments:

python ./eth2deposit/deposit.py --num_validators=<NUM_VALIDATORS> --mnemonic_language=english --chain=<CHAIN_NAME> --folder=<YOUR_FOLDER_PATH>
Arguments

See here

Successful message

See here

Development

Install basic requirements

python3 -m pip install -r requirements.txt
python3 setup.py install

Install testing requirements

python3 -m pip install -r requirements_test.txt

Run tests

python3 -m pytest .