6#ifndef OPENCBDC_TX_SRC_SENTINEL_2PC_INTERFACE_H_
7#define OPENCBDC_TX_SRC_SENTINEL_2PC_INTERFACE_H_
30 = std::function<void(std::optional<cbdc::sentinel::response>)>;
34 std::optional<cbdc::sentinel::execute_response>)>;
51 = std::optional<cbdc::sentinel::validate_response>;
Interface for an asynchronous sentinel.
std::optional< cbdc::sentinel::validate_response > validate_result
Result of a validation operation.
std::function< void( std::optional< cbdc::sentinel::execute_response >)> execute_result_callback_type
Callback function for transaction execution result.
std::function< void(validate_result)> validate_result_callback_type
Callback function for providing a transaction validation result.
async_interface(const async_interface &)=delete
std::function< void(std::optional< cbdc::sentinel::response >)> result_callback_type
Callback function for a sentinel response.
async_interface(async_interface &&)=delete
auto operator=(async_interface &&) -> async_interface &=delete
virtual auto validate_transaction(transaction::full_tx tx, validate_result_callback_type result_callback) -> bool=0
Statically validate the given transaction and generate a sentinel attestation if the transaction is v...
virtual auto execute_transaction(transaction::full_tx tx, execute_result_callback_type result_callback) -> bool=0
Validate transaction on the sentinel, forward it to the coordinator network, and return the execution...
async_interface()=default
virtual ~async_interface()=default
auto operator=(const async_interface &) -> async_interface &=delete