client

package
v0.0.0-...-9e984db Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: LGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client defines typed wrappers for the Ethereum RPC API.

func Dial

func Dial(rawurl string) (*Client, error)

Dial connects a client to the given URL.

func (*Client) BlockByNumber

func (c *Client) BlockByNumber(ctx context.Context, number *big.Int) (*ethereum.Block, error)

BlockByNumber returns a block from the current canonical chain. If number is nil, the latest known block is returned.

func (*Client) BlockNumber

func (c *Client) BlockNumber(ctx context.Context) (*big.Int, error)

BlockNumber returns the number of most recent block.

func (*Client) Close

func (c *Client) Close() error

Close implements io.Closer interface

Jump to

Keyboard shortcuts

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