Crates.io | reqbit |
lib.rs | reqbit |
version | 0.1.3 |
source | src |
created_at | 2024-08-13 04:30:05.923513 |
updated_at | 2024-08-17 02:48:55.274127 |
description | A bitcore core RPC API |
homepage | |
repository | https://github.com/zTgx/reqbit |
max_upload_size | |
id | 1335460 |
size | 102,292 |
WIP This library is the output of learning Bitcoin.
ReqBit is a Rust library that provides a robust and user-friendly interface for interacting with Bitcoin Core's RPC API. It simplifies Bitcoin-related operations, making it easier for developers to build and maintain Bitcoin applications.
To use ReqBit in your project, add the following to your Cargo.toml
:
[dependencies]
reqbit = "0.1.0"
And update reqbit.toml
with your Bitcoin node configuration:
bitcoin_node = "bitcoin_node_url"
rpc_user = "your_username"
rpc_password = "your_password"
Then, you can start using ReqBit in your Rust code:
use reqbit::ReqBit;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let reqbit = ReqBit;
let info = reqbit.getnetworkhashps(None, None).await;
Ok(())
}
ReqBit requires a running Bitcoin Core node. Make sure to configure your bitcoin.conf
file with the following settings:
server=1
rpcuser=your_username
rpcpassword=your_password
Check out the examples/
directory for more detailed usage examples, including:
For full API documentation, run:
cargo doc --open
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.