Documentation ¶
Index ¶
- func EpochFromString(str string) (primitives.Epoch, error)
- func PubKeyFromHex(str string) ([fieldparams.BLSPubkeyLength]byte, error)
- func PubKeyToHexString(pubKey []byte) (string, error)
- func RootFromHex(str string) ([32]byte, error)
- func RootToHexString(root []byte) (string, error)
- func SlotFromString(str string) (primitives.Slot, error)
- func Uint64FromString(str string) (uint64, error)
- func ValidateMetadata(ctx context.Context, validatorDB iface.ValidatorDB, ...) error
- type NodeConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EpochFromString ¶
func EpochFromString(str string) (primitives.Epoch, error)
EpochFromString converts a string into Epoch.
func PubKeyFromHex ¶
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 ¶
func RootFromHex ¶
RootFromHex takes in a hex string, verifies its length as 32 bytes, and converts that representation.
func RootToHexString ¶
func SlotFromString ¶
func SlotFromString(str string) (primitives.Slot, error)
SlotFromString converts a string into Slot.
func Uint64FromString ¶
Uint64FromString converts a string into a uint64 representation.
func ValidateMetadata ¶
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
Click to show internal directories.
Click to hide internal directories.