Function start_jsonrpc_server

Source
pub async fn start_jsonrpc_server(
    tx_sender_client: TxSenderClient,
    bind_addr: SocketAddr,
) -> Result<TxSenderJsonRpcServer, BridgeError>
Expand description

Starts a JSON-RPC server exposing send_tx and send_citrea_tx methods. send_tx and send_citrea_tx are transactional: it begins a DB transaction, calls TxSenderClient::insert_try_to_send or TxSenderClient::send_citrea_tx, and commits on success.