client

package
v0.0.0-...-d4a708c Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNull = errors.New("result is null")
)

Functions

func GetAccountByID

func GetAccountByID(id uint64) (string, error)

func GetAccountByName

func GetAccountByName(name string) (*types.Account, error)

func GetAssetInfoById

func GetAssetInfoById(assetid uint64) (*types.AssetObject, error)

func GetAssetInfoByName

func GetAssetInfoByName(assetName string) (*types.AssetObject, error)

func GetBlockAndResult

func GetBlockAndResult(number int64) (*types.BlockAndResult, error)

func GetBlockByNumber

func GetBlockByNumber(height uint64) (*types.RpcBlock, error)

func GetCandidatesCount

func GetCandidatesCount() (uint64, error)

func GetChainConfig

func GetChainConfig() (*types.ChainConfig, error)

func GetCode

func GetCode(name string) (hexutil.Bytes, error)

func GetCurrentBlockInfo

func GetCurrentBlockInfo() (*types.RpcBlock, error)

func GetData

func GetData(method string, outData interface{}, params ...interface{}) error

func GetDposIrreversible

func GetDposIrreversible() (*types.DposIrreversible, error)

func GetFeeResultByTime

func GetFeeResultByTime(time uint64, startFeeID uint64, count uint64) (*types.ObjectFeeResult, error)

func SendRPCRequest

func SendRPCRequest(rpcRequest *RPCRequest) (gc *gabs.Container, err error)

func SendRPCRequstWithAuth

func SendRPCRequstWithAuth(host string, username string, password string, rpcRequest *RPCRequest) (*gabs.Container, error)

func SendRawTransaction

func SendRawTransaction(rawData string) (types.Hash, error)

Types

type RPCRequest

type RPCRequest struct {
	JsonRpc string        `json:"jsonrpc"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
	ID      int           `json:"id"`
}

func NewRPCRequest

func NewRPCRequest(jsonRpc string, method string, param ...interface{}) *RPCRequest

Jump to

Keyboard shortcuts

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