bitcoin-rpc-types

Crates.iobitcoin-rpc-types
lib.rsbitcoin-rpc-types
version1.0.0
created_at2025-09-24 02:59:29.228526+00
updated_at2025-10-01 00:30:02.744828+00
descriptionType definitions for Bitcoin Core's JSON-RPC interface
homepage
repositoryhttps://github.com/nervana21/bitcoin-rpc-types
max_upload_size
id1852412
size32,144
nervana21 (nervana21)

documentation

https://docs.rs/bitcoin-rpc-types

README

bitcoin-rpc-types

License: MIT OR Apache-2.0 Docs.rs crates.io

Type definitions for Bitcoin Core's JSON-RPC interface.

Usage

Add this to your Cargo.toml:

[dependencies]
bitcoin-rpc-types = "1.0.0"

Example

use bitcoin_rpc_types::{ApiDefinition, BtcMethod, BtcArgument, BtcResult, HashOrHeight};

// 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);
    }
}

License

MIT OR Apache-2.0

Related Projects

Part of the bitcoin-rpc crate ecosystem, providing type-safe Rust primitives for testing and development at the Bitcoin Core JSON-RPC interface.

Commit count: 3

cargo fmt