models

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFromHexToInt added in v1.0.0

func ConvertFromHexToInt(h string) (*int, error)

func GetChangesFromEvents added in v1.0.0

func GetChangesFromEvents(response *SubscriptionResponse) ([]any, error)

func GetFieldFromAny added in v1.0.0

func GetFieldFromAny(name string, src any) (any, error)

func GetMessageByIndex added in v1.0.0

func GetMessageByIndex(moduleIdx, errorIdx int, meta *types.MetadataStruct) string

func VoucherParamsToProto added in v1.0.0

func VoucherParamsToProto(params *VoucherParams) *proto.VoucherParams

Types

type BasicParams added in v1.0.0

type BasicParams struct {
	Result       any    `json:"result"`
	Subscription string `json:"subscription"`
}

type Data added in v0.1.2

type Data struct {
	Free     any `json:"free"`
	Reserved any `json:"reserved"`
	Frozen   any `json:"frozen"`
	Flags    any `json:"flags"`
}

type EncodedVoucherIssue added in v1.0.0

type EncodedVoucherIssue struct {
	EncodedCall string `json:"encoded_call"`
}

func EncodedCallFromProto added in v1.0.0

func EncodedCallFromProto(pb *proto.EncodedVoucherIssue) *EncodedVoucherIssue

type Event added in v1.0.0

type Event struct {
	EventID        string                  `json:"event_id"`
	ModuleID       string                  `json:"module_id"`
	EventIndex     int                     `json:"event_idx"`
	ExtrinsicIndex int                     `json:"extrinsic_idx"`
	Params         []scalecodec.EventParam `json:"params"`
}

type FinalizedResponse added in v1.0.0

type FinalizedResponse struct {
	Finalized string `json:"finalized"`
}

type FrameSystemAccountInfo added in v0.1.2

type FrameSystemAccountInfo struct {
	Nonce       any   `json:"nonce"`
	Consumers   any   `json:"consumers"`
	Provider    any   `json:"providers"`
	Sufficients any   `json:"sufficients"`
	Data        *Data `json:"data"`
}

type InBlockResponse added in v1.0.0

type InBlockResponse struct {
	InBlock string `json:"inBlock"`
}

type ResponseError added in v1.0.0

type ResponseError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    any    `json:"data"`
}

type RpcGenericRequest

type RpcGenericRequest struct {
	Jsonrpc any    `json:"jsonrpc"`
	Id      any    `json:"id"`
	Method  string `json:"method"`
	Params  any    `json:"params,omitempty"`
}

func (*RpcGenericRequest) MarshalBody

func (rpc *RpcGenericRequest) MarshalBody() ([]byte, error)

type RpcGenericResponse

type RpcGenericResponse struct {
	Jsonrpc string         `json:"jsonrpc"`
	Id      any            `json:"id"`
	Result  any            `json:"result,omitempty"`
	Method  string         `json:"method"`
	Error   map[string]any `json:"error,omitempty"`
}

type SubscriptionResponse added in v1.0.0

type SubscriptionResponse struct {
	Jsonrpc string `json:"jsonrpc"`
	Method  string `json:"method"`
	Params  any    `json:"params,omitempty"`

	Result           any            `json:"result,omitempty"`
	Error            *ResponseError `json:"error,omitempty"`
	SubscriptionHash string
}

type VoucherParams added in v1.0.0

type VoucherParams struct {
	Spender       string `json:"spender"`
	Balance       string `json:"balance"`
	CodeUploading bool   `json:"code_uploading"`
	Duration      int32  `json:"duration"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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