| Crates.io | bitcoin-rpc-types |
| lib.rs | bitcoin-rpc-types |
| version | 0.1.1 |
| created_at | 2025-09-24 02:59:29.228526+00 |
| updated_at | 2025-09-25 16:22:02.057346+00 |
| description | Bitcoin RPC type definitions for Core's JSON-RPC schema |
| homepage | |
| repository | https://github.com/nervana21/bitcoin-rpc-types |
| max_upload_size | |
| id | 1852412 |
| size | 15,162 |
Shared Bitcoin RPC type definitions.
Add this to your Cargo.toml:
[dependencies]
bitcoin-rpc-types = "0.1.0"
use bitcoin_rpc_types::{ApiDefinition, BtcMethod, BtcArgument, BtcResult};
// Load an API definition from JSON
let api_def: ApiDefinition = serde_json::from_str(json_data)?;
// Access methods
for method in api_def.methods.values() {
println!("Method: {}", method.name);
for arg in &method.arguments {
println!(" Argument: {} ({})", arg.name, arg.type_name);
}
}
Contributions warmly welcome.
MIT OR Apache-2.0
This crate is used in the Bitcoin RPC Codegen project, which generates type-safe Rust clients for Bitcoin Core's JSON-RPC API. For more information, see the main bitcoin-rpc-codegen repository.