validator

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 14 Imported by: 15

Documentation

Index

Constants

View Source
const (
	EthWithdrawalPrefix byte = 0x01
)

Variables

This section is empty.

Functions

func GetDepositData

func GetDepositData(validatorKey *eth2types.BLSPrivateKey, withdrawalCredentials common.Hash, genesisForkVersion []byte, depositAmount uint64, networkName string) (beacon.ExtendedDepositData, error)

Get deposit data & root for a given validator key and withdrawal credentials

func GetPrivateKey

func GetPrivateKey(mnemonic string, path string) (*eth2types.BLSPrivateKey, error)

Get a private BLS key from the mnemonic and path.

func GetSignedExitMessage

func GetSignedExitMessage(validatorKey *eth2types.BLSPrivateKey, validatorIndex string, epoch uint64, signatureDomain []byte) (beacon.ValidatorSignature, error)

Get a voluntary exit message signature for a given validator key and index

func GetSignedWithdrawalCredsChangeMessage

func GetSignedWithdrawalCredsChangeMessage(withdrawalKey *eth2types.BLSPrivateKey, validatorIndex string, newWithdrawalAddress common.Address, signatureDomain []byte) (beacon.ValidatorSignature, error)

Get a voluntary exit message signature for a given validator key and index

func GetWithdrawalCredsFromAddress

func GetWithdrawalCredsFromAddress(address common.Address) common.Hash

Convert an address into 0x01-prefixed withdrawal credentials suitable for depositing into Beacon

func GetWithdrawalKey

func GetWithdrawalKey(mnemonic string, validatorKeyPath string) (*eth2types.BLSPrivateKey, error)

Get the withdrawal private key for a validator based on its mnemonic, index, and path

func InitializeBls

func InitializeBls() error

Types

type ValidatorManager

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

func NewValidatorManager

func NewValidatorManager(validatorPath string) *ValidatorManager

func (*ValidatorManager) LoadKey

Loads a validator key from the manager's client keystores

func (*ValidatorManager) StoreKey

func (m *ValidatorManager) StoreKey(key *types.BLSPrivateKey, derivationPath string) error

Stores a validator key into all of the manager's client keystores

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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