subspace_test_runtime

Struct RuntimeApiImpl

source
pub struct RuntimeApiImpl<Block: BlockT, C: CallApiAt<Block> + 'static> { /* private fields */ }
Expand description

Implements all runtime apis for the client side.

Trait Implementations§

source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> AccountNonceApi<__SrApiBlock__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u32> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, AccountId: UnwindSafe + RefUnwindSafe, Nonce: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn account_nonce( &self, __runtime_api_at_param__: <Block as Block>::Hash, account: AccountId, ) -> Result<Nonce, ApiError>

Get current account nonce of given AccountId.
source§

impl<Block: BlockT, C: CallApiAt<Block>> ApiExt<Block> for RuntimeApiImpl<Block, C>

source§

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
source§

fn has_api<A: RuntimeApiInfo + ?Sized>( &self, at: <Block as BlockT>::Hash, ) -> Result<bool, ApiError>
where Self: Sized,

Checks if the given api is implemented and versions match.
source§

fn has_api_with<A: RuntimeApiInfo + ?Sized, P: Fn(u32) -> bool>( &self, at: <Block as BlockT>::Hash, pred: P, ) -> Result<bool, ApiError>
where Self: Sized,

Check if the given api is implemented and the version passes a predicate.
source§

fn api_version<A: RuntimeApiInfo + ?Sized>( &self, at: <Block as BlockT>::Hash, ) -> Result<Option<u32>, ApiError>
where Self: Sized,

Returns the version of the given api.
source§

fn record_proof(&mut self)

Start recording all accessed trie nodes for generating proofs.
source§

fn proof_recorder(&self) -> Option<ProofRecorder<Block>>

Returns the current active proof recorder.
source§

fn extract_proof(&mut self) -> Option<StorageProof>

Extract the recorded proof. Read more
source§

fn into_storage_changes<B: StateBackend<HashingFor<Block>>>( &self, backend: &B, parent_hash: Block::Hash, ) -> Result<StorageChanges<Block>, String>
where Self: Sized,

Convert the api object into the storage changes that were done while executing runtime api functions. Read more
source§

fn set_call_context(&mut self, call_context: CallContext)

Set the [CallContext] to be used by the runtime api calls done by this instance.
source§

fn register_extension<E: Extension>(&mut self, extension: E)

Register an [Extension] that will be accessible while executing a runtime api call.
source§

impl<__SrApiBlock__, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> BlockBuilder<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, <__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe, ApplyExtrinsicResult: UnwindSafe + RefUnwindSafe, <__SrApiBlock__ as BlockT>::Header: UnwindSafe + RefUnwindSafe, InherentData: UnwindSafe + RefUnwindSafe, Vec<<__SrApiBlock__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe, __SrApiBlock__: UnwindSafe + RefUnwindSafe + BlockT, CheckInherentsResult: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn apply_extrinsic( &self, __runtime_api_at_param__: <Block as Block>::Hash, extrinsic: <Block as Block>::Extrinsic, ) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>

Apply the given extrinsic. Read more
§

fn apply_extrinsic_before_version_6( &self, __runtime_api_at_param__: <Block as Block>::Hash, extrinsic: <Block as Block>::Extrinsic, ) -> Result<Result<Result<(), DispatchError>, TransactionValidityError>, ApiError>

👎Deprecated
§

