Skip to content

Commit

Permalink
try decouple chain
Browse files Browse the repository at this point in the history
- simulate bumping bdk_chain to next minor version
- wallet: use version deps for chain, file_store
- chain-src crates use a version dep of chain
- testenv uses a version dep of chain

TODO:

- ci should lint example crates
- testenv may use a path dep of chain

Note:

file_store still uses a path dep of core. example crates
still use a path dep of chain, but we exclude example
crates at the top level of workspace
  • Loading branch information
ValuedMammal committed Jan 23, 2025
1 parent 03a08bb commit 2cf7486
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ jobs:
override: true
profile: minimal
- name: Rust Cache
uses: Swatinem/[email protected]
uses: Swatinem/[email protected]
# TODO: should lint each example crate
- name: Build
working-directory: example-crates/${{ matrix.example-dir }}
run: cargo build
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ members = [
"crates/esplora",
"crates/bitcoind_rpc",
"crates/testenv",
]
exclude = [
"example-crates/example_cli",
"example-crates/example_electrum",
"example-crates/example_esplora",
Expand Down
4 changes: 2 additions & 2 deletions crates/bitcoind_rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ workspace = true
[dependencies]
bitcoin = { version = "0.32.0", default-features = false }
bitcoincore-rpc = { version = "0.19.0" }
bdk_core = { path = "../core", version = "0.4.1", default-features = false }
bdk_core = { version = "0.4.1", default-features = false }

[dev-dependencies]
bdk_testenv = { path = "../testenv" }
bdk_chain = { path = "../chain" }
bdk_chain = { version = "0.21.1" }

[features]
default = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion crates/chain/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bdk_chain"
version = "0.21.1"
version = "0.22.0"
edition = "2021"
rust-version = "1.63"
homepage = "https://bitcoindevkit.org"
Expand Down
4 changes: 2 additions & 2 deletions crates/electrum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ readme = "README.md"
workspace = true

[dependencies]
bdk_core = { path = "../core", version = "0.4.1" }
bdk_core = { version = "0.4.1" }
electrum-client = { version = "0.22", features = [ "proxy" ], default-features = false }

[dev-dependencies]
bdk_testenv = { path = "../testenv" }
bdk_chain = { path = "../chain" }
bdk_chain = { version = "0.21.1" }

[features]
default = ["use-rustls"]
Expand Down
6 changes: 3 additions & 3 deletions crates/esplora/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ readme = "README.md"
workspace = true

[dependencies]
bdk_core = { path = "../core", version = "0.4.1", default-features = false }
bdk_core = { version = "0.4.1", default-features = false }
esplora-client = { version = "0.11.0", default-features = false }
async-trait = { version = "0.1.66", optional = true }
futures = { version = "0.3.26", optional = true }
miniscript = { version = "12.0.0", optional = true, default-features = false }

[dev-dependencies]
esplora-client = { version = "0.11.0" }
bdk_chain = { path = "../chain" }
bdk_chain = { version = "0.21.1" }
bdk_testenv = { path = "../testenv" }
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] }

[features]
default = ["std", "async-https", "blocking-https"]
std = ["bdk_chain/std", "miniscript?/std"]
std = ["miniscript?/std"]
tokio = ["esplora-client/tokio"]
async = ["async-trait", "futures", "esplora-client/async"]
async-https = ["async", "esplora-client/async-https"]
Expand Down
5 changes: 3 additions & 2 deletions crates/testenv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ readme = "README.md"
workspace = true

[dependencies]
bdk_chain = { path = "../chain", version = "0.21.1", default-features = false }
electrsd = { version = "0.28.0", features = [ "legacy" ], default-features = false }
# TODO: should this use a path dep to chain?
bdk_chain = { version = "0.21.1" }
electrsd = { version = "0.28.0", features = ["legacy"] }

[dev-dependencies]
bdk_testenv = { path = "." }
Expand Down
8 changes: 4 additions & 4 deletions crates/wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ miniscript = { version = "12.0.0", features = [ "serde" ], default-features = fa
bitcoin = { version = "0.32.0", features = [ "serde", "base64" ], default-features = false }
serde = { version = "^1.0", features = ["derive"] }
serde_json = { version = "^1.0" }
bdk_chain = { path = "../chain", version = "0.21.1", features = [ "miniscript", "serde" ], default-features = false }
bdk_file_store = { path = "../file_store", version = "0.18.1", optional = true }
bdk_chain = { version = "0.21.1", features = [ "miniscript", "serde" ], default-features = false }
bdk_file_store = { version = "0.18.1", optional = true }

# Optional dependencies
bip39 = { version = "2.0", optional = true }
Expand All @@ -41,9 +41,9 @@ test-utils = ["std"]
lazy_static = "1.4"
assert_matches = "1.5.0"
tempfile = "3"
bdk_chain = { path = "../chain", features = ["rusqlite"] }
bdk_chain = { version = "0.21.1", features = ["rusqlite"] }
bdk_wallet = { path = ".", features = ["rusqlite", "file_store", "test-utils"] }
bdk_file_store = { path = "../file_store" }
bdk_file_store = { version = "0.18.1" }
anyhow = "1"
rand = "^0.8"

Expand Down

0 comments on commit 2cf7486

Please sign in to comment.