stafi_decoder

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseType = `` /* 96354-byte string literal not displayed */

Code generated by type.sh. DO NOT EDIT. source: ../source/assets/definitions.json ../source/babe/definitions.json ../source/base/definitions.json ../source/beefy/definitions.json ../source/bridges/definitions.json ../source/contracts/definitions.json ../source/cumulus/definitions.json ../source/eth/definitions.json ../source/eth/v0.json ../source/eth/v1.json ../source/eth/v2.json ../source/gilt/definitions.json ../source/grandpa/definitions.json ../source/lottery/definitions.json ../source/metadata/definitions.json ../source/offender/definitions.json ../source/parachains/crowdloan.json ../source/parachains/definitions.json ../source/parachains/disputeTypes.json ../source/parachains/hrmp.json ../source/parachains/slot.json ../source/payment/definitions.json ../source/runtime/definitions.json ../source/scaleinfo/definitions.json ../source/session/definitions.json ../source/staking/definitions.json ../source/state/definitions.json ../source/system/definitions.json ../source/treasury/definitions.json ../source/uniques/definitions.json ../source/xcm/v0.json ../source/xcm/v1.json ../source/xcm/v2.json ../source/xcm/xcm.json

View Source
var DefaultStafiCustumTypes = `` /* 6673-byte string literal not displayed */
View Source
var RuntimeCodecType []string
View Source
var TypeRegistry map[string]interface{}

Functions

func ConvertType

func ConvertType(name string, option ...interface{}) string

func LoadTypeRegistry

func LoadTypeRegistry(source []byte) map[string]TypeStruct

func RegCustomTypes

func RegCustomTypes(registry map[string]TypeStruct)

Types

type AccountId

type AccountId struct {
	ScaleDecoder
}

func (*AccountId) Process

func (s *AccountId) Process()

type AccountIndex

type AccountIndex struct{ U32 }

type Address

type Address struct {
	ScaleDecoder
	AccountLength string `json:"account_length"`
}

func (*Address) Process

func (a *Address) Process()

only support latest address type

type AuthoritiesChange

type AuthoritiesChange struct{ Vec }

func (*AuthoritiesChange) Init

func (l *AuthoritiesChange) Init(data ScaleBytes, option *ScaleDecoderOption)

type AuthorityId

type AuthorityId struct{ H256 }

type BTreeMap

type BTreeMap struct{ ScaleDecoder }

func (*BTreeMap) Process

func (b *BTreeMap) Process()

type BabeBlockWeight

type BabeBlockWeight struct{ U32 }

type Balance

type Balance struct {
	ScaleDecoder
	Reader io.Reader
}

func (*Balance) Process

func (b *Balance) Process()

type BitVec

type BitVec struct {
	Compact
}

func (*BitVec) Process

func (b *BitVec) Process()

type BlockNumber

type BlockNumber struct {
	U32
}

type Bool

type Bool struct {
	ScaleDecoder
}

func (*Bool) Process

func (b *Bool) Process()

type BoxProposal

type BoxProposal struct {
	ScaleDecoder
}

func (*BoxProposal) Process

func (s *BoxProposal) Process()

type Bytes

type Bytes struct {
	ScaleDecoder
}

func (*Bytes) Init

func (b *Bytes) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*Bytes) Process

func (b *Bytes) Process()

type Call

type Call struct {
	ScaleDecoder
}

func (*Call) Process

func (s *Call) Process()

type CallIndex

type CallIndex struct {
	Module MetadataModules `json:"module"`
	Call   MetadataCalls   `json:"call"`
}

type ChangesTrieRoot

type ChangesTrieRoot struct{ HexBytes }

type Compact

type Compact struct {
	ScaleDecoder
	CompactLength int    `json:"compact_length"`
	CompactBytes  []byte `json:"compact_bytes"`
}

func (*Compact) Process

func (c *Compact) Process()

func (*Compact) ProcessCompactBytes

func (c *Compact) ProcessCompactBytes() []byte

type CompactU32

type CompactU32 struct {
	Compact
	Reader io.Reader
}

func (*CompactU32) Encode

