Documentation
¶
Index ¶
- Variables
- func DepositDomain(version beaconcommon.Version) beaconcommon.BLSDomain
- 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 DepositDomain ¶ added in v0.2.4
func DepositDomain(version beaconcommon.Version) beaconcommon.BLSDomain
Return the bls domain for deposit
func GenerateRandomMnemonics ¶
Types ¶
type DepositData ¶
type DepositData struct {
*beaconcommon.DepositData
Version beaconcommon.Version
}
func NewDepositData ¶ added in v0.2.4
func NewDepositData( pubkey []byte, withdrawalCredentials beaconcommon.Root, amount beaconcommon.Gwei, version beaconcommon.Version, ) (*DepositData, error)
NewDepositData creates a DepositData object
func (*DepositData) MarshalJSON ¶
func (data *DepositData) MarshalJSON() ([]byte, error)
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.