eth

package
v0.0.0-...-fbce341 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnectionTypeDirect = iota
	ConnectionTypeManaged
)

Variables

Functions

func SanitizeVersion

func SanitizeVersion(version string) string

Types

type ClientProfile

type ClientProfile struct {
	Id             string         `json:"id"`
	ConnectionType ConnectionType `json:"connectionType"`

	NetworkId uint64 `json:"networkId"`
	ChainId   uint64 `json:"chainId"`

	ClientVersion web3.ClientVersion `json:"clientVersion"`
	NodeInfo      *web3.NodeInfo     `json:"nodeInfo,omitempty"` // unavailable from third party providers e.g. alchemy
}

func (ClientProfile) String

func (cp ClientProfile) String() string

type ClientStatus

type ClientStatus struct {
	Id         string           `json:"id"`
	Head       *web3.Head       `json:"head,omitempty"`
	SyncStatus *web3.SyncStatus `json:"syncStatus,omitempty"`
}

func (*ClientStatus) Merge

func (cs *ClientStatus) Merge(src *ClientStatus) (*ClientStatus, error)

type ConnectionType

type ConnectionType int

func ToConnectionType

func ToConnectionType(s string) ConnectionType

func (ConnectionType) MarshalJSON

func (ct ConnectionType) MarshalJSON() ([]byte, error)

MarshalJSON implements a custom json marshaller for ConnectionType.

func (ConnectionType) String

func (ct ConnectionType) String() (result string)

func (*ConnectionType) UnmarshalJSON

func (ct *ConnectionType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a custom json unmarshaller for ConnectionType.

type NetworkAndChainId

type NetworkAndChainId struct {
	NetworkId uint64 `json:"networkId"`
	ChainId   uint64 `json:"chainId"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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