Trait ExplorerDataSource

Source
pub trait ExplorerDataSource<Types>
where Types: NodeType, Header<Types>: ExplorerHeader<Types> + QueryableHeader<Types>, Transaction<Types>: ExplorerTransaction<Types>, Payload<Types>: QueryablePayload<Types>,
{ // Required methods fn get_block_detail<'life0, 'async_trait>( &'life0 self, request: BlockIdentifier<Types>, ) -> Pin<Box<dyn Future<Output = Result<BlockDetail<Types>, GetBlockDetailError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_summaries<'life0, 'async_trait>( &'life0 self, request: GetBlockSummariesRequest<Types>, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockSummary<Types>>, GetBlockSummariesError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction_detail<'life0, 'async_trait>( &'life0 self, request: TransactionIdentifier<Types>, ) -> Pin<Box<dyn Future<Output = Result<TransactionDetailResponse<Types>, GetTransactionDetailError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction_summaries<'life0, 'async_trait>( &'life0 self, request: GetTransactionSummariesRequest<Types>, ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionSummary<Types>>, GetTransactionSummariesError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_explorer_summary<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ExplorerSummary<Types>, GetExplorerSummaryError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_search_results<'life0, 'async_trait>( &'life0 self, query: TaggedBase64, ) -> Pin<Box<dyn Future<Output = Result<SearchResult<Types>, GetSearchResultsError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; }
Expand description

An interface for querying Data and Statistics from the HotShot Blockchain.

This interface provides methods that allows the enabling of querying data concerning the blockchain from the stored data for use with a block explorer. It does not provide the same guarantees as the Availability data source with data fetching. It is not concerned with being up-to-date or having all of the data required, but rather it is concerned with providing the requested data as quickly as possible, and in a way that can be easily cached.

Required Methods§

Source

fn get_block_detail<'life0, 'async_trait>( &'life0 self, request: BlockIdentifier<Types>, ) -> Pin<Box<dyn Future<Output = Result<BlockDetail<Types>, GetBlockDetailError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

get_block_detail is a method that retrieves the details of a specific block from the blockchain. The block is identified by the given BlockIdentifier.

Source

fn get_block_summaries<'life0, 'async_trait>( &'life0 self, request: GetBlockSummariesRequest<Types>, ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockSummary<Types>>, GetBlockSummariesError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

get_block_summaries is a method that retrieves a list of block summaries from the blockchain. The list is generated from the given GetBlockSummariesRequest.

Source

fn get_transaction_detail<'life0, 'async_trait>( &'life0 self, request: TransactionIdentifier<Types>, ) -> Pin<Box<dyn Future<Output = Result<TransactionDetailResponse<Types>, GetTransactionDetailError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

get_transaction_detail is a method that retrieves the details of a specific transaction from the blockchain. The transaction is identified by the given TransactionIdentifier.

Source

fn get_transaction_summaries<'life0, 'async_trait>( &'life0 self, request: GetTransactionSummariesRequest<Types>, ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionSummary<Types>>, GetTransactionSummariesError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

get_transaction_summaries is a method that retrieves a list of transaction summaries from the blockchain. The list is generated from the given GetTransactionSummariesRequest.

Source

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

get_explorer_summary is a method that retrieves a summary overview of the blockchain. This is useful for displaying information that indicates the overall status of the block chain.

Source

fn get_search_results<'life0, 'async_trait>( &'life0 self, query: TaggedBase64, ) -> Pin<Box<dyn Future<Output = Result<SearchResult<Types>, GetSearchResultsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

get_search_results is a method that retrieves the results of a search query against the blockchain. The results are generated from the given query string.

Implementors§

Source§

impl<D, U, Types> ExplorerDataSource<Types> for ExtensibleDataSource<D, U>
where D: ExplorerDataSource<Types> + Sync, U: Send + Sync, Types: NodeType, Payload<Types>: QueryablePayload<Types>, Header<Types>: ExplorerHeader<Types> + QueryableHeader<Types>, Transaction<Types>: ExplorerTransaction<Types>,

Source§

impl<Types, S, P> ExplorerDataSource<Types> for FetchingDataSource<Types, S, P>
where Types: NodeType, Payload<Types>: QueryablePayload<Types>, Header<Types>: QueryableHeader<Types> + ExplorerHeader<Types>, Transaction<Types>: ExplorerTransaction<Types>, S: VersionedDataSource + 'static, for<'a> S::ReadOnly<'a>: ExplorerStorage<Types>, P: Send + Sync,