enrstate

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 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 EnrState

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

func NewEnrState

func NewEnrState(staticIP net.IP, fallbackIP net.IP, fallbackUDP uint16, privKey *crypto.Secp256k1PrivateKey) (*EnrState, error)

Create a new ENR state with a private key. The static / fallback choices are optional.

func (*EnrState) FallbackIP

func (s *EnrState) FallbackIP() net.IP

FallbackIP returns the current static IP, or nil if none is set.

func (*EnrState) FallbackUDP

func (s *EnrState) FallbackUDP() uint16

FallbackUDP returns the current static IP, or nil if none is set.

func (*EnrState) GetNode

func (s *EnrState) GetNode() *enode.Node

func (*EnrState) GetPriv

func (s *EnrState) GetPriv() *crypto.Secp256k1PrivateKey

func (*EnrState) LocalNode

func (s *EnrState) LocalNode() *enode.LocalNode

func (*EnrState) SetAttnets

func (s *EnrState) SetAttnets(dat *beacon.AttnetBits)

func (*EnrState) SetEth2Data

func (s *EnrState) SetEth2Data(dat *beacon.Eth2Data)

func (*EnrState) SetFallbackIP

func (s *EnrState) SetFallbackIP(ip net.IP)

func (*EnrState) SetFallbackUDP

func (s *EnrState) SetFallbackUDP(port uint16)

func (*EnrState) SetIP

func (s *EnrState) SetIP(ip net.IP)

func (*EnrState) SetStaticIP

func (s *EnrState) SetStaticIP(ip net.IP)

func (*EnrState) SetTCP

func (s *EnrState) SetTCP(port uint16)

func (*EnrState) SetUDP

func (s *EnrState) SetUDP(port uint16)

func (*EnrState) StaticIP

func (s *EnrState) StaticIP() net.IP

StaticIP returns the current static IP, or nil if none is set.

Jump to

Keyboard shortcuts

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