pub trait Erc4337Api<N, T>: Send + Sync {
// Required methods
fn send_user_operation<'life0, 'async_trait>(
&'life0 self,
user_op: SendUserOperation,
entry_point: Address,
) -> Pin<Box<dyn Future<Output = TransportResult<SendUserOperationResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn supported_entry_points<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_user_operation_receipt<'life0, 'async_trait>(
&'life0 self,
user_op_hash: Bytes,
) -> Pin<Box<dyn Future<Output = TransportResult<UserOperationReceipt>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn estimate_user_operation_gas<'life0, 'async_trait>(
&'life0 self,
user_op: SendUserOperation,
entry_point: Address,
) -> Pin<Box<dyn Future<Output = TransportResult<UserOperationGasEstimation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Available on crate feature
erc4337-api
only.Expand description
ERC-4337 Account Abstraction API
This module provides support for the eth_sendUserOperation
RPC method
as defined in ERC-4337.
Required Methods§
sourcefn send_user_operation<'life0, 'async_trait>(
&'life0 self,
user_op: SendUserOperation,
entry_point: Address,
) -> Pin<Box<dyn Future<Output = TransportResult<SendUserOperationResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_user_operation<'life0, 'async_trait>(
&'life0 self,
user_op: SendUserOperation,
entry_point: Address,
) -> Pin<Box<dyn Future<Output = TransportResult<SendUserOperationResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends a user operation to the bundler, as defined in ERC-4337.
Entry point changes based on the user operation type.
sourcefn supported_entry_points<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn supported_entry_points<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the list of supported entry points.
sourcefn get_user_operation_receipt<'life0, 'async_trait>(
&'life0 self,
user_op_hash: Bytes,
) -> Pin<Box<dyn Future<Output = TransportResult<UserOperationReceipt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_user_operation_receipt<'life0, 'async_trait>(
&'life0 self,
user_op_hash: Bytes,
) -> Pin<Box<dyn Future<Output = TransportResult<UserOperationReceipt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the receipt for any user operation.
Hash is the same returned by any user operation.
sourcefn estimate_user_operation_gas<'life0, 'async_trait>(
&'life0 self,
user_op: SendUserOperation,
entry_point: Address,
) -> Pin<Box<dyn Future<Output = TransportResult<UserOperationGasEstimation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn estimate_user_operation_gas<'life0, 'async_trait>(
&'life0 self,
user_op: SendUserOperation,
entry_point: Address,
) -> Pin<Box<dyn Future<Output = TransportResult<UserOperationGasEstimation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Estimates the gas for a user operation.
Entry point changes based on the user operation type.