diff --git a/Cargo.lock b/Cargo.lock index cf4affba..650f0a85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -111,7 +111,7 @@ version = "1.0.2" dependencies = [ "async-trait", "bitcoinsv", - "bitcoinsv-rpc-json", + "bitcoinsv-rpc-json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex", "jsonrpc", "log", @@ -133,6 +133,18 @@ dependencies = [ "serde_json", ] +[[package]] +name = "bitcoinsv-rpc-json" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "171a48356852e051ae361e5079e077fb33ac5882304077bb6c0861464091edce" +dependencies = [ + "bitcoinsv", + "hex", + "serde", + "serde_json", +] + [[package]] name = "bitflags" version = "2.6.0" diff --git a/client/Cargo.toml b/client/Cargo.toml index 77c3ed43..b2fb14d0 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -17,15 +17,15 @@ name = "bitcoinsv_rpc" path = "src/lib.rs" [dependencies] -tokio = { version = ">=1.23.1", features = ["full"] } +async-trait = "0.1.75" +bitcoinsv = "0.2.7" bitcoinsv-rpc-json = { version = "1.0.2" } -log = "0.4.5" +hex = "0.4.3" jsonrpc = { version = "0.16.0", features = ["minreq_http"]} +log = "0.4.5" serde = "1" serde_json = "1" -hex = "0.4.3" -bitcoinsv = "0.2.7" -async-trait = "0.1.75" +tokio = { version = ">=1.23.1", features = ["full"] } url = "2.5.0" [dev-dependencies] diff --git a/client/src/lib.rs b/client/src/lib.rs index 7088a888..34d2143b 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -1,19 +1,20 @@ -//! # Rust Client for Bitcoin SV API -//! -//! This is a client library for the Bitcoin SV JSON-RPC API. -//! -//! Example usage: -//! ```norun -//! let rpc_client = Client::new("http://127.0.0.1:8332", Auth::UserPass("username".to_string(), "password".to_string())).unwrap(); -//! let best_block_hash = rpc_client.get_best_block_hash().unwrap(); -//! println!("best block hash: {}", best_block_hash); -//! ``` -//! -//! For documentation on which methods are available, see the [RpcApi] trait. #![crate_name = "bitcoinsv_rpc"] #![crate_type = "rlib"] +/// # Rust Client for Bitcoin SV API +/// +/// This is a client library for the Bitcoin SV JSON-RPC API. +/// +/// Example usage: +/// ```norun +/// let rpc_client = Client::new("http://127.0.0.1:8332", Auth::UserPass("username".to_string(), "password".to_string())).unwrap(); +/// let best_block_hash = rpc_client.get_best_block_hash().unwrap(); +/// println!("best block hash: {}", best_block_hash); +/// ``` +/// +/// For documentation on which methods are available, see the [RpcApi] trait. + #[macro_use] extern crate log; #[macro_use] // `macro_use` is needed for v1.24.0 compilation. diff --git a/json/Cargo.toml b/json/Cargo.toml index 0291d9d5..8f05e611 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -17,10 +17,10 @@ name = "bitcoinsv_rpc_json" path = "src/lib.rs" [dependencies] +bitcoinsv = "0.2.7" hex = "0.4.3" serde = { version = "1", features = [ "derive" ] } serde_json = "1" -bitcoinsv = "0.2.7" [dev-dependencies] approx = "0.5"