client

package
v0.0.0-...-61fb7ef Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) 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) GetCode

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

func (*EthClient) GetQuorumPayload

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

func (*EthClient) GetTransactionByHash

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

func (*EthClient) GetTransactionReceipt

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

func (*EthClient) NetListening

func (ec *EthClient) NetListening() bool

func (*EthClient) PendingTransactions

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

func (*EthClient) RaftAddPeer

func (ec *EthClient) RaftAddPeer(request string) int

func (*EthClient) RaftRole

func (ec *EthClient) RaftRole() string

func (*EthClient) SendTransaction

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