Enum diem_sdk::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, Global>,
secondary_signers: Vec<AccountAuthenticator, Global>,
},
}
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, Global>
secondary_signers: Vec<AccountAuthenticator, Global>
Implementations
pub fn ed25519(
public_key: Ed25519PublicKey,
signature: Ed25519Signature
) -> TransactionAuthenticator
pub fn ed25519(
public_key: Ed25519PublicKey,
signature: Ed25519Signature
) -> TransactionAuthenticator
Create a single-signature ed25519 authenticator
pub fn multi_ed25519(
public_key: MultiEd25519PublicKey,
signature: MultiEd25519Signature
) -> TransactionAuthenticator
pub fn multi_ed25519(
public_key: MultiEd25519PublicKey,
signature: MultiEd25519Signature
) -> TransactionAuthenticator
Create a multisignature ed25519 authenticator
pub fn multi_agent(
sender: AccountAuthenticator,
secondary_signer_addresses: Vec<AccountAddress, Global>,
secondary_signers: Vec<AccountAuthenticator, Global>
) -> TransactionAuthenticator
pub fn multi_agent(
sender: AccountAuthenticator,
secondary_signer_addresses: Vec<AccountAddress, Global>,
secondary_signers: Vec<AccountAuthenticator, Global>
) -> TransactionAuthenticator
Create a multi-agent authenticator
Return Ok if all AccountAuthenticator’s public keys match their signatures, Err otherwise
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<TransactionAuthenticator, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<TransactionAuthenticator, <__D as Deserializer<'de>>::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 !=
.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Generates a hash used only for tests.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more