func (c *CompactU32) Encode(value int) ScaleBytes

func (*CompactU32) Init

func (c *CompactU32) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*CompactU32) Process

func (c *CompactU32) Process()

type Consensus

type Consensus struct{ Struct }

func (*Consensus) Init

func (s *Consensus) Init(data ScaleBytes, option *ScaleDecoderOption)

type Data

type Data struct {
	Enum
}

func (*Data) Init

func (d *Data) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*Data) Process

func (d *Data) Process()

type EcdsaSignature

type EcdsaSignature struct {
	ScaleDecoder
}

func (*EcdsaSignature) Process

func (e *EcdsaSignature) Process()

type Enum

type Enum struct {
	ScaleDecoder
	ValueList []string `json:"value_list"`
	Index     int      `json:"index"`
}

func (*Enum) Init

func (e *Enum) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*Enum) Process

func (e *Enum) Process()

type Era

type Era struct {
	ScaleDecoder
}

func (*Era) Process

func (e *Era) Process()

type EraExtrinsic

type EraExtrinsic struct {
	ScaleDecoder
}

func (*EraExtrinsic) Process

func (e *EraExtrinsic) Process()

type EraIndex

type EraIndex struct{ U32 }

type EthereumAddress

type EthereumAddress struct {
	ScaleDecoder
}

func (*EthereumAddress) Process

func (e *EthereumAddress) Process()

type EventIndex

type EventIndex struct {
	Module MetadataModules `json:"module"`
	Call   MetadataEvents  `json:"call"`
}

type EventParam

type EventParam struct {
	Type  string      `json:"type"`
	Value interface{} `json:"value"`
}

type EventRecord

type EventRecord struct {
	ScaleDecoder
	Metadata     *MetadataStruct
	Phase        int             `json:"phase"`
	ExtrinsicIdx int             `json:"extrinsic_idx"`
	Type         string          `json:"type"`
	Params       []EventParam    `json:"params"`
	Event        MetadataEvents  `json:"event"`
	EventModule  MetadataModules `json:"event_module"`
	Topic        []string        `json:"topic"`
}

func (*EventRecord) Process

func (e *EventRecord) Process() map[string]interface{}

type EventsDecoder

type EventsDecoder struct {
	Vec
	Metadata *MetadataStruct
}

func (*EventsDecoder) Init

func (e *EventsDecoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*EventsDecoder) Process

func (e *EventsDecoder) Process()

type Exposure

type Exposure struct{ Struct }

func (*Exposure) Init

func (s *Exposure) Init(data ScaleBytes, option *ScaleDecoderOption)

type ExtrinsicDecoder

type ExtrinsicDecoder struct {
	ScaleDecoder
	ExtrinsicLength     int                          `json:"extrinsic_length"`
	ExtrinsicHash       string                       `json:"extrinsic_hash"`
	VersionInfo         string                       `json:"version_info"`
	ContainsTransaction bool                         `json:"contains_transaction"`
	Address             interface{}                  `json:"address"`
	Signature           string                       `json:"signature"`
	SignatureVersion    int                          `json:"signature_version"`
	Nonce               int                          `json:"nonce"`
	Era                 string                       `json:"era"`
	CallIndex           string                       `json:"call_index"`
	Tip                 interface{}                  `json:"tip"`
	CallModule          MetadataModules              `json:"call_module"`
	Call                MetadataCalls                `json:"call"`
	Params              []commonTypes.ExtrinsicParam `json:"params"`
	Metadata            *MetadataStruct
}

func (*ExtrinsicDecoder) Init

func (e *ExtrinsicDecoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*ExtrinsicDecoder) Process

func (e *ExtrinsicDecoder) Process()

type ExtrinsicMetadata

type ExtrinsicMetadata struct {
	SignedExtensions []string `json:"signedExtensions"`
}

type FixedLengthArray

type FixedLengthArray struct {
	ScaleDecoder
	FixedLength int
	SubType     string
}

func (*FixedLengthArray) Init

func (f *FixedLengthArray) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*FixedLengthArray) Process

func (f *FixedLengthArray) Process()

