// Copyright (c) Mysten Labs, Inc.
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
use crate::quorum_driver_types::{
ExecuteTransactionRequestV1, ExecuteTransactionResponseV1, QuorumDriverError,
};
/// Trait to define the interface for how the REST service interacts with a a
/// QuorumDriver or a simulated transaction executor.
#[async_trait::async_trait]
pub trait TransactionExecutor: Send + Sync {
async fn execute_transaction(
&self,
request: ExecuteTransactionRequestV1,
client_addr: Option<std::net::SocketAddr>,
) -> Result<ExecuteTransactionResponseV1, QuorumDriverError>;
}