pub struct ViewKey { /* private fields */ }
Expand description
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
sourceimpl ViewKey
impl ViewKey
sourcepub fn new(a: JubJubScalar, B: JubJubExtended) -> Self
pub fn new(a: JubJubScalar, B: JubJubExtended) -> Self
This method is used to construct a new ViewKey
from the given
pair of secret a
and public b·G
.
sourcepub fn public_spend_key(&self) -> PublicSpendKey
pub fn public_spend_key(&self) -> PublicSpendKey
Derive the secret to deterministically construct a PublicSpendKey
sourcepub fn a(&self) -> &JubJubScalar
pub fn a(&self) -> &JubJubScalar
Gets a
sourcepub fn B(&self) -> &JubJubExtended
pub fn B(&self) -> &JubJubExtended
Gets B
(b·G
)
Trait Implementations
sourceimpl ConstantTimeEq for ViewKey
impl ConstantTimeEq for ViewKey
sourceimpl From<&SecretSpendKey> for ViewKey
impl From<&SecretSpendKey> for ViewKey
sourcefn from(secret: &SecretSpendKey) -> Self
fn from(secret: &SecretSpendKey) -> Self
Converts to this type from the input type.
sourceimpl From<SecretSpendKey> for ViewKey
impl From<SecretSpendKey> for ViewKey
sourcefn from(secret: SecretSpendKey) -> Self
fn from(secret: SecretSpendKey) -> Self
Converts to this type from the input type.
sourceimpl Serializable<64> for ViewKey
impl Serializable<64> for ViewKey
impl Copy for ViewKey
impl Eq for ViewKey
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, const N: usize> DeserializableSlice<N> for T where
T: Serializable<N>,
impl<T, const N: usize> DeserializableSlice<N> for T where
T: Serializable<N>,
sourceimpl<T, const N: usize> ParseHexStr<N> for T where
T: Serializable<N>,
impl<T, const N: usize> ParseHexStr<N> for T where
T: Serializable<N>,
sourcefn from_hex_str(s: &str) -> Result<Self, Self::Error> where
Self::Error: BadLength,
Self::Error: InvalidChar,
fn from_hex_str(s: &str) -> Result<Self, Self::Error> where
Self::Error: BadLength,
Self::Error: InvalidChar,
Parse a string slice as bytes hex representation and returns `