pub enum TransactionAuthenticator {
Ed25519 {
public_key: Ed25519PublicKey,
signature: Ed25519Signature,
},
MultiEd25519 {
public_key: Vec<u8>,
signature: Vec<u8>,
},
MultiAgent {
sender: AccountAuthenticator,
secondary_signer_addresses: Vec<AccountAddress>,
secondary_signers: Vec<AccountAuthenticator>,
},
FeePayer {
sender: AccountAuthenticator,
secondary_signer_addresses: Vec<AccountAddress>,
secondary_signers: Vec<AccountAuthenticator>,
fee_payer_address: AccountAddress,
fee_payer_signer: AccountAuthenticator,
},
SingleSender {
sender: AccountAuthenticator,
},
}Expand description
An authenticator for a transaction.
This contains the signature(s) and public key(s) that prove the transaction was authorized by the sender.
Note: Variant indices must match Aptos core for BCS compatibility:
- 0: Ed25519
- 1:
MultiEd25519 - 2:
MultiAgent - 3:
FeePayer - 4:
SingleSender(for unified key support)
Variants§
Ed25519
Ed25519 single-key authentication (variant 0).
Fields
public_key: Ed25519PublicKeyThe Ed25519 public key (32 bytes).
signature: Ed25519SignatureThe Ed25519 signature (64 bytes).
MultiEd25519
Multi-Ed25519 authentication (variant 1).
Fields
MultiAgent
Multi-agent transaction authentication (variant 2).
Fields
sender: AccountAuthenticatorThe sender’s authenticator.
secondary_signer_addresses: Vec<AccountAddress>Secondary signer addresses.
secondary_signers: Vec<AccountAuthenticator>Secondary signers’ authenticators.
FeePayer
Fee payer transaction authentication (variant 3).
Fields
sender: AccountAuthenticatorThe sender’s authenticator.
secondary_signer_addresses: Vec<AccountAddress>Secondary signer addresses.
secondary_signers: Vec<AccountAuthenticator>Secondary signers’ authenticators.
fee_payer_address: AccountAddressThe fee payer’s address.
fee_payer_signer: AccountAuthenticatorThe fee payer’s authenticator.
SingleSender
Single sender authentication with account authenticator (variant 4). Used for newer single-key and multi-key accounts.
Fields
sender: AccountAuthenticatorThe account authenticator.
Implementations§
Source§impl TransactionAuthenticator
impl TransactionAuthenticator
Sourcepub fn ed25519(public_key: Vec<u8>, signature: Vec<u8>) -> Self
pub fn ed25519(public_key: Vec<u8>, signature: Vec<u8>) -> Self
Creates an Ed25519 authenticator.
Sourcepub fn multi_ed25519(public_key: Vec<u8>, signature: Vec<u8>) -> Self
pub fn multi_ed25519(public_key: Vec<u8>, signature: Vec<u8>) -> Self
Creates a multi-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
Creates a multi-agent authenticator.
Sourcepub fn fee_payer(
sender: AccountAuthenticator,
secondary_signer_addresses: Vec<AccountAddress>,
secondary_signers: Vec<AccountAuthenticator>,
fee_payer_address: AccountAddress,
fee_payer_signer: AccountAuthenticator,
) -> Self
pub fn fee_payer( sender: AccountAuthenticator, secondary_signer_addresses: Vec<AccountAddress>, secondary_signers: Vec<AccountAuthenticator>, fee_payer_address: AccountAddress, fee_payer_signer: AccountAuthenticator, ) -> Self
Creates a fee payer authenticator.
Sourcepub fn single_sender(sender: AccountAuthenticator) -> Self
pub fn single_sender(sender: AccountAuthenticator) -> Self
Creates a single sender authenticator. This is used for accounts with the unified key model (including multi-key accounts).
Trait Implementations§
Source§impl Clone for TransactionAuthenticator
impl Clone for TransactionAuthenticator
Source§fn clone(&self) -> TransactionAuthenticator
fn clone(&self) -> TransactionAuthenticator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§impl From<Ed25519Authenticator> for TransactionAuthenticator
impl From<Ed25519Authenticator> for TransactionAuthenticator
Source§fn from(auth: Ed25519Authenticator) -> Self
fn from(auth: Ed25519Authenticator) -> Self
Source§impl PartialEq for TransactionAuthenticator
impl PartialEq for TransactionAuthenticator
Source§impl Serialize for TransactionAuthenticator
impl Serialize for TransactionAuthenticator
impl Eq for TransactionAuthenticator
impl StructuralPartialEq for TransactionAuthenticator
Auto Trait Implementations§
impl Freeze for TransactionAuthenticator
impl RefUnwindSafe for TransactionAuthenticator
impl Send for TransactionAuthenticator
impl Sync for TransactionAuthenticator
impl Unpin for TransactionAuthenticator
impl UnwindSafe for TransactionAuthenticator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.