Documentation ¶
Index ¶
- Variables
- func GenerateRandomMnemonics() (string, error)
- func Seed(mnemonic, mnemonicPassphrase string) ([]byte, error)
- type DepositData
- type KeystoreManager
- func (mngr *KeystoreManager) DecryptFromKeystore(ks map[string]interface{}, pwd string) (*ValidatorKey, error)
- func (mngr *KeystoreManager) EncryptToPbkdf2Keystore(vKey *ValidatorKey, pwd string) (map[string]interface{}, error)
- func (mngr *KeystoreManager) EncryptToPrysmKeystore(vkeys []*ValidatorKey, pwd string) (map[string]interface{}, error)
- func (mngr *KeystoreManager) EncryptToScryptKeystore(vKey *ValidatorKey, pwd string) (map[string]interface{}, error)
- func (mngr *KeystoreManager) GenerateValidatorKeys(mnemonic string, count int, storeMnemo bool, cb func(string) error) (keys []*ValidatorKey, err error)
- type ValidatorKey
- func GenerateValidatorKey(seed []byte, path, desc string) (*ValidatorKey, error)
- func GenerateValidatorKeys(mnemonicPassphrase, mnemonicPassword string, count int, storeMnemo bool, ...) (keys []*ValidatorKey, err error)
- func ValidatorKeyFromBytes(privkey []byte) (*ValidatorKey, error)
- func ValidatorKeyFromString(privkey string) (*ValidatorKey, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Networks = map[string]beaconcommon.Version{
"mainnet": {0x00, 0x00, 0x00, 0x00},
"prater": {0x00, 0x00, 0x10, 0x20},
"kintsugi": {0x60, 0x00, 0x10, 0x69},
"kiln": {0x70, 0x00, 0x00, 0x69},
}
Functions ¶
func GenerateRandomMnemonics ¶
Types ¶
type DepositData ¶
type DepositData struct { *beaconcommon.DepositData Version beaconcommon.Version }
func ComputeDepositData ¶
func ComputeDepositData( vkey *ValidatorKey, withdrawalCredentials beaconcommon.Root, amount beaconcommon.Gwei, version beaconcommon.Version, ) (*DepositData, error)
func (*DepositData) MarshalJSON ¶
func (data *DepositData) MarshalJSON() ([]byte, error)
type KeystoreManager ¶
type KeystoreManager struct {
// contains filtered or unexported fields
}
func NewKeystoreManager ¶
func NewKeystoreManager() *KeystoreManager
func (*KeystoreManager) DecryptFromKeystore ¶
func (mngr *KeystoreManager) DecryptFromKeystore(ks map[string]interface{}, pwd string) (*ValidatorKey, error)
func (*KeystoreManager) EncryptToPbkdf2Keystore ¶
func (mngr *KeystoreManager) EncryptToPbkdf2Keystore(vKey *ValidatorKey, pwd string) (map[string]interface{}, error)
func (*KeystoreManager) EncryptToPrysmKeystore ¶
func (mngr *KeystoreManager) EncryptToPrysmKeystore(vkeys []*ValidatorKey, pwd string) (map[string]interface{}, error)
func (*KeystoreManager) EncryptToScryptKeystore ¶
func (mngr *KeystoreManager) EncryptToScryptKeystore(vKey *ValidatorKey, pwd string) (map[string]interface{}, error)
func (*KeystoreManager) GenerateValidatorKeys ¶
func (mngr *KeystoreManager) GenerateValidatorKeys(mnemonic string, count int, storeMnemo bool, cb func(string) error) (keys []*ValidatorKey, err error)
type ValidatorKey ¶
type ValidatorKey struct { UUID string PrivKey *e2types.BLSPrivateKey Pubkey string MnemonicPassphrase string MnemonicPassword string Path string Desc string }
func GenerateValidatorKey ¶
func GenerateValidatorKey(seed []byte, path, desc string) (*ValidatorKey, error)
func GenerateValidatorKeys ¶
func ValidatorKeyFromBytes ¶
func ValidatorKeyFromBytes(privkey []byte) (*ValidatorKey, error)
func ValidatorKeyFromString ¶
func ValidatorKeyFromString(privkey string) (*ValidatorKey, error)
Click to show internal directories.
Click to hide internal directories.