Ethereum Address Utility
This module provides a utility to process Ethereum private keys either from command line input or from a file, validates them according to Ethereum private key standards. You can convert up to 100 private keys to wallet addresses at once for batch conversions.
Installation
To install the module, use the following command:
npm install -g eth_private_key_to_address
If your npm permissions are not configured properly, you may get an error because you will install the package globally with the -g command. If you get an error, you can install it using the command below:
sudo npm install -g eth_private_key_to_address
Usage
You can use this module in two ways:
-
Direct Input:
Run the module with a private key:
eth_private_key_to_address "0x1234..."
-
File Input:
Run the module with a path to a text file containing private keys (one per line):
eth_private_key_to_address "/path/private_keys.txt"
Features
- Validates Ethereum private keys for correct format.
- Supports input directly from the command line or from a file.
- Checks for a maximum of 100 private keys per file.
- Provides detailed error messages for invalid keys.
Help
For help regarding the commands, you can use the --help
option:
eth_private_key_to_address --help
Contributions
Contributions are welcome! Please feel free to submit a pull request or open an issue on the repository.
License
This project is licensed under the ISC License.