type GenericAddress

type GenericAddress struct {
	ScaleDecoder
	AccountLength string `json:"account_length"`
}

func (*GenericAddress) Process

func (a *GenericAddress) Process()

type GenericLookupSource

type GenericLookupSource struct {
	ScaleDecoder
}

func (*GenericLookupSource) Process

func (g *GenericLookupSource) Process()

type H160

type H160 struct{ ScaleDecoder }

func (*H160) Process

func (h *H160) Process()

type H256

type H256 struct {
	ScaleDecoder
}

func (*H256) Process

func (h *H256) Process()

type H512

type H512 struct {
	ScaleDecoder
}

func (*H512) Process

func (h *H512) Process()

type HexBytes

type HexBytes struct {
	ScaleDecoder
}

func (*HexBytes) Process

func (h *HexBytes) Process()

type IScaleDecoder

type IScaleDecoder interface {
	Init(data ScaleBytes, option *ScaleDecoderOption)
	Process()

	NextBytes(int) []byte
	GetNextU8() int
	// contains filtered or unexported methods
}

type Index

type Index struct{ U64 }

type IndividualExposure

type IndividualExposure struct{ Struct }

func (*IndividualExposure) Init

func (s *IndividualExposure) Init(data ScaleBytes, option *ScaleDecoderOption)

type IntFixed

type IntFixed struct {
	ScaleDecoder
	FixedLength int
	Reader      io.Reader
}

func (*IntFixed) Init

func (f *IntFixed) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*IntFixed) Process

func (f *IntFixed) Process()

type Key

type Key struct{ Bytes }

type LockIdentifier

type LockIdentifier struct {
	ScaleDecoder
}

func (*LockIdentifier) Process

func (l *LockIdentifier) Process()

type LogDigest

type LogDigest struct{ Enum }

func (*LogDigest) Init

func (l *LogDigest) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*LogDigest) Process

func (l *LogDigest) Process()

type MapType

type MapType struct {
	Hasher     string `json:"hasher"`
	Key        string `json:"key"`
	Key2       string `json:"key2,omitempty"`
	Key2Hasher string `json:"key2Hasher,omitempty"`
	Value      string `json:"value"`
	IsLinked   bool   `json:"isLinked"`
}

type MetadataCalls

type MetadataCalls struct {
	Lookup string                       `json:"lookup"`
	Name   string                       `json:"name"`
	Docs   []string                     `json:"docs"`
	Args   []MetadataModuleCallArgument `json:"args"`
}

type MetadataConstants

type MetadataConstants struct {
	Name           string   `json:"name"`
	Type           string   `json:"type"`
	ConstantsValue string   `json:"constants_value"`
	Docs           []string `json:"docs"`
}

type MetadataDecoder

type MetadataDecoder struct {
	ScaleDecoder
	Version       string         `json:"version"`
	VersionNumber int            `json:"version_number"`
	Metadata      MetadataStruct `json:"metadata"`
	CodecTypes    []string       `json:"codec_types"`
}

func (*MetadataDecoder) Init

func (m *MetadataDecoder) Init(data []byte)

func (*MetadataDecoder) Process

func (m *MetadataDecoder) Process() error

type MetadataEvents

type MetadataEvents struct {
	Lookup string   `json:"lookup"`
	Name   string   `json:"name"`
	Docs   []string `json:"docs"`
	Args   []string `json:"args"`
}

type MetadataModuleCall

type MetadataModuleCall struct {
	ScaleDecoder
	Name string                       `json:"name"`
	Args []MetadataModuleCallArgument `json:"args"`
	Docs []string                     `json:"docs"`
}

func (*MetadataModuleCall) Process

func (m *MetadataModuleCall) Process()

type MetadataModuleCallArgument

type MetadataModuleCallArgument struct {
	ScaleDecoder
	Name string `json:"name"`
	Type string `json:"type"`
}

func (*MetadataModuleCallArgument) Process

func (m *MetadataModuleCallArgument) Process()

type MetadataModuleError

