Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ztgx/reqbit
Interact with Bitcoin Core
https://github.com/ztgx/reqbit
Last synced: 2 days ago
JSON representation
Interact with Bitcoin Core
- Host: GitHub
- URL: https://github.com/ztgx/reqbit
- Owner: zTgx
- License: mit
- Created: 2024-08-11T00:21:10.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-10T15:48:48.000Z (3 months ago)
- Last Synced: 2024-12-29T20:36:14.254Z (17 days ago)
- Language: Rust
- Homepage:
- Size: 171 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ReqBit
**WIP**
This library is the output of learning Bitcoin.[![Crates.io](https://img.shields.io/crates/v/reqbit.svg)](https://crates.io/crates/reqbit)
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.
## Key Features
- **Wallet Management**: Easily load, create, and query Bitcoin wallets
- **Mining Operations**: Retrieve block templates, mining information, and network hash rates
- **Blockchain Interaction**: Access detailed block information and blockchain state
- **Transaction Handling**: Create, sign, and broadcast raw transactions## Why ReqBit?
- **Simplified API**: Abstracts complex Bitcoin Core RPC calls into intuitive Rust functions
- **Asynchronous Support**: Built with async/await for efficient concurrent operations
- **Type-Safe**: Leverages Rust's strong type system to prevent runtime errors
- **Extensible**: Modular design allows for easy addition of new features## Getting Started
To use ReqBit in your project, add the following to your `Cargo.toml`:
```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:
```rust
use reqbit::ReqBit;
#[tokio::main]
async fn main() -> Result<(), Box> {
let reqbit = ReqBit;
let info = reqbit.getnetworkhashps(None, None).await;Ok(())
}
```## Configuration
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
```## Examples
Check out the `examples/` directory for more detailed usage examples, including:
- Wallet creation and management
- Sending transactions
- Mining operations
- Blockchain queries## Documentation
For full API documentation, run:
```
cargo doc --open
```## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.