bitcoin-rpc-conversions 0.1.0

Type conversions for Bitcoin Core's JSON-RPC interface
Documentation

bitcoin-rpc-conversions

A Rust crate for converting Bitcoin RPC types to appropriate Rust types.

Usage

[dependencies]
bitcoin-rpc-conversions = "0.1.0"

Example

use bitcoin_rpc_conversions::{BitcoinRpcType, TypeRegistry};

let category = TypeRegistry::categorize("string", "txid");
assert_eq!(category, BitcoinRpcType::BitcoinTxid);
assert_eq!(category.to_rust_type(), "bitcoin::Txid");

License

MIT OR Apache-2.0

Related Projects

Part of the bitcoin-rpc-* ecosystem, which provides type-safe Rust for seamless, interface-level testing and development.