Areoxide is a lightweight and efficient library designed to wrap RPC methods for the Areon Network. It simplifies the process of interacting with Areon Network's RPC endpoints, enabling developers to build robust applications with ease.
- Simplified API: Intuitive functions to interact with Areon Network RPC endpoints.
- Lightweight: Minimal dependencies for easy integration.
- Flexible: Supports various use cases, including querying network data and more.
- Extensible: Easily extendable to include additional Areon RPC methods.
To use Areoxide, first, include it in your Rust project:
use areoxide::prelude::{rpc::RpcClient};
Create an instance of the AreonClient
by providing the RPC endpoint URL:
const RPC_URL: &str = "https://mainnet-rpc.areon.network";
let client: RpcClient = RpcClient::init(RPC_URL);
You will probably need
areoxide::prelude::util
andareoxide::prelude::constants
modules in order to make conversions from hexadecimal to decimal and vice versa. You can import it with:
use areoxide::prelude::{util, constants};
match client.get_balance("0x".to_string()).await {
Ok(balance) => {
println!("Balance: {:#?}", util::hexadecimal_str_to_decimal_str(balance).unwrap())
}
Err(e) => eprintln!("Error fetching balance: {}", e),
}
match client.get_code("0x".to_string(), constants::BLOCK_STATE_LATEST.to_string()).await {
Ok(code) => println!("Address code: {:#?}", code),
Err(e) => eprintln!("Error fetching code: {}", e),
}
match client.get_transaction_receipt("0x".to_string()).await {
Ok(receipt) => println!("TX receipt: {:#?}", receipt),
Err(e) => eprintln!("Error fetching tx receipt: {}", e),
}
We welcome contributions to improve Areoxide! Feel free to submit issues, feature requests, or pull requests to the GitHub repository.
- Fork the repository
- Create a feature branch (
git checkout -b feature-name
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-name
) - Open a pull request
Areoxide is licensed under the MIT License.