Documentation ¶
Index ¶
Constants ¶
const (
ApiModuleName = "Metadata"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module implements the Metadata Runtime API definition.
For more information about API definition, see: https://spec.polkadot.network/chap-runtime-api#sect-runtime-metadata-module
func New ¶
func New(runtimeExtrinsic extrinsic.RuntimeExtrinsic, runtimeApiModules []primitives.RuntimeApiModule, logger log.RuntimeLogger, generator *primitives.MetadataTypeGenerator) Module
func (Module) Item ¶
func (m Module) Item() primitives.ApiItem
Item returns the first 8 bytes of the Blake2b hash of the name and version of the api module.
func (Module) Metadata ¶
Metadata returns the metadata of the runtime. Currently supported versions are V14 and V15. Returns a pointer-size of the SCALE-encoded metadata of the runtime.
For more information about function definition, see: https://spec.polkadot.network/chap-runtime-api#sect-rte-metadata-metadata
func (Module) MetadataAtVersion ¶
MetadataAtVersion returns the metadata of a specific version of the runtime passed as argument. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded 32-bit integer version. Currently supported versions are V14 and V15. Returns a pointer-size of the SCALE-encoded metadata of the runtime.
For more information about function definition, see: https://spec.polkadot.network/chap-runtime-api#sect-rte-metadata-metadata-at-version
func (Module) MetadataVersions ¶
MetadataVersions returns the supported metadata versions. Returns a pointer-size of the SCALE-encoded set of versions.
For more information about function definition, see: https://spec.polkadot.network/chap-runtime-api#sect-rte-metadata-metadata-versions