Skip to main content

espresso_api/v1/
submit.rs

1//! V1 submit API.
2//!
3//! Mirrors the tide-disco endpoints defined in `crates/espresso/node/api/submit.toml`.
4
5use async_trait::async_trait;
6use serde::Serialize;
7
8#[async_trait]
9pub trait SubmitApi {
10    type Transaction: serde::de::DeserializeOwned + Send + Sync + 'static;
11    type TxHash: Serialize + Send + Sync + 'static;
12
13    async fn submit(&self, tx: Self::Transaction) -> anyhow::Result<Self::TxHash>;
14}