Struct dusk_pki::PublicSpendKey
source · [−]pub struct PublicSpendKey { /* private fields */ }
Expand description
Public pair of a·G
and b·G
defining a PublicSpendKey
Implementations
sourceimpl PublicSpendKey
impl PublicSpendKey
sourcepub fn new(A: JubJubExtended, B: JubJubExtended) -> Self
pub fn new(A: JubJubExtended, B: JubJubExtended) -> Self
This method is used to construct a new PublicSpendKey
from the given
public pair of a·G
and b·G
sourcepub fn A(&self) -> &JubJubExtended
pub fn A(&self) -> &JubJubExtended
Gets A
(a·G
)
sourcepub fn B(&self) -> &JubJubExtended
pub fn B(&self) -> &JubJubExtended
Gets B
(b·G
)
sourcepub fn gen_stealth_address(&self, r: &JubJubScalar) -> StealthAddress
pub fn gen_stealth_address(&self, r: &JubJubScalar) -> StealthAddress
Generates new PKr = H(A · r) · G + B
from a given r
Trait Implementations
sourceimpl Clone for PublicSpendKey
impl Clone for PublicSpendKey
sourcefn clone(&self) -> PublicSpendKey
fn clone(&self) -> PublicSpendKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ConstantTimeEq for PublicSpendKey
impl ConstantTimeEq for PublicSpendKey
sourceimpl Debug for PublicSpendKey
impl Debug for PublicSpendKey
sourceimpl From<&SecretSpendKey> for PublicSpendKey
impl From<&SecretSpendKey> for PublicSpendKey
sourcefn from(secret: &SecretSpendKey) -> Self
fn from(secret: &SecretSpendKey) -> Self
Converts to this type from the input type.
sourceimpl From<SecretSpendKey> for PublicSpendKey
impl From<SecretSpendKey> for PublicSpendKey
sourcefn from(secret: SecretSpendKey) -> Self
fn from(secret: SecretSpendKey) -> Self
Converts to this type from the input type.
sourceimpl LowerHex for PublicSpendKey
impl LowerHex for PublicSpendKey
sourceimpl PartialEq<PublicSpendKey> for PublicSpendKey
impl PartialEq<PublicSpendKey> for PublicSpendKey
sourceimpl Serializable<64> for PublicSpendKey
impl Serializable<64> for PublicSpendKey
sourceimpl UpperHex for PublicSpendKey
impl UpperHex for PublicSpendKey
impl Copy for PublicSpendKey
impl Eq for PublicSpendKey
Auto Trait Implementations
impl RefUnwindSafe for PublicSpendKey
impl Send for PublicSpendKey
impl Sync for PublicSpendKey
impl Unpin for PublicSpendKey
impl UnwindSafe for PublicSpendKey
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 `