jsonrpchttp

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 9 Imported by: 0

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 allows to connect to a JSON-RPC server

func NewClient

func NewClient(cfg *Config) (*Client, error)

NewClient creates a client connecting to an Ethereum 2.0 Beacon chain node at given addr

func NewClientFromClient

func NewClientFromClient(s autorest.Sender) *Client

NewClient creates a new client connected to a JSON-RPC server

func (*Client) Call

func (c *Client) Call(ctx context.Context, r *jsonrpc.Request, res interface{}) error

func (*Client) Logger

func (c *Client) Logger() logrus.FieldLogger

func (*Client) SetLogger

func (c *Client) SetLogger(logger logrus.FieldLogger)

type Config

type Config struct {
	Address string

	HTTP *kilnhttp.ClientConfig
}

func (*Config) SetDefault

func (cfg *Config) SetDefault() *Config

Jump to

Keyboard shortcuts

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