pub trait Relayer {
    // Required methods
    fn process_transaction_request<'life0, 'async_trait>(
        &'life0 self,
        tx_request: NetworkTransactionRequest,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_balance<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_pending_transactions<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<bool, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign_data<'life0, 'async_trait>(
        &'life0 self,
        request: SignDataRequest,
    ) -> Pin<Box<dyn Future<Output = Result<SignDataResponse, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sign_typed_data<'life0, 'async_trait>(
        &'life0 self,
        request: SignTypedDataRequest,
    ) -> Pin<Box<dyn Future<Output = Result<SignDataResponse, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rpc<'life0, 'async_trait>(
        &'life0 self,
        request: JsonRpcRequest<NetworkRpcRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse<NetworkRpcResult>, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_status<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<bool, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn initialize_relayer<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validate_min_balance<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}Expand description
The Relayer trait defines the core functionality required for a relayer
in the system. Implementors of this trait are responsible for handling
transaction requests, managing balances, and interacting with the network.
Required Methods§
Sourcefn process_transaction_request<'life0, 'async_trait>(
    &'life0 self,
    tx_request: NetworkTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn process_transaction_request<'life0, 'async_trait>(
    &'life0 self,
    tx_request: NetworkTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<TransactionRepoModel, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Sourcefn get_balance<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn get_balance<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Retrieves the current balance of the relayer.
§Returns
A Result containing a BalanceResponse on success, or a
RelayerError on failure.
Sourcefn delete_pending_transactions<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn delete_pending_transactions<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Deletes all pending transactions.
§Returns
A Result containing true if transactions were successfully deleted,
or a RelayerError on failure.
Sourcefn sign_data<'life0, 'async_trait>(
    &'life0 self,
    request: SignDataRequest,
) -> Pin<Box<dyn Future<Output = Result<SignDataResponse, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn sign_data<'life0, 'async_trait>(
    &'life0 self,
    request: SignDataRequest,
) -> Pin<Box<dyn Future<Output = Result<SignDataResponse, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Sourcefn sign_typed_data<'life0, 'async_trait>(
    &'life0 self,
    request: SignTypedDataRequest,
) -> Pin<Box<dyn Future<Output = Result<SignDataResponse, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn sign_typed_data<'life0, 'async_trait>(
    &'life0 self,
    request: SignTypedDataRequest,
) -> Pin<Box<dyn Future<Output = Result<SignDataResponse, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Sourcefn rpc<'life0, 'async_trait>(
    &'life0 self,
    request: JsonRpcRequest<NetworkRpcRequest>,
) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse<NetworkRpcResult>, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn rpc<'life0, 'async_trait>(
    &'life0 self,
    request: JsonRpcRequest<NetworkRpcRequest>,
) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse<NetworkRpcResult>, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Sourcefn get_status<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn get_status<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Retrieves the current status of the relayer.
§Returns
A Result containing true if the relayer is active, or a
RelayerError on failure.
Sourcefn initialize_relayer<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn initialize_relayer<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Sourcefn validate_min_balance<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn validate_min_balance<'life0, 'async_trait>(
    &'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Validates that the relayer’s balance meets the minimum required.
§Returns
A Result indicating success, or a RelayerError on failure.