Documentation ¶
Index ¶
- Variables
- func BigIntToIntBytes(i *big.Int, bytelen int) ([]byte, error)
- func Clean()
- func Encode(typeString string, data interface{}) string
- func EncodeWithOpt(typeString string, data interface{}, opt *ScaleDecoderOption) string
- func Eq(typeString, destTypeString string) bool
- func EqTypeStringWithTypeStruct(typeString string, dest *source.TypeStruct) bool
- func HasReg(typeName string) bool
- func RegCustomTypes(registry map[string]source.TypeStruct)
- func Reverse(b []byte)
- func TupleDisassemble(typeString string) []string
- type AccountId
- type AdditionalSigned
- type Address
- type AuthoritiesChange
- type BTreeMap
- type BTreeSet
- type Balance
- type BitVec
- type BlockNumber
- type Bool
- type BoundedVec
- type Box
- type BoxCall
- type BoxProposal
- type Bytes
- type Call
- type CallIndex
- type ChangesList
- type ChangesTrieRoot
- type Compact
- type CompactMoment
- type CompactU32
- type CompareChanges
- type Consensus
- type CustomMetadata
- type CustomMetadataV15
- type CustomValueMetadata
- type Data
- type EcdsaSignature
- type Empty
- type Enum
- type Era
- type EraExtrinsic
- type EthereumAddress
- type EventIndex
- type Exposure
- type ExtrinsicMetadata
- type ExtrinsicMetadataV12
- type ExtrinsicParam
- type FileInfoV2
- type FixedArray
- type FixedU8
- type Float
- type Float32
- type Float64
- type GenericAddress
- type GenericLookupSource
- type H160
- type H256
- type H512
- type HexBytes
- type IScaleDecoder
- type IndividualExposure
- type IntFixed
- type LockIdentifier
- type LogDigest
- type MapType
- type MapTypeValue
- type MetadataCalls
- type MetadataCompareResult
- type MetadataConstants
- type MetadataEvents
- type MetadataModuleCall
- type MetadataModuleCallArgument
- type MetadataModuleError
- type MetadataModuleEvent
- type MetadataModules
- type MetadataStorage
- type MetadataStruct
- type MetadataTag
- type MetadataV10Decoder
- type MetadataV11Decoder
- type MetadataV12Decoder
- type MetadataV12Module
- type MetadataV13Decoder
- type MetadataV13Module
- type MetadataV13ModuleStorage
- type MetadataV13ModuleStorageEntry
- type MetadataV14Decoder
- type MetadataV14Module
- type MetadataV14ModuleStorage
- type MetadataV14ModuleStorageEntry
- type MetadataV15Decoder
- type MetadataV15Module
- type MetadataV6Decoder
- type MetadataV6Module
- type MetadataV6ModuleConstants
- type MetadataV6ModuleStorage
- type MetadataV7Decoder
- type MetadataV7Module
- type MetadataV7ModuleConstants
- type MetadataV7ModuleStorage
- type MetadataV7ModuleStorageEntry
- type MetadataV8Decoder
- type MetadataV8Module
- type MetadataV9Decoder
- type ModuleChanges
- type ModuleErrorField
- type Moment
- type NMapType
- type Null
- type OpaqueCall
- type Option
- type OriginCaller
- type Other
- type OuterEnumsMetadata
- type OuterEnumsMetadataV15
- type PalletConstantMetadataV14
- type PalletLookUp
- type PortableType
- type PreRuntime
- type Range
- type RangeInclusive
- type RawAuraPreDigest
- type RawBabePreDigestPrimary
- type RawBabePreDigestSecondary
- type RawBabePreDigestSecondaryVRF
- type Replica
- type Result
- type RuntimeApiMetadata
- type RuntimeApiMetadataV15
- type RuntimeApiMethodMetadata
- type RuntimeApiMethodMetadataV15
- type RuntimeApiMethodParamMetadata
- type RuntimeApiMethodParamMetadataV15
- type RuntimeEnvironmentUpdated
- type RuntimeType
- type ScaleDecoder
- func (s *ScaleDecoder) Encode(interface{}) string
- func (s *ScaleDecoder) GetNextU8() int
- func (s *ScaleDecoder) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
- func (s *ScaleDecoder) NextBytes(length int) []byte
- func (s *ScaleDecoder) Process()
- func (s *ScaleDecoder) ProcessAndUpdateData(typeString string) interface{}
- func (s *ScaleDecoder) TypeStructString() string
- type ScaleDecoderOption
- type ScaleInfo
- type Seal
- type SealV0
- type Set
- type SiField
- type SiType
- type SiTypeDef
- type SiTypeDefArray
- type SiTypeDefBitSequence
- type SiTypeDefCompact
- type SiTypeDefComposite
- type SiTypeDefPrimitive
- type SiTypeDefRange
- type SiTypeDefSequence
- type SiTypeDefTuple
- type SiTypeDefVariant
- type SiTypeOption
- type SiTypeParameter
- type SiTypeWithName
- type SiVariant
- type Signature
- type SignedExtension
- type SignedExtensions
- type SlotNumber
- type Special
- type StorageType
- type String
- type Struct
- type SubstrateFixedI128
- type SubstrateFixedU64
- type TypeMapping
- type U128
- type U16
- type U32
- type U64
- type U8
- type Vec
- type VoteOutcome
- type WeakBoundedVec
- type WrapperOpaque
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TypeRegistry map[string]interface{} TypeRegistryLock = &sync.RWMutex{} V14Types = make(map[string]source.TypeStruct) V14TypesLock = &sync.RWMutex{} )
View Source
var KnownOrigins = map[string]string{
"Council": "CollectiveOrigin",
"System": "SystemOrigin",
"TechnicalCommittee": "CollectiveOrigin",
"Xcm": "XcmOrigin",
"XcmPallet": "XcmOrigin",
"Authority": "AuthorityOrigin",
"GeneralCouncil": "CollectiveOrigin",
}
Functions ¶
func BigIntToIntBytes ¶
BigIntToIntBytes ref https://github.com/centrifuge/go-substrate-rpc-client/blob/master/types/int.go#L218
func EncodeWithOpt ¶
func EncodeWithOpt(typeString string, data interface{}, opt *ScaleDecoderOption) string
func EqTypeStringWithTypeStruct ¶
func EqTypeStringWithTypeStruct(typeString string, dest *source.TypeStruct) bool
func RegCustomTypes ¶
func RegCustomTypes(registry map[string]source.TypeStruct)
func TupleDisassemble ¶
Types ¶
type AdditionalSigned ¶
type Address ¶
type Address struct { ScaleDecoder AccountLength string `json:"account_length"` }
type AuthoritiesChange ¶
type AuthoritiesChange struct{ Vec }
func (*AuthoritiesChange) Init ¶
func (l *AuthoritiesChange) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type BlockNumber ¶
type BlockNumber struct {
U32
}
type BoundedVec ¶
type BoundedVec struct {
Vec
}
func (*BoundedVec) Init ¶
func (v *BoundedVec) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
Init BoundedVec<Type, Size> to Vec<Type> https://github.com/paritytech/substrate/pull/8556
type BoxCall ¶
type BoxCall struct { CallIndex string `json:"call_Index"` Params []ExtrinsicParam `json:"params"` }
type BoxProposal ¶
type BoxProposal struct {
Call
}
type CallIndex ¶
type CallIndex struct { Module MetadataModules `json:"module"` Call MetadataCalls `json:"call"` }
type ChangesList ¶
type ChangesList struct { New []string `json:"new,omitempty"` Changes []CompareChanges `json:"changes,omitempty"` }
type ChangesTrieRoot ¶
type ChangesTrieRoot struct{ HexBytes }
type Compact ¶
type Compact struct { ScaleDecoder CompactLength int `json:"compact_length"` CompactBytes []byte `json:"compact_bytes"` }
func (*Compact) ProcessCompactBytes ¶
func (c *Compact) ProcessCompactBytes()
func (*Compact) TypeStructString ¶
type CompactMoment ¶
type CompactMoment struct {
CompactU32
}
func (*CompactMoment) Process ¶
func (m *CompactMoment) Process()
type CompactU32 ¶
func (*CompactU32) Encode ¶
func (c *CompactU32) Encode(value interface{}) string
func (*CompactU32) Init ¶
func (c *CompactU32) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
func (*CompactU32) Process ¶
func (c *CompactU32) Process()
func (*CompactU32) TypeStructString ¶
func (c *CompactU32) TypeStructString() string
type CompareChanges ¶
type Consensus ¶
type Consensus struct{ Struct }
func (*Consensus) Init ¶
func (s *Consensus) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type CustomMetadata ¶
type CustomMetadata struct {
Map []map[string]CustomValueMetadata `json:"map"`
}
type CustomMetadataV15 ¶
type CustomMetadataV15 struct{ ScaleDecoder }
func (*CustomMetadataV15) Process ¶
func (c *CustomMetadataV15) Process()
type CustomValueMetadata ¶
type Data ¶
type Data struct {
Enum
}
func (*Data) Init ¶
func (d *Data) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
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.ScaleBytes, option *ScaleDecoderOption)
func (*Enum) TypeStructString ¶
func (*Enum) WithValueList ¶
type Era ¶
type Era struct {
ScaleDecoder
}
type EraExtrinsic ¶
type EraExtrinsic struct{ Era }
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 Exposure ¶
type Exposure struct{ Struct }
func (*Exposure) Init ¶
func (s *Exposure) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type ExtrinsicMetadata ¶
type ExtrinsicMetadata struct { Type int `json:"type,omitempty"` Version int `json:"version"` AddressType int `json:"addressType,omitempty"` CallType int `json:"callType,omitempty"` SignatureType int `json:"signatureType,omitempty"` ExtraType int `json:"extraType,omitempty"` SignedExtensions []SignedExtensions `json:"signedExtensions"` SignedIdentifier []string `json:"signed_identifier"` }
type ExtrinsicMetadataV12 ¶
type ExtrinsicMetadataV12 struct {
SignedExtensions []string `json:"signedExtensions"`
}
type ExtrinsicParam ¶
type FileInfoV2 ¶
type FileInfoV2 struct {
Struct
}
func (*FileInfoV2) Init ¶
func (f *FileInfoV2) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type FixedArray ¶
type FixedArray struct { ScaleDecoder FixedLength int SubType string }
func (*FixedArray) Encode ¶
func (f *FixedArray) Encode(value interface{}) string
func (*FixedArray) Init ¶
func (f *FixedArray) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
func (*FixedArray) Process ¶
func (f *FixedArray) Process()
func (*FixedArray) TypeStructString ¶
func (f *FixedArray) TypeStructString() string
type FixedU8 ¶
type FixedU8 struct { ScaleDecoder FixedLength int }
func (*FixedU8) TypeStructString ¶
type Float ¶
type Float struct {
ScaleDecoder
}
type Float32 ¶
type Float32 struct {
Float
}
func (*Float32) Init ¶
func (f *Float32) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
func (*Float32) TypeStructString ¶
type Float64 ¶
type Float64 struct {
Float
}
func (*Float64) Init ¶
func (f *Float64) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
func (*Float64) TypeStructString ¶
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 IScaleDecoder ¶
type IScaleDecoder interface { Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption) Process() Encode(interface{}) string TypeStructString() string }
type IndividualExposure ¶
type IndividualExposure struct{ Struct }
func (*IndividualExposure) Init ¶
func (s *IndividualExposure) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type IntFixed ¶
type IntFixed struct { ScaleDecoder FixedLength int Reader io.Reader }
func (*IntFixed) Init ¶
func (f *IntFixed) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
func (*IntFixed) TypeStructString ¶
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.ScaleBytes, option *ScaleDecoderOption)
type MapTypeValue ¶
type MetadataCalls ¶
type MetadataCalls struct { Lookup string `json:"lookup"` Name string `json:"name"` Docs []string `json:"docs"` Args []MetadataModuleCallArgument `json:"args"` LookupIndex int `json:"-"` }
type MetadataCompareResult ¶
type MetadataCompareResult struct { NewModules []string `json:"new_modules,omitempty"` ModuleChanges map[string]ModuleChanges `json:"module_changes"` }
type MetadataConstants ¶
type MetadataEvents ¶
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"` TypeName string `json:"type_name,omitempty"` }
func (*MetadataModuleCallArgument) Process ¶
func (m *MetadataModuleCallArgument) Process()
type MetadataModuleError ¶
type MetadataModuleError struct { ScaleDecoder `json:"-"` Name string `json:"name"` Doc []string `json:"doc"` Fields []ModuleErrorField `json:"fields,omitempty"` }
func (*MetadataModuleError) Init ¶
func (m *MetadataModuleError) Init(data scaleBytes.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,omitempty"` CallsValue *PalletLookUp `json:"calls_value,omitempty"` Events []MetadataEvents `json:"events,omitempty"` EventsValue *PalletLookUp `json:"events_value,omitempty"` Constants []MetadataConstants `json:"constants,omitempty"` Errors []MetadataModuleError `json:"errors"` ErrorsValue *PalletLookUp `json:"errors_value"` Index int `json:"index"` }
type MetadataStorage ¶
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 *int `json:"type,omitempty"` Apis []RuntimeApiMetadata `json:"apis,omitempty"` OuterEnums *OuterEnumsMetadata `json:"outer_enums,omitempty"` Customer *CustomMetadata `json:"customer,omitempty"` }
type MetadataTag ¶
type MetadataTag struct {
Modules []MetadataModules `json:"modules"`
}
func (*MetadataTag) Compare ¶
func (m *MetadataTag) Compare(dest *MetadataTag) *MetadataCompareResult
type MetadataV10Decoder ¶
type MetadataV10Decoder struct {
ScaleDecoder
}
func (*MetadataV10Decoder) Init ¶
func (m *MetadataV10Decoder) Init(data scaleBytes.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.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.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) Process ¶
func (m *MetadataV12Module) Process()
type MetadataV13Decoder ¶
type MetadataV13Decoder struct {
ScaleDecoder
}
func (*MetadataV13Decoder) Init ¶
func (m *MetadataV13Decoder) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
func (*MetadataV13Decoder) Process ¶
func (m *MetadataV13Decoder) Process()
type MetadataV13Module ¶
type MetadataV13Module 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 (*MetadataV13Module) Process ¶
func (m *MetadataV13Module) Process()
type MetadataV13ModuleStorage ¶
type MetadataV13ModuleStorage struct { MetadataV6ModuleStorage Prefix string `json:"prefix"` Items []MetadataStorage `json:"items"` }
func (*MetadataV13ModuleStorage) Process ¶
func (m *MetadataV13ModuleStorage) Process()
type MetadataV13ModuleStorageEntry ¶
type MetadataV13ModuleStorageEntry 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 (*MetadataV13ModuleStorageEntry) Init ¶
func (m *MetadataV13ModuleStorageEntry) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
func (*MetadataV13ModuleStorageEntry) Process ¶
func (m *MetadataV13ModuleStorageEntry) Process()
type MetadataV14Decoder ¶
type MetadataV14Decoder struct {
ScaleDecoder
}
func (*MetadataV14Decoder) Process ¶
func (m *MetadataV14Decoder) Process()
type MetadataV14Module ¶
type MetadataV14Module 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"` CallsValue map[string]interface{} `json:"calls_value"` HasEvents bool `json:"has_events"` Events []MetadataEvents `json:"events"` EventsValue map[string]interface{} `json:"events_value"` Constants []MetadataConstants `json:"constants"` Errors []MetadataModuleError `json:"errors"` ErrorsValue map[string]interface{} `json:"errors_value"` Index int `json:"index"` }
func (*MetadataV14Module) Process ¶
func (m *MetadataV14Module) Process()
type MetadataV14ModuleStorage ¶
type MetadataV14ModuleStorage struct { ScaleDecoder Prefix string `json:"prefix"` Items []MetadataStorage `json:"items"` }
func (*MetadataV14ModuleStorage) Process ¶
func (m *MetadataV14ModuleStorage) Process()
type MetadataV14ModuleStorageEntry ¶
type MetadataV14ModuleStorageEntry 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 (*MetadataV14ModuleStorageEntry) Process ¶
func (m *MetadataV14ModuleStorageEntry) Process()
type MetadataV15Decoder ¶
type MetadataV15Decoder struct {
ScaleDecoder
}
func (*MetadataV15Decoder) Process ¶
func (m *MetadataV15Decoder) Process()
type MetadataV15Module ¶
type MetadataV15Module struct { MetadataV14Module Docs []string `json:"docs"` }
func (*MetadataV15Module) Process ¶
func (m *MetadataV15Module) Process()
type MetadataV6Decoder ¶
type MetadataV6Decoder struct {
ScaleDecoder
}
func (*MetadataV6Decoder) Init ¶
func (m *MetadataV6Decoder) Init(data scaleBytes.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.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.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 (m *MetadataV7ModuleStorageEntry) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
func (*MetadataV7ModuleStorageEntry) Process ¶
func (m *MetadataV7ModuleStorageEntry) Process()
type MetadataV8Decoder ¶
type MetadataV8Decoder struct {
ScaleDecoder
}
func (*MetadataV8Decoder) Init ¶
func (m *MetadataV8Decoder) Init(data scaleBytes.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.ScaleBytes, option *ScaleDecoderOption)
func (*MetadataV9Decoder) Process ¶
func (m *MetadataV9Decoder) Process()
type ModuleChanges ¶
type ModuleChanges struct { Calls *ChangesList `json:"calls,omitempty"` Events *ChangesList `json:"events,omitempty"` }
type ModuleErrorField ¶
type OpaqueCall ¶
type OpaqueCall struct {
Bytes
}
func (*OpaqueCall) Process ¶
func (f *OpaqueCall) Process()
type OriginCaller ¶
type OuterEnumsMetadata ¶
type OuterEnumsMetadataV15 ¶
type OuterEnumsMetadataV15 struct{ ScaleDecoder }
func (*OuterEnumsMetadataV15) Process ¶
func (o *OuterEnumsMetadataV15) Process()
type PalletConstantMetadataV14 ¶
type PalletConstantMetadataV14 struct { ScaleDecoder Name string `json:"name"` Type string `json:"type"` ConstantsValue string `json:"constants_value"` Docs []string `json:"docs"` }
func (*PalletConstantMetadataV14) Process ¶
func (m *PalletConstantMetadataV14) Process()
type PalletLookUp ¶
type PalletLookUp struct {
Type int `json:"type"`
}
type PortableType ¶
type PreRuntime ¶
type PreRuntime struct{ Struct }
func (*PreRuntime) Init ¶
func (s *PreRuntime) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type RangeInclusive ¶
type RangeInclusive struct{ Range }
type RawAuraPreDigest ¶
type RawAuraPreDigest struct{ Struct }
func (*RawAuraPreDigest) Init ¶
func (s *RawAuraPreDigest) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type RawBabePreDigestPrimary ¶
type RawBabePreDigestPrimary struct{ Struct }
func (*RawBabePreDigestPrimary) Init ¶
func (r *RawBabePreDigestPrimary) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type RawBabePreDigestSecondary ¶
type RawBabePreDigestSecondary struct{ Struct }
func (*RawBabePreDigestSecondary) Init ¶
func (r *RawBabePreDigestSecondary) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type RawBabePreDigestSecondaryVRF ¶
type RawBabePreDigestSecondaryVRF struct{ Struct }
func (*RawBabePreDigestSecondaryVRF) Init ¶
func (r *RawBabePreDigestSecondaryVRF) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type Replica ¶
type Replica struct {
Struct
}
func (*Replica) Init ¶
func (r *Replica) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type RuntimeApiMetadata ¶
type RuntimeApiMetadata struct { Name string `json:"name"` Methods []RuntimeApiMethodMetadata `json:"methods"` Docs []string `json:"docs"` }
type RuntimeApiMetadataV15 ¶
type RuntimeApiMetadataV15 struct {
ScaleDecoder
}
func (*RuntimeApiMetadataV15) Process ¶
func (m *RuntimeApiMetadataV15) Process()
Process
"RuntimeApiMetadataV15": { "name": "Text", "methods": "Vec<RuntimeApiMethodMetadataV15>", "docs": "Vec<Text>" }
type RuntimeApiMethodMetadata ¶
type RuntimeApiMethodMetadata struct { Name string `json:"name"` Inputs []RuntimeApiMethodParamMetadata `json:"inputs"` OutputsId int `json:"outputsId"` Outputs string `json:"outputs"` Docs []string `json:"docs"` }
type RuntimeApiMethodMetadataV15 ¶
type RuntimeApiMethodMetadataV15 struct {
ScaleDecoder
}
func (*RuntimeApiMethodMetadataV15) Process ¶
func (r *RuntimeApiMethodMetadataV15) Process()
type RuntimeApiMethodParamMetadataV15 ¶
type RuntimeApiMethodParamMetadataV15 struct {
ScaleDecoder
}
func (*RuntimeApiMethodParamMetadataV15) Process ¶
func (r *RuntimeApiMethodParamMetadataV15) Process()
Process
"RuntimeApiMethodParamMetadataV15": { "name": "Text", "type": "SiLookupTypeId" },
type RuntimeEnvironmentUpdated ¶
type RuntimeEnvironmentUpdated struct{ Null }
type ScaleDecoder ¶
type ScaleDecoder struct { Data scaleBytes.ScaleBytes `json:"-"` TypeString string `json:"-"` SubType string `json:"-"` Value interface{} `json:"-"` RawValue string `json:"-"` TypeMapping *TypeMapping `json:"-"` Metadata *MetadataStruct `json:"-"` Spec int `json:"-"` Module string `json:"-"` DuplicateName map[string]int `json:"-"` TypeName string `json:"-"` RegisteredSiType map[int]string `json:"-"` InternalCall []string `json:"-"` RecursiveTime int `json:"-"` }
func (*ScaleDecoder) Encode ¶
func (s *ScaleDecoder) Encode(interface{}) string
func (*ScaleDecoder) GetNextU8 ¶
func (s *ScaleDecoder) GetNextU8() int
func (*ScaleDecoder) Init ¶
func (s *ScaleDecoder) Init(data scaleBytes.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{}
func (*ScaleDecoder) TypeStructString ¶
func (s *ScaleDecoder) TypeStructString() string
TypeStructString Type Struct string
type ScaleDecoderOption ¶
type ScaleDecoderOption struct { Spec int SubType string Module string ValueList []string Metadata *MetadataStruct FixedLength int SignedExtensions []SignedExtension `json:"signed_extensions"` AdditionalCheck []string TypeName string // contains filtered or unexported fields }
type ScaleInfo ¶
type ScaleInfo struct { *ScaleDecoder PathPrefix string V14 bool }
func (*ScaleInfo) ProcessSiType ¶
type Seal ¶
type Seal struct{ Struct }
func (*Seal) Init ¶
func (s *Seal) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type SealV0 ¶
type SealV0 struct{ Struct }
func (*SealV0) Init ¶
func (s *SealV0) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type Set ¶
type Set struct { ScaleDecoder SetValue int ValueList []string BitLength int }
func (*Set) Init ¶
func (s *Set) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
type SiType ¶
type SiType struct { Path []string `json:"path"` Params []SiTypeParameter `json:"params,omitempty"` Def SiTypeDef `json:"def"` Docs []string `json:"docs"` }
func (*SiType) FindParameter ¶
func (s *SiType) FindParameter(name string) *SiTypeParameter
type SiTypeDef ¶
type SiTypeDef struct { Composite *SiTypeDefComposite `json:"Composite,omitempty"` Variant *SiTypeDefVariant `json:"Variant,omitempty"` Sequence *SiTypeDefSequence `json:"Sequence,omitempty"` Array *SiTypeDefArray `json:"Array,omitempty"` Tuple *SiTypeDefTuple `json:"Tuple,omitempty"` Primitive *SiTypeDefPrimitive `json:"Primitive,omitempty"` Compact *SiTypeDefCompact `json:"Compact,omitempty"` BitSequence *SiTypeDefBitSequence `json:"BitSequence,omitempty"` SiTypeDefRange *SiTypeDefRange `json:"Range,omitempty"` // HistoricMetaCompat compatibility HistoricMetaCompat string `json:"HistoricMetaCompat,omitempty"` }
type SiTypeDefArray ¶
type SiTypeDefBitSequence ¶
type SiTypeDefCompact ¶
type SiTypeDefCompact struct {
Type int `json:"type"`
}
type SiTypeDefComposite ¶
type SiTypeDefComposite struct {
Fields []SiField `json:"fields"`
}
type SiTypeDefPrimitive ¶
type SiTypeDefPrimitive string
type SiTypeDefRange ¶
type SiTypeDefSequence ¶
type SiTypeDefSequence struct {
Type int `json:"type"`
}
type SiTypeDefTuple ¶
type SiTypeDefTuple []int
type SiTypeDefVariant ¶
type SiTypeDefVariant struct {
Variants []SiVariant `json:"variants"`
}
type SiTypeOption ¶
type SiTypeOption struct {
Recursive bool
}
func RecursiveOption ¶
func RecursiveOption() SiTypeOption
type SiTypeParameter ¶
type SiTypeWithName ¶
type SiTypeWithName struct { TypeString string Structure interface{} }
type Signature ¶
type Signature struct {
ScaleDecoder
}
type SignedExtension ¶
type SignedExtension struct { Name string `json:"name"` AdditionalSigned []AdditionalSigned `json:"additional_signed"` }
type SignedExtensions ¶
type SlotNumber ¶
type SlotNumber struct{ U64 }
type StorageType ¶
type StorageType struct { Origin string `json:"origin"` PlainType *string `json:"plain_type,omitempty"` PlainTypeValue *int `json:"PlainTypeValue,omitempty"` MapType *MapType `json:"map_type,omitempty"` DoubleMapType *MapType `json:"double_map_type,omitempty"` NMapType *NMapType `json:"n_map_type,omitempty"` }
type Struct ¶
type Struct struct {
ScaleDecoder
}
func (*Struct) TypeStructString ¶
func (*Struct) WithTypeMapping ¶
func (s *Struct) WithTypeMapping(typeMapping *TypeMapping) *Struct
type SubstrateFixedI128 ¶
type SubstrateFixedI128 struct {
ScaleDecoder
}
func (*SubstrateFixedI128) Process ¶
func (s *SubstrateFixedI128) Process()
type SubstrateFixedU64 ¶
type SubstrateFixedU64 struct {
U64
}
SubstrateFixedU64 https://github.com/encointer/encointer-js/blob/master/packages/util/src/parserFixPoint.spec.ts#L17 substrate_fixed:FixedU64
func (*SubstrateFixedU64) Process ¶
func (s *SubstrateFixedU64) Process()
type TypeMapping ¶
type Vec ¶
type Vec struct {
ScaleDecoder
}
func (*Vec) Init ¶
func (v *Vec) Init(data scaleBytes.ScaleBytes, option *ScaleDecoderOption)
func (*Vec) TypeStructString ¶
type VoteOutcome ¶
type VoteOutcome struct{ H256 }
type WeakBoundedVec ¶
type WeakBoundedVec struct {
BoundedVec
}
WeakBoundedVec https://github.com/paritytech/substrate/pull/8842
type WrapperOpaque ¶
type WrapperOpaque struct{ ScaleDecoder }
func (*WrapperOpaque) Process ¶
func (w *WrapperOpaque) Process()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.