Crates.io | anychain-bitcoin |
lib.rs | anychain-bitcoin |
version | 0.1.8 |
source | src |
created_at | 2023-06-09 12:30:42.264197 |
updated_at | 2024-11-03 09:00:19.754995 |
description | A Rust library for Bitcoin-focused cryptocurrency wallets, enabling seamless transactions on the Bitcoin blockchain |
homepage | https://www.cregis.com |
repository | https://github.com/0xcregis/anychain |
max_upload_size | |
id | 886209 |
size | 157,133 |
anychain-bitcoin is a Rust crate that provides a simple and efficient way to interact with the Bitcoin blockchain. This library aims to make it easy for developers to build applications that require Bitcoin data and functionality without having to deal with the complexities of the underlying protocol.
To use anychain-bitcoin in your Rust project, add the following to your Cargo.toml file:
[dependencies]
anychain-bitcoin = "0.1.8"
Then, import the crate in your code:
extern crate anychain_bitcoin;
Here's a simple example of how to use anychain-bitcoin to get the balance of a Bitcoin address: Addr
use anychain_bitcoin::{Bitcoin, Address};
fn main() {
let bitcoin = Bitcoin::new();
let address = Address::from_str("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa").unwrap();
let balance = bitcoin.get_balance(&address).unwrap();
println!("Balance: {} satoshis", balance);
}
For more examples and detailed usage instructions, please refer to the documentation.
We welcome contributions from the community! If you'd like to contribute to anychain-bitcoin, please follow these steps:
Please make sure to write tests for your changes and follow the Rust coding style.
anychain-bitcoin is licensed under the MIT License. See LICENSE for more information