pub struct SubKeyChecker<'a> {
    pub table: HashMap<PublicKey, Index>,
    pub keys: &'a ViewPair,
}
Expand description

Helper to check if a onetime sub-address public key is related to a view pair.

Generate a table of sub-keys from a view pair given a major range and a minor range. These precomputed keys are used to check if an output is owned by the root view pair.

Fields§

§table: HashMap<PublicKey, Index>

Table of public spend keys and their corresponding indexes.

§keys: &'a ViewPair

The root view pair (v, S).

Implementations§

Generate the table of sub spend keys K(S) \in major x minor from a view pair mapped to their Sub-address indexes.

Check if an output public key with its associated random tx public key at index i is in the table, if found then the output is own by the view pair, otherwise the output might be own by someone else, or the table migth be too small.

Same as check but uses a pre-generated KeyGenerator

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

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

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.