session_keys

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 = "SessionKeys"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module implements the SessionKeys Runtime API definition.

For more information about API definition, see: https://spec.polkadot.network/chap-runtime-api#sect-runtime-sessionkeys-module

func New

func New(sessions []types.Session, logger log.RuntimeLogger) Module

func (Module) DecodeSessionKeys

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

DecodeSessionKeys decodes the given session keys. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded keys. Returns a pointer-size of the SCALE-encoded set of raw keys and their respective key type.

For more information about function definition, see: https://spec.polkadot.network/chap-runtime-api#id-sessionkeys_decode_session_keys

func (Module) GenerateSessionKeys

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

GenerateSessionKeys generates a set of session keys with an optional seed. The keys should be stored within the keystore exposed by the Host Api. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded optional seed. Returns a pointer-size of the SCALE-encoded set of keys.

For more information about function definition, see: https://spec.polkadot.network/chap-runtime-api#id-sessionkeys_generate_session_keys

func (Module) Item

func (m Module) Item() types.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() types.RuntimeApiMetadata

Metadata returns the runtime api metadata of the module.

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