Wallet

Trait Wallet 

Source
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 Self: 'async_trait, 'life0: '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; fn get_address_book<'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; 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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait; fn wait_for_contract<'life0, 'async_trait>( &'life0 self, address: AztecAddress, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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§

Source

fn get_chain_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ChainInfo, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get chain identification information.

Source

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,

Get the list of accounts managed by this wallet.

Source

fn get_address_book<'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,

Get the address book entries.

Source

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 Self: 'async_trait, 'life0: 'async_trait,

Register a sender address with an optional alias.

Source

fn get_contract_metadata<'life0, 'async_trait>( &'life0 self, address: AztecAddress, ) -> Pin<Box<dyn Future<Output = Result<ContractMetadata, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get metadata about a registered contract.

Source

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 Self: 'async_trait, 'life0: 'async_trait,

Get metadata about a registered contract class.

Source

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 Self: 'async_trait, 'life0: 'async_trait,

Register a contract instance (and optionally its artifact) with the wallet.

Source

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get private events matching the given filter.

Source

fn simulate_tx<'life0, 'async_trait>( &'life0 self, exec: ExecutionPayload, opts: SimulateOptions, ) -> Pin<Box<dyn Future<Output = Result<TxSimulationResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Simulate a transaction without sending it.

Source

fn execute_utility<'life0, 'async_trait>( &'life0 self, call: FunctionCall, opts: ExecuteUtilityOptions, ) -> Pin<Box<dyn Future<Output = Result<UtilityExecutionResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a utility (view) function.

Source

fn profile_tx<'life0, 'async_trait>( &'life0 self, exec: ExecutionPayload, opts: ProfileOptions, ) -> Pin<Box<dyn Future<Output = Result<TxProfileResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Profile a transaction for gas estimation and performance data.

Source

fn send_tx<'life0, 'async_trait>( &'life0 self, exec: ExecutionPayload, opts: SendOptions, ) -> Pin<Box<dyn Future<Output = Result<SendResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send a transaction to the network.

Source

fn wait_for_contract<'life0, 'async_trait>( &'life0 self, address: AztecAddress, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Wait until a deployed contract instance is queryable from the node.

Source

fn wait_for_tx_proven<'life0, 'async_trait>( &'life0 self, tx_hash: TxHash, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Wait until the block containing a transaction is proven on L1.

Source

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 Self: 'async_trait, 'life0: 'async_trait,

Create an authorization witness.

Source

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Read a public storage value at the given contract address and slot.

Implementations on Foreign Types§

Source§

impl<W: Wallet> Wallet for Arc<W>

Source§

fn get_chain_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ChainInfo, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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,

Source§

fn get_address_book<'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,

Source§

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 Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_contract_metadata<'life0, 'async_trait>( &'life0 self, address: AztecAddress, ) -> Pin<Box<dyn Future<Output = Result<ContractMetadata, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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 Self: 'async_trait, 'life0: 'async_trait,

Source§

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 Self: 'async_trait, 'life0: 'async_trait,

Source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn simulate_tx<'life0, 'async_trait>( &'life0 self, exec: ExecutionPayload, opts: SimulateOptions, ) -> Pin<Box<dyn Future<Output = Result<TxSimulationResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn execute_utility<'life0, 'async_trait>( &'life0 self, call: FunctionCall, opts: ExecuteUtilityOptions, ) -> Pin<Box<dyn Future<Output = Result<UtilityExecutionResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn profile_tx<'life0, 'async_trait>( &'life0 self, exec: ExecutionPayload, opts: ProfileOptions, ) -> Pin<Box<dyn Future<Output = Result<TxProfileResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_tx<'life0, 'async_trait>( &'life0 self, exec: ExecutionPayload, opts: SendOptions, ) -> Pin<Box<dyn Future<Output = Result<SendResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn wait_for_contract<'life0, 'async_trait>( &'life0 self, address: AztecAddress, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn wait_for_tx_proven<'life0, 'async_trait>( &'life0 self, tx_hash: TxHash, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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 Self: 'async_trait, 'life0: 'async_trait,

Source§

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§