pub enum TransactionAuthenticator {
Ed25519 {
public_key: Validatable<Ed25519PublicKey>,
signature: Ed25519Signature,
},
MultiEd25519 {
public_key: MultiEd25519PublicKey,
signature: MultiEd25519Signature,
},
MultiAgent {
sender: AccountAuthenticator,
secondary_signer_addresses: Vec<AccountAddress>,
secondary_signers: Vec<AccountAuthenticator>,
},
}
Expand description
Each transaction submitted to the Diem blockchain contains a TransactionAuthenticator
. During
transaction execution, the executor will check if every AccountAuthenticator
’s signature on
the transaction hash is well-formed and whether the sha3 hash of the
AccountAuthenticator
’s AuthenticationKeyPreimage
matches the AuthenticationKey
stored
under the participating signer’s account address.
Variants§
Ed25519
Single signature
MultiEd25519
K-of-N multisignature
MultiAgent
Fields
§
sender: AccountAuthenticator
§
secondary_signer_addresses: Vec<AccountAddress>
§
secondary_signers: Vec<AccountAuthenticator>
Multi-agent transaction.
Implementations§
source§impl TransactionAuthenticator
impl TransactionAuthenticator
sourcepub fn ed25519(public_key: Ed25519PublicKey, signature: Ed25519Signature) -> Self
pub fn ed25519(public_key: Ed25519PublicKey, signature: Ed25519Signature) -> Self
Create a single-signature ed25519 authenticator
sourcepub fn multi_ed25519(
public_key: MultiEd25519PublicKey,
signature: MultiEd25519Signature
) -> Self
pub fn multi_ed25519( public_key: MultiEd25519PublicKey, signature: MultiEd25519Signature ) -> Self
Create a multisignature ed25519 authenticator
sourcepub fn multi_agent(
sender: AccountAuthenticator,
secondary_signer_addresses: Vec<AccountAddress>,
secondary_signers: Vec<AccountAuthenticator>
) -> Self
pub fn multi_agent( sender: AccountAuthenticator, secondary_signer_addresses: Vec<AccountAddress>, secondary_signers: Vec<AccountAuthenticator> ) -> Self
Create a multi-agent authenticator
sourcepub fn verify(&self, raw_txn: &RawTransaction) -> Result<()>
pub fn verify(&self, raw_txn: &RawTransaction) -> Result<()>
Return Ok if all AccountAuthenticator’s public keys match their signatures, Err otherwise
pub fn sender(&self) -> AccountAuthenticator
pub fn secondary_signer_addreses(&self) -> Vec<AccountAddress> ⓘ
pub fn secondary_signers(&self) -> Vec<AccountAuthenticator> ⓘ
Trait Implementations§
source§impl Clone for TransactionAuthenticator
impl Clone for TransactionAuthenticator
source§fn clone(&self) -> TransactionAuthenticator
fn clone(&self) -> TransactionAuthenticator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TransactionAuthenticator
impl Debug for TransactionAuthenticator
source§impl<'de> Deserialize<'de> for TransactionAuthenticator
impl<'de> Deserialize<'de> for TransactionAuthenticator
source§fn 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
source§impl Display for TransactionAuthenticator
impl Display for TransactionAuthenticator
source§impl Hash for TransactionAuthenticator
impl Hash for TransactionAuthenticator
source§impl PartialEq<TransactionAuthenticator> for TransactionAuthenticator
impl PartialEq<TransactionAuthenticator> for TransactionAuthenticator
source§fn eq(&self, other: &TransactionAuthenticator) -> bool
fn eq(&self, other: &TransactionAuthenticator) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TransactionAuthenticator
impl Serialize for TransactionAuthenticator
impl Eq for TransactionAuthenticator
impl StructuralEq for TransactionAuthenticator
impl StructuralPartialEq for TransactionAuthenticator
Auto Trait Implementations§
impl RefUnwindSafe for TransactionAuthenticator
impl Send for TransactionAuthenticator
impl Sync for TransactionAuthenticator
impl Unpin for TransactionAuthenticator
impl UnwindSafe for TransactionAuthenticator
Blanket Implementations§
source§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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.