type MetadataModuleError struct {
	ScaleDecoder `json:"-"`
	Name         string   `json:"name"`
	Doc          []string `json:"doc"`
}

func (*MetadataModuleError) Init

func (m *MetadataModuleError) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*MetadataModuleError) Process

func (m *MetadataModuleError) Process()

type MetadataModuleEvent

type MetadataModuleEvent struct {
	ScaleDecoder
	Name string   `json:"name"`
	Docs []string `json:"docs"`
	Args []string `json:"args"`
}

func (*MetadataModuleEvent) Process

func (m *MetadataModuleEvent) Process()

type MetadataModules

type MetadataModules struct {
	Name      string                `json:"name"`
	Prefix    string                `json:"prefix"`
	Storage   []MetadataStorage     `json:"storage"`
	Calls     []MetadataCalls       `json:"calls"`
	Events    []MetadataEvents      `json:"events"`
	Constants []MetadataConstants   `json:"constants,omitempty"`
	Errors    []MetadataModuleError `json:"errors"`
	Index     int                   `json:"index"`
}

type MetadataStorage

type MetadataStorage struct {
	Name     string      `json:"name"`
	Modifier string      `json:"modifier"`
	Type     StorageType `json:"type"`
	Fallback string      `json:"fallback"`
	Docs     []string    `json:"docs"`
	Hasher   string      `json:"hasher,omitempty"`
}

type MetadataStruct

type MetadataStruct struct {
	MetadataVersion int                   `json:"metadata_version"`
	Metadata        MetadataTag           `json:"metadata"`
	CallIndex       map[string]CallIndex  `json:"call_index"`
	EventIndex      map[string]EventIndex `json:"event_index"`
	Extrinsic       *ExtrinsicMetadata    `json:"extrinsic"`
}

type MetadataTag

type MetadataTag struct {
	Modules []MetadataModules `json:"modules"`
}

type MetadataV10Decoder

type MetadataV10Decoder struct {
	ScaleDecoder
}

func (*MetadataV10Decoder) Init

func (m *MetadataV10Decoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*MetadataV10Decoder) Process

func (m *MetadataV10Decoder) Process()

type MetadataV11Decoder

type MetadataV11Decoder struct {
	ScaleDecoder
}

func (*MetadataV11Decoder) Init

func (m *MetadataV11Decoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*MetadataV11Decoder) Process

func (m *MetadataV11Decoder) Process()

type MetadataV12Decoder

type MetadataV12Decoder struct {
	ScaleDecoder
}

func (*MetadataV12Decoder) Init

func (m *MetadataV12Decoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*MetadataV12Decoder) Process

func (m *MetadataV12Decoder) Process()

type MetadataV12Module

type MetadataV12Module struct {
	ScaleDecoder
	Name       string                   `json:"name"`
	Prefix     string                   `json:"prefix"`
	CallIndex  string                   `json:"call_index"`
	HasStorage bool                     `json:"has_storage"`
	Storage    []MetadataStorage        `json:"storage"`
	HasCalls   bool                     `json:"has_calls"`
	Calls      []MetadataModuleCall     `json:"calls"`
	HasEvents  bool                     `json:"has_events"`
	Events     []MetadataEvents         `json:"events"`
	Constants  []map[string]interface{} `json:"constants"`
	Errors     []MetadataModuleError    `json:"errors"`
	Index      int                      `json:"index"`
}

func (*MetadataV12Module) GetIdentifier

func (m *MetadataV12Module) GetIdentifier() string

func (*MetadataV12Module) Process

func (m *MetadataV12Module) Process()

type MetadataV6Decoder

type MetadataV6Decoder struct {
	ScaleDecoder
}

func (*MetadataV6Decoder) Init

func (m *MetadataV6Decoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*MetadataV6Decoder) Process

func (m *MetadataV6Decoder) Process()

type MetadataV6Module

type MetadataV6Module struct {
	ScaleDecoder
	Name       string                   `json:"name"`
	Prefix     string                   `json:"prefix"`
	CallIndex  string                   `json:"call_index"`
	HasStorage bool                     `json:"has_storage"`
	Storage    []MetadataStorage        `json:"storage"`
	HasCalls   bool                     `json:"has_calls"`
	Calls      []MetadataModuleCall     `json:"calls"`
	HasEvents  bool                     `json:"has_events"`
	Events     []MetadataEvents         `json:"events"`
	Constants  []map[string]interface{} `json:"constants"`
}

