Crates.io | anychain-core |
lib.rs | anychain-core |
version | 0.1.7 |
source | src |
created_at | 2023-06-09 12:24:40.843335 |
updated_at | 2024-11-03 08:59:59.740999 |
description | A core support for cryptocurrency wallets |
homepage | https://www.cregis.com |
repository | https://github.com/0xcregis/anychain |
max_upload_size | |
id | 886203 |
size | 29,822 |
anychain-core is a Rust crate that provides core functionality for working with various blockchain implementations. This crate aims to simplify the process of integrating different blockchain technologies into your projects by providing a unified interface and a set of common utilities.
To start using anychain-core, add it as a dependency in your Cargo.toml file:
[dependencies]
anychain-core = "0.1.7"
Then, import the crate in your Rust code:
extern crate anychain_core;
Here's a basic example of how to use anychain-core to interact with an Ethereum blockchain:
use anychain_core::{Blockchain, Ethereum};
fn main() {
let eth = Ethereum::new("https://mainnet.infura.io/v3/YOUR-API-KEY");
let balance = eth.get_balance("0x742d35Cc6634C0532925a3b844Bc454e4438f44e").unwrap();
println!("Balance: {}", balance);
}
For more examples and usage details, please refer to the documentation.
We welcome contributions to anychain-core! If you'd like to contribute, please follow these steps:
Please make sure to write tests for your changes and follow the existing coding style.
anychain-core is licensed under the MIT License. See the LICENSE file for more information