ethos-bitcoind
A type-safe Rust client for Bitcoin Core v30.2 RPCs.
Why Use This?
This client aims to provide:
- Less repetitive boilerplate
- Easier upgrades across protocol versions
- Compile-time type checks for RPC requests/responses
- Managed integration testing (spawns protocol daemons as subprocesses, handles ports)
Project Structure
client_trait/: Rust traits for Bitcoin Core RPC endpointsnode/: Node manager for process orchestration in integration environmentsbitcoin_core_clients/: Utilities for driving integration tests against spawned local nodestransport/: Async transport layer with batching and error handlingtypes/: Typed response structs and enums for all RPC methods
Example
This async example (using Tokio) demonstrates integration testing with a spawned node:
[]
= "30.2.1"
= { = "1", = ["full"] }
use ;
use NodeManager;
use Arc;
async
Requirements
Requires a working bitcoind in $PATH.
About
This crate is generated by ethos. Its code is kept synchronized with upstream protocol changes through code generation.
Contributing
See CONTRIBUTING.md.
License
Ethos is released under the terms of the CC0-1.0 license. See LICENSE for details.
Security
This library launches Bitcoin Core daemons for local integration testing. For real network use, use strong network/firewall controls and carefully audit all dependencies.