TransactionAuthenticator

Trait TransactionAuthenticator 

Source
pub trait TransactionAuthenticator {
    // Required method
    fn get_signature(
        &self,
        pub_key: Word,
        signing_inputs: &SigningInputs,
    ) -> impl FutureMaybeSend<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 Word’s which are the hashes of the actual public keys.

Required Methods§

Source

fn get_signature( &self, pub_key: Word, signing_inputs: &SigningInputs, ) -> impl FutureMaybeSend<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_hash: The hash of 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 calling get_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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TransactionAuthenticator for ()

Source§

fn get_signature( &self, _pub_key: Word, _signing_inputs: &SigningInputs, ) -> impl FutureMaybeSend<Result<Vec<BaseElement>, AuthenticationError>>

Implementors§