pub trait TransactionAuthenticator {
// Required method
fn get_signature(
&self,
pub_key: [BaseElement; 4],
message: [BaseElement; 4],
account_delta: &AccountDelta,
) -> Result<Vec<BaseElement>, AuthenticationError>;
}Expand description
Defines an authenticator for transactions.
The main purpose of the authenticator is to generate signatures for a given message against a key managed by the authenticator. That is, the authenticator maintains a set of public- private key pairs, and can be requested to generate signatures against any of the managed keys.
The public keys are defined by Digest’s which are the hashes of the actual public keys.
Required Methods§
Sourcefn get_signature(
&self,
pub_key: [BaseElement; 4],
message: [BaseElement; 4],
account_delta: &AccountDelta,
) -> Result<Vec<BaseElement>, AuthenticationError>
fn get_signature( &self, pub_key: [BaseElement; 4], message: [BaseElement; 4], account_delta: &AccountDelta, ) -> Result<Vec<BaseElement>, AuthenticationError>
Retrieves a signature for a specific message as a list of Felt.
The request is initiated by the VM as a consequence of the SigToStack advice injector.
pub_key: The public key used for signature generation.message: The message to sign, usually a commitment to the transaction data.account_delta: An informational parameter describing the changes made to the account up to the point of callingget_signature(). This allows the authenticator to review any alterations to the account prior to signing. It should not be directly used in the signature computation.