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§
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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,
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.