pub enum SdkEvent {
Synced,
UnclaimedDeposits {
unclaimed_deposits: Vec<DepositInfo>,
},
ClaimedDeposits {
claimed_deposits: Vec<DepositInfo>,
},
PaymentSucceeded {
payment: Payment,
},
PaymentPending {
payment: Payment,
},
PaymentFailed {
payment: Payment,
},
AutoOptimization {
optimization_event: AutoOptimizationEvent,
},
LightningAddressChanged {
lightning_address: Option<LightningAddressInfo>,
},
NewDeposits {
new_deposits: Vec<DepositInfo>,
},
UnilateralExitStateChanged,
}Expand description
Events emitted by the SDK
Variants§
Synced
Emitted when the wallet has been synchronized with the network
UnclaimedDeposits
Emitted when the SDK was unable to claim deposits. Each deposit carries a
claim_error with the reason.
Fields
unclaimed_deposits: Vec<DepositInfo>ClaimedDeposits
Emitted when deposits were claimed into the wallet. The resulting payment
is emitted separately as PaymentSucceeded.
Fields
claimed_deposits: Vec<DepositInfo>PaymentSucceeded
Emitted when a payment completed. The cached balance is refreshed before
this event, so get_info returns the new value.
PaymentPending
Emitted when a payment is in flight. The same payment is emitted again as succeeded or failed once it settles.
PaymentFailed
Emitted when a payment failed.
AutoOptimization
Emitted while the background auto-optimizer is running.
Only fired from the auto path (enabled via
LeafOptimizationConfig::auto_enabled). Manually-triggered runs
via BreezSdk::optimize_leaves do not emit events: they return an
OptimizationOutcome instead.
Fields
optimization_event: AutoOptimizationEventLightningAddressChanged
Emitted when the Lightning address changed on another device. The address is unset when it was deleted.
Fields
lightning_address: Option<LightningAddressInfo>NewDeposits
Emitted when on-chain deposits are detected. Only deposits whose
is_mature is set have enough confirmations to be claimed.
Fields
new_deposits: Vec<DepositInfo>UnilateralExitStateChanged
Emitted when the data a unilateral exit is built from has changed, so an exit state exported earlier is out of date and should be exported again.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SdkEvent
impl RefUnwindSafe for SdkEvent
impl Send for SdkEvent
impl Sync for SdkEvent
impl Unpin for SdkEvent
impl UnsafeUnpin for SdkEvent
impl UnwindSafe for SdkEvent
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.