fn finalize_block( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<<Block as Block>::Header, ApiError>

Finish the current block.
§

fn inherent_extrinsics( &self, __runtime_api_at_param__: <Block as Block>::Hash, inherent: InherentData, ) -> Result<Vec<<Block as Block>::Extrinsic>, ApiError>

Generate inherent extrinsics. The inherent data will vary from chain to chain.
§

fn check_inherents( &self, __runtime_api_at_param__: <Block as Block>::Hash, block: Block, data: InherentData, ) -> Result<CheckInherentsResult, ApiError>

Check that the inherents are valid. The inherent data will vary from chain to chain.
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> BundleProducerElectionApi<__SrApiBlock__, u128> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>

source§

fn bundle_producer_election_params( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<BundleProducerElectionParams<Balance>>, ApiError>

source§

fn operator( &self, __runtime_api_at_param__: <Block as Block>::Hash, operator_id: u64, ) -> Result<Option<(Public, Balance)>, ApiError>

source§

impl<__SrApiBlock__, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> Core<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, RuntimeVersion: UnwindSafe + RefUnwindSafe, __SrApiBlock__: UnwindSafe + RefUnwindSafe + BlockT, <__SrApiBlock__ as BlockT>::Header: UnwindSafe + RefUnwindSafe, ExtrinsicInclusionMode: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn version( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<RuntimeVersion, ApiError>

Returns the version of the runtime.
§

fn execute_block( &self, __runtime_api_at_param__: <Block as Block>::Hash, block: Block, ) -> Result<(), ApiError>

Execute the given block.
§

fn initialize_block_before_version_5( &self, __runtime_api_at_param__: <Block as Block>::Hash, header: &<Block as Block>::Header, ) -> Result<(), ApiError>

👎Deprecated
Initialize a block with the given header.
§

fn initialize_block( &self, __runtime_api_at_param__: <Block as Block>::Hash, header: &<Block as Block>::Header, ) -> Result<ExtrinsicInclusionMode, ApiError>

Initialize a block with the given header and return the runtime executive mode.
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> DomainsApi<__SrApiBlock__, Header<u32, BlakeTwo256>> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, OpaqueBundle<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, Header, Balance>: UnwindSafe + RefUnwindSafe, SealedSingletonReceipt<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, Header, Balance>: UnwindSafe + RefUnwindSafe, DomainId: UnwindSafe + RefUnwindSafe, Vec<<__SrApiBlock__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe, OpaqueBundles<__SrApiBlock__, Header, Balance>: UnwindSafe + RefUnwindSafe, Randomness: UnwindSafe + RefUnwindSafe, Option<Vec<u8>>: UnwindSafe + RefUnwindSafe, Option<RuntimeId>: UnwindSafe + RefUnwindSafe, Option<(DomainInstanceData, NumberFor<__SrApiBlock__>)>: UnwindSafe + RefUnwindSafe, Moment: UnwindSafe + RefUnwindSafe, U256: UnwindSafe + RefUnwindSafe, Option<H256>: UnwindSafe + RefUnwindSafe, BlockNumber: UnwindSafe + RefUnwindSafe, Option<BlockNumber>: UnwindSafe + RefUnwindSafe, Option<DomainBundleLimit>: UnwindSafe + RefUnwindSafe, bool: UnwindSafe + RefUnwindSafe, Hash: UnwindSafe + RefUnwindSafe, Option<ExecutionReceiptFor<Header, __SrApiBlock__, Balance>>: UnwindSafe + RefUnwindSafe, Option<(BTreeMap<OperatorId, Balance>, Vec<OperatorId>)>: UnwindSafe + RefUnwindSafe, OperatorPublicKey: UnwindSafe + RefUnwindSafe, Option<OperatorId>: UnwindSafe + RefUnwindSafe, Option<Hash>: UnwindSafe + RefUnwindSafe, Balance: UnwindSafe + RefUnwindSafe, Option<(BlockNumber, Hash)>: UnwindSafe + RefUnwindSafe, OperatorId: UnwindSafe + RefUnwindSafe, NumberFor<__SrApiBlock__>: UnwindSafe + RefUnwindSafe, Option<bool>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

source§

fn submit_bundle_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, opaque_bundle: Bundle<OpaqueExtrinsic, <<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, u128>, ) -> Result<(), ApiError>

Submits the transaction bundle via an unsigned extrinsic.
source§

fn submit_receipt_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, singleton_receipt: SealedSingletonReceipt<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, u128>, ) -> Result<(), ApiError>

source§

fn extract_successful_bundles( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, extrinsics: Vec<<Block as Block>::Extrinsic>, ) -> Result<Vec<Bundle<OpaqueExtrinsic, <<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, u128>>, ApiError>

Extract the bundles stored successfully from the given extrinsics.
source§

fn extrinsics_shuffling_seed( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Randomness, ApiError>

Generates a randomness seed for extrinsics shuffling.
source§

fn domain_runtime_code( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<Vec<u8>>, ApiError>

Returns the WASM bundle for given domain_id.
source§

fn runtime_id( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<u32>, ApiError>

Returns the runtime id for given domain_id.
source§

fn domain_instance_data( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<(DomainInstanceData, <<Block as Block>::Header as Header>::Number)>, ApiError>

Returns the domain instance data for given domain_id.
source§

fn timestamp( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<u64, ApiError>

Returns the current timestamp at given height.
source§

fn domain_tx_range( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<U256, ApiError>

Returns the current Tx range for the given domain Id.
source§

fn genesis_state_root( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<H256>, ApiError>

Return the genesis state root if not pruned
source§

fn head_receipt_number( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<<DomainHeader as Header>::Number, ApiError>

Returns the best execution chain number.
source§

fn oldest_unconfirmed_receipt_number( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<<DomainHeader as Header>::Number>, ApiError>

Returns the block number of oldest unconfirmed execution receipt.
source§

fn domain_bundle_limit( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<DomainBundleLimit>, ApiError>

Returns the domain bundle limit of the given domain.
source§

fn non_empty_er_exists( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<bool, ApiError>

Returns true if there are any ERs in the challenge period with non empty extrinsics.
source§

fn domain_best_number( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<<DomainHeader as Header>::Number>, ApiError>

Returns the current best number of the domain.
source§

fn execution_receipt( &self, __runtime_api_at_param__: <Block as Block>::Hash, receipt_hash: <DomainHeader as Header>::Hash, ) -> Result<Option<ExecutionReceipt<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, <DomainHeader as Header>::Number, <DomainHeader as Header>::Hash, u128>>, ApiError>

Returns the execution receipt
source§

fn domain_operators( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<(BTreeMap<u64, u128>, Vec<u64>)>, ApiError>

Returns the current epoch and the next epoch operators of the given domain
source§

fn operator_id_by_signing_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, signing_key: Public, ) -> Result<Option<u64>, ApiError>

Get operator id by signing key
source§

fn receipt_hash( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, domain_number: <DomainHeader as Header>::Number, ) -> Result<Option<<DomainHeader as Header>::Hash>, ApiError>

Returns the execution receipt hash of the given domain and domain block number
source§

fn consensus_chain_byte_fee( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<u128, ApiError>

Return the consensus chain byte fee that will used to charge the domain transaction for consensus chain storage fee
source§

fn latest_confirmed_domain_block( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<(<DomainHeader as Header>::Number, <DomainHeader as Header>::Hash)>, ApiError>

Returns the latest confirmed domain block number and hash
source§

fn is_bad_er_pending_to_prune( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, receipt_hash: <DomainHeader as Header>::Hash, ) -> Result<bool, ApiError>

Return if the receipt is exist and pending to prune
source§

fn storage_fund_account_balance( &self, __runtime_api_at_param__: <Block as Block>::Hash, operator_id: u64, ) -> Result<u128, ApiError>

Return the balance of the storage fund account
source§

fn is_domain_runtime_upgraded_since( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, at: <<Block as Block>::Header as Header>::Number, ) -> Result<Option<bool>, ApiError>

Return if the domain runtime code is upgraded since at
source§

fn domain_sudo_call( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<Vec<u8>>, ApiError>

Return domain sudo call.
source§

fn last_confirmed_domain_block_receipt( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<ExecutionReceipt<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, <DomainHeader as Header>::Number, <DomainHeader as Header>::Hash, u128>>, ApiError>

Return last confirmed domain block execution receipt.
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> FraudProofApi<__SrApiBlock__, Header<u32, BlakeTwo256>> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, FraudProof<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, Header, H256>: UnwindSafe + RefUnwindSafe, FraudProofStorageKeyRequest<NumberFor<__SrApiBlock__>>: UnwindSafe + RefUnwindSafe, Vec<u8>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

source§

fn submit_fraud_proof_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, fraud_proof: FraudProof<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, DomainHeader, H256>, ) -> Result<(), ApiError>

Submit the fraud proof via an unsigned extrinsic.
source§

fn fraud_proof_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, req: FraudProofStorageKeyRequest<<<Block as Block>::Header as Header>::Number>, ) -> Result<Vec<u8>, ApiError>

Reture the storage key used in fraud proof
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> GenesisBuilder<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, Vec<u8>: UnwindSafe + RefUnwindSafe, Result: UnwindSafe + RefUnwindSafe, Option<PresetId>: UnwindSafe + RefUnwindSafe, Option<Vec<u8>>: UnwindSafe + RefUnwindSafe, Vec<PresetId>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn build_state( &self, __runtime_api_at_param__: <Block as Block>::Hash, json: Vec<u8>, ) -> Result<Result<(), String>, ApiError>

Build RuntimeGenesisConfig from a JSON blob not using any defaults and store it in the storage. Read more
§

fn get_preset( &self, __runtime_api_at_param__: <Block as Block>::Hash, id: &Option<String>, ) -> Result<Option<Vec<u8>>, ApiError>

Returns a JSON blob representation of the built-in RuntimeGenesisConfig identified by id. Read more
§

fn preset_names( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Vec<String>, ApiError>

Returns a list of identifiers for available builtin RuntimeGenesisConfig presets. Read more
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> MessengerApi<__SrApiBlock__, u32, <__SrApiBlock__ as Block>::Hash> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, <__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe, Option<bool>: UnwindSafe + RefUnwindSafe, Option<ConsensusChainMmrLeafProof<BlockNumber, <__SrApiBlock__ as BlockT>::Hash, H256>>: UnwindSafe + RefUnwindSafe, DomainId: UnwindSafe + RefUnwindSafe, Vec<u8>: UnwindSafe + RefUnwindSafe, MessageKey: UnwindSafe + RefUnwindSafe, Option<DomainAllowlistUpdates>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

source§

fn is_xdm_mmr_proof_valid( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<bool>, ApiError>

Returns Some(true) if valid XDM or Some(false) if not Returns None if this is not an XDM
source§

fn extract_xdm_mmr_proof( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<ConsensusChainMmrLeafProof<CNumber, CHash, H256>>, ApiError>

source§

fn confirmed_domain_block_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Vec<u8>, ApiError>

Returns the confirmed domain block storage for given domain.
source§

fn outbox_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, message_key: (ChainId, U256, U256), ) -> Result<Vec<u8>, ApiError>

Returns storage key for outbox for a given message_id.
source§

fn inbox_response_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, message_key: (ChainId, U256, U256), ) -> Result<Vec<u8>, ApiError>

Returns storage key for inbox response for a given message_id.
source§

fn domain_chains_allowlist_update( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<DomainAllowlistUpdates>, ApiError>

Returns any domain’s chains allowlist updates on consensus chain.
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> Metadata<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, OpaqueMetadata: UnwindSafe + RefUnwindSafe, u32: UnwindSafe + RefUnwindSafe, Option<OpaqueMetadata>: UnwindSafe + RefUnwindSafe, Vec<u32>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn metadata( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<OpaqueMetadata, ApiError>

Returns the metadata of a runtime.
§

fn metadata_at_version( &self, __runtime_api_at_param__: <Block as Block>::Hash, version: u32, ) -> Result<Option<OpaqueMetadata>, ApiError>

Returns the metadata at a given version. Read more
§

fn metadata_versions( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Vec<u32>, ApiError>

Returns the supported metadata versions. Read more
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> MmrApi<__SrApiBlock__, <<Runtime as Config>::Hashing as Hash>::Output, u32> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, Result<<<Runtime as Config>::Hashing as Hash>::Output, Error>: UnwindSafe + RefUnwindSafe, Result<LeafIndex, Error>: UnwindSafe + RefUnwindSafe, Vec<BlockNumber>: UnwindSafe + RefUnwindSafe, Option<BlockNumber>: UnwindSafe + RefUnwindSafe, Result<(Vec<EncodableOpaqueLeaf>, LeafProof<<<Runtime as Config>::Hashing as Hash>::Output>), Error>: UnwindSafe + RefUnwindSafe, Vec<EncodableOpaqueLeaf>: UnwindSafe + RefUnwindSafe, LeafProof<<<Runtime as Config>::Hashing as Hash>::Output>: UnwindSafe + RefUnwindSafe, Result<(), Error>: UnwindSafe + RefUnwindSafe, <<Runtime as Config>::Hashing as Hash>::Output: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn mmr_root( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Result<Hash, Error>, ApiError>

Return the on-chain MMR root hash.
§

fn mmr_leaf_count( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Result<u64, Error>, ApiError>

Return the number of MMR blocks in the chain.
§

fn generate_proof( &self, __runtime_api_at_param__: <Block as Block>::Hash, block_numbers: Vec<BlockNumber>, best_known_block_number: Option<BlockNumber>, ) -> Result<Result<(Vec<EncodableOpaqueLeaf>, LeafProof<Hash>), Error>, ApiError>

Generate MMR proof for a series of block numbers. If best_known_block_number = Some(n), use historical MMR state at given block height n. Else, use current MMR state.
§

fn verify_proof( &self, __runtime_api_at_param__: <Block as Block>::Hash, leaves: Vec<EncodableOpaqueLeaf>, proof: LeafProof<Hash>, ) -> Result<Result<(), Error>, ApiError>

Verify MMR proof against on-chain MMR for a batch of leaves. Read more
§

fn verify_proof_stateless( &self, __runtime_api_at_param__: <Block as Block>::Hash, root: Hash, leaves: Vec<EncodableOpaqueLeaf>, proof: LeafProof<Hash>, ) -> Result<Result<(), Error>, ApiError>

Verify MMR proof against given root hash for a batch of leaves. Read more
source§

impl<__SrApiBlock__, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> ObjectsApi<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, __SrApiBlock__: UnwindSafe + RefUnwindSafe + BlockT, BlockObjectMapping: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

source§

fn extract_block_object_mapping( &self, __runtime_api_at_param__: <Block as Block>::Hash, block: Block, ) -> Result<BlockObjectMapping, ApiError>

Extract block object mapping for a given block
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> OffchainWorkerApi<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, <__SrApiBlock__ as BlockT>::Header: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn offchain_worker_before_version_2( &self, __runtime_api_at_param__: <Block as Block>::Hash, number: <<Block as Block>::Header as Header>::Number, ) -> Result<(), ApiError>

👎Deprecated
Starts the off-chain task for given block number.
§

fn offchain_worker( &self, __runtime_api_at_param__: <Block as Block>::Hash, header: &<Block as Block>::Header, ) -> Result<(), ApiError>

Starts the off-chain task for given block header.
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> OnchainStateApi<__SrApiBlock__, <<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, u128> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, AccountId: UnwindSafe + RefUnwindSafe, Balance: UnwindSafe + RefUnwindSafe, ChainId: UnwindSafe + RefUnwindSafe, Option<ChannelId>: UnwindSafe + RefUnwindSafe, ConsensusChainMmrLeafProof<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, H256>: UnwindSafe + RefUnwindSafe, Option<<<Runtime as Config>::LeafData as LeafDataProvider>::LeafData>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

source§

fn free_balance( &self, __runtime_api_at_param__: <Block as Block>::Hash, account_id: AccountId, ) -> Result<Balance, ApiError>

Api to get the free balance of the given account
source§

fn get_open_channel_for_chain( &self, __runtime_api_at_param__: <Block as Block>::Hash, dst_chain_id: ChainId, ) -> Result<Option<U256>, ApiError>

Returns the last open channel for a given domain.
source§

fn verify_proof_and_extract_leaf( &self, __runtime_api_at_param__: <Block as Block>::Hash, proof: ConsensusChainMmrLeafProof<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, H256>, ) -> Result<Option<MmrLeaf<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash>>, ApiError>

Verify the mmr proof statelessly and extract the state root.
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> RelayerApi<__SrApiBlock__, u32, u32, <__SrApiBlock__ as Block>::Hash> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, BlockMessagesWithStorageKey: UnwindSafe + RefUnwindSafe, CrossDomainMessage<NumberFor<__SrApiBlock__>, <__SrApiBlock__ as BlockT>::Hash, <__SrApiBlock__ as BlockT>::Hash>: UnwindSafe + RefUnwindSafe, Option<<__SrApiBlock__ as BlockT>::Extrinsic>: UnwindSafe + RefUnwindSafe, ChainId: UnwindSafe + RefUnwindSafe, MessageId: UnwindSafe + RefUnwindSafe, bool: UnwindSafe + RefUnwindSafe, BTreeSet<(ChainId, ChannelId)>: UnwindSafe + RefUnwindSafe, ChannelId: UnwindSafe + RefUnwindSafe, Vec<u8>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

source§

fn block_messages( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<BlockMessagesWithStorageKey, ApiError>

Returns all the outbox and inbox responses to deliver. Storage key is used to generate the storage proof for the message.
source§

fn outbox_message_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, msg: CrossDomainMessage<CNumber, CHash, H256>, ) -> Result<Option<<Block as Block>::Extrinsic>, ApiError>

Constructs an outbox message to the dst_chain as an unsigned extrinsic.
source§

fn inbox_response_message_unsigned( &self, __runtime_api_at_param__: <Block as Block>::Hash, msg: CrossDomainMessage<CNumber, CHash, H256>, ) -> Result<Option<<Block as Block>::Extrinsic>, ApiError>

Constructs an inbox response message to the dst_chain as an unsigned extrinsic.
source§

fn should_relay_outbox_message( &self, __runtime_api_at_param__: <Block as Block>::Hash, dst_chain_id: ChainId, msg_id: (U256, U256), ) -> Result<bool, ApiError>

Returns true if the outbox message is ready to be relayed to dst_chain.
source§

fn should_relay_inbox_message_response( &self, __runtime_api_at_param__: <Block as Block>::Hash, dst_chain_id: ChainId, msg_id: (U256, U256), ) -> Result<bool, ApiError>

Returns true if the inbox message response is ready to be relayed to dst_chain.
source§

fn updated_channels( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<BTreeSet<(ChainId, U256)>, ApiError>

Returns the list of channels updated in the given block.
source§

fn channel_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, chain_id: ChainId, channel_id: U256, ) -> Result<Vec<u8>, ApiError>

Returns storage key for channels for given chain and channel id.
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> SessionKeys<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, Option<Vec<u8>>: UnwindSafe + RefUnwindSafe, Vec<u8>: UnwindSafe + RefUnwindSafe, Option<Vec<(Vec<u8>, KeyTypeId)>>: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn generate_session_keys( &self, __runtime_api_at_param__: <Block as Block>::Hash, seed: Option<Vec<u8>>, ) -> Result<Vec<u8>, 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
§

fn decode_session_keys( &self, __runtime_api_at_param__: <Block as Block>::Hash, encoded: Vec<u8>, ) -> Result<Option<Vec<(Vec<u8>, KeyTypeId)>>, ApiError>

Decode the given public session keys. Read more
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> SubspaceApi<__SrApiBlock__, PublicKey> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>

source§

fn pot_parameters( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<PotParameters, ApiError>

Proof of time parameters
source§

fn solution_ranges( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<SolutionRanges, ApiError>

Solution ranges.
source§

fn submit_vote_extrinsic( &self, __runtime_api_at_param__: <Block as Block>::Hash, signed_vote: SignedVote<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash, RewardAddress>, ) -> Result<(), ApiError>

Submit farmer vote vote that is essentially a header with bigger solution range than acceptable for block authoring. Only useful in an offchain context.
source§

fn history_size( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<HistorySize, ApiError>

Size of the blockchain history
source§

fn max_pieces_in_sector( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<u16, ApiError>

How many pieces one sector is supposed to contain (max)
source§

fn segment_commitment( &self, __runtime_api_at_param__: <Block as Block>::Hash, segment_index: SegmentIndex, ) -> Result<Option<SegmentCommitment>, ApiError>

Get the segment commitment of records for specified segment index
source§

fn extract_segment_headers( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<Vec<SegmentHeader>>, ApiError>

Returns Vec<SegmentHeader> if a given extrinsic has them.
source§

fn is_inherent( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<bool, ApiError>

Checks if the extrinsic is an inherent.
source§

fn root_plot_public_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<Option<PublicKey>, ApiError>

Returns root plot public key in case block authoring is restricted.
source§

fn should_adjust_solution_range( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<bool, ApiError>

Whether solution range adjustment is enabled.
source§

fn chain_constants( &self, __runtime_api_at_param__: <Block as Block>::Hash, ) -> Result<ChainConstants, ApiError>

Get Subspace blockchain constants
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> TaggedTransactionQueue<__SrApiBlock__> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, TransactionSource: UnwindSafe + RefUnwindSafe, <__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe, <__SrApiBlock__ as BlockT>::Hash: UnwindSafe + RefUnwindSafe, TransactionValidity: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn validate_transaction_before_version_2( &self, __runtime_api_at_param__: <Block as Block>::Hash, tx: <Block as Block>::Extrinsic, ) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>

👎Deprecated
Validate the transaction.
§

fn validate_transaction_before_version_3( &self, __runtime_api_at_param__: <Block as Block>::Hash, source: TransactionSource, tx: <Block as Block>::Extrinsic, ) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>

👎Deprecated
Validate the transaction.
§

fn validate_transaction( &self, __runtime_api_at_param__: <Block as Block>::Hash, source: TransactionSource, tx: <Block as Block>::Extrinsic, block_hash: <Block as Block>::Hash, ) -> Result<Result<ValidTransaction, TransactionValidityError>, ApiError>

Validate the transaction. Read more
source§

impl<__SrApiBlock__: BlockT + UnwindSafe + RefUnwindSafe, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> TransactionPaymentApi<__SrApiBlock__, u128> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>
where RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>, &'static RuntimeApiImplCall: Send, <__SrApiBlock__ as BlockT>::Extrinsic: UnwindSafe + RefUnwindSafe, u32: UnwindSafe + RefUnwindSafe, RuntimeDispatchInfo<Balance>: UnwindSafe + RefUnwindSafe, FeeDetails<Balance>: UnwindSafe + RefUnwindSafe, Weight: UnwindSafe + RefUnwindSafe, Balance: UnwindSafe + RefUnwindSafe, __SrApiBlock__::Header: UnwindSafe + RefUnwindSafe,

§

fn query_info( &self, __runtime_api_at_param__: <Block as Block>::Hash, uxt: <Block as Block>::Extrinsic, len: u32, ) -> Result<RuntimeDispatchInfo<Balance>, ApiError>

§

fn query_fee_details( &self, __runtime_api_at_param__: <Block as Block>::Hash, uxt: <Block as Block>::Extrinsic, len: u32, ) -> Result<FeeDetails<Balance>, ApiError>

§

fn query_weight_to_fee( &self, __runtime_api_at_param__: <Block as Block>::Hash, weight: Weight, ) -> Result<Balance, ApiError>

§

fn query_length_to_fee( &self, __runtime_api_at_param__: <Block as Block>::Hash, length: u32, ) -> Result<Balance, ApiError>

Auto Trait Implementations§

§

impl<Block, C> !Freeze for RuntimeApiImpl<Block, C>

§

impl<Block, C> !RefUnwindSafe for RuntimeApiImpl<Block, C>

§

impl<Block, C> Send for RuntimeApiImpl<Block, C>
where C: Sync,

§

impl<Block, C> !Sync 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,

§

impl<Block, C> !UnwindSafe for RuntimeApiImpl<Block, C>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CheckedConversion for 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
§

fn checked_into<T>(self) -> Option<T>
where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T, U> IntoKey<U> for T
where U: FromKey<T>,

§

fn into_key(self) -> U

§

impl<T> IsType<T> for T

§

fn from_ref(t: &T) -> &T

Cast reference.
§

fn into_ref(&self) -> &T

Cast reference.
§

fn from_mut(t: &mut T) -> &mut T

Cast mutable reference.
§

fn into_mut(&mut self) -> &mut T

Cast mutable reference.
§

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
§

impl<T> SaturatedConversion for 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
§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, U> TryIntoKey<U> for T
where U: TryFromKey<T>,

§

type Error = <U as TryFromKey<T>>::Error

§

fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>

§

impl<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> JsonSchemaMaybe for T