pub trait AccountProvider: Send + Sync {
// Required methods
fn create_tx_execution_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 AztecAddress,
exec: ExecutionPayload,
gas_settings: GasSettings,
chain_info: &'life2 ChainInfo,
fee_payer: Option<AztecAddress>,
fee_payment_method: Option<u8>,
) -> Pin<Box<dyn Future<Output = Result<TxExecutionRequest, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn create_auth_wit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 AztecAddress,
intent: MessageHashOrIntent,
chain_info: &'life2 ChainInfo,
) -> Pin<Box<dyn Future<Output = Result<AuthWitness, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_complete_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<CompleteAddress>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Aliased<AztecAddress>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Provides account operations needed by BaseWallet.
This is the Rust equivalent of the abstract getAccountFromAddress()
in the TS BaseWallet. Different wallet backends (embedded, CLI, extension)
implement this to provide their own account lookup and transaction creation
strategy.
The trait returns PXE-level TxExecutionRequest (opaque JSON) directly,
handling the conversion from the account’s structured request internally.
This avoids a circular dependency between the wallet and account crates.
Required Methods§
Sourcefn create_tx_execution_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 AztecAddress,
exec: ExecutionPayload,
gas_settings: GasSettings,
chain_info: &'life2 ChainInfo,
fee_payer: Option<AztecAddress>,
fee_payment_method: Option<u8>,
) -> Pin<Box<dyn Future<Output = Result<TxExecutionRequest, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_tx_execution_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 AztecAddress,
exec: ExecutionPayload,
gas_settings: GasSettings,
chain_info: &'life2 ChainInfo,
fee_payer: Option<AztecAddress>,
fee_payment_method: Option<u8>,
) -> Pin<Box<dyn Future<Output = Result<TxExecutionRequest, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create a transaction execution request for the given account.
This processes the execution payload through the account’s entrypoint, adding authentication and gas handling, then serializes the result into the PXE’s opaque request format.
Sourcefn create_auth_wit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 AztecAddress,
intent: MessageHashOrIntent,
chain_info: &'life2 ChainInfo,
) -> Pin<Box<dyn Future<Output = Result<AuthWitness, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_auth_wit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 AztecAddress,
intent: MessageHashOrIntent,
chain_info: &'life2 ChainInfo,
) -> Pin<Box<dyn Future<Output = Result<AuthWitness, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create an authorization witness for the given account.
Sourcefn get_complete_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<CompleteAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_complete_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<CompleteAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the complete address for a managed account, if available.