Add validate_domain option to ElectrumConfig

This commit is contained in:
Steve Myers
2023-01-03 09:47:23 -06:00
committed by thunderbiscuit
parent cdde26a8ea
commit f399b799e4
6 changed files with 13 additions and 6 deletions

View File

@@ -10,8 +10,7 @@ crate-type = ["staticlib", "cdylib"]
name = "bdkffi"
[dependencies]
#bdk = { version = "0.26", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] }
bdk = { git = "https://github.com/bitcoindevkit/bdk", tag = "v0.26.0-rc.2", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] }
bdk = { version = "0.26", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] }
uniffi_macros = { version = "0.21.0", features = ["builtin-bindgen"] }
uniffi = { version = "0.21.0", features = ["builtin-bindgen"] }

View File

@@ -117,6 +117,7 @@ dictionary ElectrumConfig {
u8 retry;
u8? timeout;
u64 stop_gap;
boolean validate_domain;
};
dictionary EsploraConfig {

View File

@@ -118,6 +118,8 @@ pub struct ElectrumConfig {
pub timeout: Option<u8>,
/// Stop searching addresses for transactions after finding an unused gap of this length
pub stop_gap: u64,
/// Validate the domain when using SSL
pub validate_domain: bool,
}
/// Configuration for an EsploraBlockchain
@@ -268,6 +270,7 @@ impl Blockchain {
timeout: config.timeout,
url: config.url,
stop_gap: usize::try_from(config.stop_gap).unwrap(),
validate_domain: config.validate_domain,
})
}
BlockchainConfig::Esplora { config } => {