bitcoin-rpc-conversions 0.1.1

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 crate ecosystem, providing type-safe Rust primitives for testing and development at the Bitcoin Core JSON-RPC interface.