utils

package
v0.2.1-dev Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

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, network types.Network) (types.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

This section is empty.

Jump to

Keyboard shortcuts

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