Documentation ¶
Index ¶
- func DepositDomain(version beaconcommon.Version) beaconcommon.BLSDomain
- func GenerateRandomMnemonics() (string, error)
- func Seed(mnemonic, mnemonicPassphrase string) ([]byte, error)
- func ValidateDepositData(expectedCreds beaconcommon.Root, expectedVersion beaconcommon.Version, ...) error
- type DepositData
- func (data *DepositData) MarshalJSON() ([]byte, error)
- func (data *DepositData) Network() string
- func (data *DepositData) Sign(vkey *ValidatorKey) (*DepositData, error)
- func (data *DepositData) SigningRoot() beaconcommon.Root
- func (data *DepositData) UnmarshalJSON(b []byte) error
- func (data *DepositData) VerifySignature() (bool, error)
- 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 ¶
This section is empty.
Functions ¶
func DepositDomain ¶ added in v0.2.4
func DepositDomain(version beaconcommon.Version) beaconcommon.BLSDomain
Return the bls domain for deposit
func GenerateRandomMnemonics ¶
func ValidateDepositData ¶ added in v0.2.8
func ValidateDepositData( expectedCreds beaconcommon.Root, expectedVersion beaconcommon.Version, expectedAmount beaconcommon.Gwei, datas ...*DepositData, ) error
Types ¶
type DepositData ¶
type DepositData struct { beaconcommon.DepositData Version beaconcommon.Version }
func (*DepositData) MarshalJSON ¶
func (data *DepositData) MarshalJSON() ([]byte, error)
func (*DepositData) Network ¶ added in v0.2.5
func (data *DepositData) Network() string
func (*DepositData) Sign ¶ added in v0.2.4
func (data *DepositData) Sign( vkey *ValidatorKey, ) (*DepositData, error)
func (*DepositData) SigningRoot ¶ added in v0.2.4
func (data *DepositData) SigningRoot() beaconcommon.Root
Compute DepositMessage root to be signed
func (*DepositData) UnmarshalJSON ¶ added in v0.2.4
func (data *DepositData) UnmarshalJSON(b []byte) error
func (*DepositData) VerifySignature ¶ added in v0.2.4
func (data *DepositData) VerifySignature() (bool, 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.