Trait vapcore_light::provider::Provider [−][src]
Defines the operations that a provider for the light subprotocol must fulfill.
Required methods
fn chain_info(&self) -> BlockChainInfo
[src]
Provide current blockchain info.
fn reorg_depth(&self, a: &H256, b: &H256) -> Option<u64>
[src]
Find the depth of a common ancestor between two blocks.
If either block is unknown or an ancestor can’t be found
then return None
.
fn earliest_state(&self) -> Option<u64>
[src]
Earliest block where state queries are available.
If None
, no state queries are servable.
fn block_header(&self, id: BlockId) -> Option<Header>
[src]
Get a block header by id.
fn transaction_index(
&self,
req: CompleteTransactionIndexRequest
) -> Option<TransactionIndexResponse>
[src]
&self,
req: CompleteTransactionIndexRequest
) -> Option<TransactionIndexResponse>
Get a transaction index by hash.
fn block_body(&self, req: CompleteBodyRequest) -> Option<BodyResponse>
[src]
Fulfill a block body request.
fn block_receipts(
&self,
req: CompleteReceiptsRequest
) -> Option<ReceiptsResponse>
[src]
&self,
req: CompleteReceiptsRequest
) -> Option<ReceiptsResponse>
Fulfill a request for block receipts.
fn account_proof(&self, req: CompleteAccountRequest) -> Option<AccountResponse>
[src]
Get an account proof.
fn storage_proof(&self, req: CompleteStorageRequest) -> Option<StorageResponse>
[src]
Get a storage proof.
fn contract_code(&self, req: CompleteCodeRequest) -> Option<CodeResponse>
[src]
Provide contract code for the specified (block_hash, code_hash) pair.
fn header_proof(
&self,
req: CompleteHeaderProofRequest
) -> Option<HeaderProofResponse>
[src]
&self,
req: CompleteHeaderProofRequest
) -> Option<HeaderProofResponse>
Provide a header proof from a given Canonical Hash Trie as well as the corresponding header.
fn transactions_to_propagate(&self) -> Vec<PendingTransaction>
[src]
Provide pending transactions.
fn transaction_proof(
&self,
req: CompleteExecutionRequest
) -> Option<ExecutionResponse>
[src]
&self,
req: CompleteExecutionRequest
) -> Option<ExecutionResponse>
Provide a proof-of-execution for the given transaction proof request. Returns a vector of all state items necessary to execute the transaction.
fn epoch_signal(&self, req: CompleteSignalRequest) -> Option<SignalResponse>
[src]
Provide epoch signal data at given block hash. This should be just the
Provided methods
fn block_headers(&self, req: CompleteHeadersRequest) -> Option<HeadersResponse>
[src]
Provide a list of headers starting at the requested block,
possibly in reverse and skipping skip
at a time.
The returned vector may have any length in the range [0, max
], but the
results within must adhere to the skip
and reverse
parameters.
Implementors
impl<L: AsLightClient + Send + Sync> Provider for LightProvider<L>
[src]
fn chain_info(&self) -> BlockChainInfo
[src]
fn reorg_depth(&self, _a: &H256, _b: &H256) -> Option<u64>
[src]
fn earliest_state(&self) -> Option<u64>
[src]
fn block_header(&self, id: BlockId) -> Option<Header>
[src]
fn transaction_index(
&self,
_req: CompleteTransactionIndexRequest
) -> Option<TransactionIndexResponse>
[src]
&self,
_req: CompleteTransactionIndexRequest
) -> Option<TransactionIndexResponse>
fn block_body(&self, _req: CompleteBodyRequest) -> Option<BodyResponse>
[src]
fn block_receipts(
&self,
_req: CompleteReceiptsRequest
) -> Option<ReceiptsResponse>
[src]
&self,
_req: CompleteReceiptsRequest
) -> Option<ReceiptsResponse>
fn account_proof(&self, _req: CompleteAccountRequest) -> Option<AccountResponse>
[src]
fn storage_proof(&self, _req: CompleteStorageRequest) -> Option<StorageResponse>
[src]
fn contract_code(&self, _req: CompleteCodeRequest) -> Option<CodeResponse>
[src]
fn header_proof(
&self,
_req: CompleteHeaderProofRequest
) -> Option<HeaderProofResponse>
[src]
&self,
_req: CompleteHeaderProofRequest
) -> Option<HeaderProofResponse>
fn transaction_proof(
&self,
_req: CompleteExecutionRequest
) -> Option<ExecutionResponse>
[src]
&self,
_req: CompleteExecutionRequest
) -> Option<ExecutionResponse>
fn epoch_signal(&self, _req: CompleteSignalRequest) -> Option<SignalResponse>
[src]
fn transactions_to_propagate(&self) -> Vec<PendingTransaction>
[src]
impl<T: ProvingBlockChainClient + ?Sized> Provider for T
[src]
fn chain_info(&self) -> BlockChainInfo
[src]
fn reorg_depth(&self, a: &H256, b: &H256) -> Option<u64>
[src]
fn earliest_state(&self) -> Option<u64>
[src]
fn block_header(&self, id: BlockId) -> Option<Header>
[src]
fn transaction_index(
&self,
req: CompleteTransactionIndexRequest
) -> Option<TransactionIndexResponse>
[src]
&self,
req: CompleteTransactionIndexRequest
) -> Option<TransactionIndexResponse>
fn block_body(&self, req: CompleteBodyRequest) -> Option<BodyResponse>
[src]
fn block_receipts(
&self,
req: CompleteReceiptsRequest
) -> Option<ReceiptsResponse>
[src]
&self,
req: CompleteReceiptsRequest
) -> Option<ReceiptsResponse>
fn account_proof(&self, req: CompleteAccountRequest) -> Option<AccountResponse>
[src]
fn storage_proof(&self, req: CompleteStorageRequest) -> Option<StorageResponse>
[src]
fn contract_code(&self, req: CompleteCodeRequest) -> Option<CodeResponse>
[src]
fn header_proof(
&self,
req: CompleteHeaderProofRequest
) -> Option<HeaderProofResponse>
[src]
&self,
req: CompleteHeaderProofRequest
) -> Option<HeaderProofResponse>
fn transaction_proof(
&self,
req: CompleteExecutionRequest
) -> Option<ExecutionResponse>
[src]
&self,
req: CompleteExecutionRequest
) -> Option<ExecutionResponse>