interchangeformat

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EpochFromString added in v1.2.2

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

Uint64FromString converts a string into Epoch.

func ExportStandardProtectionJSON added in v1.0.1

func ExportStandardProtectionJSON(ctx context.Context, validatorDB db.Database) (*format.EIPSlashingProtectionFormat, error)

ExportStandardProtectionJSON extracts all slashing protection data from a validator database and packages it into an EIP-3076 compliant, standard

func ImportStandardProtectionJSON

func ImportStandardProtectionJSON(ctx context.Context, validatorDB db.Database, r io.Reader) error

ImportStandardProtectionJSON takes in EIP-3076 compliant JSON file used for slashing protection by eth2 validators and imports its data into Prysm's internal representation of slashing protection in the validator client's database. For more information, see the EIP document here: https://eips.ethereum.org/EIPS/eip-3076.

func PubKeyFromHex added in v1.2.0

func PubKeyFromHex(str string) ([48]byte, error)

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

func RootFromHex added in v1.2.0

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

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

func SlotFromString added in v1.2.2

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

SlotFromString converts a string into Slot.

func Uint64FromString added in v1.2.0

func Uint64FromString(str string) (uint64, error)

Uint64FromString converts a string into a uint64 representation.

Types

This section is empty.

Directories

Path Synopsis
Package interchangeformat defines methods to parse, import, and export slashing protection data from a standard JSON file according to EIP-3076 https://eips.ethereum.org/EIPS/eip-3076.
Package interchangeformat defines methods to parse, import, and export slashing protection data from a standard JSON file according to EIP-3076 https://eips.ethereum.org/EIPS/eip-3076.

Jump to

Keyboard shortcuts

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