Struct node_template_runtime::RuntimeApiImpl [−][src]
Expand description
Implements all runtime apis for the client side.
Trait Implementations
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,
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,
fn AccountNonceApi_account_nonce_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<AccountId>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Index>, ApiError>
fn account_nonce(
&self,
__runtime_api_at_param__: &BlockId<Block>,
account: AccountId
) -> Result<Index, ApiError>
fn account_nonce(
&self,
__runtime_api_at_param__: &BlockId<Block>,
account: AccountId
) -> Result<Index, ApiError>
Get current account nonce of given AccountId
.
fn account_nonce_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
account: AccountId
) -> Result<Index, ApiError>
fn account_nonce_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
account: AccountId
) -> Result<Index, ApiError>
Get current account nonce of given AccountId
.
type StateBackend = C::StateBackend
type StateBackend = C::StateBackend
The state backend that is used to store the block states.
fn 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
Checks if the given api is implemented and versions match.
Check if the given api is implemented and the version passes a predicate.
fn api_version<A: RuntimeApiInfo + ?Sized>(
&self,
at: &BlockId<Block>
) -> Result<Option<u32>, ApiError> where
Self: Sized,
fn api_version<A: RuntimeApiInfo + ?Sized>(
&self,
at: &BlockId<Block>
) -> Result<Option<u32>, ApiError> where
Self: Sized,
Returns the version of the given api.
Start recording all accessed trie nodes for generating proofs.
Returns the current active proof recorder.
Extract the recorded proof. Read more
fn into_storage_changes(
&self,
backend: &Self::StateBackend,
changes_trie_state: Option<&ChangesTrieState<'_, HashFor<Block>, NumberFor<Block>>>,
parent_hash: Block::Hash
) -> Result<StorageChanges<C::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<C::StateBackend, Block>, String> where
Self: Sized,
Convert the api object into the storage changes that were done while executing runtime api functions. Read more
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__>>,
SlotDuration: 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__>>,
SlotDuration: UnwindSafe + RefUnwindSafe,
Vec<AuraId>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn AuraApi_slot_duration_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<SlotDuration>, ApiError>
fn slot_duration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<SlotDuration, ApiError>
fn slot_duration(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<SlotDuration, ApiError>
Returns the slot duration for Aura. Read more
fn slot_duration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<SlotDuration, ApiError>
fn slot_duration_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<SlotDuration, ApiError>
Returns the slot duration for Aura. Read more
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__>>,
bool: UnwindSafe + RefUnwindSafe,
(Vec<BenchmarkList>, Vec<StorageInfo>): UnwindSafe + RefUnwindSafe,
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__>>,
bool: UnwindSafe + RefUnwindSafe,
(Vec<BenchmarkList>, Vec<StorageInfo>): UnwindSafe + RefUnwindSafe,
BenchmarkConfig: UnwindSafe + RefUnwindSafe,
Result<Vec<BenchmarkBatch>, RuntimeString>: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn Benchmark_benchmark_metadata_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<bool>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<(Vec<BenchmarkList>, Vec<StorageInfo>)>, ApiError>
fn Benchmark_dispatch_benchmark_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<BenchmarkConfig>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Result<Vec<BenchmarkBatch>, RuntimeString>>, ApiError>
fn benchmark_metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extra: bool
) -> Result<(Vec<BenchmarkList, Global>, Vec<StorageInfo, Global>), ApiError>
fn benchmark_metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extra: bool
) -> Result<(Vec<BenchmarkList, Global>, Vec<StorageInfo, Global>), ApiError>
Get the benchmark metadata available for this runtime. Read more
fn benchmark_metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extra: bool
) -> Result<(Vec<BenchmarkList, Global>, Vec<StorageInfo, Global>), ApiError>
fn benchmark_metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extra: bool
) -> Result<(Vec<BenchmarkList, Global>, Vec<StorageInfo, Global>), ApiError>
Get the benchmark metadata available for this runtime. Read more
fn dispatch_benchmark(
&self,
__runtime_api_at_param__: &BlockId<Block>,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, ApiError>
fn dispatch_benchmark(
&self,
__runtime_api_at_param__: &BlockId<Block>,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, ApiError>
Dispatch the given benchmark.
fn dispatch_benchmark_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, ApiError>
fn dispatch_benchmark_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch, Global>, RuntimeString>, ApiError>
Dispatch the given benchmark.
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__::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__::Header: UnwindSafe + RefUnwindSafe,
fn BlockBuilder_apply_extrinsic_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<<__SR_API_BLOCK__ as BlockT>::Extrinsic>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<ApplyExtrinsicResult>, ApiError>
fn BlockBuilder_finalize_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<<__SR_API_BLOCK__ as BlockT>::Header>, ApiError>
fn BlockBuilder_inherent_extrinsics_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<InherentData>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Vec<<__SR_API_BLOCK__ as BlockT>::Extrinsic>>, ApiError>
fn BlockBuilder_check_inherents_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(__SR_API_BLOCK__, InherentData)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<CheckInherentsResult>, ApiError>
fn apply_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
fn apply_extrinsic(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
Apply the given extrinsic. Read more
fn apply_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
fn apply_extrinsic_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extrinsic: <Block as Block>::Extrinsic
) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>
Apply the given extrinsic. Read more
Finish the current block.
fn finalize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<<Block as Block>::Header, ApiError>
fn finalize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<<Block as Block>::Header, ApiError>
Finish the current block.
fn inherent_extrinsics(
&self,
__runtime_api_at_param__: &BlockId<Block>,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, ApiError>
fn inherent_extrinsics(
&self,
__runtime_api_at_param__: &BlockId<Block>,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, ApiError>
Generate inherent extrinsics. The inherent data will vary from chain to chain.
fn inherent_extrinsics_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, ApiError>
fn inherent_extrinsics_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
inherent: InherentData
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, ApiError>
Generate inherent extrinsics. The inherent data will vary from chain to chain.
fn check_inherents(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, ApiError>
fn check_inherents(
&self,
__runtime_api_at_param__: &BlockId<Block>,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, ApiError>
Check that the inherents are valid. The inherent data will vary from chain to chain.
fn check_inherents_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, ApiError>
fn check_inherents_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block,
data: InherentData
) -> Result<CheckInherentsResult, ApiError>
Check that the inherents are valid. The inherent data will vary from chain to chain.
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,
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,
fn Core_version_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<RuntimeVersion>, ApiError>
fn Core_execute_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<__SR_API_BLOCK__>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<()>, ApiError>
fn Core_initialize_block_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as BlockT>::Header>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<()>, ApiError>
Returns the version of the runtime.
fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, ApiError>
fn version_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<RuntimeVersion, ApiError>
Returns the version of the runtime.
fn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, ApiError>
fn version_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>
) -> Result<OldRuntimeVersion, ApiError>
Returns the version of the runtime.
fn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, ApiError>
fn version_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OldRuntimeVersion, ApiError>
Returns the version of the runtime.
Execute the given block.
fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), ApiError>
fn execute_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
block: Block
) -> Result<(), ApiError>
Execute the given block.
Initialize a block with the given header.
fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
fn initialize_block_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
Initialize a block with the given header.
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,
SetId: 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,
SetId: 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,
fn GrandpaApi_current_set_id_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<SetId>, ApiError>
fn GrandpaApi_submit_report_equivocation_unsigned_extrinsic_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(EquivocationProof<<__SR_API_BLOCK__ as BlockT>::Hash, NumberFor<__SR_API_BLOCK__>>, OpaqueKeyOwnershipProof)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Option<()>>, ApiError>
fn GrandpaApi_generate_key_ownership_proof_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(SetId, GrandpaId)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Option<OpaqueKeyOwnershipProof>>, ApiError>
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
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<()>, ApiError>
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<()>, ApiError>
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
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<()>, ApiError>
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<()>, ApiError>
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
fn generate_key_ownership_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
fn generate_key_ownership_proof(
&self,
__runtime_api_at_param__: &BlockId<Block>,
set_id: u64,
authority_id: Public
) -> Result<Option<OpaqueKeyOwnershipProof>, ApiError>
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
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>, ApiError>
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>, ApiError>
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
Get current GRANDPA authority set id.
fn current_set_id_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<u64, ApiError>
fn current_set_id_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<u64, ApiError>
Get current GRANDPA authority set id.
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,
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,
fn Metadata_metadata_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<()>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<OpaqueMetadata>, ApiError>
Returns the metadata of a runtime.
fn metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OpaqueMetadata, ApiError>
fn metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext
) -> Result<OpaqueMetadata, ApiError>
Returns the metadata of a runtime.
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,
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,
fn OffchainWorkerApi_offchain_worker_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<&<__SR_API_BLOCK__ as BlockT>::Header>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<()>, ApiError>
Starts the off-chain task for given block number.
Starts the off-chain task for given block number.
Starts the off-chain task for given block header.
fn offchain_worker_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
fn offchain_worker_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
header: &<Block as Block>::Header
) -> Result<(), ApiError>
Starts the off-chain task for given block header.
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,
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,
fn SessionKeys_generate_session_keys_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<Option<Vec<u8>>>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Vec<u8>>, ApiError>
fn SessionKeys_decode_session_keys_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<Vec<u8>>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<Option<Vec<(Vec<u8>, KeyTypeId)>>>, ApiError>
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
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
Decode the given public session keys. Read more
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,
<__SR_API_BLOCK__ as BlockT>::Hash: 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,
<__SR_API_BLOCK__ as BlockT>::Hash: UnwindSafe + RefUnwindSafe,
TransactionValidity: UnwindSafe + RefUnwindSafe,
__SR_API_BLOCK__::Header: UnwindSafe + RefUnwindSafe,
fn TaggedTransactionQueue_validate_transaction_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(TransactionSource, <__SR_API_BLOCK__ as BlockT>::Extrinsic, <__SR_API_BLOCK__ as BlockT>::Hash)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<TransactionValidity>, ApiError>
fn validate_transaction_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_before_version_2(
&self,
__runtime_api_at_param__: &BlockId<Block>,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction.
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>, ApiError>
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>, ApiError>
Validate the transaction.
fn validate_transaction_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_before_version_3(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction.
fn validate_transaction_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_before_version_3_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction.
fn validate_transaction(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction(
&self,
__runtime_api_at_param__: &BlockId<Block>,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction. Read more
fn validate_transaction_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
fn validate_transaction_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
source: TransactionSource,
tx: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash
) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>
Validate the transaction. Read more
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,
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 TransactionPaymentApi_query_info_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(<__SR_API_BLOCK__ as BlockT>::Extrinsic, u32)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<RuntimeDispatchInfo<Balance>>, ApiError>
fn TransactionPaymentApi_query_fee_details_runtime_api_impl(
&self,
at: &BlockId<__SR_API_BLOCK__>,
context: ExecutionContext,
params: Option<(<__SR_API_BLOCK__ as BlockT>::Extrinsic, u32)>,
params_encoded: Vec<u8>
) -> Result<NativeOrEncoded<FeeDetails<Balance>>, ApiError>
fn query_info(
&self,
__runtime_api_at_param__: &BlockId<Block>,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<RuntimeDispatchInfo<Balance>, ApiError>
fn query_info_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<RuntimeDispatchInfo<Balance>, ApiError>
fn query_fee_details(
&self,
__runtime_api_at_param__: &BlockId<Block>,
uxt: <Block as Block>::Extrinsic,
len: u32
) -> Result<FeeDetails<Balance>, ApiError>
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>, ApiError>
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
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub 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).
pub 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.
pub 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.
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V