Rm electrs and related dependencies
This commit is contained in:
parent
0e6f61cad2
commit
13f645c8d2
@ -6,7 +6,6 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
bitcoincore-rpc = { version = "0.18" }
|
bitcoincore-rpc = { version = "0.18" }
|
||||||
electrum-client = { git = "https://github.com/cygnet3/rust-electrum-client", branch = "sp_tweaks" }
|
|
||||||
env_logger = "0.9"
|
env_logger = "0.9"
|
||||||
futures-util = { version = "0.3.28", default-features = false, features = ["sink", "std"] }
|
futures-util = { version = "0.3.28", default-features = false, features = ["sink", "std"] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
|
@ -13,7 +13,6 @@ pub struct Config {
|
|||||||
pub ws_url: String,
|
pub ws_url: String,
|
||||||
pub wallet_name: String,
|
pub wallet_name: String,
|
||||||
pub network: Network,
|
pub network: Network,
|
||||||
pub electrum_url: String,
|
|
||||||
pub blindbit_url: String,
|
pub blindbit_url: String,
|
||||||
pub zmq_url: String,
|
pub zmq_url: String,
|
||||||
pub data_dir: String,
|
pub data_dir: String,
|
||||||
@ -64,10 +63,6 @@ impl Config {
|
|||||||
.ok_or(Error::msg("no \"network\""))?
|
.ok_or(Error::msg("no \"network\""))?
|
||||||
.trim_matches('\"'),
|
.trim_matches('\"'),
|
||||||
)?,
|
)?,
|
||||||
electrum_url: file_content
|
|
||||||
.remove("electrum_url")
|
|
||||||
.ok_or(Error::msg("No \"electrum_url\""))?
|
|
||||||
.to_owned(),
|
|
||||||
blindbit_url: file_content
|
blindbit_url: file_content
|
||||||
.remove("blindbit_url")
|
.remove("blindbit_url")
|
||||||
.ok_or(Error::msg("No \"blindbit_url\""))?
|
.ok_or(Error::msg("No \"blindbit_url\""))?
|
||||||
|
@ -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)
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user