types

package
v0.0.2-rc-2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExtrinsicFormatVersion is the current version of the [`UncheckedExtrinsic`] encoded format.
	//
	// This version needs to be bumped if the encoded representation changes.
	// It ensures that if the representation is changed and the format is not known,
	// the decoding fails.
	ExtrinsicFormatVersion = 4
	ExtrinsicBitSigned     = 0b1000_0000
	ExtrinsicUnmaskVersion = 0b0111_1111
)

Variables

This section is empty.

Functions

func NewBlock

func NewBlock(header types.Header, extrinsics sc.Sequence[types.UncheckedExtrinsic]) primitives.Block

func NewUncheckedExtrinsic

func NewUncheckedExtrinsic(version sc.U8, signature sc.Option[primitives.ExtrinsicSignature], function primitives.Call, extra primitives.SignedExtra, logger log.WarnLogger) primitives.UncheckedExtrinsic

NewUncheckedExtrinsic returns a new instance of an unchecked extrinsic.

func NewUnsignedUncheckedExtrinsic

func NewUnsignedUncheckedExtrinsic(function primitives.Call) primitives.UncheckedExtrinsic

NewUnsignedUncheckedExtrinsic returns a new instance of an unsigned extrinsic.

Types

type PayloadInitializer

type PayloadInitializer = func(call primitives.Call, extra primitives.SignedExtra) (
	primitives.SignedPayload, error,
)

type RuntimeApi

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

func NewRuntimeApi

func NewRuntimeApi(apis []primitives.ApiModule, logger log.Logger) RuntimeApi

func (RuntimeApi) Items

func (ra RuntimeApi) Items() sc.Sequence[primitives.ApiItem]

func (RuntimeApi) Module

func (ra RuntimeApi) Module(name string) primitives.ApiModule

type RuntimeDecoder

type RuntimeDecoder interface {
	DecodeBlock(buffer *bytes.Buffer) (primitives.Block, error)
	DecodeUncheckedExtrinsic(buffer *bytes.Buffer) (primitives.UncheckedExtrinsic, error)
	DecodeCall(buffer *bytes.Buffer) (primitives.Call, error)
}

func NewRuntimeDecoder

func NewRuntimeDecoder(modules []types.Module, extra primitives.SignedExtra, sudoIndex sc.U8, logger log.WarnLogger) RuntimeDecoder

type SudoDecoder

type SudoDecoder interface {
	DecodeSudoArgs(buffer *bytes.Buffer, decodeCallFunc func(buffer *bytes.Buffer) (primitives.Call, error)) (primitives.Call, error)
}

Jump to

Keyboard shortcuts

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