Cargo Features
[dependencies]
jitash-bdk = { version = "0.28.1", default-features = false, features = ["minimal", "compiler", "verify", "std", "sqlite", "sqlite-bundled", "compact_filters", "key-value-db", "all-keys", "keys-bip39", "rpc", "hardware-signer", "async-interface", "electrum", "use-esplora-async", "use-esplora-blocking", "use-esplora-reqwest", "use-esplora-ureq", "esplora", "reqwest-default-tls", "test-blockchains", "test-electrum", "test-rpc", "test-rpc-legacy", "test-esplora", "test-md-docs", "test-hardware-signer", "dev-getrandom-wasm"] }
- default = electrum, key-value-db, std
-
These default features are set whenever
jitash-bdk
is added without
somewhere in the dependency tree.default-features = false - minimal
- compiler
-
Enables compiler of miniscript ^9.0
- verify = bitcoinconsensus
-
Affects
wallet::verify
… - std default
-
std feature is always required unless building for wasm32-unknown-unknown target if building for wasm user must add dependencies bitcoin/no-std,miniscript/no-std
Enables std of bitcoin ^0.29.2 and miniscript ^9.0
- sqlite sqlite-bundled? = ahash, hashlink, rusqlite
-
Affects
any::SqliteDbConfiguration
… - sqlite-bundled = sqlite
-
Enables bundled of rusqlite ^0.28.0
- compact_filters = cc, regex, rocksdb, socks
-
Affects
blockchain::compact_filters
,blockchain::any
… - key-value-db default = sled
-
Affects
any::SledDbConfiguration
… - all-keys = keys-bip39
- keys-bip39 all-keys? = bip39
-
Affects
keys::bip39
… - rpc test-rpc? test-rpc-legacy? = bitcoincore-rpc
-
Affects
blockchain::rpc
,blockchain::any
… - hardware-signer test-hardware-signer? = hwi
-
Affects
wallet::hardwaresigner
… - async-interface = async-trait
-
We currently provide mulitple implementations of
Blockchain
, all are blocking except for theEsploraBlockchain
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 theuse-esplora-async
feature. - Users wanting blocking HTTP calls can use any of the other blockchain
implementations (
compact_filters
,electrum
, oresplora
). Users wanting to use Esplora should enable theuse-esplora-blocking
feature.
WARNING: Please take care with the features below, various combinations will fail to build. We cannot currently build
bdk
with--all-features
. - Users wanting asynchronous HTTP calls should enable
- electrum default test-electrum? test-md-docs? = electrum-client
-
Affects
blockchain::electrum
,blockchain::any
… - use-esplora-async use-esplora-reqwest? = esplora, futures
-
MUST ALSO USE
--no-default-features
.Enables async of esplora-client ^0.5
- use-esplora-blocking use-esplora-ureq? = esplora
-
Enables blocking of esplora-client ^0.5
- use-esplora-reqwest = use-esplora-async
-
Deprecated aliases
- use-esplora-ureq = use-esplora-blocking
- esplora use-esplora-async? use-esplora-blocking?
-
Typical configurations will not need to use
esplora
feature directly.Affects
blockchain::esplora
,blockchain::any
… - reqwest-default-tls
-
Use below feature with
use-esplora-async
to enable reqwest default TLS supportEnables async-https of esplora-client ^0.5
- test-blockchains test-electrum? test-esplora? test-rpc? test-rpc-legacy? = bitcoincore-rpc, electrum-client
-
Debug/Test features
- test-electrum dev = electrum, test-blockchains
-
Enables bitcoind_22_0 and electrs_0_8_10 of electrsd ^0.24.0
- test-rpc dev = rpc, test-blockchains
-
Enables bitcoind_22_0 and electrs_0_8_10 of electrsd ^0.24.0
- test-rpc-legacy dev = rpc, test-blockchains
-
Enables bitcoind_0_20_0 and electrs_0_8_10 of electrsd ^0.24.0
- test-esplora dev = test-blockchains
-
Enables bitcoind_22_0, esplora_a33e97e1 and legacy of electrsd ^0.24.0
- test-md-docs = electrum
- test-hardware-signer = hardware-signer
- dev-getrandom-wasm
-
This feature is used to run
cargo check
in our CI targeting wasm. It's not recommended for libraries to explicitly include the "getrandom/js" feature, so we only do it when necessary for running our CI. See: https://docs.rs/getrandom/0.2.8/getrandom/#webassembly-support
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- sled key-value-db
-
Enables sled
Optional dependencies
- electrum-client electrum test-blockchains?
-
Enables electrum-client ^0.12
- esplora-client reqwest-default-tls? use-esplora-async? use-esplora-blocking?
-
Enables esplora-client ^0.5
- rusqlite sqlite? sqlite-bundled?
-
Enables rusqlite ^0.28.0
- ahash sqlite?
-
Enables ahash ^0.7.6
- futures use-esplora-async?
- async-trait async-interface?
- rocksdb compact_filters?
-
Enables rocksdb ^0.14
- cc compact_filters?
- socks compact_filters?
- hwi hardware-signer?
-
Enables hwi ^0.5
- hashlink sqlite?
-
Enables hashlink =0.8.1
required for sqlite feature, hashlink versions after 0.8.1 depend on Hashbrown 0.13 with MSRV 1.61.0
- regex compact_filters?
-
Enables regex =1.7.3
required for compact_filters feature, regex versions after 1.7.3 have MSRV 1.60.0
- bip39 keys-bip39?
- bitcoinconsensus verify?
-
Enables bitcoinconsensus ^0.19.0-3
- bitcoincore-rpc rpc? test-blockchains?
-
Enables bitcoincore-rpc ^0.16
Needed by bdk_blockchain_tests macro and the
rpc
feature