#[non_exhaustive]pub enum WalletEvent {
ChainTipChanged {
old_tip: BlockId,
new_tip: BlockId,
},
TxConfirmed {
txid: Arc<Txid>,
tx: Arc<Transaction>,
block_time: ConfirmationBlockTime,
old_block_time: Option<ConfirmationBlockTime>,
},
TxUnconfirmed {
txid: Arc<Txid>,
tx: Arc<Transaction>,
old_block_time: Option<ConfirmationBlockTime>,
},
TxReplaced {
txid: Arc<Txid>,
tx: Arc<Transaction>,
conflicts: Vec<Conflict>,
},
TxDropped {
txid: Arc<Txid>,
tx: Arc<Transaction>,
},
}Expand description
Events representing changes to wallet transactions.
Returned after calling
Wallet::apply_update_events.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ChainTipChanged
The latest chain tip known to the wallet changed.
TxConfirmed
A transaction is now confirmed.
If the transaction was previously unconfirmed old_block_time will be None.
If a confirmed transaction is now re-confirmed in a new block old_block_time will contain
the block id and the time it was previously confirmed. This can happen after a chain
reorg.
Fields
tx: Arc<Transaction>Transaction.
block_time: ConfirmationBlockTimeConfirmation block time.
old_block_time: Option<ConfirmationBlockTime>Old confirmation block and time if previously confirmed in a different block.
TxUnconfirmed
A transaction is now unconfirmed.
If the transaction is first seen in the mempool old_block_time will be None.
If a previously confirmed transaction is now seen in the mempool old_block_time will
contain the block id and the time it was previously confirmed. This can happen after a
chain reorg.
Fields
tx: Arc<Transaction>Transaction.
old_block_time: Option<ConfirmationBlockTime>Old confirmation block and time, if previously confirmed.
TxReplaced
An unconfirmed transaction was replaced.
This can happen after an RBF is broadcast or if a third party double spends an input of a received payment transaction before it is confirmed.
The conflicts field contains the txid and vin (in which it conflicts) of the conflicting transactions.
Fields
tx: Arc<Transaction>Transaction.
TxDropped
Unconfirmed transaction dropped.
The transaction was dropped from the local mempool. This is generally due to the fee rate
being too low. The transaction can still reappear in the mempool in the future resulting in
a WalletEvent::TxUnconfirmed event.
Trait Implementations§
Source§impl Clone for WalletEvent
impl Clone for WalletEvent
Source§fn clone(&self) -> WalletEvent
fn clone(&self) -> WalletEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for WalletEvent
impl<UT> ConvertError<UT> for WalletEvent
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for WalletEvent
impl Debug for WalletEvent
Source§impl Display for WalletEvent
impl Display for WalletEvent
Source§impl<UT> FfiConverter<UT> for WalletEvent
impl<UT> FfiConverter<UT> for WalletEvent
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl From<WalletEvent> for WalletEvent
impl From<WalletEvent> for WalletEvent
Source§impl<UT> Lift<UT> for WalletEvent
impl<UT> Lift<UT> for WalletEvent
Source§impl<UT> LiftRef<UT> for WalletEvent
impl<UT> LiftRef<UT> for WalletEvent
type LiftType = WalletEvent
Source§impl<UT> LiftReturn<UT> for WalletEvent
impl<UT> LiftReturn<UT> for WalletEvent
Source§type ReturnType = <WalletEvent as Lift<UT>>::FfiType
type ReturnType = <WalletEvent as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for WalletEvent
impl<UT> Lower<UT> for WalletEvent
Source§impl<UT> LowerError<UT> for WalletEvent
impl<UT> LowerError<UT> for WalletEvent
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for WalletEvent
impl<UT> LowerReturn<UT> for WalletEvent
Source§type ReturnType = <WalletEvent as Lower<UT>>::FfiType
type ReturnType = <WalletEvent as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl<UT> TypeId<UT> for WalletEvent
impl<UT> TypeId<UT> for WalletEvent
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for WalletEvent
impl RefUnwindSafe for WalletEvent
impl Send for WalletEvent
impl Sync for WalletEvent
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more