Documentation
¶
Index ¶
- type Block
- type Node
- func (n *Node) Balance(address string) (*big.Int, error)
- func (n *Node) BlockNumber() (uint64, error)
- func (n *Node) ChainID() (uint64, error)
- func (n *Node) ClientVersion() (string, error)
- func (n *Node) Coinbase() (string, error)
- func (n *Node) GetBlockByHash(blockHash string) (Block, error)
- func (n *Node) GetBlockByNumber(blockNumber uint64) (Block, error)
- func (n *Node) GetUncleByBlockNumberAndIndex(blockNumber uint64, uncleIndex int) (Block, error)
- func (n *Node) GetUncleCountByBlockNumber(blockNumber uint64) (uint64, error)
- func (n *Node) HarvestBlockByNonce(givenNonceHex string, givenNumber uint64) (block Block, uncleParent uint64, err error)
- func (n *Node) SubmitWork(work []string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
Number string `json:"number"`
Hash string `json:"hash"`
Nonce string `json:"nonce"`
Difficulty string `json:"difficulty"`
Timestamp string `json:"timestamp"`
Transactions []string `json:"transactions"`
}
Block is a block body representation
type Node ¶
Node is the base OpenEthereum API struct
func (*Node) Balance ¶
Balance delegates to `eth_getBalance` API method, and returns the address's balance
func (*Node) BlockNumber ¶
BlockNumber delegates to `eth_blockNumber` API method, and returns the current block number
func (*Node) ChainID ¶
ChainID delegates to `eth_chainId` API method, and returns the network's chain id
func (*Node) ClientVersion ¶
ClientVersion delegates to `eth_blockNumber` API method, and returns the current block number
func (*Node) Coinbase ¶
Coinbase delegates to `eth_coinbase` API method, and returns the miner's coinbase address
func (*Node) GetBlockByHash ¶
GetBlockByHash delegates to `eth_getBlockByHash` RPC method, and returns block by number
func (*Node) GetBlockByNumber ¶
GetBlockByNumber delegates to `eth_getBlockByNumber` RPC method, and returns block by number
func (*Node) GetUncleByBlockNumberAndIndex ¶
GetUncleByBlockNumberAndIndex delegates to `eth_getUncleByBlockNumberAndIndex` RPC method, and returns uncle by block number and index
func (*Node) GetUncleCountByBlockNumber ¶
GetUncleCountByBlockNumber delegates to `eth_getUncleCountByBlockNumber` RPC method, and returns amount of uncles by given block number