message

package
v0.2103.13 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package message implements the supported runtime messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MessagesHash

func MessagesHash(msgs []Message) (h hash.Hash)

MessagesHash returns a hash of provided runtime messages.

Types

type Message

type Message struct {
	Staking  *StakingMessage  `json:"staking,omitempty"`
	Registry *RegistryMessage `json:"registry,omitempty"`
}

Message is a message that can be sent by a runtime.

func (*Message) ValidateBasic

func (m *Message) ValidateBasic() error

ValidateBasic performs basic validation of the runtime message.

type RegistryMessage

type RegistryMessage struct {
	cbor.Versioned

	UpdateRuntime *registry.Runtime `json:"update_runtime,omitempty"`
}

RegistryMessage is a runtime message that allows a runtime to perform staking operations.

func (*RegistryMessage) ValidateBasic

func (rm *RegistryMessage) ValidateBasic() error

ValidateBasic performs basic validation of the runtime message.

type StakingMessage

type StakingMessage struct {
	cbor.Versioned

	Transfer      *staking.Transfer      `json:"transfer,omitempty"`
	Withdraw      *staking.Withdraw      `json:"withdraw,omitempty"`
	AddEscrow     *staking.Escrow        `json:"add_escrow,omitempty"`
	ReclaimEscrow *staking.ReclaimEscrow `json:"reclaim_escrow,omitempty"`
}

StakingMessage is a runtime message that allows a runtime to perform staking operations.

func (*StakingMessage) ValidateBasic

func (sm *StakingMessage) ValidateBasic() error

ValidateBasic performs basic validation of the runtime message.

Jump to

Keyboard shortcuts

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