Trait Wallet
pub trait Wallet: Send + Sync {
Show 16 methods
// Required methods
fn get_chain_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainInfo, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Aliased<AztecAddress>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_address_book<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Aliased<AztecAddress>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn register_sender<'life0, 'async_trait>(
&'life0 self,
address: AztecAddress,
alias: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_contract_metadata<'life0, 'async_trait>(
&'life0 self,
address: AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<ContractMetadata, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_contract_class_metadata<'life0, 'async_trait>(
&'life0 self,
class_id: Fr,
) -> Pin<Box<dyn Future<Output = Result<ContractClassMetadata, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn register_contract<'life0, 'async_trait>(
&'life0 self,
instance: ContractInstanceWithAddress,
artifact: Option<ContractArtifact>,
secret_key: Option<Fr>,
) -> Pin<Box<dyn Future<Output = Result<ContractInstanceWithAddress, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_private_events<'life0, 'life1, 'async_trait>(
&'life0 self,
event_metadata: &'life1 EventMetadataDefinition,
filter: PrivateEventFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<PrivateEvent>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn simulate_tx<'life0, 'async_trait>(
&'life0 self,
exec: ExecutionPayload,
opts: SimulateOptions,
) -> Pin<Box<dyn Future<Output = Result<TxSimulationResult, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn execute_utility<'life0, 'async_trait>(
&'life0 self,
call: FunctionCall,
opts: ExecuteUtilityOptions,
) -> Pin<Box<dyn Future<Output = Result<UtilityExecutionResult, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn profile_tx<'life0, 'async_trait>(
&'life0 self,
exec: ExecutionPayload,
opts: ProfileOptions,
) -> Pin<Box<dyn Future<Output = Result<TxProfileResult, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn send_tx<'life0, 'async_trait>(
&'life0 self,
exec: ExecutionPayload,
opts: SendOptions,
) -> Pin<Box<dyn Future<Output = Result<SendResult, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn wait_for_contract<'life0, 'async_trait>(
&'life0 self,
address: AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn wait_for_tx_proven<'life0, 'async_trait>(
&'life0 self,
tx_hash: TxHash,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn create_auth_wit<'life0, 'async_trait>(
&'life0 self,
from: AztecAddress,
message_hash_or_intent: MessageHashOrIntent,
) -> Pin<Box<dyn Future<Output = Result<AuthWitness, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_public_storage_at<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
contract: &'life1 AztecAddress,
slot: &'life2 Fr,
) -> Pin<Box<dyn Future<Output = Result<Fr, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
}Expand description
Main private execution interface for end users.
This trait is the primary abstraction for interacting with the Aztec network through a wallet implementation. It provides methods for account management, contract registration, transaction simulation, sending, and event retrieval.
Required Methods§
fn get_chain_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_chain_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainInfo, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get chain identification information.
fn get_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Aliased<AztecAddress>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Aliased<AztecAddress>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get the list of accounts managed by this wallet.
fn get_address_book<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Aliased<AztecAddress>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_address_book<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Aliased<AztecAddress>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get the address book entries.
fn register_sender<'life0, 'async_trait>(
&'life0 self,
address: AztecAddress,
alias: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn register_sender<'life0, 'async_trait>(
&'life0 self,
address: AztecAddress,
alias: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Register a sender address with an optional alias.
fn get_contract_metadata<'life0, 'async_trait>(
&'life0 self,
address: AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<ContractMetadata, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_contract_metadata<'life0, 'async_trait>(
&'life0 self,
address: AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<ContractMetadata, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get metadata about a registered contract.
fn get_contract_class_metadata<'life0, 'async_trait>(
&'life0 self,
class_id: Fr,
) -> Pin<Box<dyn Future<Output = Result<ContractClassMetadata, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_contract_class_metadata<'life0, 'async_trait>(
&'life0 self,
class_id: Fr,
) -> Pin<Box<dyn Future<Output = Result<ContractClassMetadata, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Get metadata about a registered contract class.
fn register_contract<'life0, 'async_trait>(
&'life0 self,
instance: ContractInstanceWithAddress,
artifact: Option<ContractArtifact>,
secret_key: Option<Fr>,
) -> Pin<Box<dyn Future<Output = Result<ContractInstanceWithAddress, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn register_contract<'life0, 'async_trait>(
&'life0 self,
instance: ContractInstanceWithAddress,
artifact: Option<ContractArtifact>,
secret_key: Option<Fr>,
) -> Pin<Box<dyn Future<Output = Result<ContractInstanceWithAddress, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Register a contract instance (and optionally its artifact) with the wallet.
fn get_private_events<'life0, 'life1, 'async_trait>(
&'life0 self,
event_metadata: &'life1 EventMetadataDefinition,
filter: PrivateEventFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<PrivateEvent>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_private_events<'life0, 'life1, 'async_trait>(
&'life0 self,
event_metadata: &'life1 EventMetadataDefinition,
filter: PrivateEventFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<PrivateEvent>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Get private events matching the given filter.
fn simulate_tx<'life0, 'async_trait>(
&'life0 self,
exec: ExecutionPayload,
opts: SimulateOptions,
) -> Pin<Box<dyn Future<Output = Result<TxSimulationResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn simulate_tx<'life0, 'async_trait>(
&'life0 self,
exec: ExecutionPayload,
opts: SimulateOptions,
) -> Pin<Box<dyn Future<Output = Result<TxSimulationResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Simulate a transaction without sending it.
fn execute_utility<'life0, 'async_trait>(
&'life0 self,
call: FunctionCall,
opts: ExecuteUtilityOptions,
) -> Pin<Box<dyn Future<Output = Result<UtilityExecutionResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn execute_utility<'life0, 'async_trait>(
&'life0 self,
call: FunctionCall,
opts: ExecuteUtilityOptions,
) -> Pin<Box<dyn Future<Output = Result<UtilityExecutionResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Execute a utility (view) function.
fn profile_tx<'life0, 'async_trait>(
&'life0 self,
exec: ExecutionPayload,
opts: ProfileOptions,
) -> Pin<Box<dyn Future<Output = Result<TxProfileResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn profile_tx<'life0, 'async_trait>(
&'life0 self,
exec: ExecutionPayload,
opts: ProfileOptions,
) -> Pin<Box<dyn Future<Output = Result<TxProfileResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Profile a transaction for gas estimation and performance data.
fn send_tx<'life0, 'async_trait>(
&'life0 self,
exec: ExecutionPayload,
opts: SendOptions,
) -> Pin<Box<dyn Future<Output = Result<SendResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn send_tx<'life0, 'async_trait>(
&'life0 self,
exec: ExecutionPayload,
opts: SendOptions,
) -> Pin<Box<dyn Future<Output = Result<SendResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Send a transaction to the network.
fn wait_for_contract<'life0, 'async_trait>(
&'life0 self,
address: AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn wait_for_contract<'life0, 'async_trait>(
&'life0 self,
address: AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Wait until a deployed contract instance is queryable from the node.
fn wait_for_tx_proven<'life0, 'async_trait>(
&'life0 self,
tx_hash: TxHash,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn wait_for_tx_proven<'life0, 'async_trait>(
&'life0 self,
tx_hash: TxHash,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Wait until the block containing a transaction is proven on L1.
fn create_auth_wit<'life0, 'async_trait>(
&'life0 self,
from: AztecAddress,
message_hash_or_intent: MessageHashOrIntent,
) -> Pin<Box<dyn Future<Output = Result<AuthWitness, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn create_auth_wit<'life0, 'async_trait>(
&'life0 self,
from: AztecAddress,
message_hash_or_intent: MessageHashOrIntent,
) -> Pin<Box<dyn Future<Output = Result<AuthWitness, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Create an authorization witness.
fn get_public_storage_at<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
contract: &'life1 AztecAddress,
slot: &'life2 Fr,
) -> Pin<Box<dyn Future<Output = Result<Fr, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_public_storage_at<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
contract: &'life1 AztecAddress,
slot: &'life2 Fr,
) -> Pin<Box<dyn Future<Output = Result<Fr, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Read a public storage value at the given contract address and slot.