message

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package message implements the supported runtime messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IncomingMessage

type IncomingMessage struct {
	// ID is the unique identifier of the message.
	ID uint64 `json:"id"`

	// Caller is the address of the caller authenticated by the consensus layer.
	Caller staking.Address `json:"caller"`

	// Tag is an optional tag provided by the caller which is ignored and can be used to match
	// processed incoming message events later.
	Tag uint64 `json:"tag,omitempty"`

	// Fee is the fee sent into the runtime as part of the message being sent. The fee is
	// transferred before the message is processed by the runtime.
	Fee quantity.Quantity `json:"fee,omitempty"`

	// Tokens are any tokens sent into the runtime as part of the message being sent. The tokens are
	// transferred before the message is processed by the runtime.
	Tokens quantity.Quantity `json:"tokens,omitempty"`

	// Data is a runtime transaction.
	Data []byte `json:"data,omitempty"`
}

IncomingMessage is an incoming message.

type IncomingMessageQueueMeta

type IncomingMessageQueueMeta struct {
	// Size contains the current size of the queue.
	Size uint32 `json:"size,omitempty"`

	// NextSequenceNumber contains the sequence number that should be used for the next queued
	// message.
	NextSequenceNumber uint64 `json:"next_sequence_number,omitempty"`
}

IncomingMessageQueueMeta is the incoming message queue metadata.

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.

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.

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.

Jump to

Keyboard shortcuts

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