Our features are a bit convoluted, most annoyingly we cannot build with `--all-features`. However we can make life for users a little easier. Explicitly we want users to be able to: - Use async-interface/WASM without using esplora (to implement their own blockchain) - Use esplora in an ergonomic manner Currently using esplora requires either reqwest or ureq. Instead of making the user add all the features manually we can add features that add the required feature sets, this makes it easier for users to understand what is required and also makes usage easier. With this patch applied we can do - `cargo check --no-default-features --features=use-esplora-reqwest` - `cargo check --no-default-features --features=use-esplora-ureq` - `cargo check --features=use-esplora-ureq` - `cargo check --no-default-features --features=async-trait`
109 lines
4.1 KiB
TOML
109 lines
4.1 KiB
TOML
[package]
|
|
name = "bdk"
|
|
version = "0.9.1-dev"
|
|
edition = "2018"
|
|
authors = ["Alekos Filini <alekos.filini@gmail.com>", "Riccardo Casatta <riccardo@casatta.it>"]
|
|
homepage = "https://bitcoindevkit.org"
|
|
repository = "https://github.com/bitcoindevkit/bdk"
|
|
documentation = "https://docs.rs/bdk"
|
|
description = "A modern, lightweight, descriptor-based wallet library"
|
|
keywords = ["bitcoin", "wallet", "descriptor", "psbt"]
|
|
readme = "README.md"
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
[dependencies]
|
|
bdk-macros = { path = "macros"} # TODO: Change this to version number after next release.
|
|
log = "^0.4"
|
|
miniscript = "5.1"
|
|
bitcoin = { version = "~0.26.2", features = ["use-serde", "base64"] }
|
|
serde = { version = "^1.0", features = ["derive"] }
|
|
serde_json = { version = "^1.0" }
|
|
rand = "^0.7"
|
|
|
|
# Optional dependencies
|
|
sled = { version = "0.34", optional = true }
|
|
electrum-client = { version = "0.7", optional = true }
|
|
reqwest = { version = "0.11", optional = true, features = ["json"] }
|
|
ureq = { version = "2.1", default-features = false, features = ["json"], optional = true }
|
|
futures = { version = "0.3", optional = true }
|
|
async-trait = { version = "0.1", optional = true }
|
|
rocksdb = { version = "0.14", optional = true }
|
|
cc = { version = ">=1.0.64", optional = true }
|
|
socks = { version = "0.3", optional = true }
|
|
lazy_static = { version = "1.4", optional = true }
|
|
tiny-bip39 = { version = "^0.8", optional = true }
|
|
zeroize = { version = "<1.4.0", optional = true }
|
|
bitcoinconsensus = { version = "0.19.0-3", optional = true }
|
|
|
|
# Needed by bdk_blockchain_tests macro
|
|
bitcoincore-rpc = { version = "0.13", optional = true }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
async-trait = "0.1"
|
|
js-sys = "0.3"
|
|
rand = { version = "^0.7", features = ["wasm-bindgen"] }
|
|
|
|
[features]
|
|
minimal = []
|
|
compiler = ["miniscript/compiler"]
|
|
verify = ["bitcoinconsensus"]
|
|
default = ["key-value-db", "electrum"]
|
|
compact_filters = ["rocksdb", "socks", "lazy_static", "cc"]
|
|
key-value-db = ["sled"]
|
|
all-keys = ["keys-bip39"]
|
|
keys-bip39 = ["tiny-bip39", "zeroize"]
|
|
rpc = ["bitcoincore-rpc"]
|
|
|
|
# We currently provide mulitple implementations of `Blockchain`, all are
|
|
# blocking except for the `EsploraBlockchain` which can be either async or
|
|
# blocking, depending on the HTTP client in use.
|
|
#
|
|
# - Users wanting asynchronous HTTP calls should enable `async-interface` to get
|
|
# access to the asynchronous method implementations. Then, if Esplora is wanted,
|
|
# enable `esplora` AND `reqwest` (`--features=use-esplora-reqwest`).
|
|
# - Users wanting blocking HTTP calls can use any of the other blockchain
|
|
# implementations (`compact_filters`, `electrum`, or `esplora`). Users wanting to
|
|
# use Esplora should enable `esplora` AND `ureq` (`--features=use-esplora-ureq`).
|
|
#
|
|
# WARNING: Please take care with the features below, various combinations will
|
|
# fail to build. We cannot currently build `bdk` with `--all-features`.
|
|
async-interface = ["async-trait"]
|
|
electrum = ["electrum-client"]
|
|
# MUST ALSO USE `--no-default-features`.
|
|
use-esplora-reqwest = ["async-interface", "esplora", "reqwest", "futures"]
|
|
use-esplora-ureq = ["esplora", "ureq"]
|
|
# Typical configurations will not need to use `esplora` feature directly.
|
|
esplora = []
|
|
|
|
|
|
# Debug/Test features
|
|
test-blockchains = ["bitcoincore-rpc", "electrum-client"]
|
|
test-electrum = ["electrum", "electrsd/electrs_0_8_10", "test-blockchains"]
|
|
test-rpc = ["rpc", "electrsd/electrs_0_8_10", "test-blockchains"]
|
|
test-esplora = ["esplora", "ureq", "electrsd/legacy", "electrsd/esplora_a33e97e1", "test-blockchains"]
|
|
test-md-docs = ["electrum"]
|
|
|
|
[dev-dependencies]
|
|
lazy_static = "1.4"
|
|
env_logger = "0.7"
|
|
clap = "2.33"
|
|
electrsd = { version= "0.8", features = ["trigger", "bitcoind_0_21_1"] }
|
|
|
|
[[example]]
|
|
name = "address_validator"
|
|
[[example]]
|
|
name = "compact_filters_balance"
|
|
required-features = ["compact_filters"]
|
|
|
|
[[example]]
|
|
name = "miniscriptc"
|
|
path = "examples/compiler.rs"
|
|
required-features = ["compiler"]
|
|
|
|
[workspace]
|
|
members = ["macros"]
|
|
[package.metadata.docs.rs]
|
|
features = ["compiler", "electrum", "esplora", "ureq", "compact_filters", "rpc", "key-value-db", "all-keys", "verify"]
|
|
# defines the configuration attribute `docsrs`
|
|
rustdoc-args = ["--cfg", "docsrs"]
|