Enum diem_types::transaction::authenticator::TransactionAuthenticator [−][src]
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
Single signature
Fields of Ed25519
public_key: Validatable<Ed25519PublicKey>
signature: Ed25519Signature
K-of-N multisignature
Fields of MultiEd25519
public_key: MultiEd25519PublicKey
signature: MultiEd25519Signature
Multi-agent transaction.
Fields of MultiAgent
sender: AccountAuthenticator
secondary_signer_addresses: Vec<AccountAddress>
secondary_signers: Vec<AccountAuthenticator>
Implementations
Create a single-signature ed25519 authenticator
pub fn multi_ed25519(
public_key: MultiEd25519PublicKey,
signature: MultiEd25519Signature
) -> Self
pub fn multi_ed25519(
public_key: MultiEd25519PublicKey,
signature: MultiEd25519Signature
) -> Self
Create a multisignature ed25519 authenticator
pub 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
Return Ok if all AccountAuthenticator’s public keys match their signatures, Err otherwise
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more
Generates a hash used only for tests.