Config

Struct Config 

Source
pub struct Config {
Show 14 fields pub api_key: Option<String>, pub network: Network, pub sync_interval_secs: u32, pub max_deposit_claim_fee: Option<MaxFee>, pub lnurl_domain: Option<String>, pub prefer_spark_over_lightning: bool, pub external_input_parsers: Option<Vec<ExternalInputParser>>, pub use_default_external_input_parsers: bool, pub real_time_sync_server_url: Option<String>, pub private_enabled_default: bool, pub optimization_config: OptimizationConfig, pub stable_balance_config: Option<StableBalanceConfig>, pub max_concurrent_claims: u32, pub support_lnurl_verify: bool,
}

Fields§

§api_key: Option<String>§network: Network§sync_interval_secs: u32§max_deposit_claim_fee: Option<MaxFee>§lnurl_domain: Option<String>

The domain used for receiving through lnurl-pay and lightning address.

§prefer_spark_over_lightning: bool

When this is set to true we will prefer to use spark payments over lightning when sending and receiving. This has the benefit of lower fees but is at the cost of privacy.

§external_input_parsers: Option<Vec<ExternalInputParser>>

A set of external input parsers that are used by BreezSdk::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.

§real_time_sync_server_url: Option<String>

Url to use for the real-time sync server. Defaults to the Breez real-time sync server.

§private_enabled_default: bool

Whether the Spark private mode is enabled by default.

If set to true, the Spark private mode will be enabled on the first initialization of the SDK. If set to false, no changes will be made to the Spark private mode.

§optimization_config: OptimizationConfig

Configuration for leaf optimization.

Leaf optimization controls the denominations of leaves that are held in the wallet. Fewer, bigger leaves allow for more funds to be exited unilaterally. More leaves allow payments to be made without needing a swap, reducing payment latency.

§stable_balance_config: Option<StableBalanceConfig>

Configuration for automatic conversion of Bitcoin to stable tokens.

When set, received sats will be automatically converted to the specified token once the balance exceeds the threshold.

§max_concurrent_claims: u32

Maximum number of concurrent transfer claims.

Default is 4. Increase for server environments with high incoming payment volume.

§support_lnurl_verify: bool

When true, enables LNURL verify support (LUD-21) and zap receipts (NIP-57). When false (default), these features are disabled for privacy.

Implementations§

Source§

impl Config

Source

pub fn validate(&self) -> Result<(), SdkError>

Validates the configuration.

Returns an error if any configuration values are invalid.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate 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

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> 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> 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> ErasedDestructor for T
where T: 'static,