Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultEthDerivationPath string = "m/44'/60'/0'/0/%d" DefaultBeaconDerivationPath string = "m/12381/3600/%d/0/0" DefaultMnemonic string = "test test test test test test test test test test test junk" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyGenerator ¶
type KeyGenerator struct {
// contains filtered or unexported fields
}
KeyGenerator is a simple utility for generating EOA and BLS private keys from a mnemonic and derivation paths. This is meant to be used in testing scenarios where complete flexibility of derivation paths isn't a priority.
func NewKeyGenerator ¶
func NewKeyGenerator(mnemonic string, ethDerivationPath string, blsDerivationPath string) (*KeyGenerator, error)
Create a new key generator from explicit values
func NewKeyGeneratorWithDefaults ¶
func NewKeyGeneratorWithDefaults() (*KeyGenerator, error)
Create a new key generator with default values
func (*KeyGenerator) GetBlsPrivateKey ¶
func (g *KeyGenerator) GetBlsPrivateKey(index uint) (*types.BLSPrivateKey, error)
Get the BLS private key for the given index
func (*KeyGenerator) GetEthPrivateKey ¶
func (g *KeyGenerator) GetEthPrivateKey(index uint) (*ecdsa.PrivateKey, error)
Get the EOA private key for the given index
Click to show internal directories.
Click to hide internal directories.