Skip to main content

HotShotAvailabilityApi

Trait HotShotAvailabilityApi 

Source
pub trait HotShotAvailabilityApi {
Show 27 methods // Required methods fn get_leaf<'life0, 'async_trait>( &'life0 self, id: LeafId, ) -> Pin<Box<dyn Future<Output = Result<LeafQueryData<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_leaf_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<LeafQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_header<'life0, 'async_trait>( &'life0 self, id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Header<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_header_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Header<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block<'life0, 'async_trait>( &'life0 self, id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<BlockQueryData<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_payload<'life0, 'async_trait>( &'life0 self, id: PayloadId, ) -> Pin<Box<dyn Future<Output = Result<PayloadQueryData<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_payload_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<PayloadQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_vid_common<'life0, 'async_trait>( &'life0 self, id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<VidCommonQueryData<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_vid_common_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<VidCommonQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_leaf_ranges<'life0, 'async_trait>( &'life0 self, ranges: Vec<Range<u64>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<LeafQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_ranges<'life0, 'async_trait>( &'life0 self, ranges: Vec<Range<u64>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_vid_common_ranges<'life0, 'async_trait>( &'life0 self, ranges: Vec<Range<u64>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<VidCommonQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction_by_position<'life0, 'async_trait>( &'life0 self, height: u64, index: u64, ) -> Pin<Box<dyn Future<Output = Result<TransactionQueryData<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction_by_hash<'life0, 'async_trait>( &'life0 self, hash: String, ) -> Pin<Box<dyn Future<Output = Result<TransactionQueryData<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction_proof_by_position<'life0, 'async_trait>( &'life0 self, height: u64, index: u64, ) -> Pin<Box<dyn Future<Output = Result<TransactionWithProofQueryData<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction_proof_by_hash<'life0, 'async_trait>( &'life0 self, hash: String, ) -> Pin<Box<dyn Future<Output = Result<TransactionWithProofQueryData<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_summary<'life0, 'async_trait>( &'life0 self, height: usize, ) -> Pin<Box<dyn Future<Output = Result<BlockSummaryQueryData<SeqTypes>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_summary_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockSummaryQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_limits<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Limits>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_cert2<'life0, 'async_trait>( &'life0 self, height: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<Certificate2<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_leaves<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, LeafQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_headers<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, Header<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_blocks<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, BlockQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_payloads<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, PayloadQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_vid_common<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, VidCommonQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_transactions<'life0, 'async_trait>( &'life0 self, from: usize, namespace: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, TransactionQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

HotShot core availability API: mirrors the hotshot-query-service availability endpoints.

Each method corresponds to a hotshot-query-service route, with no path or output changes.

Required Methods§

Source

fn get_leaf<'life0, 'async_trait>( &'life0 self, id: LeafId, ) -> Pin<Box<dyn Future<Output = Result<LeafQueryData<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_leaf_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<LeafQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_header<'life0, 'async_trait>( &'life0 self, id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<Header<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_header_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Header<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_block<'life0, 'async_trait>( &'life0 self, id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<BlockQueryData<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_block_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_payload<'life0, 'async_trait>( &'life0 self, id: PayloadId, ) -> Pin<Box<dyn Future<Output = Result<PayloadQueryData<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_payload_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<PayloadQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_vid_common<'life0, 'async_trait>( &'life0 self, id: BlockId, ) -> Pin<Box<dyn Future<Output = Result<VidCommonQueryData<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_vid_common_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<VidCommonQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_leaf_ranges<'life0, 'async_trait>( &'life0 self, ranges: Vec<Range<u64>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<LeafQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The objects for a set of half-open height ranges, which must be ascending and disjoint.

These carry a fragmented set of heights in one request, for peers catching up. Like the range endpoints they answer in full or not at all: a height the node lacks is fetched from its own peers, and a 404 means at least one was not available in time.

Source

fn get_block_ranges<'life0, 'async_trait>( &'life0 self, ranges: Vec<Range<u64>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_vid_common_ranges<'life0, 'async_trait>( &'life0 self, ranges: Vec<Range<u64>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<VidCommonQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_transaction_by_position<'life0, 'async_trait>( &'life0 self, height: u64, index: u64, ) -> Pin<Box<dyn Future<Output = Result<TransactionQueryData<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_transaction_by_hash<'life0, 'async_trait>( &'life0 self, hash: String, ) -> Pin<Box<dyn Future<Output = Result<TransactionQueryData<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_transaction_proof_by_position<'life0, 'async_trait>( &'life0 self, height: u64, index: u64, ) -> Pin<Box<dyn Future<Output = Result<TransactionWithProofQueryData<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_transaction_proof_by_hash<'life0, 'async_trait>( &'life0 self, hash: String, ) -> Pin<Box<dyn Future<Output = Result<TransactionWithProofQueryData<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_block_summary<'life0, 'async_trait>( &'life0 self, height: usize, ) -> Pin<Box<dyn Future<Output = Result<BlockSummaryQueryData<SeqTypes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_block_summary_range<'life0, 'async_trait>( &'life0 self, from: usize, until: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockSummaryQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_limits<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Limits>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_cert2<'life0, 'async_trait>( &'life0 self, height: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<Certificate2<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn stream_leaves<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, LeafQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn stream_headers<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, Header<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn stream_blocks<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, BlockQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn stream_payloads<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, PayloadQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn stream_vid_common<'life0, 'async_trait>( &'life0 self, from: usize, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, VidCommonQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn stream_transactions<'life0, 'async_trait>( &'life0 self, from: usize, namespace: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, TransactionQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§