pub struct ServicesConfig {Show 17 fields
pub chain: Chain,
pub arc_url: String,
pub arc_config: ArcConfig,
pub arc_gorilla_pool_url: Option<String>,
pub arc_gorilla_pool_config: Option<ArcConfig>,
pub whats_on_chain_api_key: Option<String>,
pub bitails_api_key: Option<String>,
pub chaintracks_url: Option<String>,
pub chaintracks_fiat_exchange_rates_url: Option<String>,
pub exchangeratesapi_key: Option<String>,
pub bsv_exchange_rate: BsvExchangeRate,
pub bsv_update_msecs: u64,
pub fiat_exchange_rates: FiatExchangeRates,
pub fiat_update_msecs: u64,
pub post_beef_soft_timeout_ms: u64,
pub post_beef_soft_timeout_per_kb_ms: u64,
pub post_beef_soft_timeout_max_ms: u64,
}Expand description
Configuration for the wallet services layer.
Fields§
§chain: ChainWhich BSV chain to use.
arc_url: StringTAAL ARC service URL.
arc_config: ArcConfigTAAL ARC configuration.
arc_gorilla_pool_url: Option<String>GorillaPool ARC service URL (mainnet only).
arc_gorilla_pool_config: Option<ArcConfig>GorillaPool ARC configuration.
whats_on_chain_api_key: Option<String>API key for WhatsOnChain.
bitails_api_key: Option<String>API key for Bitails.
chaintracks_url: Option<String>Chaintracks service URL.
chaintracks_fiat_exchange_rates_url: Option<String>Chaintracks fiat exchange rates endpoint URL.
exchangeratesapi_key: Option<String>API key for exchangeratesapi.io.
bsv_exchange_rate: BsvExchangeRateCurrent BSV exchange rate.
bsv_update_msecs: u64Update interval for BSV exchange rate in milliseconds (default: 15 minutes).
fiat_exchange_rates: FiatExchangeRatesCurrent fiat exchange rates.
fiat_update_msecs: u64Update interval for fiat exchange rates in milliseconds (default: 24 hours).
post_beef_soft_timeout_ms: u64Base timeout for postBeef in milliseconds.
post_beef_soft_timeout_per_kb_ms: u64Additional timeout per KiB of BEEF payload.
post_beef_soft_timeout_max_ms: u64Maximum timeout for postBeef in milliseconds.
Implementations§
Source§impl ServicesConfig
impl ServicesConfig
Sourcepub fn get_post_beef_soft_timeout_ms(&self, beef_bytes_len: usize) -> u64
pub fn get_post_beef_soft_timeout_ms(&self, beef_bytes_len: usize) -> u64
Calculate the adaptive soft timeout for postBeef based on BEEF payload size.
Trait Implementations§
Source§impl Clone for ServicesConfig
impl Clone for ServicesConfig
Source§fn clone(&self) -> ServicesConfig
fn clone(&self) -> ServicesConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServicesConfig
impl Debug for ServicesConfig
Source§impl<'de> Deserialize<'de> for ServicesConfig
impl<'de> Deserialize<'de> for ServicesConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Chain> for ServicesConfig
impl From<Chain> for ServicesConfig
Auto Trait Implementations§
impl Freeze for ServicesConfig
impl RefUnwindSafe for ServicesConfig
impl Send for ServicesConfig
impl Sync for ServicesConfig
impl Unpin for ServicesConfig
impl UnsafeUnpin for ServicesConfig
impl UnwindSafe for ServicesConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more