referrerpolicy=no-referrer-when-downgrade

Module polkadot_sdk_frame::runtime::apis

source ·
Expand description

Types and traits for runtimes that implement runtime APIs.

A testing runtime should not need this.

A non-testing runtime should have this enabled, as such:

use polkadot_sdk_frame::runtime::{prelude::*, apis::{*,}};

Re-exports§

  • pub use sp_api;

Modules§

Macros§

Structs§

  • Auxiliary wrapper that holds an api instance and binds it to the given lifetime.
  • Parameters for CallApiAt::call_api_at.
  • Proof of voter misbehavior on a given set id. Misbehavior/equivocation in GRANDPA happens when a voter votes on the same round (either at prevote or precommit stage) for different blocks. Proving is achieved by collecting the signed messages of conflicting votes.
  • A GRANDPA justification for block finality, it includes a commit message and an ancestry proof including all headers routing all precommit target blocks to the commit target block. Due to the current voting strategy the precommit targets should be the same as the commit target, since honest voters don’t vote past authority set change blocks.
  • An identifier for a type of cryptographic key.
  • A scheduled change of authority set.
  • Unit type wrapper that represents a slot.
  • A slot duration defined in milliseconds.
  • A proof that some set of key-value pairs are included in the storage trie. The proof contains the storage values so that the partial storage backend can be reconstructed by a verifier that does not already have access to the key-value pairs.

Enums§

  • An error describing which API call failed.
  • The context in which a call is done.
  • Wrapper object for GRANDPA equivocation proofs, useful for unifying prevote and precommit equivocations under a common type.
  • Describes on what should happen with a storage transaction.

Constants§

Traits§

  • The API to query account nonce.
  • Extends the runtime api implementation with some common functionality.
  • API necessary for block authorship with aura.
  • The BlockBuilder api trait that provides the required functionality for building a block.
  • Something that can call into the an api at a given block.
  • Something that can be constructed to a runtime api.
  • The Core runtime api that every Substrate runtime needs to implement.
  • API to interact with RuntimeGenesisConfig for the runtime
  • APIs for integrating the GRANDPA finality gadget into runtimes. This should be implemented on the runtime side.
  • The Metadata api trait that returns metadata for the runtime.
  • The offchain worker api.
  • Something that provides a runtime api.
  • Something that provides information about a runtime api.
  • Session keys runtime api.
  • The TaggedTransactionQueue api trait for interfering with the transaction queue.

Functions§

Type Aliases§

  • Identity of a Grandpa authority.
  • A list of Grandpa authorities with associated weights.
  • The grandpa crypto scheme defined via the keypair type.
  • Signature for a Grandpa authority.
  • The weight of an authority.
  • A catch up message for this chain’s block type.
  • A commit message for this chain’s block type.
  • A compact commit message for this chain’s block type.
  • A GRANDPA message for a substrate chain.
  • An opaque type used to represent the key ownership proof at the runtime API boundary. The inner value is an encoded representation of the actual key ownership proof which will be parameterized when defining the runtime. At the runtime API boundary this type is unknown and as such we keep this opaque representation, implementors of the runtime API will have to make sure that all usages of OpaqueKeyOwnershipProof refer to the same type.
  • A precommit message for this chain’s block type.
  • The type representing preset ID.
  • A prevote message for this chain’s block type.
  • A primary propose message for this chain’s block type.
  • A type that records all accessed trie nodes and generates a proof out of it.
  • The result type alias, used in build methods. Err contains formatted error message.
  • The round indicator.
  • The monotonic identifier of a GRANDPA set of authorities.
  • A signed message.