Crate bp_runtime

Source
Expand description

Primitives that may be used at (bridges) runtime level.

Re-exports§

pub use sp_runtime::paste;

Modules§

extensions
Primitives that may be used for creating signed extensions for indirect runtimes.
messages
Primitives that may be used by different message delivery and dispatch mechanisms.

Macros§

decl_bridge_finality_runtime_apis
Convenience macro that declares bridge finality runtime apis and related constants for a chain. This includes:
decl_bridge_messages_runtime_apis
Convenience macro that declares bridge messages runtime apis and related constants for a chain. This includes:
decl_bridge_runtime_apis
Convenience macro that declares bridge finality runtime apis, bridge messages runtime apis and related constants for a chain. The name of the chain has to be specified in snake case (e.g. bridge_hub_polkadot).
generate_static_str_provider
A macro that generates StaticStrProvider with the string set to its stringified argument.

Structs§

BoundedStorageValue
A bounded runtime storage value.
HeaderId
Generic header Id.
ParachainIdOf
Adapter for Get<u32> to access PARACHAIN_ID from trait Parachain
PreComputedSize
Pre-computed size.
StorageProofChecker
This struct is used to read storage values from a subset of a Merklized database. The “proof” is a subset of the nodes in the Merkle structure of the database, so that it provides authentication against a known Merkle root as well as the values in the database themselves.

Enums§

BasicOperatingMode
Basic operating modes for a bridges module (Normal/Halted).
EncodedOrDecodedCall
Chain call, that is either SCALE-encoded, or decoded.
OwnedBridgeModuleError
Error generated by the OwnedBridgeModule trait.
StorageProofError
Errors that can occur when interacting with UnverifiedStorageProof and VerifiedStorageProof.
TransactionEra
Era of specific transaction.

Constants§

NO_INSTANCE_ID
Use this when something must be shared among all instances.

Traits§

Chain
Minimal Substrate-based chain representation that may be used from no_std environment.
HeaderIdProvider
Generic header id provider.
OperatingMode
Operating mode for a bridge module.
OwnedBridgeModule
Bridge module that has owner and operating mode
Parachain
Minimal parachain representation that may be used from no_std environment.
RangeInclusiveExt
A trait defining helper methods for RangeInclusive (start..=end)
Size
Anything that has size.
StaticStrProvider
Trait that provides a static str.
StorageDoubleMapKeyProvider
Can be used to access the runtime storage key of a StorageDoubleMap.
StorageMapKeyProvider
Can be use to access the runtime storage key of a StorageMap.
UnderlyingChainProvider
A trait that provides the type of the underlying chain.
WeightExtraOps
All extra operations with weights that we need in bridges.

Functions§

craft_valid_storage_proof
Return valid storage proof and state root.
raw_storage_proof_size
Calculates size for RawStorageProof.
storage_map_final_key
This is a copy of the frame_support::storage::generator::StorageMap::storage_map_final_key for maps based on selected hasher.
storage_value_final_key
Returns the storage prefix for a specific pallet name and storage name.
storage_value_key
This is how a storage key of storage value is computed.

Type Aliases§

AccountIdOf
Account id type used by the chain.
AccountPublicOf
Account public type used by the chain.
BalanceOf
Balance type used by the chain.
BlockNumberOf
Block number used by the chain.
ChainId
Unique identifier of the chain.
HashOf
Hash type used by the chain.
HasherOf
Hasher type used by the chain.
HeaderIdOf
Header id used by the chain.
HeaderOf
Header type used by the chain.
NonceOf
Transaction nonce type used by the chain.
RawStorageProof
Raw storage proof type (just raw trie nodes).
SignatureOf
Signature type used by the chain.
TransactionEraOf
Transaction era used by the chain.
UnderlyingChainOf
Underlying chain type.