Giter Site home page Giter Site logo

matnad / eth2.0-deposit-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ethereum/staking-deposit-cli

0.0 1.0 0.0 440 KB

Secure key generation for eth2 deposits

License: Creative Commons Zero v1.0 Universal

Makefile 2.98% Python 95.53% Shell 1.49%

eth2.0-deposit-cli's Introduction

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
source venv/bin/activate

and install the dependencies:

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

Run the following command to enter the interactive CLI:

python3 ./eth2deposit/deposit.py

You can also run the tool with optional arguments:

python3 ./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 (Assume that you've installed Python 3 as the main Python):

python -V
Step 1. Installation

Install the dependencies:

pip3 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 (Assume that you've installed Python 3 as the main Python):

python -V
Step 1. Installation

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

pip3 install virtualenv
virtualenv venv
.\venv\Scripts\activate

and install the dependencies:

python setup.py install
pip3 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 .

eth2.0-deposit-cli's People

Contributors

carlbeek avatar hwwhww avatar miguelmota avatar protortyp avatar vadorovsky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.