Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ edition = "2018"
categories = ["cryptography::cryptocurrencies", "development-tools::testing"]

[dependencies]
bitcoincore-rpc = { version = "0.19", features = ["rand"] }
bitcoind-json-rpc-client = { version = "0.1", features = ["client-sync"] }
log = "0.4"
which = "4.2.5"
anyhow = "1.0.66"
tempfile = "3"
serde_json = { version = "1.0.117" }

[dev-dependencies]
env_logger = "0.9.0"
Expand Down Expand Up @@ -53,3 +54,10 @@ anyhow = "1.0.66"
[package.metadata.docs.rs]
features = ["download", "doc"]
rustdoc-args = ["--cfg", "docsrs"]

[patch.crates-io.bitcoind-json-rpc-client]
path = "/home/tobin/build/github.com/tcharding/rust-bitcoind-json-rpc/06-02-integration-tests/client"

[patch.crates-io.bitcoind-json-rpc-types]
path = "/home/tobin/build/github.com/tcharding/rust-bitcoind-json-rpc/06-02-integration-tests/json"

35 changes: 35 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#[cfg(feature = "26_0")] // This is all features.
compile_error!{"bitcoind-json-rpc does not support bitcoind v26_0"}

#[cfg(all(feature = "25_1", not(feature = "26_0")))]
compile_error!{"bitcoind-json-rpc does not support bitcoind v25.1"}

#[cfg(all(feature = "25_0", not(feature = "25_1")))]
compile_error!{"bitcoind-json-rpc does not support bitcoind v25.0"}

#[cfg(all(feature = "24_0_1", not(feature = "25_0")))]
compile_error!{"bitcoind-json-rpc does not support bitcoind v24.0.1"}

#[cfg(all(feature = "23_1", not(feature = "24_0_1")))]
compile_error!{"bitcoind-json-rpc does not support bitcoind v23.1"}

#[cfg(all(feature = "22_1", not(feature = "23_1")))]
#[allow(unused_imports)] // Not all users need the json types.
pub use bitcoind_json_rpc_client::{client_sync::v22::Client, json::v22 as json};

#[cfg(all(feature = "0_21_2", not(feature = "22_1")))]
compile_error!{"bitcoind-json-rpc does not support bitcoind v22.2"}

#[cfg(all(feature = "0_20_2", not(feature = "0_21_2")))]
compile_error!{"bitcoind-json-rpc does not support bitcoind v0.20.2"}

#[cfg(all(feature = "0_19_1", not(feature = "0_20_2")))]
compile_error!{"bitcoind-json-rpc does not support bitcoind v0.19.1"}

#[cfg(all(feature = "0_18_1", not(feature = "0_19_1")))]
#[allow(unused_imports)] // Not all users need the json types.
pub use bitcoind_json_rpc_client::{client_sync::v18::Client, json::v18 as json};

#[cfg(all(feature = "0_17_1", not(feature = "0_18_1")))]
#[allow(unused_imports)] // Not all users need the json types.
pub use bitcoind_json_rpc_client::{client_sync::v17::Client, json::v17 as json};
Loading