decoder

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blake2Hash

func Blake2Hash(data []byte, bitLen int) []byte

func DecodeExtrinsicEra

func DecodeExtrinsicEra(era string, current uint64) (uint64, uint64, uint64)

func DoHash

func DoHash(data []byte, hasher string) []byte

func TwoxHash

func TwoxHash(data []byte, bitLen int) []byte

Types

type Decoder

type Decoder struct {
	ChainSpecName string
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(l *logrus.Logger, metadata string) (*Decoder, error)

func (*Decoder) DecodeEvents

func (d *Decoder) DecodeEvents(ctx context.Context, payload string) []dto.Event

func (*Decoder) DecodeExtrinsic

func (d *Decoder) DecodeExtrinsic(ctx context.Context, payload string) dto.Mapped

func (*Decoder) GetExtrinsicFromParams

func (d *Decoder) GetExtrinsicFromParams(ctx context.Context, params interface{}) (*dto.Extrinsic, error)

func (*Decoder) NewStorageRequest

func (d *Decoder) NewStorageRequest(module, method string, args ...interface{}) (*StorageRequest, error)

Works only with Metadata V14

type Params

type Params interface{}

type StorageRequest

type StorageRequest struct {
	Module     string
	Method     string
	StorageKey string
	StoredType string
}

func (*StorageRequest) DecodeResponse

func (r *StorageRequest) DecodeResponse(payload string) dto.Params

Jump to

Keyboard shortcuts

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