func (*MetadataV6Module) GetIdentifier

func (m *MetadataV6Module) GetIdentifier() string

func (*MetadataV6Module) Process

func (m *MetadataV6Module) Process()

type MetadataV6ModuleConstants

type MetadataV6ModuleConstants struct {
	ScaleDecoder
	Name           string   `json:"name"`
	Type           string   `json:"type"`
	ConstantsValue string   `json:"constants_value"`
	Docs           []string `json:"docs"`
}

func (*MetadataV6ModuleConstants) Process

func (m *MetadataV6ModuleConstants) Process()

type MetadataV6ModuleStorage

type MetadataV6ModuleStorage struct {
	ScaleDecoder
	Name     string                 `json:"name"`
	Modifier string                 `json:"modifier"`
	Type     map[string]interface{} `json:"type"`
	Fallback string                 `json:"fallback"`
	Docs     []string               `json:"docs"`
	Hasher   string                 `json:"hasher"`
}

func (*MetadataV6ModuleStorage) Init

func (m *MetadataV6ModuleStorage) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*MetadataV6ModuleStorage) Process

func (m *MetadataV6ModuleStorage) Process()

type MetadataV7Decoder

type MetadataV7Decoder struct {
	ScaleDecoder
}

func (*MetadataV7Decoder) Init

func (m *MetadataV7Decoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*MetadataV7Decoder) Process

func (m *MetadataV7Decoder) Process()

type MetadataV7Module

type MetadataV7Module struct {
	ScaleDecoder
	Name       string                   `json:"name"`
	Prefix     string                   `json:"prefix"`
	CallIndex  string                   `json:"call_index"`
	HasStorage bool                     `json:"has_storage"`
	Storage    []MetadataStorage        `json:"storage"`
	HasCalls   bool                     `json:"has_calls"`
	Calls      []MetadataModuleCall     `json:"calls"`
	HasEvents  bool                     `json:"has_events"`
	Events     []MetadataEvents         `json:"events"`
	Constants  []map[string]interface{} `json:"constants"`
}

func (*MetadataV7Module) Process

func (m *MetadataV7Module) Process()

type MetadataV7ModuleConstants

type MetadataV7ModuleConstants struct {
	MetadataV6ModuleConstants
}

type MetadataV7ModuleStorage

type MetadataV7ModuleStorage struct {
	MetadataV6ModuleStorage
	Prefix string            `json:"prefix"`
	Items  []MetadataStorage `json:"items"`
}

func (*MetadataV7ModuleStorage) Process

func (m *MetadataV7ModuleStorage) Process()

type MetadataV7ModuleStorageEntry

type MetadataV7ModuleStorageEntry struct {
	ScaleDecoder
	Name     string      `json:"name"`
	Modifier string      `json:"modifier"`
	Type     StorageType `json:"type"`
	Fallback string      `json:"fallback"`
	Docs     []string    `json:"docs"`
	Hasher   string      `json:"hasher"`
}

func (*MetadataV7ModuleStorageEntry) Init

func (*MetadataV7ModuleStorageEntry) Process

func (m *MetadataV7ModuleStorageEntry) Process()

type MetadataV8Decoder

type MetadataV8Decoder struct {
	ScaleDecoder
}

func (*MetadataV8Decoder) Init

func (m *MetadataV8Decoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*MetadataV8Decoder) Process

func (m *MetadataV8Decoder) Process()

type MetadataV8Module

type MetadataV8Module struct {
	ScaleDecoder
	Name       string                   `json:"name"`
	Prefix     string                   `json:"prefix"`
	CallIndex  string                   `json:"call_index"`
	HasStorage bool                     `json:"has_storage"`
	Storage    []MetadataStorage        `json:"storage"`
	HasCalls   bool                     `json:"has_calls"`
	Calls      []MetadataModuleCall     `json:"calls"`
	HasEvents  bool                     `json:"has_events"`
	Events     []MetadataEvents         `json:"events"`
	Constants  []map[string]interface{} `json:"constants"`
	Errors     []MetadataModuleError    `json:"errors"`
}

