Skip to main content

espresso_api/v2/
data.rs

1use async_trait::async_trait;
2use serialization_api::ApiSerializations;
3
4#[async_trait]
5pub trait DataApi: ApiSerializations {
6    async fn get_namespace_proof(
7        &self,
8        namespace_id: u64,
9        block_height: u64,
10    ) -> anyhow::Result<Self::NamespaceProof>;
11
12    async fn get_namespace_proof_range(
13        &self,
14        namespace_id: u64,
15        from: u64,
16        until: u64,
17    ) -> anyhow::Result<Vec<Self::NamespaceProof>>;
18
19    async fn get_incorrect_encoding_proof(
20        &self,
21        namespace_id: u64,
22        block_height: u64,
23    ) -> anyhow::Result<Self::IncorrectEncodingProof>;
24}