pub enum SdkError {
Show 19 variants
SparkError(String),
InsufficientFunds {
token_identifier: Option<String>,
},
InvalidUuid(String),
InvalidInput(String),
CrossChainAmountOutOfRange {
reason: String,
too_small: bool,
bound_amount: Option<u128>,
bound_usd_cents: Option<u64>,
},
CrossChainRouteUnavailable {
reason: String,
temporary: bool,
},
NetworkError(String),
StorageError(String),
ChainServiceError(String),
MaxDepositClaimFeeExceeded {
tx: String,
vout: u32,
max_fee: Option<Fee>,
required_fee_sats: u64,
required_fee_rate_sat_per_vbyte: u64,
},
MissingUtxo {
tx: String,
vout: u32,
},
DepositClaimInProgress {
tx: String,
vout: u32,
},
RefundReplacementFeeTooLow {
pending_fee_sats: u64,
required_fee_sats: u64,
},
LnurlError(String),
Signer(String),
OptimizationAlreadyRunning,
OptimizationCancelled,
InsufficientCpfpFunds {
required_sat: u64,
},
Generic(String),
}Expand description
Error type for the BreezSdk
Variants§
SparkError(String)
InsufficientFunds
Fields
InvalidUuid(String)
InvalidInput(String)
Invalid input error
CrossChainAmountOutOfRange
A cross-chain provider rejected the amount as outside what it accepts for the route.
The bound fields carry what the route publishes in the direction that failed, in whichever denominations the provider publishes. A route can enforce a tighter bound than it publishes, so an amount inside the published one can still land here.
The message is the provider’s own rejection text with the published bound appended, so it already names the direction.
Fields
too_small: booltrue for a rejection below the minimum, false for one above the
maximum or beyond available liquidity.
A cross-chain provider won’t serve the route, for now or at all.
The message leads with a fixed phrase for each case, for bindings that only see the text, followed by the provider’s own reason.
NetworkError(String)
Network error
StorageError(String)
Storage error
ChainServiceError(String)
MaxDepositClaimFeeExceeded
Fields
MissingUtxo
DepositClaimInProgress
Another claim on this deposit is already running.
RefundReplacementFeeTooLow
A refund for this deposit is already on the network, and the requested replacement does not pay enough to displace it.
LnurlError(String)
Signer(String)
OptimizationAlreadyRunning
optimize_leaves was called while another optimization run (auto or
manual) was already in flight.
OptimizationCancelled
optimize_leaves was preempted by the SDK to free leaves for a
higher-priority operation (typically a payment).
InsufficientCpfpFunds
The provided CPFP funding is too low to cover the exit’s on-chain fees.
Generic(String)
Trait Implementations§
Source§impl Error for SdkError
impl Error for SdkError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<ChainServiceError> for SdkError
impl From<ChainServiceError> for SdkError
Source§fn from(e: ChainServiceError) -> Self
fn from(e: ChainServiceError) -> Self
Source§impl From<ConversionError> for SdkError
impl From<ConversionError> for SdkError
Source§fn from(e: ConversionError) -> Self
fn from(e: ConversionError) -> Self
Source§impl From<Infallible> for SdkError
impl From<Infallible> for SdkError
Source§fn from(value: Infallible) -> Self
fn from(value: Infallible) -> Self
Source§impl From<SdkError> for ConversionError
impl From<SdkError> for ConversionError
Source§impl From<SdkError> for DepositClaimError
impl From<SdkError> for DepositClaimError
Source§impl From<StorageError> for SdkError
impl From<StorageError> for SdkError
Source§fn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
Source§impl From<SystemTimeError> for SdkError
impl From<SystemTimeError> for SdkError
Source§fn from(e: SystemTimeError) -> Self
fn from(e: SystemTimeError) -> Self
Source§impl From<TryFromIntError> for SdkError
impl From<TryFromIntError> for SdkError
Source§fn from(e: TryFromIntError) -> Self
fn from(e: TryFromIntError) -> Self
Auto Trait Implementations§
impl Freeze for SdkError
impl RefUnwindSafe for SdkError
impl Send for SdkError
impl Sync for SdkError
impl Unpin for SdkError
impl UnsafeUnpin for SdkError
impl UnwindSafe for SdkError
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
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>
§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>
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§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.