func (*MetadataV8Module) GetIdentifier

func (m *MetadataV8Module) GetIdentifier() string

func (*MetadataV8Module) Process

func (m *MetadataV8Module) Process()

type MetadataV9Decoder

type MetadataV9Decoder struct {
	ScaleDecoder
}

func (*MetadataV9Decoder) Init

func (m *MetadataV9Decoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*MetadataV9Decoder) Process

func (m *MetadataV9Decoder) Process()

type Moment

type Moment struct {
	CompactU32
}

func (*Moment) Init

func (m *Moment) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*Moment) Process

func (m *Moment) Process()

type Null

type Null struct {
	ScaleDecoder
}

type OpaqueCall

type OpaqueCall struct {
	Bytes
}

func (*OpaqueCall) Process

func (f *OpaqueCall) Process()

type Option

type Option struct {
	ScaleDecoder
}

func (*Option) Process

func (o *Option) Process()

type Other

type Other struct{ HexBytes }

type ParaId

type ParaId struct{ U32 }

type PreRuntime

type PreRuntime struct{ Struct }

func (*PreRuntime) Init

func (s *PreRuntime) Init(data ScaleBytes, option *ScaleDecoderOption)

type PropIndex

type PropIndex struct{ U32 }

type RawAuraPreDigest

type RawAuraPreDigest struct{ Struct }

func (*RawAuraPreDigest) Init

func (s *RawAuraPreDigest) Init(data ScaleBytes, option *ScaleDecoderOption)

type RawBabeLabel

type RawBabeLabel struct {
	Enum
}

func (*RawBabeLabel) Init

func (s *RawBabeLabel) Init(data ScaleBytes, option *ScaleDecoderOption)

type RawBabePreDigest

type RawBabePreDigest struct {
	Struct
}

func (*RawBabePreDigest) Init

func (r *RawBabePreDigest) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*RawBabePreDigest) Process

func (r *RawBabePreDigest) Process()

type RawBabePreDigestPrimary

type RawBabePreDigestPrimary struct{ Struct }

func (*RawBabePreDigestPrimary) Init

func (r *RawBabePreDigestPrimary) Init(data ScaleBytes, option *ScaleDecoderOption)

type RawBabePreDigestSecondary

type RawBabePreDigestSecondary struct{ Struct }

func (*RawBabePreDigestSecondary) Init

type RawBabePreDigestSecondaryVRF

type RawBabePreDigestSecondaryVRF struct{ Struct }

func (*RawBabePreDigestSecondaryVRF) Init

type ReferendumIndex

type ReferendumIndex struct{ U32 }

type RuntimeType

type RuntimeType struct{}

func (*RuntimeType) DecoderClass

func (r *RuntimeType) DecoderClass(typeString string, spec int) (reflect.Type, reflect.Value, string)

func (RuntimeType) Reg

func (r RuntimeType) Reg() *RuntimeType

type ScaleBytes

type ScaleBytes struct {
	Data   []byte `json:"data"`
	Offset int    `json:"offset"`
}

func (*ScaleBytes) GetNextBytes

func (s *ScaleBytes) GetNextBytes(length int) []byte

func (*ScaleBytes) GetRemainingLength

func (s *ScaleBytes) GetRemainingLength() int

func (*ScaleBytes) Reset

func (s *ScaleBytes) Reset()

func (*ScaleBytes) String

func (s *ScaleBytes) String() string

type ScaleDecoder

type ScaleDecoder struct {
	Data        ScaleBytes      `json:"-"`
	TypeString  string          `json:"-"`
	SubType     string          `json:"-"`
	Value       interface{}     `json:"-"`
	RawValue    string          `json:"-"`
	TypeMapping *TypeMapping    `json:"-"`
	Metadata    *MetadataStruct `json:"-"`
	Spec        int             `json:"-"`
}

