pub struct ViewKey(/* private fields */);
Implementations§
source§impl ViewKey
impl ViewKey
sourcepub fn from_private_key(private_key: &PrivateKey) -> Self
pub fn from_private_key(private_key: &PrivateKey) -> Self
Create a new view key from a private key
@param {PrivateKey} private_key Private key @returns {ViewKey} View key
sourcepub fn from_string(view_key: &str) -> Self
pub fn from_string(view_key: &str) -> Self
Create a new view key from a string representation of a view key
@param {string} view_key String representation of a view key @returns {ViewKey} View key
sourcepub fn to_string(&self) -> String
pub fn to_string(&self) -> String
Get a string representation of a view key
@returns {string} String representation of a view key
sourcepub fn to_address(&self) -> Address
pub fn to_address(&self) -> Address
Get the address corresponding to a view key
@returns {Address} Address
Methods from Deref<Target = ViewKey<Testnet3>>§
pub fn to_address(&self) -> Address<N>
pub fn to_address(&self) -> Address<N>
Returns the address corresponding to the view key.
Methods from Deref<Target = Scalar<N>>§
pub const SIZE_IN_BITS: usize = <E::Scalar>::SIZE_IN_BITS
pub const SIZE_IN_BYTES: usize = _
pub const SIZE_IN_DATA_BITS: usize = <E::Scalar>::SIZE_IN_DATA_BITS
Trait Implementations§
source§impl FromWasmAbi for ViewKey
impl FromWasmAbi for ViewKey
source§impl IntoWasmAbi for ViewKey
impl IntoWasmAbi for ViewKey
source§impl LongRefFromWasmAbi for ViewKey
impl LongRefFromWasmAbi for ViewKey
source§impl OptionFromWasmAbi for ViewKey
impl OptionFromWasmAbi for ViewKey
source§impl OptionIntoWasmAbi for ViewKey
impl OptionIntoWasmAbi for ViewKey
source§impl PartialEq for ViewKey
impl PartialEq for ViewKey
source§impl RefFromWasmAbi for ViewKey
impl RefFromWasmAbi for ViewKey
source§impl RefMutFromWasmAbi for ViewKey
impl RefMutFromWasmAbi for ViewKey
source§impl TryFromJsValue for ViewKey
impl TryFromJsValue for ViewKey
source§impl VectorFromWasmAbi for ViewKey
impl VectorFromWasmAbi for ViewKey
source§impl VectorIntoWasmAbi for ViewKey
impl VectorIntoWasmAbi for ViewKey
impl Eq for ViewKey
impl StructuralEq for ViewKey
impl StructuralPartialEq 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.