substrate_metadata library

Classes

$CustomMetadataV15
$CustomMetadataV15Value
$EnumDeprecationInfo
Codec for EnumDeprecationInfo
$ExtrinsicMetadataV14
$ExtrinsicMetadataV15
Codec for ExtrinsicMetadataV15
$ExtrinsicMetadataV16
Codec for ExtrinsicMetadataV16
$Field
Codec for Field
$ItemDeprecationInfo
Codec for ItemDeprecationInfo
$OuterEnumsV15
Codec for OuterEnumsV15
$PalletAssociatedTypeMetadata
Codec for PalletAssociatedTypeMetadata
$PalletCallMetadata
Codec for PalletCallMetadata
$PalletCallMetadataV16
Codec for PalletCallMetadataV16
$PalletConstantMetadata
Codec for PalletConstantMetadata
$PalletConstantMetadataV16
Codec for PalletConstantMetadataV16
$PalletErrorMetadata
Codec for PalletErrorMetadata
$PalletErrorMetadataV16
Codec for PalletErrorMetadataV16
$PalletEventMetadata
Codec for PalletEventMetadata
$PalletEventMetadataV16
Codec for PalletEventMetadataV16
$PalletMetadata
Codec for PalletMetadataV15
$PalletMetadataV14
Codec for PalletMetadataV14
$PalletMetadataV15
Codec for PalletMetadataV15
$PalletMetadataV16
Codec for PalletMetadataV16
$PalletStorageMetadata
Codec for PalletStorageMetadata
$PalletStorageMetadataV16
Codec for PalletStorageMetadataV16
$PalletViewFunctionMetadata
Codec for PalletViewFunctionMetadata
$PortableType
Codec for PortableType
$PortableTypeDef
Codec for TypeDef
$Primitive
$RuntimeApiMetadataV15
Codec for RuntimeApiMetadataV15
$RuntimeApiMetadataV16
Codec for RuntimeApiMetadataV16
$RuntimeApiMethodMetadataV15
Codec for RuntimeApiMethodMetadataV15
$RuntimeApiMethodMetadataV16
Codec for RuntimeApiMethodMetadataV16
$RuntimeApiMethodParamMetadataV15
Codec for RuntimeApiMethodParamMetadataV15
$RuntimeMetadataPrefixed
Codec for RuntimeMetadataPrefixed
$RuntimeMetadataV14
Codec for RuntimeMetadataV14
$RuntimeMetadataV15
Codec for RuntimeMetadataV15
$RuntimeMetadataV16
Codec for RuntimeMetadataV16
$SignedExtensionMetadataCodec
$StorageEntryMetadata
Codec for StorageEntryMetadata
$StorageEntryMetadataV16
Codec for StorageEntryMetadataV16
$StorageEntryModifier
$StorageEntryType
Codec for StorageEntryType
$StorageHasherEnum
$TransactionExtensionMetadata
Codec for TransactionExtensionMetadata
$TypeDef
Codec for TypeDef
$TypeDefArray
$TypeDefBitSequence
$TypeDefCompact
$TypeDefComposite
$TypeDefPrimitive
A primitive Rust type.
$TypeDefSequence
$TypeDefTuple
$TypeDefVariant
$TypeParameter
Codec for TypeParameter
$VariantDef
Codec for VariantDef
$VariantDeprecationInfo
Codec for VariantDeprecationInfo
$ViewFunctionParamMetadata
Codec for ViewFunctionParamMetadata
Blake2bHasher
Blake2b hash
Blake3Hasher
Blake3 hash
BlockHashBase
BlockHashSink
CacheStats
Cache statistics for monitoring
ChainInfo
Convenient facade for accessing metadata, registry, and derived codecs
ConstantInfo
ConstantsCodec
Codec for encoding and decoding Substrate runtime constants
CustomMetadataV15
CustomMetadataV15Value
EnumDeprecationInfo
Deprecation information for enum types (calls, events, errors).
Era
EventInfo
Metadata about an event
EventRecord
Represents a complete event record from storage
EventsRecordCodec
Codec for encoding and decoding Substrate event records
ExtensionInfo
Internal helper class to unify SignedExtensionMetadata and TransactionExtensionMetadata
ExtraInfo
ExtrinsicInfo
ExtrinsicMetadata
Metadata of the extrinsic used by the runtime.
ExtrinsicMetadataV14
Metadata of the extrinsic used by the runtime (Version 14)
ExtrinsicMetadataV15
Metadata of the extrinsic used by the runtime (Version 15)
ExtrinsicMetadataV16
Metadata of the extrinsic used by the runtime (Version 16)
ExtrinsicsCodec
ExtrinsicSignature
Signature information for a signed extrinsic
ExtrinsicSignatureCodec
Codec for extrinsic signature information
Field
A field of a struct-like data type.
FieldInfo
Metadata about a field
HashBase
The base class used by the hash algorithm implementations. It implements the StreamTransformer and exposes few convenient methods to handle any types of data source.
HashDigest
HashDigestSink
This sink allows adding arbitrary length byte arrays and produces a HashDigest on close.
Hasher
ItemDeprecated
Item is deprecated with a note and optional since version.
ItemDeprecatedWithoutNote
Item is deprecated but without any note.
ItemDeprecationInfo
Deprecation information for metadata items (pallets, storage, constants, APIs).
ItemNotDeprecated
Item is not deprecated.
LazyConstantsCodec
Lazy loading constants codec with advanced control
LookupEntry
LookupField
LookupTypeDef
LookupTypeDefArray
LookupTypeDefBitSequence
LookupTypeDefCompact
LookupTypeDefComposite
LookupTypeDefEnumeration
LookupTypeDefPrimitive
LookupTypeDefSequence
LookupTypeDefTuple
LookupTypeDefVariant
LookupValue
LookupValueParams
MetadataDigest
MetadataMerkleizer
MetadataTypeRegistry
Type registry that works directly with Substrate metadata
OuterEnums
Outer enum type references (common interface for V14 and V15)
OuterEnumsV15
Outer enum type references (V15)
PalletAssociatedTypeMetadata
Metadata about a pallet's associated type (V16)
PalletCallMetadata
Metadata about callable functions in a pallet
PalletCallMetadataV16
Metadata about callable functions in a pallet (V16)
PalletConstantMetadata
Metadata about a pallet constant
PalletConstantMetadataV16
Pallet constant metadata for V16, including deprecation information.
PalletErrorMetadata
Metadata about errors in a pallet
PalletErrorMetadataV16
Metadata about errors in a pallet (V16)
PalletEventMetadata
Metadata about events in a pallet
PalletEventMetadataV16
Metadata about events in a pallet (V16)
PalletMetadata
PalletMetadataV14
Metadata about a single pallet (module)
PalletMetadataV15
Metadata about a single pallet (module) in MetadataV15
PalletMetadataV16
Metadata about a single pallet (module) in MetadataV16
PalletStorageMetadata
Storage metadata for a pallet
PalletStorageMetadataV16
Pallet storage metadata for V16
PalletViewFunctionMetadata
Metadata about a pallet's view function (V16)
Phase
Phase of block execution when event was emitted
PhaseCodec
Codec for encoding and decoding Phase information
PortableRegistry
Portable registry wrapper for cleaner API
PortableType
A type definition in the portable registry
PortableTypeDef
Definition of a type's structure
RuntimeApiMetadataV15
Metadata about a runtime API (V15)
RuntimeApiMetadataV16
Metadata about a runtime API (V16)
RuntimeApiMethodMetadataV15
Metadata about a runtime API method (V15)
RuntimeApiMethodMetadataV16
Metadata about a runtime API method (V16)
RuntimeApiMethodParamMetadataV15
Metadata about a runtime API method parameter (V15)
RuntimeCall
Represents a runtime call within an extrinsic
RuntimeCallCodec
Codec for RuntimeCall
RuntimeEvent
Represents a runtime event
RuntimeEventCodec
Codec for encoding and decoding RuntimeEvent
RuntimeMetadata
Versioned metadata enum
RuntimeMetadataPrefixed
Wrapper for prefixed runtime metadata
RuntimeMetadataV14
Main metadata container for a Substrate runtime (Version 14)
RuntimeMetadataV15
Main metadata container for a Substrate runtime (Version 15)
RuntimeMetadataV16
Main metadata container for a Substrate runtime (Version 16)
SignedExtensionMetadata
Metadata of an extrinsic signed extension.
SignedExtensionsCodec
StorageDoubleMap<K1, K2, V>
StorageEntryMetadata
Metadata about a single storage entry in Metadata
StorageEntryMetadataV16
Storage entry metadata for V16, including deprecation information.
StorageEntryType
Type of storage entry
StorageEntryTypeMap
Map storage (key to value mapping)
StorageEntryTypePlain
Plain storage value (single value, no key)
StorageHasher<K>
StorageMap<K, V>
StorageNMap<V>
StorageQuadrupleMap<K1, K2, K3, K4, V>
StorageQuintupleMap<K1, K2, K3, K4, K5, V>
StorageSextupleMap<K1, K2, K3, K4, K5, K6, V>
StorageTripleMap<K1, K2, K3, V>
StorageValue<V>
TopicsCodec
Codec for encoding and decoding event topics
TransactionExtensionMetadata
Metadata about a transaction extension (V16)
TwoxxHasher
XX hash
TypeDef
Variants of type definitions
TypeDefArray
Array type (fixed-size)
TypeDefBitSequence
BitSequence type
TypeDefCompact
Compact encoded type
TypeDefComposite
Composite type (struct-like)
TypeDefPrimitive
A primitive Rust type.
TypeDefSequence
Sequence type (vector/array-like with dynamic length)
TypeDefTuple
Tuple type
TypeDefVariant
Variant type (enum-like)
TypeParameter
Type parameter for generic types
TypeRef
UncheckedExtrinsic
Represents an unchecked extrinsic (transaction) in the runtime
UncheckedExtrinsicCodec
Codec for a single UncheckedExtrinsic
VariantDef
Variant in an enum type
VariantDeprecated
Variant is deprecated with a note and optional since version.
VariantDeprecatedWithoutNote
Variant is deprecated but without any note.
VariantDeprecationInfo
Deprecation information for individual enum variants (calls, events, errors).
ViewFunctionParamMetadata
Parameter metadata for view functions (V16)
XXHash64
XXHash64 is a fast and efficient non-cryptographic hash function for 64-bit platforms. It is designed for producing a quick and reliable hash value for a given data, which can be used for many applications, such as checksum, data validation, etc. In addition, it has a good distribution of hash values, which helps to reduce collisions.
XXHash64Sink
This implementation is derived from https://github.com/easyaspi314/xxhash-clean/blob/master/xxhash64-ref.c

