espresso_api/v1/submit.rs
1//! V1 submit API.
2
3use async_trait::async_trait;
4use serde::Serialize;
5
6#[async_trait]
7pub trait SubmitApi {
8 type Transaction: serde::de::DeserializeOwned + Send + Sync + 'static;
9 type TxHash: Serialize + Send + Sync + 'static;
10
11 async fn submit(&self, tx: Self::Transaction) -> anyhow::Result<Self::TxHash>;
12}