rpc

package
v0.0.0-...-0167ef5 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHpbNodeSnapSigners

func GetHpbNodeSnapSigners(number int64, endpoint string) ([]common.Address, error)

func GetLastBlockNumber

func GetLastBlockNumber(endpoint string) (int64, error)

func GetNodeListFromHpbScan

func GetNodeListFromHpbScan(endpoint string) (map[common.Address]Node, error)

Types

type BlockResult

type BlockResult struct {
	ParentHash     common.Hash    `json:"parentHash"`
	Difficulty     string         `json:"difficulty"`
	Miner          common.Address `json:"miner"`
	HardwareRandom hexutil.Bytes  `json:"hardwareRandom"`
}

func GetBlockMinerAndHardwareRandom

func GetBlockMinerAndHardwareRandom(number int64, endpoint string) (*BlockResult, error)

type Node

type Node struct {
	NodeName       string
	NodeAddress    common.Address
	LockAmount     float64
	Country        string
	LocationDetail string
}

type RPCRequest

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

func NewRPCRequest

func NewRPCRequest(method string, params []interface{}) *RPCRequest

type Signers

type Signers struct {
	Addresses map[common.Address]struct{} `json:"signers"`
}

Jump to

Keyboard shortcuts

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