Documentation
¶
Overview ¶
Package keystore provides functions to store and load private keys to/from EIP 2335 (https://eips.ethereum.org/EIPS/eip-2335) compatible keystore files. Passwords are expected/created in files with same identical names as the keystores, except with txt extension.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConfirmInsecureKeys confirmInsecure
ConfirmInsecureKeys is syntactic sugar to highlight the security implications of insecure keys.
Functions ¶
func LoadKeys ¶
LoadKeys returns all secrets stored in dir/keystore-*.json 2335 keystore files using password stored in dir/keystore-*.txt.
func StoreKeys ¶
StoreKeys stores the secrets in dir/keystore-%d.json EIP 2335 keystore files with new random passwords stored in dir/keystore-%d.txt.
func StoreKeysInsecure ¶ added in v0.11.0
StoreKeysInsecure stores the secrets in dir/keystore-insecure-%d.json EIP 2335 keystore files with new random passwords stored in dir/keystore-insecure-%d.txt.
🚨 The keystores are insecure and should only be used for testing large validator sets as it speeds up encryption and decryption at the cost of security.
Types ¶
type KeymanagerReq ¶ added in v0.13.0
type KeymanagerReq struct { Keystores []keystore `json:"keystores"` Passwords []string `json:"passwords"` }
KeymanagerReq represents the keymanager API request body for POST request. Refer: https://ethereum.github.io/keymanager-APIs/#/Local%20Key%20Manager/importKeystores
func KeymanagerReqBody ¶ added in v0.13.0
func KeymanagerReqBody(secrets []*bls_sig.SecretKey) (KeymanagerReq, error)
KeymanagerReqBody constructs a KeymanagerReq using the provided secrets and returns it.