Trait LightClientApi
Source pub trait LightClientApi {
type LeafProof: Serialize + Send + Sync + 'static;
type HeaderProof: Serialize + Send + Sync + 'static;
type StakeTableEvents: Serialize + Send + Sync + 'static;
type PayloadProof: Serialize + Send + Sync + 'static;
type NamespaceProof: Serialize + Send + Sync + 'static;
// Required methods
fn get_leaf_proof<'life0, 'async_trait>(
&'life0 self,
query: LeafQuery,
finalized: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Self::LeafProof>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_header_proof<'life0, 'async_trait>(
&'life0 self,
root: u64,
requested: HeaderQuery,
) -> Pin<Box<dyn Future<Output = Result<Self::HeaderProof>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_light_client_stake_table<'life0, 'async_trait>(
&'life0 self,
epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<Self::StakeTableEvents>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_payload_proof<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Self::PayloadProof>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_payload_proof_range<'life0, 'async_trait>(
&'life0 self,
start: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self::PayloadProof>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_lc_namespace_proof<'life0, 'async_trait>(
&'life0 self,
height: u64,
namespace: u64,
) -> Pin<Box<dyn Future<Output = Result<Self::NamespaceProof>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_lc_namespace_proof_range<'life0, 'async_trait>(
&'life0 self,
start: u64,
end: u64,
namespace: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self::NamespaceProof>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}