metadata

package
v0.0.3-rc-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
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

func (m Module) Metadata() int64

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

func (m Module) MetadataAtVersion(dataPtr int32, dataLen int32) int64

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

func (m Module) MetadataVersions() int64

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

func (Module) Name

func (m Module) Name() string

Name returns the name of the api module.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL