Skip to main content

HotShotAvailabilityApi

Trait HotShotAvailabilityApi 

Source
pub trait HotShotAvailabilityApi {
    type Leaf: Serialize + Send + Sync + 'static;
    type Block: Serialize + Send + Sync + 'static;
    type Header: Serialize + Send + Sync + 'static;
    type Payload: Serialize + Send + Sync + 'static;
    type VidCommon: Serialize + Send + Sync + 'static;
    type Transaction: Serialize + Send + Sync + 'static;
    type TransactionWithProof: Serialize + Send + Sync + 'static;
    type BlockSummary: Serialize + Send + Sync + 'static;
    type Limits: Serialize + Send + Sync + 'static;
    type Cert2: Serialize + Send + Sync + 'static;

Show 24 methods // Required methods fn get_leaf<'life0, 'async_trait>( &'life0 self, id: LeafId, ) -> Pin<Box<dyn Future<Output = Result<Self::Leaf>> + 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<Self::Leaf>>> + 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<Self::Header>> + 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<Self::Header>>> + 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<Self::Block>> + 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<Self::Block>>> + 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<Self::Payload>> + 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<Self::Payload>>> + 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<Self::VidCommon>> + 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<Self::VidCommon>>> + 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<Self::Transaction>> + 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<Self::Transaction>> + 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<Self::TransactionWithProof>> + 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<Self::TransactionWithProof>> + 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<Self::BlockSummary>> + 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<Self::BlockSummary>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_limits<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::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<Self::Cert2>>> + 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, Self::Leaf>>> + 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, Self::Header>>> + 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, Self::Block>>> + 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, Self::Payload>>> + 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, Self::VidCommon>>> + 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, Self::Transaction>>> + 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 tide-disco route exposed by the hotshot-query-service, copied verbatim to axum with no path or output changes.

Required Associated Types§

Source

type Leaf: Serialize + Send + Sync + 'static

Source

type Block: Serialize + Send + Sync + 'static

Source

type Header: Serialize + Send + Sync + 'static

Source

type Payload: Serialize + Send + Sync + 'static

Source

type VidCommon: Serialize + Send + Sync + 'static

Source

type Transaction: Serialize + Send + Sync + 'static

Source

type TransactionWithProof: Serialize + Send + Sync + 'static

Source

type BlockSummary: Serialize + Send + Sync + 'static

Source

type Limits: Serialize + Send + Sync + 'static

Source

type Cert2: Serialize + Send + Sync + 'static

Required Methods§

Source

fn get_leaf<'life0, 'async_trait>( &'life0 self, id: LeafId, ) -> Pin<Box<dyn Future<Output = Result<Self::Leaf>> + 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<Self::Leaf>>> + 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<Self::Header>> + 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<Self::Header>>> + 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<Self::Block>> + 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<Self::Block>>> + 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<Self::Payload>> + 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<Self::Payload>>> + 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<Self::VidCommon>> + 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<Self::VidCommon>>> + 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<Self::Transaction>> + 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<Self::Transaction>> + 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<Self::TransactionWithProof>> + 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<Self::TransactionWithProof>> + 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<Self::BlockSummary>> + 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<Self::BlockSummary>>> + 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<Self::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<Self::Cert2>>> + 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, Self::Leaf>>> + 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, Self::Header>>> + 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, Self::Block>>> + 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, Self::Payload>>> + 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, Self::VidCommon>>> + 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, Self::Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§