helpers

package
v5.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EpochFromString added in v5.0.2

func EpochFromString(str string) (primitives.Epoch, error)

EpochFromString converts a string into Epoch.

func PubKeyFromHex added in v5.0.2

func PubKeyFromHex(str string) ([fieldparams.BLSPubkeyLength]byte, error)

PubKeyFromHex takes in a hex string, verifies its length as 48 bytes, and converts that representation.

func PubKeyToHexString added in v5.0.2

func PubKeyToHexString(pubKey []byte) (string, error)

func RootFromHex added in v5.0.2

func RootFromHex(str string) ([32]byte, error)

RootFromHex takes in a hex string, verifies its length as 32 bytes, and converts that representation.

func RootToHexString added in v5.0.2

func RootToHexString(root []byte) (string, error)

func SlotFromString added in v5.0.2

func SlotFromString(str string) (primitives.Slot, error)

SlotFromString converts a string into Slot.

func Uint64FromString added in v5.0.2

func Uint64FromString(str string) (uint64, error)

Uint64FromString converts a string into a uint64 representation.

func ValidateMetadata added in v5.0.2

func ValidateMetadata(ctx context.Context, validatorDB iface.ValidatorDB, interchangeJSON *format.EIPSlashingProtectionFormat) error

Types

type NodeConnection

type NodeConnection interface {
	GetGrpcClientConn() *grpc.ClientConn
	GetBeaconApiUrl() string
	GetBeaconApiTimeout() time.Duration
	// contains filtered or unexported methods
}

Use an interface with a private dummy function to force all other packages to call NewNodeConnection

func NewNodeConnection

func NewNodeConnection(grpcConn *grpc.ClientConn, beaconApiUrl string, beaconApiTimeout time.Duration) NodeConnection

Jump to

Keyboard shortcuts

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