Struct dusk_pki::ViewKey[][src]

pub struct ViewKey { /* fields omitted */ }

Pair of a secret a and public b·G

The notes are encrypted against secret a, so this is used to decrypt the blinding factor and value

Implementations

impl ViewKey[src]

pub fn new(a: JubJubScalar, B: JubJubExtended) -> Self[src]

This method is used to construct a new ViewKey from the given pair of secret a and public b·G.

pub fn public_spend_key(&self) -> PublicSpendKey[src]

Derive the secret to deterministically construct a PublicSpendKey

pub fn a(&self) -> &JubJubScalar[src]

Gets a

pub fn B(&self) -> &JubJubExtended[src]

Gets B (b·G)

pub fn owns(&self, owner: &impl Ownable) -> bool[src]

Checks PKr = H(R · a) · G + B

Trait Implementations

impl Clone for ViewKey[src]

impl ConstantTimeEq for ViewKey[src]

impl Copy for ViewKey[src]

impl Debug for ViewKey[src]

impl Eq for ViewKey[src]

impl From<&'_ SecretSpendKey> for ViewKey[src]

impl From<SecretSpendKey> for ViewKey[src]

impl LowerHex for ViewKey[src]

impl PartialEq<ViewKey> for ViewKey[src]

impl Serializable<64_usize> for ViewKey[src]

type Error = Error

The type returned in the event of a conversion error.

impl UpperHex for ViewKey[src]

Auto Trait Implementations

impl RefUnwindSafe for ViewKey

impl Send for ViewKey

impl Sync for ViewKey

impl Unpin for ViewKey

impl UnwindSafe for ViewKey

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, const N: usize> DeserializableSlice<N> for T where
    T: Serializable<N>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, const N: usize> ParseHexStr<N> for T where
    T: Serializable<N>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.