[−][src]Struct sc_client::Client
Substrate Client
Methods
impl<B, E, Block, RA> Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
pub fn new(
backend: Arc<B>,
executor: E,
build_genesis_storage: &dyn BuildStorage,
fork_blocks: ForkBlocks<Block>,
bad_blocks: BadBlocks<Block>,
execution_extensions: ExecutionExtensions<Block>,
_prometheus_registry: Option<Registry>
) -> Result<Self>
[src]
backend: Arc<B>,
executor: E,
build_genesis_storage: &dyn BuildStorage,
fork_blocks: ForkBlocks<Block>,
bad_blocks: BadBlocks<Block>,
execution_extensions: ExecutionExtensions<Block>,
_prometheus_registry: Option<Registry>
) -> Result<Self>
Creates new Substrate Client with given blockchain and code executor.
pub fn state_at(&self, block: &BlockId<Block>) -> Result<B::State>
[src]
Get a reference to the state at a given block.
pub fn code_at(&self, id: &BlockId<Block>) -> Result<Vec<u8>>
[src]
Get the code at a given block.
pub fn runtime_version_at(&self, id: &BlockId<Block>) -> Result<RuntimeVersion>
[src]
Get the RuntimeVersion at a given block.
pub fn block_hash(
&self,
block_number: <<Block as BlockT>::Header as HeaderT>::Number
) -> Result<Option<Block::Hash>>
[src]
&self,
block_number: <<Block as BlockT>::Header as HeaderT>::Number
) -> Result<Option<Block::Hash>>
Get block hash by number.
pub fn header_proof_with_cht_size(
&self,
id: &BlockId<Block>,
cht_size: NumberFor<Block>
) -> Result<(Block::Header, StorageProof)>
[src]
&self,
id: &BlockId<Block>,
cht_size: NumberFor<Block>
) -> Result<(Block::Header, StorageProof)>
Reads given header and generates CHT-based header proof for CHT of given size.
pub fn key_changes_proof_with_cht_size(
&self,
first: Block::Hash,
last: Block::Hash,
min: Block::Hash,
max: Block::Hash,
storage_key: Option<&StorageKey>,
key: &StorageKey,
cht_size: NumberFor<Block>
) -> Result<ChangesProof<Block::Header>>
[src]
&self,
first: Block::Hash,
last: Block::Hash,
min: Block::Hash,
max: Block::Hash,
storage_key: Option<&StorageKey>,
key: &StorageKey,
cht_size: NumberFor<Block>
) -> Result<ChangesProof<Block::Header>>
Does the same work as key_changes_proof
, but assumes that CHTs are of passed size.
pub fn revert(&self, n: NumberFor<Block>) -> Result<NumberFor<Block>>
[src]
Attempts to revert the chain by n
blocks guaranteeing that no block is
reverted past the last finalized block. Returns the number of blocks
that were successfully reverted.
pub fn unsafe_revert(&self, n: NumberFor<Block>) -> Result<NumberFor<Block>>
[src]
Attempts to revert the chain by n
blocks disregarding finality. This
method will revert any finalized blocks as requested and can potentially
leave the node in an inconsistent state. Other modules in the system that
persist data and that rely on finality (e.g. consensus parts) will be
unaffected by the revert. Use this method with caution and making sure
that no other data needs to be reverted for consistency aside from the
block data.
Returns the number of blocks that were successfully reverted.
pub fn usage_info(&self) -> ClientInfo<Block>
[src]
Get usage info about current client.
pub fn chain_info(&self) -> Info<Block>
[src]
Get blockchain info.
pub fn block_status(&self, id: &BlockId<Block>) -> Result<BlockStatus>
[src]
Get block status.
pub fn header(
&self,
id: &BlockId<Block>
) -> Result<Option<<Block as BlockT>::Header>>
[src]
&self,
id: &BlockId<Block>
) -> Result<Option<<Block as BlockT>::Header>>
Get block header by id.
pub fn body(
&self,
id: &BlockId<Block>
) -> Result<Option<Vec<<Block as BlockT>::Extrinsic>>>
[src]
&self,
id: &BlockId<Block>
) -> Result<Option<Vec<<Block as BlockT>::Extrinsic>>>
Get block body by id.
pub fn uncles(
&self,
target_hash: Block::Hash,
max_generation: NumberFor<Block>
) -> Result<Vec<Block::Hash>>
[src]
&self,
target_hash: Block::Hash,
max_generation: NumberFor<Block>
) -> Result<Vec<Block::Hash>>
Gets the uncles of the block with target_hash
going back max_generation
ancestors.
Trait Implementations
impl<B, E, Block, RA> AuxStore for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
Self: ProvideRuntimeApi<Block>,
Self::Api: CoreApi<Block, Error = Error>,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
Self: ProvideRuntimeApi<Block>,
Self::Api: CoreApi<Block, Error = Error>,
fn insert_aux<'a, 'b: 'a, 'c: 'a, I: IntoIterator<Item = &'a (&'c [u8], &'c [u8])>, D: IntoIterator<Item = &'a &'b [u8]>>(
&self,
insert: I,
delete: D
) -> Result<()>
[src]
&self,
insert: I,
delete: D
) -> Result<()>
Insert auxiliary data into key-value store.
fn get_aux(&self, key: &[u8]) -> Result<Option<Vec<u8>>>
[src]
Query auxiliary data from key-value store.
impl<'_, B, E, Block, RA> AuxStore for &'_ Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
Client<B, E, Block, RA>: ProvideRuntimeApi<Block>,
<Client<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api: CoreApi<Block, Error = Error>,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
Client<B, E, Block, RA>: ProvideRuntimeApi<Block>,
<Client<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api: CoreApi<Block, Error = Error>,
fn insert_aux<'a, 'b: 'a, 'c: 'a, I: IntoIterator<Item = &'a (&'c [u8], &'c [u8])>, D: IntoIterator<Item = &'a &'b [u8]>>(
&self,
insert: I,
delete: D
) -> Result<()>
[src]
&self,
insert: I,
delete: D
) -> Result<()>
fn get_aux(&self, key: &[u8]) -> Result<Option<Vec<u8>>>
[src]
impl<B, E, Block, RA> BlockBackend<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
fn block_body(
&self,
id: &BlockId<Block>
) -> Result<Option<Vec<<Block as BlockT>::Extrinsic>>>
[src]
&self,
id: &BlockId<Block>
) -> Result<Option<Vec<<Block as BlockT>::Extrinsic>>>
fn block(&self, id: &BlockId<Block>) -> Result<Option<SignedBlock<Block>>>
[src]
fn block_status(&self, id: &BlockId<Block>) -> Result<BlockStatus>
[src]
fn justification(&self, id: &BlockId<Block>) -> Result<Option<Justification>>
[src]
impl<B, E, Block, RA> BlockBuilderProvider<B, Block, Client<B, E, Block, RA>> for Client<B, E, Block, RA> where
B: Backend<Block> + Send + Sync + 'static,
E: CallExecutor<Block> + Send + Sync + 'static,
Block: BlockT,
Self: ChainHeaderBackend<Block> + ProvideRuntimeApi<Block>,
Self::Api: ApiExt<Block, StateBackend = StateBackendFor<B, Block>> + BlockBuilderApi<Block, Error = Error>,
[src]
B: Backend<Block> + Send + Sync + 'static,
E: CallExecutor<Block> + Send + Sync + 'static,
Block: BlockT,
Self: ChainHeaderBackend<Block> + ProvideRuntimeApi<Block>,
Self::Api: ApiExt<Block, StateBackend = StateBackendFor<B, Block>> + BlockBuilderApi<Block, Error = Error>,
fn new_block_at<R: Into<RecordProof>>(
&self,
parent: &BlockId<Block>,
inherent_digests: DigestFor<Block>,
record_proof: R
) -> Result<BlockBuilder<Block, Self, B>>
[src]
&self,
parent: &BlockId<Block>,
inherent_digests: DigestFor<Block>,
record_proof: R
) -> Result<BlockBuilder<Block, Self, B>>
fn new_block(
&self,
inherent_digests: DigestFor<Block>
) -> Result<BlockBuilder<Block, Self, B>>
[src]
&self,
inherent_digests: DigestFor<Block>
) -> Result<BlockBuilder<Block, Self, B>>
impl<B, E, Block, RA> BlockIdTo<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
RA: Send + Sync,
[src]
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
RA: Send + Sync,
type Error = Error
The error type that will be returned by the functions.
fn to_hash(&self, block_id: &BlockId<Block>) -> Result<Option<Block::Hash>>
[src]
fn to_number(
&self,
block_id: &BlockId<Block>
) -> Result<Option<NumberFor<Block>>>
[src]
&self,
block_id: &BlockId<Block>
) -> Result<Option<NumberFor<Block>>>
impl<'_, B, E, Block, RA> BlockImport<Block> for &'_ Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
Client<B, E, Block, RA>: ProvideRuntimeApi<Block>,
<Client<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api: CoreApi<Block, Error = Error> + ApiExt<Block, StateBackend = B::State>,
[src]
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
Client<B, E, Block, RA>: ProvideRuntimeApi<Block>,
<Client<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api: CoreApi<Block, Error = Error> + ApiExt<Block, StateBackend = B::State>,
NOTE: only use this implementation when you are sure there are NO consensus-level BlockImport objects. Otherwise, importing blocks directly into the client would be bypassing important verification work.
type Error = ConsensusError
The error type.
type Transaction = TransactionFor<B, Block>
The transaction type used by the backend.
fn import_block(
&mut self,
import_block: BlockImportParams<Block, TransactionFor<B, Block>>,
new_cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
import_block: BlockImportParams<Block, TransactionFor<B, Block>>,
new_cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
Import a checked and validated block. If a justification is provided in
BlockImportParams
then finalized
must be true.
NOTE: only use this implementation when there are NO consensus-level BlockImport objects. Otherwise, importing blocks directly into the client would be bypassing important verification work.
If you are not sure that there are no BlockImport objects provided by the consensus algorithm, don't use this function.
fn check_block(
&mut self,
block: BlockCheckParams<Block>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
block: BlockCheckParams<Block>
) -> Result<ImportResult, Self::Error>
Check block preconditions.
impl<B, E, Block, RA> BlockImport<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
Self: ProvideRuntimeApi<Block>,
Self::Api: CoreApi<Block, Error = Error> + ApiExt<Block, StateBackend = B::State>,
[src]
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
Self: ProvideRuntimeApi<Block>,
Self::Api: CoreApi<Block, Error = Error> + ApiExt<Block, StateBackend = B::State>,
type Error = ConsensusError
The error type.
type Transaction = TransactionFor<B, Block>
The transaction type used by the backend.
fn import_block(
&mut self,
import_block: BlockImportParams<Block, Self::Transaction>,
new_cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
import_block: BlockImportParams<Block, Self::Transaction>,
new_cache: HashMap<CacheKeyId, Vec<u8>>
) -> Result<ImportResult, Self::Error>
fn check_block(
&mut self,
block: BlockCheckParams<Block>
) -> Result<ImportResult, Self::Error>
[src]
&mut self,
block: BlockCheckParams<Block>
) -> Result<ImportResult, Self::Error>
impl<B, E, Block, RA> BlockOf for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
type Type = Block
The type of the block.
impl<B, E, Block, RA> BlockchainEvents<Block> for Client<B, E, Block, RA> where
E: CallExecutor<Block>,
Block: BlockT,
[src]
E: CallExecutor<Block>,
Block: BlockT,
fn import_notification_stream(&self) -> ImportNotifications<Block>
[src]
Get block import event stream.
fn finality_notification_stream(&self) -> FinalityNotifications<Block>
[src]
fn storage_changes_notification_stream(
&self,
filter_keys: Option<&[StorageKey]>,
child_filter_keys: Option<&[(StorageKey, Option<Vec<StorageKey>>)]>
) -> Result<StorageEventStream<Block::Hash>>
[src]
&self,
filter_keys: Option<&[StorageKey]>,
child_filter_keys: Option<&[(StorageKey, Option<Vec<StorageKey>>)]>
) -> Result<StorageEventStream<Block::Hash>>
Get storage changes event stream.
impl<B, E, Block, RA> CallApiAt<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block, Backend = B> + Send + Sync,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block, Backend = B> + Send + Sync,
Block: BlockT,
type Error = Error
Error type used by the implementation.
type StateBackend = B::State
The state backend that is used to store the block states.
fn call_api_at<'a, R: Encode + Decode + PartialEq, NC: FnOnce() -> Result<R, String> + UnwindSafe, C: CoreApi<Block, Error = Error>>(
&self,
params: CallApiAtParams<'a, Block, C, NC, B::State>
) -> Result<NativeOrEncoded<R>>
[src]
&self,
params: CallApiAtParams<'a, Block, C, NC, B::State>
) -> Result<NativeOrEncoded<R>>
fn runtime_version_at(&self, at: &BlockId<Block>) -> Result<RuntimeVersion>
[src]
impl<BE, E, B, RA> Chain<B> for Client<BE, E, B, RA> where
BE: Backend<B>,
E: CallExecutor<B>,
B: BlockT,
[src]
BE: Backend<B>,
E: CallExecutor<B>,
B: BlockT,
fn block_status(
&self,
id: &BlockId<B>
) -> Result<BlockStatus, Box<dyn Error + Send>>
[src]
&self,
id: &BlockId<B>
) -> Result<BlockStatus, Box<dyn Error + Send>>
impl<B, E, Block, RA> ExecutorProvider<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
type Executor = E
executor instance
fn executor(&self) -> &Self::Executor
[src]
fn execution_extensions(&self) -> &ExecutionExtensions<Block>
[src]
impl<B, E, Block, RA> Finalizer<Block, B> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
fn apply_finality(
&self,
operation: &mut ClientImportOperation<Block, B>,
id: BlockId<Block>,
justification: Option<Justification>,
notify: bool
) -> Result<()>
[src]
&self,
operation: &mut ClientImportOperation<Block, B>,
id: BlockId<Block>,
justification: Option<Justification>,
notify: bool
) -> Result<()>
fn finalize_block(
&self,
id: BlockId<Block>,
justification: Option<Justification>,
notify: bool
) -> Result<()>
[src]
&self,
id: BlockId<Block>,
justification: Option<Justification>,
notify: bool
) -> Result<()>
impl<'_, B, E, Block, RA> Finalizer<Block, B> for &'_ Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
fn apply_finality(
&self,
operation: &mut ClientImportOperation<Block, B>,
id: BlockId<Block>,
justification: Option<Justification>,
notify: bool
) -> Result<()>
[src]
&self,
operation: &mut ClientImportOperation<Block, B>,
id: BlockId<Block>,
justification: Option<Justification>,
notify: bool
) -> Result<()>
fn finalize_block(
&self,
id: BlockId<Block>,
justification: Option<Justification>,
notify: bool
) -> Result<()>
[src]
&self,
id: BlockId<Block>,
justification: Option<Justification>,
notify: bool
) -> Result<()>
impl<B, E, Block, RA> HeaderBackend<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
RA: Send + Sync,
[src]
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
RA: Send + Sync,
fn header(&self, id: BlockId<Block>) -> Result<Option<Block::Header>>
[src]
fn info(&self) -> Info<Block>
[src]
fn status(&self, id: BlockId<Block>) -> Result<BlockStatus>
[src]
fn number(
&self,
hash: Block::Hash
) -> Result<Option<<<Block as BlockT>::Header as HeaderT>::Number>>
[src]
&self,
hash: Block::Hash
) -> Result<Option<<<Block as BlockT>::Header as HeaderT>::Number>>
fn hash(&self, number: NumberFor<Block>) -> Result<Option<Block::Hash>>
[src]
fn block_hash_from_id(
&self,
id: &BlockId<Block>
) -> Result<Option<<Block as Block>::Hash>, Error>
[src]
&self,
id: &BlockId<Block>
) -> Result<Option<<Block as Block>::Hash>, Error>
fn block_number_from_id(
&self,
id: &BlockId<Block>
) -> Result<Option<<<Block as Block>::Header as Header>::Number>, Error>
[src]
&self,
id: &BlockId<Block>
) -> Result<Option<<<Block as Block>::Header as Header>::Number>, Error>
fn expect_header(
&self,
id: BlockId<Block>
) -> Result<<Block as Block>::Header, Error>
[src]
&self,
id: BlockId<Block>
) -> Result<<Block as Block>::Header, Error>
fn expect_block_number_from_id(
&self,
id: &BlockId<Block>
) -> Result<<<Block as Block>::Header as Header>::Number, Error>
[src]
&self,
id: &BlockId<Block>
) -> Result<<<Block as Block>::Header as Header>::Number, Error>
fn expect_block_hash_from_id(
&self,
id: &BlockId<Block>
) -> Result<<Block as Block>::Hash, Error>
[src]
&self,
id: &BlockId<Block>
) -> Result<<Block as Block>::Hash, Error>
impl<'_, B, E, Block, RA> HeaderBackend<Block> for &'_ Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
RA: Send + Sync,
[src]
B: Backend<Block>,
E: CallExecutor<Block> + Send + Sync,
Block: BlockT,
RA: Send + Sync,
fn header(&self, id: BlockId<Block>) -> Result<Option<Block::Header>>
[src]
fn info(&self) -> Info<Block>
[src]
fn status(&self, id: BlockId<Block>) -> Result<BlockStatus>
[src]
fn number(
&self,
hash: Block::Hash
) -> Result<Option<<<Block as BlockT>::Header as HeaderT>::Number>>
[src]
&self,
hash: Block::Hash
) -> Result<Option<<<Block as BlockT>::Header as HeaderT>::Number>>
fn hash(&self, number: NumberFor<Block>) -> Result<Option<Block::Hash>>
[src]
fn block_hash_from_id(
&self,
id: &BlockId<Block>
) -> Result<Option<<Block as Block>::Hash>, Error>
[src]
&self,
id: &BlockId<Block>
) -> Result<Option<<Block as Block>::Hash>, Error>
fn block_number_from_id(
&self,
id: &BlockId<Block>
) -> Result<Option<<<Block as Block>::Header as Header>::Number>, Error>
[src]
&self,
id: &BlockId<Block>
) -> Result<Option<<<Block as Block>::Header as Header>::Number>, Error>
fn expect_header(
&self,
id: BlockId<Block>
) -> Result<<Block as Block>::Header, Error>
[src]
&self,
id: BlockId<Block>
) -> Result<<Block as Block>::Header, Error>
fn expect_block_number_from_id(
&self,
id: &BlockId<Block>
) -> Result<<<Block as Block>::Header as Header>::Number, Error>
[src]
&self,
id: &BlockId<Block>
) -> Result<<<Block as Block>::Header as Header>::Number, Error>
fn expect_block_hash_from_id(
&self,
id: &BlockId<Block>
) -> Result<<Block as Block>::Hash, Error>
[src]
&self,
id: &BlockId<Block>
) -> Result<<Block as Block>::Hash, Error>
impl<B, E, Block, RA> HeaderMetadata<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
type Error = Error
Error used in case the header metadata is not found.
fn header_metadata(
&self,
hash: Block::Hash
) -> Result<CachedHeaderMetadata<Block>, Self::Error>
[src]
&self,
hash: Block::Hash
) -> Result<CachedHeaderMetadata<Block>, Self::Error>
fn insert_header_metadata(
&self,
hash: Block::Hash,
metadata: CachedHeaderMetadata<Block>
)
[src]
&self,
hash: Block::Hash,
metadata: CachedHeaderMetadata<Block>
)
fn remove_header_metadata(&self, hash: Block::Hash)
[src]
impl<B, E, Block, RA> LockImportRun<Block, B> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
fn lock_import_and_run<R, Err, F>(&self, f: F) -> Result<R, Err> where
F: FnOnce(&mut ClientImportOperation<Block, B>) -> Result<R, Err>,
Err: From<Error>,
[src]
F: FnOnce(&mut ClientImportOperation<Block, B>) -> Result<R, Err>,
Err: From<Error>,
impl<'_, B, E, Block, RA> LockImportRun<Block, B> for &'_ Client<B, E, Block, RA> where
Block: BlockT,
B: Backend<Block>,
E: CallExecutor<Block>,
[src]
Block: BlockT,
B: Backend<Block>,
E: CallExecutor<Block>,
fn lock_import_and_run<R, Err, F>(&self, f: F) -> Result<R, Err> where
F: FnOnce(&mut ClientImportOperation<Block, B>) -> Result<R, Err>,
Err: From<Error>,
[src]
F: FnOnce(&mut ClientImportOperation<Block, B>) -> Result<R, Err>,
Err: From<Error>,
impl<B, E, Block, RA> ProofProvider<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
fn read_proof(
&self,
id: &BlockId<Block>,
keys: &mut dyn Iterator<Item = &[u8]>
) -> Result<StorageProof>
[src]
&self,
id: &BlockId<Block>,
keys: &mut dyn Iterator<Item = &[u8]>
) -> Result<StorageProof>
fn read_child_proof(
&self,
id: &BlockId<Block>,
storage_key: &[u8],
child_info: ChildInfo,
keys: &mut dyn Iterator<Item = &[u8]>
) -> Result<StorageProof>
[src]
&self,
id: &BlockId<Block>,
storage_key: &[u8],
child_info: ChildInfo,
keys: &mut dyn Iterator<Item = &[u8]>
) -> Result<StorageProof>
fn execution_proof(
&self,
id: &BlockId<Block>,
method: &str,
call_data: &[u8]
) -> Result<(Vec<u8>, StorageProof)>
[src]
&self,
id: &BlockId<Block>,
method: &str,
call_data: &[u8]
) -> Result<(Vec<u8>, StorageProof)>
fn header_proof(
&self,
id: &BlockId<Block>
) -> Result<(Block::Header, StorageProof)>
[src]
&self,
id: &BlockId<Block>
) -> Result<(Block::Header, StorageProof)>
fn key_changes_proof(
&self,
first: Block::Hash,
last: Block::Hash,
min: Block::Hash,
max: Block::Hash,
storage_key: Option<&StorageKey>,
key: &StorageKey
) -> Result<ChangesProof<Block::Header>>
[src]
&self,
first: Block::Hash,
last: Block::Hash,
min: Block::Hash,
max: Block::Hash,
storage_key: Option<&StorageKey>,
key: &StorageKey
) -> Result<ChangesProof<Block::Header>>
impl<B, E, Block, RA> ProvideCache<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
Block: BlockT,
impl<B, E, Block, RA> ProvideRuntimeApi<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block, Backend = B> + Send + Sync,
Block: BlockT,
RA: ConstructRuntimeApi<Block, Self>,
[src]
B: Backend<Block>,
E: CallExecutor<Block, Backend = B> + Send + Sync,
Block: BlockT,
RA: ConstructRuntimeApi<Block, Self>,
type Api = <RA as ConstructRuntimeApi<Block, Self>>::RuntimeApi
The concrete type that provides the api.
fn runtime_api<'a>(&'a self) -> ApiRef<'a, Self::Api>
[src]
impl<B, E, Block, RA> ProvideUncles<Block> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
fn uncles(
&self,
target_hash: Block::Hash,
max_generation: NumberFor<Block>
) -> Result<Vec<Block::Header>>
[src]
&self,
target_hash: Block::Hash,
max_generation: NumberFor<Block>
) -> Result<Vec<Block::Header>>
impl<B, E, Block, RA> StorageProvider<Block, B> for Client<B, E, Block, RA> where
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
[src]
B: Backend<Block>,
E: CallExecutor<Block>,
Block: BlockT,
fn storage_keys(
&self,
id: &BlockId<Block>,
key_prefix: &StorageKey
) -> Result<Vec<StorageKey>>
[src]
&self,
id: &BlockId<Block>,
key_prefix: &StorageKey
) -> Result<Vec<StorageKey>>
fn storage_pairs(
&self,
id: &BlockId<Block>,
key_prefix: &StorageKey
) -> Result<Vec<(StorageKey, StorageData)>>
[src]
&self,
id: &BlockId<Block>,
key_prefix: &StorageKey
) -> Result<Vec<(StorageKey, StorageData)>>
fn storage_keys_iter<'a>(
&self,
id: &BlockId<Block>,
prefix: Option<&'a StorageKey>,
start_key: Option<&StorageKey>
) -> Result<KeyIterator<'a, B::State, Block>>
[src]
&self,
id: &BlockId<Block>,
prefix: Option<&'a StorageKey>,
start_key: Option<&StorageKey>
) -> Result<KeyIterator<'a, B::State, Block>>
fn storage(
&self,
id: &BlockId<Block>,
key: &StorageKey
) -> Result<Option<StorageData>>
[src]
&self,
id: &BlockId<Block>,
key: &StorageKey
) -> Result<Option<StorageData>>
fn storage_hash(
&self,
id: &BlockId<Block>,
key: &StorageKey
) -> Result<Option<Block::Hash>>
[src]
&self,
id: &BlockId<Block>,
key: &StorageKey
) -> Result<Option<Block::Hash>>
fn child_storage_keys(
&self,
id: &BlockId<Block>,
child_storage_key: &StorageKey,
child_info: ChildInfo,
key_prefix: &StorageKey
) -> Result<Vec<StorageKey>>
[src]
&self,
id: &BlockId<Block>,
child_storage_key: &StorageKey,
child_info: ChildInfo,
key_prefix: &StorageKey
) -> Result<Vec<StorageKey>>
fn child_storage(
&self,
id: &BlockId<Block>,
storage_key: &StorageKey,
child_info: ChildInfo,
key: &StorageKey
) -> Result<Option<StorageData>>
[src]
&self,
id: &BlockId<Block>,
storage_key: &StorageKey,
child_info: ChildInfo,
key: &StorageKey
) -> Result<Option<StorageData>>
fn child_storage_hash(
&self,
id: &BlockId<Block>,
storage_key: &StorageKey,
child_info: ChildInfo,
key: &StorageKey
) -> Result<Option<Block::Hash>>
[src]
&self,
id: &BlockId<Block>,
storage_key: &StorageKey,
child_info: ChildInfo,
key: &StorageKey
) -> Result<Option<Block::Hash>>
fn max_key_changes_range(
&self,
first: NumberFor<Block>,
last: BlockId<Block>
) -> Result<Option<(NumberFor<Block>, BlockId<Block>)>>
[src]
&self,
first: NumberFor<Block>,
last: BlockId<Block>
) -> Result<Option<(NumberFor<Block>, BlockId<Block>)>>
fn key_changes(
&self,
first: NumberFor<Block>,
last: BlockId<Block>,
storage_key: Option<&StorageKey>,
key: &StorageKey
) -> Result<Vec<(NumberFor<Block>, u32)>>
[src]
&self,
first: NumberFor<Block>,
last: BlockId<Block>,
storage_key: Option<&StorageKey>,
key: &StorageKey
) -> Result<Vec<(NumberFor<Block>, u32)>>
Auto Trait Implementations
impl<B, E, Block, RA> !RefUnwindSafe for Client<B, E, Block, RA>
impl<B, E, Block, RA> Send for Client<B, E, Block, RA> where
B: Send + Sync,
E: Send,
RA: Send,
<Block as Block>::Hash: Send,
<Block as Block>::Header: Header + Send,
<<Block as Block>::Header as Header>::Number: Send,
B: Send + Sync,
E: Send,
RA: Send,
<Block as Block>::Hash: Send,
<Block as Block>::Header: Header + Send,
<<Block as Block>::Header as Header>::Number: Send,
impl<B, E, Block, RA> Sync for Client<B, E, Block, RA> where
B: Send + Sync,
E: Sync,
RA: Sync,
<Block as Block>::Hash: Send + Sync,
<Block as Block>::Header: Header + Send,
<<Block as Block>::Header as Header>::Number: Sync,
B: Send + Sync,
E: Sync,
RA: Sync,
<Block as Block>::Hash: Send + Sync,
<Block as Block>::Header: Header + Send,
<<Block as Block>::Header as Header>::Number: Sync,
impl<B, E, Block, RA> Unpin for Client<B, E, Block, RA> where
E: Unpin,
RA: Unpin,
<Block as Block>::Hash: Unpin,
<Block as Block>::Header: Header,
<<Block as Block>::Header as Header>::Number: Unpin,
E: Unpin,
RA: Unpin,
<Block as Block>::Hash: Unpin,
<Block as Block>::Header: Header,
<<Block as Block>::Header as Header>::Number: Unpin,
impl<B, E, Block, RA> !UnwindSafe for Client<B, E, Block, RA>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedConversion for T
[src]
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
[src]
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
fn from_ref(outer: &Outer) -> &T
[src]
Get a reference to the inner from the outer.
fn from_mut(outer: &mut Outer) -> &mut T
[src]
Get a mutable reference to the inner from the outer.
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
fn unchecked_into(self) -> T
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
T: Bounded,
fn unique_saturated_into(self) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,