1.0.2 • Published 1 year ago

etherbal-by-jyremi v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago
# EthereumBalance

EthereumBalance is a Java utility for retrieving real-time Ethereum wallet balances. It provides a simple way to integrate balance querying functionality into Java applications or services.

## Features

- Fetch Ethereum wallet balances in real-time.
- Utilizes the Web3j library for seamless integration.
- Supports retrieval of balances from the Ethereum mainnet via the Infura API.

## Installation

1. Clone the repository:

```bash
git clone https://github.com/your-username/ethereum-balance.git
  1. Import the project into your preferred Java development environment.

  2. Ensure that you have the necessary dependencies installed (Web3j library).

Usage

  1. Import the EthereumBalance class into your Java project.

  2. Call the getBalance() method, providing the Ethereum wallet address as an argument.

  3. Receive the wallet balance in Ether (ETH) as a BigDecimal object.

import java.math.BigDecimal;
import java.util.concurrent.ExecutionException;
import EthereumBalance;

public class Main {
    public static void main(String[] args) {
        String address = "0xYourAddress";
        try {
            BigDecimal balance = EthereumBalance.getBalance(address);
            System.out.println("Balance: " + balance + " ETH");
        } catch (ExecutionException | InterruptedException e) {
            e.printStackTrace();
        }
    }
}

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests to improve this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

This README file provides a brief overview of the project, installation instructions, usage examples, information about contributions, and licensing details.