client

package
v0.0.0-...-6cdae42 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountStats

type AccountStats struct {
	Account common.Address
	Value   uint64
}

AccountStats in case it refers to validators, value means number of mined blocks in case it refers to users, value means tootal users's gas consumption

type AdminInfo

type AdminInfo struct {
	ID         string    `json:"id"`
	Name       string    `json:"name"`
	Enode      string    `json:"enode"`
	IP         string    `json:"ip"`
	Ports      Ports     `json:"ports"`
	ListenAddr string    `json:"listenAddr"`
	Protocols  Protocols `json:"protocols"`
}

type AdminPeers

type AdminPeers struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Caps      []string  `json:"caps"`
	Network   Network   `json:"network"`
	Protocols Protocols `json:"protocols"`
}

type BlockDetailsResponse

type BlockDetailsResponse struct {
	Number           string                       `json:"number"`
	Hash             string                       `json:"hash"`
	ParentHash       string                       `json:"parentHash"`
	Nonce            string                       `json:"nonce"`
	Sha3Uncles       string                       `json:"sha3Uncles"`
	LogsBloom        string                       `json:"logsBloom"`
	TransactionsRoot string                       `json:"transactionsRoot"`
	StateRoot        string                       `json:"stateRoot"`
	Miner            string                       `json:"miner"`
	Difficulty       string                       `json:"difficulty"`
	TotalDifficulty  string                       `json:"totalDifficulty"`
	ExtraData        string                       `json:"extraData"`
	Size             string                       `json:"size"`
	GasLimit         string                       `json:"gasLimit"`
	GasUsed          string                       `json:"gasUsed"`
	Timestamp        string                       `json:"timestamp"`
	Transactions     []TransactionDetailsResponse `json:"transactions"`
	Uncles           []string                     `json:"uncles"`
}

type CallPayload

type CallPayload struct {
	To   string `json:"to"`
	Data string `json:"data"`
}

type Eth

type Eth struct {
	Network    int    `json:"network"`
	Version    int    `json:"version"`
	Difficulty int    `json:"difficulty"`
	Genesis    string `json:"genesis"`
	Head       string `json:"head"`
}

type EthClient

type EthClient struct {
	Url string
}

func (*EthClient) AddPeer

func (ec *EthClient) AddPeer(enode string) error

func (*EthClient) AdminNodeInfo

func (ec *EthClient) AdminNodeInfo() AdminInfo

func (*EthClient) AdminPeers

func (ec *EthClient) AdminPeers() []AdminPeers

func (*EthClient) BlockNumber

func (ec *EthClient) BlockNumber() string

func (*EthClient) Coinbase

func (ec *EthClient) Coinbase() string

func (*EthClient) CreateAccount

func (ec *EthClient) CreateAccount(password string) string

func (*EthClient) DeployContracts

func (ec *EthClient) DeployContracts(byteCode string, pubKeys []string, private bool) string

func (*EthClient) EthCall

func (*EthClient) GetAccounts

func (ec *EthClient) GetAccounts() []string

func (*EthClient) GetBalance

func (ec *EthClient) GetBalance(account string) string

func (*EthClient) GetBlockByNumber

func (ec *EthClient) GetBlockByNumber(blockNo string) BlockDetailsResponse

func (*EthClient) GetCandidates

func (ec *EthClient) GetCandidates() map[common.Address]bool

func (*EthClient) GetCode

func (ec *EthClient) GetCode(address string) string

func (*EthClient) GetQuorumPayload

func (ec *EthClient) GetQuorumPayload(input string) string

func (*EthClient) GetSnapshot

func (ec *EthClient) GetSnapshot(blockNumber string) backend.Snapshot

func (*EthClient) GetStatistics

func (ec *EthClient) GetStatistics(start string, end string) IstanbulStats

func (*EthClient) GetTransactionByHash

func (ec *EthClient) GetTransactionByHash(txNo string) TransactionDetailsResponse

func (*EthClient) GetTransactionReceipt

func (ec *EthClient) GetTransactionReceipt(txNo string) TransactionReceiptResponse

func (*EthClient) GetValidators

func (ec *EthClient) GetValidators(blockNumber string) []common.Address

func (*EthClient) NetListening

func (ec *EthClient) NetListening() bool

func (*EthClient) PendingTransactions

func (ec *EthClient) PendingTransactions() []TransactionDetailsResponse

func (*EthClient) ProposeValidator

func (ec *EthClient) ProposeValidator(address string, vote bool) error

func (*EthClient) SendTransaction

type IstanbulStats

type IstanbulStats struct {
	Validators  []common.Address `json:"validators"`
	BlocksMined []uint32         `json:"blocks_mined"`

	Users           []common.Address `json:"users"`
	GasConsumptions []uint64         `json:"gas_consumptions"`

	MaxGas uint64 `json:"max_gas_used"`
}

type Logs

type Logs struct {
	Address          string   `json:"address"`
	BlockHash        string   `json:"blockHash"`
	BlockNumber      string   `json:"blockNumber"`
	Data             string   `json:"data"`
	LogIndex         string   `json:"logIndex"`
	Topics           []string `json:"topics"`
	TransactionHash  string   `json:"transactionHash"`
	TransactionIndex string   `json:"transactionIndex"`
}

type Network

type Network struct {
	LocalAddress  string `json:"localAddress"`
	RemoteAddress string `json:"remoteAddress"`
}

type Payload

type Payload struct {
	From       string   `json:"from"`
	To         string   `json:"to,omitempty"`
	Data       string   `json:"data"`
	Gaslimit   string   `json:"gas"`
	PrivateFor []string `json:"privateFor,omitempty"`
}

type Ports

type Ports struct {
	Discovery int `json:"discovery"`
	Listener  int `json:"listener"`
}

type Protocols

type Protocols struct {
	Eth Eth `json:"eth"`
}

type TransactionDetailsResponse

type TransactionDetailsResponse struct {
	BlockHash        string `json:"blockHash"`
	BlockNumber      string `json:"blockNumber"`
	From             string `json:"from"`
	Gas              string `json:"gas"`
	GasPrice         string `json:"gasPrice"`
	Hash             string `json:"hash"`
	Input            string `json:"input"`
	Nonce            string `json:"nonce"`
	To               string `json:"to"`
	TransactionIndex string `json:"transactionIndex"`
	Value            string `json:"value"`
	V                string `json:"v"`
	R                string `json:"r"`
	S                string `json:"s"`
}

type TransactionReceiptResponse

type TransactionReceiptResponse struct {
	BlockHash         string `json:"blockHash"`
	BlockNumber       string `json:"blockNumber"`
	ContractAddress   string `json:"contractAddress"`
	CumulativeGasUsed string `json:"cumulativeGasUsed"`
	From              string `json:"from"`
	GasUsed           string `json:"gasUsed"`
	Logs              []Logs `json:"logs"`
	LogsBloom         string `json:"logsBloom"`
	Root              string `json:"root"`
	To                string `json:"to"`
	TransactionHash   string `json:"transactionHash"`
	TransactionIndex  string `json:"transactionIndex"`
}

Jump to

Keyboard shortcuts

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