[−][src]Struct grin_wallet_libwallet::OutputData
Information about an output that's being tracked by the wallet. Must be enough to reconstruct the commitment associated with the ouput when the root private key is known.
Fields
root_key_id: Identifier
Root key_id that the key for this output is derived from
key_id: Identifier
Derived key for this output
n_child: u32
How many derivations down from the root key
commit: Option<String>
The actual commit, optionally stored
mmr_index: Option<u64>
PMMR Index, used on restore in case of duplicate wallets using the same key_id (2 wallets using same seed, for instance
value: u64
Value of the output, necessary to rebuild the commitment
status: OutputStatus
Current status of the output
height: u64
Height of the output
lock_height: u64
Height we are locked until
is_coinbase: bool
Is this a coinbase output? Is it subject to coinbase locktime?
tx_log_entry: Option<u32>
Optional corresponding internal entry in tx entry log
Methods
impl OutputData
[src]
pub fn lock(&mut self)
[src]
Lock a given output to avoid conflicting use
pub fn num_confirmations(&self, current_height: u64) -> u64
[src]
How many confirmations has this output received? If height == 0 then we are either Unconfirmed or the output was cut-through so we do not actually know how many confirmations this output had (and never will).
pub fn eligible_to_spend(
&self,
current_height: u64,
minimum_confirmations: u64
) -> bool
[src]
&self,
current_height: u64,
minimum_confirmations: u64
) -> bool
Check if output is eligible to spend based on state and height and confirmations
pub fn mark_unspent(&mut self)
[src]
Marks this output as unspent if it was previously unconfirmed
pub fn mark_spent(&mut self)
[src]
Mark an output as spent
Trait Implementations
impl Clone for OutputData
[src]
fn clone(&self) -> OutputData
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for OutputData
[src]
impl Ord for OutputData
[src]
fn cmp(&self, other: &OutputData) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<OutputData> for OutputData
[src]
fn eq(&self, other: &OutputData) -> bool
[src]
fn ne(&self, other: &OutputData) -> bool
[src]
impl PartialOrd<OutputData> for OutputData
[src]
fn partial_cmp(&self, other: &OutputData) -> Option<Ordering>
[src]
fn lt(&self, other: &OutputData) -> bool
[src]
fn le(&self, other: &OutputData) -> bool
[src]
fn gt(&self, other: &OutputData) -> bool
[src]
fn ge(&self, other: &OutputData) -> bool
[src]
impl Debug for OutputData
[src]
impl Serialize for OutputData
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for OutputData
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Writeable for OutputData
[src]
impl Readable for OutputData
[src]
fn read(reader: &mut dyn Reader) -> Result<OutputData, Error>
[src]
Auto Trait Implementations
impl Send for OutputData
impl Sync for OutputData
impl Unpin for OutputData
impl UnwindSafe for OutputData
impl RefUnwindSafe for OutputData
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Send + Sync> where
T: Send + Sync,
T: Send + Sync,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Send + Sync + Clone,
T: 'a + Send + Sync + Clone,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> Erased for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,