net

package
v0.0.0-...-69704c5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameSpace = "net"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PublicNetAPI

type PublicNetAPI struct {
	Metrics *monitor.RpcMetrics
	// contains filtered or unexported fields
}

PublicNetAPI is the eth_ prefixed set of APIs in the Web3 JSON-RPC spec.

func NewAPI

func NewAPI(clientCtx context.CLIContext, log log.Logger) *PublicNetAPI

NewAPI creates an instance of the public Net Web3 API.

func (*PublicNetAPI) Listening

func (api *PublicNetAPI) Listening() bool

Listening returns if client is actively listening for network connections.

func (*PublicNetAPI) PeerCount

func (api *PublicNetAPI) PeerCount() int

PeerCount returns the number of peers currently connected to the client.

func (*PublicNetAPI) Version

func (api *PublicNetAPI) Version() string

Version returns the current ethereum protocol version.

Jump to

Keyboard shortcuts

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