pub struct EmbeddedPxe<N>where
N: AztecNode,{ /* private fields */ }Expand description
Embedded PXE that runs private execution logic in-process.
In-process PXE for Aztec v4.x where PXE runs client-side.
Talks to the Aztec node via node_* RPC methods and maintains local
stores for contracts, keys, addresses, notes, capsules, and events.
Phase 3 additions: anchor block tracking, block reorg handling, private event retrieval, transaction profiling, and persistent storage.
Implementations§
Source§impl<N> EmbeddedPxe<N>
impl<N> EmbeddedPxe<N>
Sourcepub async fn create(
node: N,
kv: Arc<dyn KvStore>,
) -> Result<EmbeddedPxe<N>, Error>
pub async fn create( node: N, kv: Arc<dyn KvStore>, ) -> Result<EmbeddedPxe<N>, Error>
Create a new EmbeddedPxe backed by the given node client and KV store.
Sourcepub async fn create_with_prover_config(
node: N,
kv: Arc<dyn KvStore>,
prover_config: BbProverConfig,
) -> Result<EmbeddedPxe<N>, Error>
pub async fn create_with_prover_config( node: N, kv: Arc<dyn KvStore>, prover_config: BbProverConfig, ) -> Result<EmbeddedPxe<N>, Error>
Create a new EmbeddedPxe with custom BB prover configuration.
Sourcepub async fn create_with_config(
node: N,
kv: Arc<dyn KvStore>,
config: EmbeddedPxeConfig,
) -> Result<EmbeddedPxe<N>, Error>
pub async fn create_with_config( node: N, kv: Arc<dyn KvStore>, config: EmbeddedPxeConfig, ) -> Result<EmbeddedPxe<N>, Error>
Create a new EmbeddedPxe with full configuration.
Sourcepub async fn create_ephemeral(node: N) -> Result<EmbeddedPxe<N>, Error>
pub async fn create_ephemeral(node: N) -> Result<EmbeddedPxe<N>, Error>
Create a new EmbeddedPxe with an in-memory KV store.
Sourcepub fn contract_store(&self) -> &ContractStore
pub fn contract_store(&self) -> &ContractStore
Get a reference to the contract store.
Sourcepub fn address_store(&self) -> &AddressStore
pub fn address_store(&self) -> &AddressStore
Get a reference to the address store.
Sourcepub fn note_store(&self) -> &NoteStore
pub fn note_store(&self) -> &NoteStore
Get a reference to the note store.
Sourcepub fn anchor_block_store(&self) -> &AnchorBlockStore
pub fn anchor_block_store(&self) -> &AnchorBlockStore
Get a reference to the anchor block store.
Sourcepub fn private_event_store(&self) -> &PrivateEventStore
pub fn private_event_store(&self) -> &PrivateEventStore
Get a reference to the private event store.
Trait Implementations§
Source§impl<N> Pxe for EmbeddedPxe<N>
impl<N> Pxe for EmbeddedPxe<N>
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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
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,
EmbeddedPxe<N>: '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,
EmbeddedPxe<N>: 'async_trait,
Auto Trait Implementations§
impl<N> !Freeze for EmbeddedPxe<N>
impl<N> !RefUnwindSafe for EmbeddedPxe<N>
impl<N> Send for EmbeddedPxe<N>
impl<N> Sync for EmbeddedPxe<N>
impl<N> Unpin for EmbeddedPxe<N>where
N: Unpin,
impl<N> !UnwindSafe for EmbeddedPxe<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more