pub struct BaseWallet<P, N, A> { /* private fields */ }Expand description
A production Wallet backed by PXE + Aztec node connections.
Routes private-state operations (simulate, prove, events, registration) through the PXE, public-state queries (chain info, contract metadata) through the Aztec node, and delegates auth witness creation to the account provider.
Implementations§
Source§impl<P: Pxe, N: AztecNode, A: AccountProvider> BaseWallet<P, N, A>
impl<P: Pxe, N: AztecNode, A: AccountProvider> BaseWallet<P, N, A>
Sourcepub fn new(pxe: P, node: N, accounts: A) -> Self
pub fn new(pxe: P, node: N, accounts: A) -> Self
Create a new BaseWallet with the given PXE, node, and account provider.
Sourcepub fn account_provider(&self) -> &A
pub fn account_provider(&self) -> &A
Get a reference to the account provider.
Trait Implementations§
Source§impl<P: Pxe, N: AztecNode, A: AccountProvider> Wallet for BaseWallet<P, N, A>
impl<P: Pxe, N: AztecNode, A: AccountProvider> Wallet for BaseWallet<P, N, A>
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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.
Auto Trait Implementations§
impl<P, N, A> Freeze for BaseWallet<P, N, A>
impl<P, N, A> RefUnwindSafe for BaseWallet<P, N, A>
impl<P, N, A> Send for BaseWallet<P, N, A>
impl<P, N, A> Sync for BaseWallet<P, N, A>
impl<P, N, A> Unpin for BaseWallet<P, N, A>
impl<P, N, A> UnwindSafe for BaseWallet<P, N, A>
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
Mutably borrows from an owned value. Read more
§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>
Converts
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>
Converts
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