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;
fn get_lc_namespaces_proof_range<'life0, 'async_trait>(
&'life0 self,
start: u64,
end: u64,
namespaces: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<HashMap<u64, Self::NamespaceProof>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Associated Types§
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,
Sourcefn get_lc_namespaces_proof_range<'life0, 'async_trait>(
&'life0 self,
start: u64,
end: u64,
namespaces: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<HashMap<u64, Self::NamespaceProof>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_lc_namespaces_proof_range<'life0, 'async_trait>(
&'life0 self,
start: u64,
end: u64,
namespaces: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<HashMap<u64, Self::NamespaceProof>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
namespaces is the raw TaggedBase64-encoded path segment produced by the light-client
client (tag NS, wrapping a JSON Vec<u64>); decoding it is left to the implementation
so this crate does not need a tagged-base64 dependency.