Account

Trait Account 

Source
pub trait Account:
    Send
    + Sync
    + AuthorizationProvider {
    // Required methods
    fn complete_address(&self) -> &CompleteAddress;
    fn address(&self) -> AztecAddress;
    fn create_tx_execution_request<'life0, 'life1, 'async_trait>(
        &'life0 self,
        exec: ExecutionPayload,
        gas_settings: GasSettings,
        chain_info: &'life1 ChainInfo,
        options: EntrypointOptions,
    ) -> Pin<Box<dyn Future<Output = Result<TxExecutionRequest, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn wrap_execution_payload<'life0, 'async_trait>(
        &'life0 self,
        exec: ExecutionPayload,
        options: EntrypointOptions,
    ) -> Pin<Box<dyn Future<Output = Result<ExecutionPayload, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

An Aztec account – combines an entrypoint, auth-witness provider, and complete address.

The Account trait is the main abstraction for account-based transaction creation. It wraps execution payloads through the account’s entrypoint contract, adding authentication and fee payment.

Required Methods§

Source

fn complete_address(&self) -> &CompleteAddress

Get the complete address of this account.

Source

fn address(&self) -> AztecAddress

Get the account address.

Source

fn create_tx_execution_request<'life0, 'life1, 'async_trait>( &'life0 self, exec: ExecutionPayload, gas_settings: GasSettings, chain_info: &'life1 ChainInfo, options: EntrypointOptions, ) -> Pin<Box<dyn Future<Output = Result<TxExecutionRequest, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a full transaction execution request from a payload.

This processes the payload through the account’s entrypoint, adding authentication and gas handling.

Source

fn wrap_execution_payload<'life0, 'async_trait>( &'life0 self, exec: ExecutionPayload, options: EntrypointOptions, ) -> Pin<Box<dyn Future<Output = Result<ExecutionPayload, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Wrap an execution payload through the account’s entrypoint.

Similar to Account::create_tx_execution_request but returns an ExecutionPayload rather than a full request.

Implementors§