Struct stack_epic_wallet_libwallet::TxLogEntry
source · pub struct TxLogEntry {Show 19 fields
pub parent_key_id: Identifier,
pub id: u32,
pub tx_slate_id: Option<Uuid>,
pub tx_type: TxLogEntryType,
pub creation_ts: DateTime<Utc>,
pub confirmation_ts: Option<DateTime<Utc>>,
pub confirmed: bool,
pub num_inputs: usize,
pub num_outputs: usize,
pub amount_credited: u64,
pub amount_debited: u64,
pub fee: Option<u64>,
pub ttl_cutoff_height: Option<u64>,
pub messages: Option<ParticipantMessages>,
pub stored_tx: Option<String>,
pub kernel_excess: Option<Commitment>,
pub kernel_lookup_min_height: Option<u64>,
pub payment_proof: Option<StoredProofInfo>,
pub public_addr: Option<String>,
}Expand description
Optional transaction information, recorded when an event happens to add or remove funds from a wallet. One Transaction log entry maps to one or many outputs
Fields§
§parent_key_id: IdentifierBIP32 account path used for creating this tx
id: u32Local id for this transaction (distinct from a slate transaction id)
tx_slate_id: Option<Uuid>Slate transaction this entry is associated with, if any
tx_type: TxLogEntryTypeTransaction type (as above)
creation_ts: DateTime<Utc>Time this tx entry was created #[serde(with = “tx_date_format”)]
confirmation_ts: Option<DateTime<Utc>>Time this tx was confirmed (by this wallet) #[serde(default, with = “opt_tx_date_format”)]
confirmed: boolWhether the inputs+outputs involved in this transaction have been confirmed (In all cases either all outputs involved in a tx should be confirmed, or none should be; otherwise there’s a deeper problem)
num_inputs: usizenumber of inputs involved in TX
num_outputs: usizenumber of outputs involved in TX
amount_credited: u64Amount credited via this transaction
amount_debited: u64Amount debited via this transaction
fee: Option<u64>Fee
ttl_cutoff_height: Option<u64>Cutoff block height
messages: Option<ParticipantMessages>Message data, stored as json
stored_tx: Option<String>Location of the store transaction, (reference or resending)
kernel_excess: Option<Commitment>Associated kernel excess, for later lookup if necessary
kernel_lookup_min_height: Option<u64>Height reported when transaction was created, if lookup of kernel is necessary
payment_proof: Option<StoredProofInfo>Additional info needed to stored payment proof
public_addr: Option<String>From or To Address tx was send/received
Implementations§
source§impl TxLogEntry
impl TxLogEntry
sourcepub fn new(parent_key_id: Identifier, t: TxLogEntryType, id: u32) -> Self
pub fn new(parent_key_id: Identifier, t: TxLogEntryType, id: u32) -> Self
Return a new blank with TS initialised with next entry
sourcepub fn sum_confirmed(txs: &Vec<TxLogEntry>) -> (u64, u64)
pub fn sum_confirmed(txs: &Vec<TxLogEntry>) -> (u64, u64)
Given a vec of TX log entries, return credited + debited sums
sourcepub fn update_confirmation_ts(&mut self)
pub fn update_confirmation_ts(&mut self)
Update confirmation TS with now
Trait Implementations§
source§impl Clone for TxLogEntry
impl Clone for TxLogEntry
source§fn clone(&self) -> TxLogEntry
fn clone(&self) -> TxLogEntry
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TxLogEntry
impl Debug for TxLogEntry
source§impl<'de> Deserialize<'de> for TxLogEntry
impl<'de> Deserialize<'de> for TxLogEntry
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>,
source§impl Readable for TxLogEntry
impl Readable for TxLogEntry
source§fn read(reader: &mut dyn Reader) -> Result<TxLogEntry, Error>
fn read(reader: &mut dyn Reader) -> Result<TxLogEntry, Error>
source§impl Serialize for TxLogEntry
impl Serialize for TxLogEntry
Auto Trait Implementations§
impl RefUnwindSafe for TxLogEntry
impl Send for TxLogEntry
impl Sync for TxLogEntry
impl Unpin for TxLogEntry
impl UnwindSafe for TxLogEntry
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
§impl<T> CloneAny for T
impl<T> CloneAny for T
§impl<'a, T> DefaultFeatures<'a> for T
impl<'a, T> DefaultFeatures<'a> for T
§fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
Box
behind a trait object of this trait.§fn self_address_mut(&mut self) -> *mut ()
fn self_address_mut(&mut self) -> *mut ()
self. Read more§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>
§impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
§fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
Box
behind a trait object of this trait.§fn self_address_mut(&mut self) -> *mut ()
fn self_address_mut(&mut self) -> *mut ()
self. Read more§impl<T> SafeBorrow<T> for Twhere
T: ?Sized,
impl<T> SafeBorrow<T> for Twhere
T: ?Sized,
§fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
ptr, which was obtained from a prior call to Self::borrow(),
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self. Read more