Rm electrs and related dependencies

This commit is contained in:
Sosthene 2025-06-20 10:36:42 +02:00
parent ff64646e18
commit bec23c5c5c
3 changed files with 0 additions and 20 deletions

View File

@ -6,7 +6,6 @@ edition = "2021"
[dependencies]
anyhow = "1.0"
bitcoincore-rpc = { version = "0.18" }
electrum-client = { git = "https://github.com/cygnet3/rust-electrum-client", branch = "sp_tweaks" }
env_logger = "0.9"
futures-util = { version = "0.3.28", default-features = false, features = ["sink", "std"] }
hex = "0.4.3"

View File

@ -13,7 +13,6 @@ pub struct Config {
pub ws_url: String,
pub wallet_name: String,
pub network: Network,
pub electrum_url: String,
pub blindbit_url: String,
pub zmq_url: String,
pub data_dir: String,
@ -64,10 +63,6 @@ impl Config {
.ok_or(Error::msg("no \"network\""))?
.trim_matches('\"'),
)?,
electrum_url: file_content
.remove("electrum_url")
.ok_or(Error::msg("No \"electrum_url\""))?
.to_owned(),
blindbit_url: file_content
.remove("blindbit_url")
.ok_or(Error::msg("No \"blindbit_url\""))?

View File

@ -1,14 +0,0 @@
use electrum_client::{Client, ConfigBuilder};
use log::info;
const VALIDATE_DOMAIN: bool = false; // self-signed cert, so we don't validate
pub fn create_electrum_client(electrum_url: &str) -> anyhow::Result<Client> {
let config = ConfigBuilder::new()
.validate_domain(VALIDATE_DOMAIN)
.build();
let electrum_client = Client::from_config(electrum_url, config)?;
info!("ssl client {}", electrum_url);
Ok(electrum_client)
}