breez_sdk_liquid::model

Struct Config

Source
pub struct Config {
Show 14 fields pub liquid_electrum_url: String, pub bitcoin_electrum_url: String, pub mempoolspace_url: String, pub working_dir: String, pub cache_dir: Option<String>, pub network: LiquidNetwork, pub payment_timeout_sec: u64, pub zero_conf_min_fee_rate_msat: u32, 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>,
}
Expand description

Configuration for the Liquid SDK

Fields§

§liquid_electrum_url: String§bitcoin_electrum_url: String§mempoolspace_url: String

The mempool.space API URL, has to be in the format: https://mempool.space/api

§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

§zero_conf_min_fee_rate_msat: u32

Zero-conf minimum accepted fee-rate in millisatoshis per vbyte

§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.

Implementations§

Source§

impl Config

Source

pub fn mainnet(breez_api_key: Option<String>) -> Self

Source

pub fn testnet(breez_api_key: Option<String>) -> Self

Source

pub fn zero_conf_max_amount_sat(&self) -> u64

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl IntoDart for Config

Source§

fn into_dart(self) -> DartAbi

Consumes Self and Performs the conversion.
Source§

impl IntoIntoDart<Config> for Config

Source§

impl Serialize for Config

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl IntoDartExceptPrimitive for Config

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> DartSafe for T

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T

§

impl<T> TaskRetFutTrait for T
where T: Send,