Expand description
Runtime Modules shared primitive types.
Re-exports§
pub use generic::DigestItem;
pub use generic::Digest;
pub use random_number_generator::RandomNumberGenerator;
Modules§
- biguint
- Re-export big_uint stuff. Infinite precision unsigned integer for tetcore runtime.
- curve
- Provides some utilities to define a piecewise linear function.
- generic
- Generic implementations of Extrinsic/Header/Block.
- helpers_
128bit - Re-export 128 bit helpers. Some helper functions to work with 128bit numbers. Note that the functionality provided here is only sensible to use with 128bit numbers because for smaller sizes, you can always rely on assumptions of a bigger type (u128) being available, or simply create a per-thing and use the multiplication implementation provided there.
- key_
types - Re-export this since it’s part of the API of this crate. Known key types; this also functions as a global registry of key types for projects wishing to avoid collisions with each other.
- offchain
- A collection of higher lever helpers for offchain calls.
- random_
number_ generator - A simple pseudo random number generator that allows a stream of random numbers to be efficiently created from a single initial seed hash.
- testing
- Testing utilities.
- traits
- Primitives for the runtime modules.
- transaction_
validity - Transaction validity interface.
Macros§
- assert_
eq_ error_ rate - Checks that
$x
is equal to$y
with an error rate of$error
. - count
- Calls a given macro a number of times with a set of fixed params and an incrementing numeral. e.g.
- create_
runtime_ str - Create a const
RuntimeString
. - format_
runtime_ string - Convenience macro to use the format! interface to get a
RuntimeString::Owned
- impl_
opaque_ keys - Implement
OpaqueKeys
for a described struct.
Structs§
- Account
Id32 - Re-export this since it’s part of the API of this crate. An opaque 32-byte cryptographic identifier.
- AnySignature
- Signature verify that can work with any known signature types..
- Crypto
Type Id - Re-export this since it’s part of the API of this crate. An identifier for a specific cryptographic algorithm used by a key pair
- Dispatch
Error With Post Info - Result of a
Dispatchable
which contains theDispatchResult
and additional information about theDispatchable
that is only known post dispatch. - Fixed
I64 - Re-export top-level arithmetic stuff. A fixed point number representation in the range.
- Fixed
I128 - Re-export top-level arithmetic stuff. A fixed point number representation in the range.
- Fixed
U128 - Re-export top-level arithmetic stuff. A fixed point number representation in the range.
- KeyType
Id - Re-export this since it’s part of the API of this crate. An identifier for a type of cryptographic key.
- Module
Id - A module identifier. These are per module and should be stored in a registry somewhere.
- Opaque
Extrinsic - Simple blob to hold an extrinsic without committing to its format and ensure it is serialized correctly.
- PerU16
- Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1].
- Perbill
- Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1].
- Percent
- Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1].
- Permill
- Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1].
- Perquintill
- Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1].
- Rational128
- Re-export top-level arithmetic stuff. A wrapper for any rational number with a 128 bit numerator and denominator.
- Signature
Batching - Batching session.
- Storage
- Struct containing data needed for a storage.
- Storage
Child - Child trie storage data.
Enums§
- Dispatch
Error - Reason why a dispatch call failed.
- Either
- The enum
Either
with variantsLeft
andRight
is a general purpose sum type with two cases. - Multi
Address - A multi-format address wrapper for on-chain accounts.
- Multi
Signature - Signature verify that can work with any known signature types..
- Multi
Signer - Public key for any known crypto algorithm.
- Runtime
String - A string that wraps a
&'static str
in the runtime andString
/Vec<u8>
on decode. - Transaction
Outcome - Describes on what should happen with a storage transaction.
Traits§
- Bound
ToRuntime AppPublic - Something that bound to a fixed
RuntimeAppPublic
. - Build
Module Genesis Storage - Something that can build the genesis storage of a module.
- Build
Storage - Complex storage builder stuff.
- Crypto
Type - Re-export this since it’s part of the API of this crate. Type which has a particular kind of crypto associated with it.
- Deserialize
- A data structure that can be deserialized from any data format supported by Serde.
- Deserialize
Owned - A data structure that can be deserialized without borrowing any data from the deserializer.
- Fixed
Point Number - Re-export top-level arithmetic stuff. Something that implements a decimal fixed point number.
- Fixed
Point Operand - Re-export top-level arithmetic stuff.
Integer types that can be used to interact with
FixedPointNumber
implementations. - PerThing
- Re-export top-level arithmetic stuff.
Something that implements a fixed point ration with an arbitrary granularity
X
, as parts perX
. - Runtime
AppPublic - A runtime interface for an application’s public key.
- Saturated
Conversion - Re-export top-level arithmetic stuff.
Convenience type to work around the highly unergonomic syntax needed
to invoke the functions of overloaded generic traits, in this case
SaturatedFrom
andSaturatedInto
. - Serialize
- A data structure that can be serialized into any data format supported by Serde.
- TypeId
- Re-export this since it’s part of the API of this crate. Provide a simple 4 byte identifier for a type.
Functions§
- Print something that implements
Printable
from the runtime. - verify_
encoded_ lazy - Verify a signature on an encoded value in a lazy manner. This can be an optimization if the signature scheme has an “unsigned” escape hash.
Type Aliases§
- Apply
Extrinsic Result - The result of applying of an extrinsic.
- Apply
Extrinsic Result With Info - Same as
ApplyExtrinsicResult
but augmented withPostDispatchInfo
on success. - Consensus
Engine Id - Consensus engine unique ID.
- Dispatch
Outcome - This type specifies the outcome of dispatching a call to a module.
- Dispatch
Result - This is the legacy return type of
Dispatchable
. It is still exposed for compatibility reasons. The new return type isDispatchResultWithInfo
. FABRIC runtimes should usefabric_support::dispatch::DispatchResult
. - Dispatch
Result With Info - Return type of a
Dispatchable
which contains theDispatchResult
and additional information about theDispatchable
that is only known post dispatch. - InnerOf
- Re-export top-level arithmetic stuff.
Get the inner type of a
PerThing
. - Justification
- An abstraction over justification for a block’s validity under a consensus algorithm.
- UpperOf
- Re-export top-level arithmetic stuff.
Get the upper type of a
PerThing
.
Derive Macros§
- Deserialize
- Runtime
Debug - Re-export
RuntimeDebug
, to avoid dependency clutter. - Serialize