EthGoTools is a powerful and user-friendly terminal-based application built with Go. It provides a suite of Ethereum-related utilities, allowing developers and enthusiasts to manage their Ethereum accounts, generate keys, interact with Farcaster accounts, sign messages, and verify signatures—all from the comfort of your terminal.
- Eth Go Tools
EthGoTools offers the following functionalities:
-
Convert Private Key to Address
- Input an Ethereum private key in hexadecimal format to retrieve the corresponding Ethereum address.
-
Generate New Private Key
- Generate a new Ethereum private key securely, along with its corresponding public address. Warning: The private key is displayed only once; ensure you store it securely.
-
Check Farcaster Account
- Enter a Farcaster username to fetch and display profile information and recent casts using the Airstack API.
-
Sign Message with Private Key
- Input a private key and a message to produce a cryptographic signature. Useful for signing transactions or authenticating messages.
-
Verify Signature
- Verify the authenticity of a message signature by providing the message, signature, and the Ethereum address of the signer.
-
Go (1.16 or later): Ensure that Go is installed on your system. You can verify your Go installation by running:
go version
-
Git: To clone the repository.
-
Clone the Repository
git clone https://github.com/yourusername/ethgotools.git
-
Navigate to the Project Directory
cd ethgotools
-
Download Dependencies
EthGoTools uses Go modules for dependency management.
go mod tidy
-
Build the Application
go build -o ethgotools app.go
This command compiles the Go application into an executable named
ethgotools
.
After building the application, you can run it directly from the terminal.
./ethgotools
Upon running, you'll be presented with an interactive menu to select the desired tool.
Description: Converts an Ethereum private key to its corresponding public address.
Steps:
- Select "Convert Private Key to Address" from the menu.
- Enter your Ethereum private key in hexadecimal format.
- The application will display the corresponding Ethereum address.
Example:
Ethereum Address: 0xYourEthereumAddressHere
Press Enter to continue...
Description: Generates a new Ethereum private key along with its corresponding public address.
Steps:
- Select "Generate New Private Key" from the menu.
- The application will display the newly generated private key and address.
Warning: Store your private key securely. Never share it with anyone.
Example:
New Private Key: yournewprivatekeyhex
Corresponding Ethereum Address: 0xYourEthereumAddressHere
WARNING: Store this private key securely. Never share it with anyone!
Press Enter to continue...
Description: Retrieves and displays information about a Farcaster account using the Airstack API.
Prerequisite: An AIRSTACK_API_KEY
. Set this in your environment variables (see Configuration).
Steps:
- Select "Check Farcaster Account" from the menu.
- Enter the Farcaster username you wish to check.
- The application will display profile information and recent casts.
Example:
Results for Farcaster user 'username':
Profile Information:
Profile Name : User's Profile Name
Follower Count : 150
Following Count: 100
FarScore : 4.75
Recent Casts:
1. First recent cast text.
2. Second recent cast text.
...
Press Enter to continue...
Description: Signs a message using your Ethereum private key, producing a cryptographic signature.
Steps:
- Select "Sign Message with Private Key" from the menu.
- Enter your Ethereum private key in hexadecimal format.
- Enter the message you wish to sign.
- The application will display the signature.
Example:
Signature:
0xYourSignatureHere
Press Enter to return to menu...
Description: Verifies the authenticity of a signed message by checking the signature against the message and Ethereum address.
Steps:
- Select "Verify Signature" from the menu.
- Enter the original message that was signed.
- Enter the signature in hexadecimal format.
- Enter the Ethereum address of the signer.
- The application will inform you whether the signature is valid.
Example:
Signature is valid.
Press Enter to return to menu...
or
Signature is invalid.
Press Enter to return to menu...
EthGoTools uses environment variables to manage sensitive information and API keys. Ensure you set these variables before running the application.
Create a .env
file in the project root directory with the following content:
AIRSTACK_API_KEY=your_airstack_api_key_here
Alternatively, you can set environment variables directly in your shell.
For Unix/Linux/macOS:
export AIRSTACK_API_KEY=your_airstack_api_key_here
For Windows (Command Prompt):
set AIRSTACK_API_KEY=your_airstack_api_key_here
- The Airstack API is required only for the "Check Farcaster Account" feature.
- Ensure that your
.env
file is never committed to version control to protect your API keys and sensitive information.
EthGoTools handles sensitive data such as private keys and signatures. Follow these best practices to ensure your security:
- Protect Your Private Keys: Never share your private keys. Ensure they are stored securely and consider using hardware wallets for enhanced security.
- Environment Variables: Keep your
.env
file confidential. Use tools like Git's.gitignore
to prevent accidental commits. - Use Trusted Environments: Run EthGoTools on secure and trusted machines to prevent unauthorized access to your sensitive data.
- Regular Updates: Keep your dependencies and Go version updated to benefit from security patches and improvements.
Contributions are welcome! Whether you find a bug, have a feature request, or want to improve the documentation, your input is valuable.
-
Fork the Repository
Click the "Fork" button at the top-right corner of this page to create a personal copy of the repository.
-
Clone Your Fork
git clone https://github.com/yourusername/ethgotools.git cd ethgotools
-
Create a New Branch
git checkout -b feature/YourFeatureName
-
Make Your Changes
Implement your feature or bug fix.
-
Commit Your Changes
git commit -m "Add feature: YourFeatureName"
-
Push to Your Fork
git push origin feature/YourFeatureName
-
Create a Pull Request
Navigate to the original repository and click on "Compare & pull request" to submit your changes.
Please ensure that all contributions adhere to the Code of Conduct. Be respectful, constructive, and considerate in all interactions.
This project is licensed under the MIT License.
- Go: An open-source programming language that makes it easy to build simple, reliable, and efficient software.
- Bubble Tea: A Go framework for building delightful terminal user interfaces.
- Lip Gloss: A styled terminal output library for Go.
- go-ethereum: The official Go implementation of the Ethereum protocol.
- Airstack: For providing APIs to interact with Farcaster accounts.
- Joho/Godotenv: For loading environment variables from
.env
files.