v3

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 26 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ConfigShowPatchTransaction = false
)
View Source
const (
	Version = 3
)

Variables

View Source
var (
	VersionValue = jsonrpc.HexInt(intconv.FormatInt(Version))
)

Functions

func DataParamValidation

func DataParamValidation(sl validator.StructLevel)

func DebugMethodRepository

func DebugMethodRepository(mtr *metric.JsonrpcMetric) *jsonrpc.MethodRepository

func MethodRepository

func MethodRepository(mtr *metric.JsonrpcMetric) *jsonrpc.MethodRepository

func RegisterValidationRule

func RegisterValidationRule(v *jsonrpc.Validator)

func RosettaMethodRepository added in v1.2.13

func RosettaMethodRepository(mtr *metric.JsonrpcMetric) *jsonrpc.MethodRepository

Types

type AddressParam

type AddressParam struct {
	Address jsonrpc.Address `json:"address" validate:"required,t_addr"`
	Height  jsonrpc.HexInt  `json:"height,omitempty" validate:"optional,t_int"`
}

type BTPMessagesParam added in v1.3.0

type BTPMessagesParam struct {
	Height    jsonrpc.HexInt `json:"height" validate:"required,t_int"`
	NetworkId jsonrpc.HexInt `json:"networkID" validate:"required,t_int"`
}

type BTPQueryParam added in v1.3.0

type BTPQueryParam struct {
	Height jsonrpc.HexInt `json:"height,omitempty" validate:"optional,t_int"`
	Id     jsonrpc.HexInt `json:"id" validate:"required,t_int"`
}

type BlockHashParam

type BlockHashParam struct {
	Hash jsonrpc.HexBytes `json:"hash" validate:"required,t_hash"`
}

type BlockHeightParam

type BlockHeightParam struct {
	Height jsonrpc.HexInt `json:"height" validate:"required,t_int"`
}

type CallParam

type CallParam struct {
	FromAddress jsonrpc.Address `json:"from,omitempty" validate:"optional,t_addr_eoa"`
	ToAddress   jsonrpc.Address `json:"to" validate:"required,t_addr_score"`
	DataType    string          `json:"dataType" validate:"required,call"`
	Data        interface{}     `json:"data"`
	Height      jsonrpc.HexInt  `json:"height,omitempty" validate:"optional,t_int"`
}

type DataHashParam

type DataHashParam struct {
	Hash jsonrpc.HexBytes `json:"hash" validate:"required,t_hash"`
}

type HeightParam added in v1.2.9

type HeightParam struct {
	Height jsonrpc.HexInt `json:"height,omitempty" validate:"optional,t_int"`
}

type MissingTransactionInfo added in v1.3.2

type MissingTransactionInfo interface {
	ReplaceID(height int64, id []byte) []byte
	GetLocationOf(id []byte) (int64, int, bool)
}

type ProofEventsParam

type ProofEventsParam struct {
	BlockHash jsonrpc.HexBytes `json:"hash" validate:"required,t_hash"`
	Index     jsonrpc.HexInt   `json:"index" validate:"required,t_int"`
	Events    []jsonrpc.HexInt `json:"events" validate:"gt=0,dive,t_int"`
}

type ProofResultParam

type ProofResultParam struct {
	BlockHash jsonrpc.HexBytes `json:"hash" validate:"required,t_hash"`
	Index     jsonrpc.HexInt   `json:"index" validate:"required,t_int"`
}

type RosettaTraceParam added in v1.2.13

type RosettaTraceParam struct {
	Tx     jsonrpc.HexBytes `json:"tx,omitempty" validate:"optional,t_rhash"`
	Block  jsonrpc.HexBytes `json:"block,omitempty" validate:"optional,t_hash"`
	Height jsonrpc.HexInt   `json:"height,omitempty" validate:"optional,gte=0,t_int"`
}

type ScoreAddressParam

type ScoreAddressParam struct {
	Address jsonrpc.Address `json:"address" validate:"required,t_addr_score"`
	Height  jsonrpc.HexInt  `json:"height,omitempty" validate:"optional,t_int"`
}

type TransactionHashParam

type TransactionHashParam struct {
	Hash jsonrpc.HexBytes `json:"txHash" validate:"required,t_hash"`
}

type TransactionParam

type TransactionParam struct {
	Version     jsonrpc.HexInt  `json:"version" validate:"required,t_int"`
	FromAddress jsonrpc.Address `json:"from" validate:"required,t_addr_eoa"`
	ToAddress   jsonrpc.Address `json:"to" validate:"required,t_addr"`
	Value       jsonrpc.HexInt  `json:"value,omitempty" validate:"optional,t_int"`
	StepLimit   jsonrpc.HexInt  `json:"stepLimit" validate:"required,t_int"`
	Timestamp   jsonrpc.HexInt  `json:"timestamp" validate:"required,t_int"`
	NetworkID   jsonrpc.HexInt  `json:"nid" validate:"required,t_int"`
	Nonce       jsonrpc.HexInt  `json:"nonce,omitempty" validate:"optional,t_int"`
	Signature   string          `json:"signature" validate:"required,t_sig"`
	DataType    string          `json:"dataType,omitempty" validate:"optional,call|deploy|message|deposit"`
	Data        interface{}     `json:"data,omitempty"`
}

type TransactionParamForEstimate

type TransactionParamForEstimate struct {
	Version     jsonrpc.HexInt  `json:"version" validate:"required,t_int"`
	FromAddress jsonrpc.Address `json:"from" validate:"required,t_addr_eoa"`
	ToAddress   jsonrpc.Address `json:"to" validate:"required,t_addr"`
	Value       jsonrpc.HexInt  `json:"value,omitempty" validate:"optional,t_int"`
	Timestamp   jsonrpc.HexInt  `json:"timestamp" validate:"required,t_int"`
	NetworkID   jsonrpc.HexInt  `json:"nid" validate:"required,t_int"`
	Nonce       jsonrpc.HexInt  `json:"nonce,omitempty" validate:"optional,t_int"`
	DataType    string          `json:"dataType,omitempty" validate:"optional,call|deploy|message|deposit"`
	Data        interface{}     `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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