Struct aptos_types::transaction::authenticator::AuthenticationKey
source · [−]pub struct AuthenticationKey(_);Expand description
A struct that represents an account authentication key. An account’s address is the last 16 bytes of authentication key used to create it
Implementations
sourceimpl AuthenticationKey
impl AuthenticationKey
sourcepub const fn zero() -> Self
pub const fn zero() -> Self
Return an authentication key that is impossible (in expectation) to sign for–useful for intentionally relinquishing control of an account.
sourcepub fn from_preimage(preimage: &AuthenticationKeyPreimage) -> AuthenticationKey
pub fn from_preimage(preimage: &AuthenticationKeyPreimage) -> AuthenticationKey
Create an authentication key from a preimage by taking its sha3 hash
sourcepub fn ed25519(public_key: &Ed25519PublicKey) -> AuthenticationKey
pub fn ed25519(public_key: &Ed25519PublicKey) -> AuthenticationKey
Create an authentication key from an Ed25519 public key
sourcepub fn multi_ed25519(public_key: &MultiEd25519PublicKey) -> Self
pub fn multi_ed25519(public_key: &MultiEd25519PublicKey) -> Self
Create an authentication key from a MultiEd25519 public key
sourcepub fn derived_address(&self) -> AccountAddress
pub fn derived_address(&self) -> AccountAddress
Return an address derived from the last AccountAddress::LENGTH bytes of this
authentication key.
sourcepub fn prefix(&self) -> [u8; 0]
pub fn prefix(&self) -> [u8; 0]
Return the first self::LENGTH - AccountAddress::LENGTH bytes of this authentication key
Trait Implementations
sourceimpl AsRef<[u8]> for AuthenticationKey
impl AsRef<[u8]> for AuthenticationKey
sourceimpl Clone for AuthenticationKey
impl Clone for AuthenticationKey
sourcefn clone(&self) -> AuthenticationKey
fn clone(&self) -> AuthenticationKey
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 Debug for AuthenticationKey
impl Debug for AuthenticationKey
sourceimpl<'de> Deserialize<'de> for AuthenticationKey
impl<'de> Deserialize<'de> for AuthenticationKey
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for AuthenticationKey
impl Display for AuthenticationKey
sourceimpl FromStr for AuthenticationKey
impl FromStr for AuthenticationKey
sourceimpl Hash for AuthenticationKey
impl Hash for AuthenticationKey
sourceimpl LowerHex for AuthenticationKey
impl LowerHex for AuthenticationKey
sourceimpl Ord for AuthenticationKey
impl Ord for AuthenticationKey
sourceimpl PartialEq<AuthenticationKey> for AuthenticationKey
impl PartialEq<AuthenticationKey> for AuthenticationKey
sourcefn eq(&self, other: &AuthenticationKey) -> bool
fn eq(&self, other: &AuthenticationKey) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &AuthenticationKey) -> bool
fn ne(&self, other: &AuthenticationKey) -> bool
This method tests for !=.
sourceimpl PartialOrd<AuthenticationKey> for AuthenticationKey
impl PartialOrd<AuthenticationKey> for AuthenticationKey
sourcefn partial_cmp(&self, other: &AuthenticationKey) -> Option<Ordering>
fn partial_cmp(&self, other: &AuthenticationKey) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl Serialize for AuthenticationKey
impl Serialize for AuthenticationKey
sourceimpl TryFrom<&[u8]> for AuthenticationKey
impl TryFrom<&[u8]> for AuthenticationKey
type Error = CryptoMaterialError
type Error = CryptoMaterialError
The type returned in the event of a conversion error.
sourcefn try_from(bytes: &[u8]) -> Result<AuthenticationKey, CryptoMaterialError>
fn try_from(bytes: &[u8]) -> Result<AuthenticationKey, CryptoMaterialError>
Performs the conversion.
sourceimpl TryFrom<Vec<u8, Global>> for AuthenticationKey
impl TryFrom<Vec<u8, Global>> for AuthenticationKey
type Error = CryptoMaterialError
type Error = CryptoMaterialError
The type returned in the event of a conversion error.
sourcefn try_from(bytes: Vec<u8>) -> Result<AuthenticationKey, CryptoMaterialError>
fn try_from(bytes: Vec<u8>) -> Result<AuthenticationKey, CryptoMaterialError>
Performs the conversion.
impl Copy for AuthenticationKey
impl Eq for AuthenticationKey
impl StructuralEq for AuthenticationKey
impl StructuralPartialEq for AuthenticationKey
Auto Trait Implementations
impl RefUnwindSafe for AuthenticationKey
impl Send for AuthenticationKey
impl Sync for AuthenticationKey
impl Unpin for AuthenticationKey
impl UnwindSafe for AuthenticationKey
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<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
sourcefn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.
sourceimpl<T> ToHex for T where
T: AsRef<[u8]>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
sourcefn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self into the result. Lower case
letters are used (e.g. f9b4ca) Read more
sourcefn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self into the result. Upper case
letters are used (e.g. F9B4CA) Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> ValidCryptoMaterialStringExt for T where
T: ValidCryptoMaterial,
impl<T> ValidCryptoMaterialStringExt for T where
T: ValidCryptoMaterial,
sourcefn from_encoded_string(encoded_str: &str) -> Result<Self, CryptoMaterialError>
fn from_encoded_string(encoded_str: &str) -> Result<Self, CryptoMaterialError>
When trying to convert from bytes, we simply decode the string into bytes before checking if we can convert. Read more
sourcefn to_encoded_string(&self) -> Result<String, Error>
fn to_encoded_string(&self) -> Result<String, Error>
A function to encode into hex-string after serializing.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more