pub struct OutputData {
    pub root_key_id: Identifier,
    pub key_id: Identifier,
    pub n_child: u32,
    pub commit: Option<String>,
    pub mmr_index: Option<u64>,
    pub value: u64,
    pub status: OutputStatus,
    pub height: u64,
    pub lock_height: u64,
    pub is_coinbase: bool,
    pub tx_log_entry: Option<u32>,
}
Expand description

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

Implementations

Lock a given output to avoid conflicting use

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).

Check if output is eligible to spend based on state and height and confirmations

Marks this output as unspent if it was previously unconfirmed

Mark an output as spent

Mark an output as reverted

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Reads the data necessary to this Readable from the provided reader

Serialize this value into the given Serde serializer. Read more

Write the data held by this Writeable to the provided writer

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Clone this value, and then immediately put it into a Box behind a trait object of this trait. Read more

Returns the address of self. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Clone this value, and then immediately put it into a Box behind a trait object of this trait. Read more

Returns the address of self. Read more

Given 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

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more