func (*ScaleDecoder) GetNextU8

func (s *ScaleDecoder) GetNextU8() int

func (*ScaleDecoder) Init

func (s *ScaleDecoder) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*ScaleDecoder) NextBytes

func (s *ScaleDecoder) NextBytes(length int) []byte

func (*ScaleDecoder) Process

func (s *ScaleDecoder) Process()

func (*ScaleDecoder) ProcessAndUpdateData

func (s *ScaleDecoder) ProcessAndUpdateData(typeString string) interface{}

type ScaleDecoderOption

type ScaleDecoderOption struct {
	Spec        int
	SubType     string
	ValueList   []string
	Metadata    *MetadataStruct
	FixedLength int
}

type Seal

type Seal struct{ Struct }

func (*Seal) Init

func (s *Seal) Init(data ScaleBytes, option *ScaleDecoderOption)

type SealV0

type SealV0 struct{ Struct }

func (*SealV0) Init

func (s *SealV0) Init(data ScaleBytes, option *ScaleDecoderOption)

type SessionIndex

type SessionIndex struct{ U32 }

type Set

type Set struct {
	ScaleDecoder
	SetValue  int
	ValueList []string
	BitLength int
}

func (*Set) Init

func (s *Set) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*Set) Process

func (s *Set) Process()

type Signature

type Signature struct {
	ScaleDecoder
}

func (*Signature) Process

func (s *Signature) Process()

type SlotNumber

type SlotNumber struct{ U64 }

type Special

type Special struct {
	Version  []int
	Registry interface{}
}

type StorageHasher

type StorageHasher struct {
	Enum
}

func (*StorageHasher) Init

func (s *StorageHasher) Init(data ScaleBytes, option *ScaleDecoderOption)

type StorageType

type StorageType struct {
	Origin        string   `json:"origin"`
	PlainType     *string  `json:"plain_type,omitempty"`
	MapType       *MapType `json:"map_type,omitempty"`
	DoubleMapType *MapType `json:"double_map_type,omitempty"`
}

type String

type String struct {
	ScaleDecoder
}

func (*String) Process

func (b *String) Process()

type Struct

type Struct struct {
	ScaleDecoder
}

func (*Struct) Process

func (s *Struct) Process()

type TypeMapping

type TypeMapping struct {
	Names []string
	Types []string
}

type TypeStruct

type TypeStruct struct {
	Type        string     `json:"type"`
	TypeString  string     `json:"type_string"`
	TypeMapping [][]string `json:"type_mapping,omitempty"`
	ValueList   []string   `json:"value_list,omitempty"`
	BitLength   int        `json:"bit_length,omitempty"`
	V14         bool       `json:"-"`
	SpecVec     int
}

type U128

type U128 struct {
	ScaleDecoder
}

func (*U128) Process

func (u *U128) Process()

type U16

type U16 struct {
	Reader io.Reader
	ScaleDecoder
}

func (*U16) Process

func (u *U16) Process()

type U32

type U32 struct {
	Reader io.Reader
	ScaleDecoder
}

func (*U32) Encode

func (u *U32) Encode(value int)

func (*U32) Process

func (u *U32) Process()

type U64

type U64 struct {
	ScaleDecoder
	Reader io.Reader
}

func (*U64) Process

func (u *U64) Process()

type U8

type U8 struct {
	ScaleDecoder
}

func (*U8) Process

func (u *U8) Process()

type Vec

type Vec struct {
	ScaleDecoder
}

func (*Vec) Init

func (v *Vec) Init(data ScaleBytes, option *ScaleDecoderOption)

func (*Vec) Process

func (v *Vec) Process()

type VecU8FixedLength

type VecU8FixedLength struct {
	ScaleDecoder
	FixedLength int
}

func (*VecU8FixedLength) Process

func (s *VecU8FixedLength) Process()

type Vote

type Vote struct {
	U8
}

type VoteOutcome

type VoteOutcome struct {
	ScaleDecoder
}

func (*VoteOutcome) Process

func (v *VoteOutcome) Process()

Jump to

Keyboard shortcuts

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