Struct anagolay_runtime::RuntimeApiImpl
source · [−]pub struct RuntimeApiImpl<Block: BlockT, C: CallApiAt<Block> + 'static> where
C::StateBackend: StateBackend<HashFor<Block>>, { /* private fields */ }
Expand description
Implements all runtime apis for the client side.
Trait Implementations
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AccountNonceApi<__SR_API_BLOCK__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
AccountId: UnwindSafe + RefUnwindSafe,
Index: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AccountNonceApi<__SR_API_BLOCK__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
AccountId: UnwindSafe + RefUnwindSafe,
Index: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn account_nonce(
&self,
__runtime_api_at_param__: &BlockId<Block>,
account: AccountId
) -> Result<Index, Self::Error>
fn account_nonce(
&self,
__runtime_api_at_param__: &BlockId<Block>,
account: AccountId
) -> Result<Index, Self::Error>
Get current account nonce of given AccountId
.
sourcefn account_nonce_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
account: AccountId
) -> Result<Index, Self::Error>
fn account_nonce_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
account: AccountId
) -> Result<Index, Self::Error>
Get current account nonce of given AccountId
.
sourceimpl<Block: BlockT, C: CallApiAt<Block>> ApiErrorExt for RuntimeApiImpl<Block, C> where
C::StateBackend: StateBackend<HashFor<Block>>,
impl<Block: BlockT, C: CallApiAt<Block>> ApiErrorExt for RuntimeApiImpl<Block, C> where
C::StateBackend: StateBackend<HashFor<Block>>,
sourceimpl<Block: BlockT, C: CallApiAt<Block>> ApiExt<Block> for RuntimeApiImpl<Block, C> where
C::StateBackend: StateBackend<HashFor<Block>>,
impl<Block: BlockT, C: CallApiAt<Block>> ApiExt<Block> for RuntimeApiImpl<Block, C> where
C::StateBackend: StateBackend<HashFor<Block>>,
type StateBackend = C::StateBackend
type StateBackend = C::StateBackend
The state backend that is used to store the block states.
sourcefn execute_in_transaction<F: FnOnce(&Self) -> TransactionOutcome<R>, R>(
&self,
call: F
) -> R where
Self: Sized,
fn execute_in_transaction<F: FnOnce(&Self) -> TransactionOutcome<R>, R>(
&self,
call: F
) -> R where
Self: Sized,
Execute the given closure inside a new transaction. Read more
sourcefn has_api<A: RuntimeApiInfo + ?Sized>(
&self,
at: &BlockId<Block>
) -> Result<bool, C::Error> where
Self: Sized,
fn has_api<A: RuntimeApiInfo + ?Sized>(
&self,
at: &BlockId<Block>
) -> Result<bool, C::Error> where
Self: Sized,
Checks if the given api is implemented and versions match.
sourcefn has_api_with<A: RuntimeApiInfo + ?Sized, P: Fn(u32) -> bool>(
&self,
at: &BlockId<Block>,
pred: P
) -> Result<bool, C::Error> where
Self: Sized,
fn has_api_with<A: RuntimeApiInfo + ?Sized, P: Fn(u32) -> bool>(
&self,
at: &BlockId<Block>,
pred: P
) -> Result<bool, C::Error> where
Self: Sized,
Check if the given api is implemented and the version passes a predicate.
sourcefn record_proof(&mut self)
fn record_proof(&mut self)
Start recording all accessed trie nodes for generating proofs.
sourcefn extract_proof(&mut self) -> Option<StorageProof>
fn extract_proof(&mut self) -> Option<StorageProof>
Extract the recorded proof. Read more
sourcefn into_storage_changes(
&self,
backend: &Self::StateBackend,
changes_trie_state: Option<&ChangesTrieState<'_, HashFor<Block>, NumberFor<Block>>>,
parent_hash: Block::Hash
) -> Result<StorageChanges<Self::StateBackend, Block>, String> where
Self: Sized,
fn into_storage_changes(
&self,
backend: &Self::StateBackend,
changes_trie_state: Option<&ChangesTrieState<'_, HashFor<Block>, NumberFor<Block>>>,
parent_hash: Block::Hash
) -> Result<StorageChanges<Self::StateBackend, Block>, String> where
Self: Sized,
Convert the api object into the storage changes that were done while executing runtime api functions. Read more
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AuraApi<__SR_API_BLOCK__, Public> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
u64: UnwindSafe + RefUnwindSafe,
Vec<AuraId>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> AuraApi<__SR_API_BLOCK__, Public> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
u64: UnwindSafe + RefUnwindSafe,
Vec<AuraId>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn slot_duration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<u64, Self::Error>
fn slot_duration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<u64, Self::Error>
Return the slot duration in seconds for Aura. Currently, only the value provided by this type at genesis will be used. Read more
sourcefn slot_duration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<u64, Self::Error>
fn slot_duration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<u64, Self::Error>
Return the slot duration in seconds for Aura. Currently, only the value provided by this type at genesis will be used. Read more
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Benchmark<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
BenchmarkConfig: UnwindSafe + RefUnwindSafe,
Result<Vec<BenchmarkBatch>, RuntimeString>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Benchmark<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
BenchmarkConfig: UnwindSafe + RefUnwindSafe,
Result<Vec<BenchmarkBatch>, RuntimeString>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn dispatch_benchmark(
&self,
__runtime_api_at_param__: &BlockId<Block>,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, Self::Error>
fn dispatch_benchmark(
&self,
__runtime_api_at_param__: &BlockId<Block>,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, Self::Error>
Dispatch the given benchmark.
sourcefn dispatch_benchmark_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, Self::Error>
fn dispatch_benchmark_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, Self::Error>
Dispatch the given benchmark.
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> BlockBuilder<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
ApplyExtrinsicResult: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
Vec<<__SR_API_BLOCK__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
CheckInherentsResult: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Hash: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> BlockBuilder<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
ApplyExtrinsicResult: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
Vec<<__SR_API_BLOCK__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe,
InherentData: UnwindSafe + RefUnwindSafe,
CheckInherentsResult: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Hash: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn apply_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, Self::Error>
fn apply_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, Self::Error>
Apply the given extrinsic. Read more
sourcefn apply_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, Self::Error>
fn apply_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, Self::Error>
Apply the given extrinsic. Read more
sourcefn finalize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<<Block as Block>::Header, Self::Error>
fn finalize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<<Block as Block>::Header, Self::Error>
Finish the current block.
sourcefn finalize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<<Block as Block>::Header, Self::Error>
fn finalize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<<Block as Block>::Header, Self::Error>
Finish the current block.
sourcefn inherent_extrinsics(
&self,
__runtime_api_at_param__: &BlockId<Block>,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, Self::Error>
fn inherent_extrinsics(
&self,
__runtime_api_at_param__: &BlockId<Block>,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, Self::Error>
Generate inherent extrinsics. The inherent data will vary from chain to chain.
sourcefn inherent_extrinsics_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, Self::Error>
fn inherent_extrinsics_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, Self::Error>
Generate inherent extrinsics. The inherent data will vary from chain to chain.
sourcefn check_inherents(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, Self::Error>
fn check_inherents(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, Self::Error>
Check that the inherents are valid. The inherent data will vary from chain to chain.
sourcefn check_inherents_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, Self::Error>
fn check_inherents_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, Self::Error>
Check that the inherents are valid. The inherent data will vary from chain to chain.
sourcefn random_seed(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<<Block as Block>::Hash, Self::Error>
fn random_seed(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<<Block as Block>::Hash, Self::Error>
Generate a random seed.
sourcefn random_seed_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<<Block as Block>::Hash, Self::Error>
fn random_seed_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<<Block as Block>::Hash, Self::Error>
Generate a random seed.
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Core<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
RuntimeVersion: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Core<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
RuntimeVersion: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn version(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<RuntimeVersion, Self::Error>
fn version(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<RuntimeVersion, Self::Error>
Returns the version of the runtime.
sourcefn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, Self::Error>
fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, Self::Error>
Returns the version of the runtime.
sourcefn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, Self::Error>
fn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, Self::Error>
Returns the version of the runtime.
sourcefn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, Self::Error>
fn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, Self::Error>
Returns the version of the runtime.
sourcefn execute_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block
) -> Result<(), Self::Error>
fn execute_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block
) -> Result<(), Self::Error>
Execute the given block.
sourcefn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), Self::Error>
fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), Self::Error>
Execute the given block.
sourcefn initialize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
fn initialize_block(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
Initialize a block with the given header.
sourcefn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
Initialize a block with the given header.
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> GrandpaApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
GrandpaAuthorityList: UnwindSafe + RefUnwindSafe,
EquivocationProof<<__SR_API_BLOCK__ as BlockT>::Hash, NumberFor<__SR_API_BLOCK__>>: UnwindSafe + RefUnwindSafe,
OpaqueKeyOwnershipProof: UnwindSafe + RefUnwindSafe,
Option<()>: UnwindSafe + RefUnwindSafe,
SetId: UnwindSafe + RefUnwindSafe,
GrandpaId: UnwindSafe + RefUnwindSafe,
Option<OpaqueKeyOwnershipProof>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> GrandpaApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
GrandpaAuthorityList: UnwindSafe + RefUnwindSafe,
EquivocationProof<<__SR_API_BLOCK__ as BlockT>::Hash, NumberFor<__SR_API_BLOCK__>>: UnwindSafe + RefUnwindSafe,
OpaqueKeyOwnershipProof: UnwindSafe + RefUnwindSafe,
Option<()>: UnwindSafe + RefUnwindSafe,
SetId: UnwindSafe + RefUnwindSafe,
GrandpaId: UnwindSafe + RefUnwindSafe,
Option<OpaqueKeyOwnershipProof>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed. Read more
Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed. Read more
sourcefn submit_report_equivocation_unsigned_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
equivocation_proof: EquivocationProof<<Block as Block>::Hash, <<Block as Block>::Header as Header>::Number>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, Self::Error>
fn submit_report_equivocation_unsigned_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
equivocation_proof: EquivocationProof<<Block as Block>::Hash, <<Block as Block>::Header as Header>::Number>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, Self::Error>
Submits an unsigned extrinsic to report an equivocation. The caller
must provide the equivocation proof and a key ownership proof
(should be obtained using generate_key_ownership_proof
). The
extrinsic will be unsigned and should only be accepted for local
authorship (not to be broadcast to the network). This method returns
None
when creation of the extrinsic fails, e.g. if equivocation
reporting is disabled for the given runtime (i.e. this method is
hardcoded to return None
). Only useful in an offchain context. Read more
sourcefn submit_report_equivocation_unsigned_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
equivocation_proof: EquivocationProof<<Block as Block>::Hash, <<Block as Block>::Header as Header>::Number>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, Self::Error>
fn submit_report_equivocation_unsigned_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
equivocation_proof: EquivocationProof<<Block as Block>::Hash, <<Block as Block>::Header as Header>::Number>,
key_owner_proof: OpaqueKeyOwnershipProof
) -> Result<Option<()>, Self::Error>
Submits an unsigned extrinsic to report an equivocation. The caller
must provide the equivocation proof and a key ownership proof
(should be obtained using generate_key_ownership_proof
). The
extrinsic will be unsigned and should only be accepted for local
authorship (not to be broadcast to the network). This method returns
None
when creation of the extrinsic fails, e.g. if equivocation
reporting is disabled for the given runtime (i.e. this method is
hardcoded to return None
). Only useful in an offchain context. Read more
sourcefn generate_key_ownership_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, Self::Error>
fn generate_key_ownership_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, Self::Error>
Generates a proof of key ownership for the given authority in the
given set. An example usage of this module is coupled with the
session historical module to prove that a given authority key is
tied to a given staking identity during a specific session. Proofs
of key ownership are necessary for submitting equivocation reports.
NOTE: even though the API takes a set_id
as parameter the current
implementations ignore this parameter and instead rely on this
method being called at the correct block height, i.e. any point at
which the given set id is live on-chain. Future implementations will
instead use indexed data through an offchain worker, not requiring
older states to be available. Read more
sourcefn generate_key_ownership_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, Self::Error>
fn generate_key_ownership_proof_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, Self::Error>
Generates a proof of key ownership for the given authority in the
given set. An example usage of this module is coupled with the
session historical module to prove that a given authority key is
tied to a given staking identity during a specific session. Proofs
of key ownership are necessary for submitting equivocation reports.
NOTE: even though the API takes a set_id
as parameter the current
implementations ignore this parameter and instead rely on this
method being called at the correct block height, i.e. any point at
which the given set id is live on-chain. Future implementations will
instead use indexed data through an offchain worker, not requiring
older states to be available. Read more
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Metadata<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
OpaqueMetadata: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> Metadata<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
OpaqueMetadata: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OpaqueMetadata, Self::Error>
fn metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OpaqueMetadata, Self::Error>
Returns the metadata of a runtime.
sourcefn metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OpaqueMetadata, Self::Error>
fn metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OpaqueMetadata, Self::Error>
Returns the metadata of a runtime.
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> OffchainWorkerApi<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Header: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn offchain_worker_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
number: <<Block as Block>::Header as Header>::Number
) -> Result<(), Self::Error>
fn offchain_worker_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
number: <<Block as Block>::Header as Header>::Number
) -> Result<(), Self::Error>
Starts the off-chain task for given block number.
sourcefn offchain_worker_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
number: <<Block as Block>::Header as Header>::Number
) -> Result<(), Self::Error>
fn offchain_worker_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
number: <<Block as Block>::Header as Header>::Number
) -> Result<(), Self::Error>
Starts the off-chain task for given block number.
sourcefn offchain_worker(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
fn offchain_worker(
&self,
__runtime_api_at_param__: &BlockId<Block>,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
Starts the off-chain task for given block header.
sourcefn offchain_worker_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
fn offchain_worker_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), Self::Error>
Starts the off-chain task for given block header.
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> SessionKeys<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Option<Vec<(Vec<u8>, KeyTypeId)>>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> SessionKeys<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
Option<Vec<u8>>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Vec<u8>: UnwindSafe + RefUnwindSafe,
Option<Vec<(Vec<u8>, KeyTypeId)>>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn generate_session_keys(
&self,
__runtime_api_at_param__: &BlockId<Block>,
seed: Option<Vec<u8, Global>>
) -> Result<Vec<u8, Global>, Self::Error>
fn generate_session_keys(
&self,
__runtime_api_at_param__: &BlockId<Block>,
seed: Option<Vec<u8, Global>>
) -> Result<Vec<u8, Global>, Self::Error>
Generate a set of session keys with optionally using the given seed. The keys should be stored within the keystore exposed via runtime externalities. Read more
sourcefn generate_session_keys_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
seed: Option<Vec<u8, Global>>
) -> Result<Vec<u8, Global>, Self::Error>
fn generate_session_keys_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
seed: Option<Vec<u8, Global>>
) -> Result<Vec<u8, Global>, Self::Error>
Generate a set of session keys with optionally using the given seed. The keys should be stored within the keystore exposed via runtime externalities. Read more
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TaggedTransactionQueue<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
TransactionSource: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
TransactionValidity: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TaggedTransactionQueue<__SR_API_BLOCK__> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
TransactionSource: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
TransactionValidity: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
sourcefn validate_transaction_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, Self::Error>
fn validate_transaction_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, Self::Error>
Validate the transaction.
sourcefn validate_transaction_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, Self::Error>
fn validate_transaction_before_version_2_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, Self::Error>
Validate the transaction.
sourcefn validate_transaction(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, Self::Error>
fn validate_transaction(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, Self::Error>
Validate the transaction. Read more
sourcefn validate_transaction_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, Self::Error>
fn validate_transaction_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, Self::Error>
Validate the transaction. Read more
sourceimpl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TransactionPaymentApi<__SR_API_BLOCK__, u128> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
RuntimeDispatchInfo<Balance>: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
FeeDetails<Balance>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
impl<__SR_API_BLOCK__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SR_API_BLOCK__> + 'static> TransactionPaymentApi<__SR_API_BLOCK__, u128> for RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall> where
RuntimeApiImplCall::StateBackend: StateBackend<HashFor<__SR_API_BLOCK__>>,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
RuntimeDispatchInfo<Balance>: UnwindSafe + RefUnwindSafe,
<__SR_API_BLOCK__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe,
u32: UnwindSafe + RefUnwindSafe,
FeeDetails<Balance>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn query_info(
&self,
__runtime_api_at_param__: &BlockId<Block>,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<RuntimeDispatchInfo<Balance>, Self::Error>
fn query_info_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<RuntimeDispatchInfo<Balance>, Self::Error>
fn query_fee_details(
&self,
__runtime_api_at_param__: &BlockId<Block>,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<FeeDetails<Balance>, Self::Error>
fn query_fee_details_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<FeeDetails<Balance>, Self::Error>
impl<Block: BlockT, C: CallApiAt<Block>> Send for RuntimeApiImpl<Block, C> where
C::StateBackend: StateBackend<HashFor<Block>>,
impl<Block: BlockT, C: CallApiAt<Block>> Sync for RuntimeApiImpl<Block, C> where
C::StateBackend: StateBackend<HashFor<Block>>,
Auto Trait Implementations
impl<Block, C> !RefUnwindSafe for RuntimeApiImpl<Block, C>
impl<Block, C> Unpin for RuntimeApiImpl<Block, C> where
<Block as Block>::Hash: Unpin,
<<Block as Block>::Header as Header>::Hashing: Unpin,
<<Block as Block>::Header as Header>::Number: Unpin,
<<C as CallApiAt<Block>>::StateBackend as Backend<<<Block as Block>::Header as Header>::Hashing>>::Transaction: Unpin,
impl<Block, C> !UnwindSafe for RuntimeApiImpl<Block, C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedConversion for T
impl<T> CheckedConversion for T
sourcefn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
Convert from a value of T
into an equivalent instance of Option<Self>
. Read more
sourcefn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
Consume self to return Some
equivalent value of Option<T>
. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Convert from a value of T
into an equivalent instance of Self
. Read more
sourcefn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
. Read more
sourceimpl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
sourcepub fn to_subset(&self) -> Option<SS>
pub fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
sourcepub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
sourcepub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
sourcepub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.
sourceimpl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
sourcepub fn unique_saturated_into(self) -> T
pub fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of T
.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more