diff --git a/docs/book.toml b/docs/book.toml index 2c832e27..9e3e98d5 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -1,5 +1,4 @@ [book] -authors = ["valefar-on-discord"] language = "en" multilingual = false src = "src" diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 16f65021..fcc9cc1b 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -1,8 +1,10 @@ # Summary -- [Introduction](README.md) +- [Ethstaker Deposit CLI](landing.md) +- [Quick Setup](quick_setup.md) - [New Mnemonic](new_mnemonic.md) - [Existing Mnemonic](existing_mnemonic.md) - [Generate BLS to Execution Change](generate_bls_to_execution_change.md) - [Exit Transaction Keystore](exit_transaction_keystore.md) - [Exit Transaction Mnemonic](exit_transaction_mnemonic.md) +- [Local Development](local_development.md) diff --git a/docs/src/existing_mnemonic.md b/docs/src/existing_mnemonic.md index 84e56009..1a7d4548 100644 --- a/docs/src/existing_mnemonic.md +++ b/docs/src/existing_mnemonic.md @@ -5,20 +5,27 @@ Uses an existing BIP-39 mnemonic phrase for key generation. ## Arguments +- **`--chain`**: The chain to use for generating the deposit data. Options are: 'mainnet', 'holesky', etc... + +- **`--mnemonic`**: The mnemonic you used to create withdrawal credentials. + +- **`--mnemonic_password`**: The mnemonic password you used in your key generation. Note: It's not the keystore password. + - **`--validator_start_index`**: The index of the first validator's keys you wish to generate. If this is your first time generating keys with this mnemonic, use 0. If you have generated keys using this mnemonic before, use the next index from which you want to start generating keys from (eg, if you've generated 4 keys before (keys #0, #1, #2, #3), then enter 4 here. - **`--num_validators`**: Number of validators to create. -- **`--chain`**: The chain to use for generating the deposit data. Options are: 'mainnet', 'holesky', etc. - -- **`--folder`**: The folder where keystore and deposit data files will be saved. +- **`--keystore_password`**: The password that is used to encrypt the provided keystore. Note: It's not your mnemonic password. - **`--execution_address`**: The Ethereum 1 address for validator withdrawals. - **`--pbkdf2`**: Will use pbkdf2 key derivation instead of scrypt for generated keystore files as defined in [EIP-2335](https://eips.ethereum.org/EIPS/eip-2335#decryption-key). This can be a good alternative if you intend to work with a large number of keys. +- **`--folder`**: The folder where keystore and deposit data files will be saved. + ## Example Usage ```sh ./deposit existing-mnemonic +``` diff --git a/docs/src/exit_transaction_keystore.md b/docs/src/exit_transaction_keystore.md index 795a9499..17bb92d9 100644 --- a/docs/src/exit_transaction_keystore.md +++ b/docs/src/exit_transaction_keystore.md @@ -22,3 +22,4 @@ Creates an exit transaction using a keystore file. ```sh ./deposit exit-transaction-keystore --keystore /path/to/keystore.json +``` diff --git a/docs/src/exit_transaction_mnemonic.md b/docs/src/exit_transaction_mnemonic.md index 058ae1c3..65a4f3b2 100644 --- a/docs/src/exit_transaction_mnemonic.md +++ b/docs/src/exit_transaction_mnemonic.md @@ -23,3 +23,4 @@ Creates an exit transaction using a mnemonic phrase. ```sh ./deposit exit-transaction-mnemonic +``` diff --git a/docs/src/generate_bls_to_execution_change.md b/docs/src/generate_bls_to_execution_change.md index d715b766..6f0bf9ac 100644 --- a/docs/src/generate_bls_to_execution_change.md +++ b/docs/src/generate_bls_to_execution_change.md @@ -23,8 +23,8 @@ Generates a BLS to execution address change message. - **`--devnet_chain_setting`**: The custom chain setting of a devnet or testnet. Note that it will override your `--chain` choice. - ## Example Usage ```sh ./deposit generate-bls-to-execution-change +``` diff --git a/docs/src/README.md b/docs/src/landing.md similarity index 78% rename from docs/src/README.md rename to docs/src/landing.md index b5d5bd67..2a66a9be 100644 --- a/docs/src/README.md +++ b/docs/src/landing.md @@ -14,8 +14,16 @@ Here are some core recommendations: - **Create backups of your mnemonic**: The mnemonic generated by this tool is crucial to your operation and success as a validator. Losing this mnemonic can put you at significant risk of losing your funds. Follow the instructions carefully when creating a mnemonic, ensure you make a backup copy, and store it in a safe location. +## Getting Started + +If you want to start creating validator keys, please follow the [Quick Setup Instructions](quick_setup.md) or if you would like to run locally, view the [Local Development Instructions](local_development.md). + ## Commands +**You are not required to specify each argument when executing the command. We will prompt you for each argument for security purposes.** + +If there is a specific command you would like to understand more, please choose from the following list: + - **[new-mnemonic](new_mnemonic.md)**: Used to generate a new mnemonic, validator keys, and deposit file. It is not recommended to use this command if you have existing validators. - **[existing-mnemonic](existing_mnemonic.md)**: Provide a mnemonic to regenerate validator keys or create new ones. @@ -28,7 +36,7 @@ Here are some core recommendations: ## Contributing -This project is open-source and welcomes contributions from the community. If you would like to contribute to the `ethstaker-deposit-cli`, please refer to the contributing guidelines in the repository. Your contributions can help improve the tool and make Ethereum staking more accessible to everyone. +This project is open-source and welcomes contributions from the community. If you would like to contribute to the `ethstaker-deposit-cli`, please read the [Local Development Instructions](local_development.md), fork the project, and create a pull request with a description of the changes you have made and why. ## Support diff --git a/docs/src/local_development.md b/docs/src/local_development.md new file mode 100644 index 00000000..fdce0bea --- /dev/null +++ b/docs/src/local_development.md @@ -0,0 +1,46 @@ +# Local Development Instructions + +To install the `ethstaker-deposit-cli`, follow these steps: + +## Prerequisites + +Ensure you have the following software installed on your system: + +- **Git**: Version control system to clone the repository. [Download Git](https://git-scm.com/downloads) +- **Python 3.12+**: The programming language required to run the tool. [Download Python](https://www.python.org/downloads/) +- **pip**: Package installer for Python, which is included with Python 3.12+. + + +## Local Development Steps + +1. **Clone the Repository** + + ```sh + git clone https://github.com/eth-educators/ethstaker-deposit-cli.git + ``` + +2. **Navigate to the Project Directory** + + ```sh + cd ethstaker-deposit-cli + ``` + +3. **Install Dependencies** + + ```sh + pip3 install -r requirements.txt + ``` + +4. **Run the CLI** + + You can now run the CLI tool using the following command: + + ```sh + python3 -m ethstaker_deposit [OPTIONS] COMMAND [ARGS] + ``` + +**To execute tests, you will need to install the test dependencies**: +```sh +python3 -m pip install -r requirements_test.txt +python3 -m pytest tests +``` diff --git a/docs/src/new_mnemonic.md b/docs/src/new_mnemonic.md index 8b2bcaef..14c8ed6c 100644 --- a/docs/src/new_mnemonic.md +++ b/docs/src/new_mnemonic.md @@ -5,19 +5,22 @@ Generates a new BIP-39 mnemonic along with validator keystore and deposit files ## Arguments -- **`--num_validators`**: Number of validators to create. (Default: 1) +- **`--mnemonic_language`**: The language of the BIP-39 mnemonic. Options are: 'chinese_simplified', 'chinese_traditional', 'czech', 'english', 'french', 'italian', 'japanese', 'korean', 'portuguese', 'spanish'. -- **`--mnemonic_language`**: The language of the BIP-39 mnemonic. Options are: 'chinese_simplified', 'chinese_traditional', 'czech', 'english', 'french', 'italian', 'japanese', 'korean', 'portuguese', 'spanish'. (Default: 'english') +- **`--chain`**: The chain to use for generating the deposit data. Options are: 'mainnet', 'holesky', etc... -- **`--chain`**: The chain to use for generating the deposit data. Options are: 'mainnet', 'holesky', etc... (Default: 'mainnet') +- **`--num_validators`**: Number of validators to create. -- **`--folder`**: The folder where keystore and deposit data files will be saved. (Default: current directory) +- **`--keystore_password`**: The password that is used to encrypt the provided keystore. Note: It's not your mnemonic password. -- **`--execution_address`**: The Ethereum 1 address for validator withdrawals. (Default: None) +- **`--execution_address`**: The Ethereum 1 address for validator withdrawals. - **`--pbkdf2`**: Will use pbkdf2 key derivation instead of scrypt for generated keystore files as defined in [EIP-2335](https://eips.ethereum.org/EIPS/eip-2335#decryption-key). This can be a good alternative if you intend to work with a large number of keys. +- **`--folder`**: The folder where keystore and deposit data files will be saved. + ## Example Usage ```sh ./deposit new-mnemonic +``` diff --git a/docs/src/quick_setup.md b/docs/src/quick_setup.md new file mode 100644 index 00000000..e84b6d14 --- /dev/null +++ b/docs/src/quick_setup.md @@ -0,0 +1,53 @@ +# Quick Setup + +This guide will walk you through the steps to download and set up the `ethstaker-deposit-cli` for your operating system. + +## Step 1: Download the Latest Release + +1. Navigate to the [Releases page](https://github.com/eth-educators/ethstaker-deposit-cli/releases) of the `ethstaker-deposit-cli` repository. + +2. Download the corresponding file for your operating system: + - **Windows**: Look for a file with `windows` in the name. + - **MacOS**: Look for a file with `darwin` in the name. + - **Linux**: Look for a file with `linux` in the name. + +3. Extract the contents of the zipped file + +4. Open a terminal or command prompt and navigate to the extracted folder + + +## Step 2: Verify the Installation + +1. Make sure you have GPG installed. + +2. Make sure you have the `edc-security@ethstaker.cc` public key by running +```sh +gpg --keyserver keys.openpgp.org --search-keys 'edc-security@ethstaker.cc' +``` + +3. Verify the signature file against the corresponding file but be sure to replace the contents with the exact file name: +```sh +gpg --verify staking_deposit-cli-***.asc staking_deposit-cli-*** +``` + +4. You should see `Good signature from "EDC Security "` in the output **otherwise do not continue**. + +## Step 3: Usage + +**MacOS users:** In order to run from the terminal, you must first open the file to bypass MacOS code signing issues. Do so by right clicking the `deposit` file and then selecting `Open`. + +Determine which command best suites what you would like to accomplish: + +- **[new-mnemonic](new_mnemonic.md)**: Used to generate a new mnemonic, validator keys, and deposit file. It is not recommended to use this command if you have existing validators. + +- **[existing-mnemonic](existing_mnemonic.md)**: Provide a mnemonic to regenerate validator keys or create new ones. + +- **[generate-bls-to-execution-change](generate_bls_to_execution_change.md)**: Update your withdrawal credentials of existing validators. It is **required** to have the corresponding mnemonic. + +- **[exit-transaction-keystore](exit_transaction_keystore.md)**: Generate an exit message using the keystore of your validators. + +- **[exit-transaction-mnemonic](exit_transaction_mnemonic.md)**: Generate an exit message using the mnemonic of your validators. + +--- + +If you encounter any issues, please check the [issues page](https://github.com/eth-educators/ethstaker-deposit-cli/issues) for help or to report a problem. You may also contact us on the [Ethstaker discord](https://dsc.gg/ethstaker).