Enums

ExtrinsicType
Extrinsic preamble type
PhaseType
Primitive
StorageEntryModifier
Modifier indicating whether a storage entry is optional
StorageHasherEnum
Storage hashers for map keys

Extensions

ListExtension on Uint8List
ListIntExtension on List<int>
PrimitiveExtension on Primitive
RuntimeMetadataExtensions on RuntimeMetadata
Extension methods to provide a common interface for RuntimeMetadata variants
ToJson on T
Returns normalized Json to Human readable format
XXHash64StringExtension on String
Extension to String to generate xxh64 code.

Constants

metaReserved → const int
Magic number prefix for metadata: 'meta' in ASCII (0x6174656d)
xxh64 → const XXHash64
An instance of XXHash64 with seed = 0

Functions

asHexString(List<int> bytes) → String
blake3(List<int> input, [dynamic outputLength = 32]) → List<int>
blake3Hex(List<int> input, [dynamic outputLength = 32]) → String
xxh64code(String input, [Encoding? encoding]) → int
Gets the 64-bit xxHash value of a String.
xxh64sum(String input, [Encoding? encoding]) → String
Gets the 64-bit xxHash hash of a String in hexadecimal.

Typedefs

CustomMetadataV16 = CustomMetadataV15
V16 uses the same CustomMetadata structure as V15
Lookup = List<LookupEntry>
OuterEnumsV16 = OuterEnumsV15
V16 uses the same OuterEnums structure as V15

Exceptions / Errors

MetadataException
Exception thrown by registry operations