File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,9 +29,15 @@ pub struct ElectrumClient(BdkBdkElectrumClient<bdk_electrum::electrum_client::Cl
2929impl ElectrumClient {
3030 /// Creates a new bdk client from a electrum_client::ElectrumApi
3131 /// Optional: Set the proxy of the builder
32- #[ uniffi:: constructor( default ( socks5 = None ) ) ]
33- pub fn new ( url : String , socks5 : Option < String > ) -> Result < Self , ElectrumError > {
32+ /// Optional: Set `validate_domain` to `false` to allow self-signed SSL certificates
33+ #[ uniffi:: constructor( default ( socks5 = None , validate_domain = true ) ) ]
34+ pub fn new (
35+ url : String ,
36+ socks5 : Option < String > ,
37+ validate_domain : bool ,
38+ ) -> Result < Self , ElectrumError > {
3439 let mut config = bdk_electrum:: electrum_client:: ConfigBuilder :: new ( ) ;
40+ config = config. validate_domain ( validate_domain) ;
3541 if let Some ( socks5) = socks5 {
3642 config = config. socks5 ( Some ( bdk_electrum:: electrum_client:: Socks5Config :: new (
3743 socks5. as_str ( ) ,
You can’t perform that action at this time.
0 commit comments