pub trait Pxe: Send + Sync {
Show 18 methods
// Required methods
fn get_synced_block_header<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockHeader, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_contract_instance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<ContractInstanceWithAddress>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_contract_artifact<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Fr,
) -> Pin<Box<dyn Future<Output = Result<Option<ContractArtifact>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_contracts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AztecAddress>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
secret_key: &'life1 Fr,
partial_address: &'life2 Fr,
) -> Pin<Box<dyn Future<Output = Result<CompleteAddress, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_registered_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CompleteAddress>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_sender<'life0, 'life1, 'async_trait>(
&'life0 self,
sender: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_senders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AztecAddress>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_sender<'life0, 'life1, 'async_trait>(
&'life0 self,
sender: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn register_contract_class<'life0, 'life1, 'async_trait>(
&'life0 self,
artifact: &'life1 ContractArtifact,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn register_contract<'life0, 'async_trait>(
&'life0 self,
request: RegisterContractRequest,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_contract<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 AztecAddress,
artifact: &'life2 ContractArtifact,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn simulate_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_request: &'life1 TxExecutionRequest,
opts: SimulateTxOpts,
) -> Pin<Box<dyn Future<Output = Result<TxSimulationResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn prove_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_request: &'life1 TxExecutionRequest,
scopes: Vec<AztecAddress>,
) -> Pin<Box<dyn Future<Output = Result<TxProvingResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn profile_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_request: &'life1 TxExecutionRequest,
opts: ProfileTxOpts,
) -> Pin<Box<dyn Future<Output = Result<TxProfileResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn execute_utility<'life0, 'life1, 'async_trait>(
&'life0 self,
call: &'life1 FunctionCall,
opts: ExecuteUtilityOpts,
) -> Pin<Box<dyn Future<Output = Result<UtilityExecutionResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_private_events<'life0, 'life1, 'async_trait>(
&'life0 self,
event_selector: &'life1 EventSelector,
filter: PrivateEventFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackedPrivateEvent>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Interface for the Aztec Private eXecution Environment (PXE).
The PXE handles private state, transaction simulation, proving, and account/contract registration. This trait abstracts over different PXE backends (HTTP client, in-process, mock).
Required Methods§
Sourcefn get_synced_block_header<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockHeader, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_synced_block_header<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockHeader, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the synced block header.
Sourcefn get_contract_instance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<ContractInstanceWithAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_contract_instance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<ContractInstanceWithAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a contract instance by its address.
Sourcefn get_contract_artifact<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Fr,
) -> Pin<Box<dyn Future<Output = Result<Option<ContractArtifact>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_contract_artifact<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Fr,
) -> Pin<Box<dyn Future<Output = Result<Option<ContractArtifact>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a contract artifact by its class ID.
Sourcefn get_contracts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AztecAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_contracts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AztecAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all registered contract addresses.
Sourcefn register_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
secret_key: &'life1 Fr,
partial_address: &'life2 Fr,
) -> Pin<Box<dyn Future<Output = Result<CompleteAddress, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
secret_key: &'life1 Fr,
partial_address: &'life2 Fr,
) -> Pin<Box<dyn Future<Output = Result<CompleteAddress, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Register an account with the PXE.
Sourcefn get_registered_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CompleteAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_registered_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<CompleteAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all registered account addresses.
Sourcefn register_sender<'life0, 'life1, 'async_trait>(
&'life0 self,
sender: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_sender<'life0, 'life1, 'async_trait>(
&'life0 self,
sender: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<AztecAddress, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register a sender address for private log syncing.
Sourcefn get_senders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AztecAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_senders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AztecAddress>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all registered sender addresses.
Sourcefn remove_sender<'life0, 'life1, 'async_trait>(
&'life0 self,
sender: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_sender<'life0, 'life1, 'async_trait>(
&'life0 self,
sender: &'life1 AztecAddress,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove a registered sender.
Sourcefn register_contract_class<'life0, 'life1, 'async_trait>(
&'life0 self,
artifact: &'life1 ContractArtifact,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_contract_class<'life0, 'life1, 'async_trait>(
&'life0 self,
artifact: &'life1 ContractArtifact,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register a contract class with the PXE (artifact only, no instance).
Sourcefn register_contract<'life0, 'async_trait>(
&'life0 self,
request: RegisterContractRequest,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_contract<'life0, 'async_trait>(
&'life0 self,
request: RegisterContractRequest,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Register a contract instance (and optionally its artifact).
Sourcefn update_contract<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 AztecAddress,
artifact: &'life2 ContractArtifact,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_contract<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
address: &'life1 AztecAddress,
artifact: &'life2 ContractArtifact,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update a contract’s artifact.
Sourcefn simulate_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_request: &'life1 TxExecutionRequest,
opts: SimulateTxOpts,
) -> Pin<Box<dyn Future<Output = Result<TxSimulationResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn simulate_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_request: &'life1 TxExecutionRequest,
opts: SimulateTxOpts,
) -> Pin<Box<dyn Future<Output = Result<TxSimulationResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Simulate a transaction without sending it.
Sourcefn prove_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_request: &'life1 TxExecutionRequest,
scopes: Vec<AztecAddress>,
) -> Pin<Box<dyn Future<Output = Result<TxProvingResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn prove_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_request: &'life1 TxExecutionRequest,
scopes: Vec<AztecAddress>,
) -> Pin<Box<dyn Future<Output = Result<TxProvingResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Prove a transaction, producing a proven result ready for submission.
Sourcefn profile_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_request: &'life1 TxExecutionRequest,
opts: ProfileTxOpts,
) -> Pin<Box<dyn Future<Output = Result<TxProfileResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn profile_tx<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_request: &'life1 TxExecutionRequest,
opts: ProfileTxOpts,
) -> Pin<Box<dyn Future<Output = Result<TxProfileResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Profile a transaction for gas estimation and performance data.
Sourcefn execute_utility<'life0, 'life1, 'async_trait>(
&'life0 self,
call: &'life1 FunctionCall,
opts: ExecuteUtilityOpts,
) -> Pin<Box<dyn Future<Output = Result<UtilityExecutionResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_utility<'life0, 'life1, 'async_trait>(
&'life0 self,
call: &'life1 FunctionCall,
opts: ExecuteUtilityOpts,
) -> Pin<Box<dyn Future<Output = Result<UtilityExecutionResult, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a utility (view/unconstrained) function.
Sourcefn get_private_events<'life0, 'life1, 'async_trait>(
&'life0 self,
event_selector: &'life1 EventSelector,
filter: PrivateEventFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackedPrivateEvent>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_private_events<'life0, 'life1, 'async_trait>(
&'life0 self,
event_selector: &'life1 EventSelector,
filter: PrivateEventFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackedPrivateEvent>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get private events matching a selector and filter.