Documentation ¶
Index ¶
- Variables
- func MigrateAccountToValidatorKey(acckeypath string, valkeypath string, pubkey validatorpk.PubKey) error
- type EncryptedKeyJSON
- type Keystore
- func (ks Keystore) EncryptKey(pubkey validatorpk.PubKey, key []byte, auth string) ([]byte, error)
- func (ks Keystore) ReadKey(wantPubkey validatorpk.PubKey, filename, auth string) (*PrivateKey, error)
- func (ks Keystore) StoreKey(filename string, pubkey validatorpk.PubKey, key []byte, auth string) error
- type PrivateKey
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotSupportedType = errors.New("not supported key type")
)
Functions ¶
func MigrateAccountToValidatorKey ¶
func MigrateAccountToValidatorKey(acckeypath string, valkeypath string, pubkey validatorpk.PubKey) error
Types ¶
type EncryptedKeyJSON ¶
type EncryptedKeyJSON struct { Type uint8 `json:"type"` PublicKey string `json:"pubkey"` Crypto keystore.CryptoJSON `json:"crypto"` }
type Keystore ¶
type Keystore struct {
// contains filtered or unexported fields
}
func (Keystore) EncryptKey ¶
EncryptKey encrypts a key using the specified scrypt parameters into a json blob that can be decrypted later on.
func (Keystore) ReadKey ¶
func (ks Keystore) ReadKey(wantPubkey validatorpk.PubKey, filename, auth string) (*PrivateKey, error)
type PrivateKey ¶
func DecryptKey ¶
func DecryptKey(keyjson []byte, auth string) (*PrivateKey, error)
DecryptKey decrypts a key from a json blob, returning the private key itself.
Click to show internal directories.
Click to hide internal directories.