bitcoindevkit / bdk

A modern, lightweight, descriptor-based wallet library written in Rust!
Other
848 stars 307 forks source link

example: Fix wallet examples #1434

Closed ValuedMammal closed 3 weeks ago

ValuedMammal commented 4 months ago

These are some fixes that can be implemented for the wallet_* examples in the example-crates dir.

storopoli commented 4 months ago

You can assign this to me. I am eager to help.

storopoli commented 4 months ago

@ValuedMammal the problem with

  • [ ] Consider moving these smaller examples to the bdk/examples folder

is that we cannot add them to the wallet/examples folder is due to the fact that bdk_esplora and bdk_electrum crates are not dependencies for bdk_wallet. Hence we cannot add them to the cargo examples.

However we can circumvent this by adding both bdk_electrum and bdk_esplora to the dev-depencies of bdk_wallet. Which I think is not worth it the extra overhead.

Source: https://users.rust-lang.org/t/cargo-example-only-dependencies/3215

ValuedMammal commented 4 months ago

we cannot add them to the wallet/examples folder is due to the fact that bdk_esplora and bdk_electrum crates are not dependencies for bdk_wallet.

you're right, they will probably have to stay in example-crates