pub enum WalletEvent {
FundsReceived {
wallet_id: WalletId,
asset: Option<AssetId>,
amount: Amount,
coin_id: String,
confirmed_height: u32,
},
FundsSent {
wallet_id: WalletId,
asset: Option<AssetId>,
amount: Amount,
tx_id: String,
confirmed_height: u32,
},
CoinStateChanged {
coin_id: String,
spent: bool,
created_height: Option<u32>,
spent_height: Option<u32>,
},
Confirmation {
tx_id: String,
height: u32,
},
TransactionFailed {
tx_id: String,
error: String,
},
NewTip {
height: u32,
header_hash: String,
},
SyncProgress {
wallet_id: WalletId,
state: SyncLifecycle,
peak_height: u32,
target_height: u32,
},
CatInfo {
asset_id: AssetId,
name: Option<String>,
},
DidInfo {
launcher_id: String,
},
NftData {
launcher_id: String,
},
Derivation {
wallet_id: WalletId,
index: u32,
},
}Expand description
The event the engine emits and apps consume.
Tagged by type in snake_case on the wire ({"type":"funds_received",…}), so a machine consumer
branches on a stable discriminant.
Variants§
FundsReceived
Inbound value landed for a wallet.
Fields
FundsSent
Outbound value confirmed for a wallet.
Fields
CoinStateChanged
A tracked coin changed state.
Fields
Confirmation
A submitted transaction confirmed on-chain.
TransactionFailed
A submitted transaction failed (rejected or never confirmed).
NewTip
A new chain tip was observed.
SyncProgress
Sync progress advanced for a wallet.
Fields
§
state: SyncLifecycleThe current lifecycle state.
CatInfo
CAT metadata for an asset became available.
DidInfo
DID metadata became available.
NftData
NFT data became available.
Derivation
A new HD receive address became active.
Implementations§
Trait Implementations§
Source§impl Clone for WalletEvent
impl Clone for WalletEvent
Source§fn clone(&self) -> WalletEvent
fn clone(&self) -> WalletEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WalletEvent
impl Debug for WalletEvent
Source§impl<'de> Deserialize<'de> for WalletEvent
impl<'de> Deserialize<'de> for WalletEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for WalletEvent
Source§impl PartialEq for WalletEvent
impl PartialEq for WalletEvent
Source§impl Serialize for WalletEvent
impl Serialize for WalletEvent
impl StructuralPartialEq for WalletEvent
Auto Trait Implementations§
impl Freeze for WalletEvent
impl RefUnwindSafe for WalletEvent
impl Send for WalletEvent
impl Sync for WalletEvent
impl Unpin for WalletEvent
impl UnsafeUnpin for WalletEvent
impl UnwindSafe for WalletEvent
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
Mutably borrows from an owned value. Read more