pub struct Config {Show 13 fields
pub liquid_explorer: BlockchainExplorer,
pub bitcoin_explorer: BlockchainExplorer,
pub working_dir: String,
pub cache_dir: Option<String>,
pub network: LiquidNetwork,
pub payment_timeout_sec: u64,
pub sync_service_url: Option<String>,
pub zero_conf_max_amount_sat: Option<u64>,
pub breez_api_key: Option<String>,
pub external_input_parsers: Option<Vec<ExternalInputParser>>,
pub use_default_external_input_parsers: bool,
pub onchain_fee_rate_leeway_sat_per_vbyte: Option<u32>,
pub asset_metadata: Option<Vec<AssetMetadata>>,
}
Expand description
Configuration for the Liquid SDK
Fields§
§liquid_explorer: BlockchainExplorer
§bitcoin_explorer: BlockchainExplorer
§working_dir: String
Directory in which the DB and log files are stored.
Prefix can be a relative or absolute path to this directory.
cache_dir: Option<String>
Directory in which the Liquid wallet cache is stored. Defaults to working_dir
network: LiquidNetwork
§payment_timeout_sec: u64
Send payment timeout. See LiquidSdk::send_payment
sync_service_url: Option<String>
The url of the real-time sync service. Defaults to BREEZ_SYNC_SERVICE_URL
Setting this field to None
will disable the service
zero_conf_max_amount_sat: Option<u64>
Maximum amount in satoshi to accept zero-conf payments with Defaults to DEFAULT_ZERO_CONF_MAX_SAT
breez_api_key: Option<String>
The Breez API key used for making requests to the sync service
external_input_parsers: Option<Vec<ExternalInputParser>>
A set of external input parsers that are used by LiquidSdk::parse when the input is not recognized. See ExternalInputParser for more details on how to configure external parsing.
use_default_external_input_parsers: bool
The SDK includes some default external input parsers (DEFAULT_EXTERNAL_INPUT_PARSERS). Set this to false in order to prevent their use.
onchain_fee_rate_leeway_sat_per_vbyte: Option<u32>
For payments where the onchain fees can only be estimated on creation, this can be used in order to automatically allow slightly more expensive fees. If the actual fee rate ends up being above the sum of the initial estimate and this leeway, the payment will require user fee acceptance. See WaitingFeeAcceptance.
Defaults to zero.
asset_metadata: Option<Vec<AssetMetadata>>
A set of asset metadata used by LiquidSdk::parse when the input is a LiquidAddressData and the asset_id differs from the Liquid Bitcoin asset. See AssetMetadata for more details on how define asset metadata. By default the asset metadata for Liquid Bitcoin and Tether USD are included.
Implementations§
Source§impl Config
impl Config
pub fn mainnet(breez_api_key: Option<String>) -> Self
pub fn mainnet_esplora(breez_api_key: Option<String>) -> Self
pub fn testnet(breez_api_key: Option<String>) -> Self
pub fn testnet_esplora(breez_api_key: Option<String>) -> Self
pub fn regtest() -> Self
pub fn regtest_esplora() -> Self
pub fn zero_conf_max_amount_sat(&self) -> u64
pub fn sync_enabled(&self) -> bool
Trait Implementations§
impl IntoDartExceptPrimitive for Config
Auto Trait Implementations§
impl Freeze for Config
impl Send for Config
impl Sync for Config
impl RefUnwindSafe for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request