#74,021,436text#74,021,435text#74,021,434text#74,021,433text#74,021,432text#74,021,431text#74,021,430text#74,021,429text#74,021,428text#74,021,427textInscription #73590555#73,590,555htmlInscription #72450974#72,450,974pngInscription #72415229#72,415,229pngInscription #72046695#72,046,695pngdmt-mint.natdogooooo#71,857,705tapInscription #71421489#71,421,489pngtransfer100.pizza#71,229,296brc-20transfer1,584.zbit#70,645,842brc-20transfer84.zbit#70,543,187brc-20transfer1,584.zbit#70,542,493brc-20Inscription #70504403#70,504,403html#69,559,078gltfInscription #69400459#69,400,459htmlInscription #64409422#64,409,422htmlInscription #64337401#64,337,401htmlInscription #63446199#63,446,199pngInscription #63446154#63,446,154pngInscription #63427310#63,427,310pngInscription #61949582#61,949,582htmlInscription #61704851#61,704,851htmlInscription #61681008#61,681,008html#60,999,871Inscription #60999870#60,999,870png#60,999,863Inscription #60999862#60,999,862png#60,999,826Inscription #60999825#60,999,825png#60,996,389Inscription #60996388#60,996,388png#60,899,971Inscription #60899970#60,899,970png#60,213,135Inscription #60213134#60,213,134html#60,204,651Inscription #60204650#60,204,650html#60,185,944Inscription #60185943#60,185,943html#60,183,848Inscription #60183847#60,183,847html Timestamp, WalletTxInfo, }, jsonrpc_core::{IoHandler, Value}, jsonrpc_http_server::{CloseHandle, ServerBuilder}, serde::{Deserialize, Serialize}, server::Server, state::State, std::{ collections::{BTreeMap, BTreeSet, HashMap}, sync::{Arc, Mutex, MutexGuard}, thread, time::Duration, }, }; mod api; mod server; mod state; pub fn builder() -> Builder { Builder { fail_lock_unspent: false, network: Network::Bitcoin, version: 240000, } } pub struct Builder { fail_lock_unspent: bool, network: Network, version: usize, } impl Builder { pub fn fail_lock_unspent(self, fail_lock_unspent: bool) -> Self { Self { fail_lock_unspent, ..self } } pub fn network(self, network: Network) -> Self { Self { network, ..self } } pub fn version(self, version: usize) -> Self { Self { version, ..self } } pub fn build(self) -> Handle { let state = Arc::new(Mutex::new(State::new( self.network, self.version, self.fail_lock_unspent,#60,004,337text let acme_cache = if let Some(acme_cache) = acme_cache { acme_cache.clone() } else { options.data_dir()?.join("acme-cache") }; Ok(acme_cache) } fn acme_domains(&self) -> Result<Vec<String>> { if !self.acme_domain.is_empty() { Ok(self.acme_domain.clone()) } else { Ok(vec![System::new() .host_name() .ok_or(anyhow!("no hostname found"))?]) } } fn http_port(&self) -> Option<u16> { if self.http || self.http_port.is_some() || (self.https_port.is_none() && !self.https) { Some(self.http_port.unwrap_or(80)) } else { None } } fn https_port(&self) -> Option<u16> { if self.https || self.https_port.is_some() { Some(self.https_port.unwrap_or(443)) } else { None } } fn acceptor(&self, options: &Options) -> Result<AxumAcceptor> { let config = AcmeConfig::new(self.acme_domains()?) .contact(&self.acme_contact) .cache_option(Some(DirCache::new(Self::acme_cache( self.acme_cache.as_ref(),#60,004,036textInscription #59988180#59,988,180htmlInscription #59924162#59,924,162htmlInscription #59891171#59,891,171htmlInscription #58387542#58,387,542pngInscription #58281301#58,281,301pngInscription #58239276#58,239,276pngInscription #58146067#58,146,067png#57,738,849Inscription #57738848#57,738,848png