Pxe

Trait Pxe 

Source
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 'life0: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_contracts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<AztecAddress>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn get_registered_accounts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<CompleteAddress>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_senders<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<AztecAddress>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn register_contract<'life0, 'async_trait>( &'life0 self, request: RegisterContractRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: '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 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn stop<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: '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§

Source

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

Get the synced block header.

Source

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

Get a contract instance by its address.

Source

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

Get a contract artifact by its class ID.

Source

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

Get all registered contract addresses.

Source

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

Register an account with the PXE.

Source

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

Get all registered account addresses.

Source

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

Register a sender address for private log syncing.

Source

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

Get all registered sender addresses.

Source

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

Remove a registered sender.

Source

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

Register a contract class with the PXE (artifact only, no instance).

Source

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

Register a contract instance (and optionally its artifact).

Source

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

Update a contract’s artifact.

Source

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

Simulate a transaction without sending it.

Source

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

Prove a transaction, producing a proven result ready for submission.

Source

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

Profile a transaction for gas estimation and performance data.

Source

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

Execute a utility (view/unconstrained) function.

Source

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

Get private events matching a selector and filter.

Source

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

Stop the PXE instance.

Implementors§

Source§

impl<N> Pxe for EmbeddedPxe<N>
where N: AztecNode + Clone + 'static,