Documentation ¶
Index ¶
- Constants
- type AccountLister
- type Deleter
- type IKeymanager
- type Importer
- type KeyChangeSubscriber
- type KeyStatus
- type KeyStatusType
- type KeyStoreExtractor
- type KeysFetcher
- type Keystore
- type Kind
- type ListKeymanagerAccountConfig
- type PublicKeyAdder
- type PublicKeyDeleter
- type PublicKeysFetcher
- type Signer
Constants ¶
const IncorrectPasswordErrMsg = "invalid checksum"
IncorrectPasswordErrMsg defines a common error string representing an EIP-2335 keystore password was incorrect.
const (
KeysReloaded = "Reloaded validator keys into keymanager"
)
KeysReloaded is a "key reloaded" message.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountLister ¶
type AccountLister interface {
ListKeymanagerAccounts(ctx context.Context, cfg ListKeymanagerAccountConfig) error
}
type Deleter ¶
type Deleter interface {
DeleteKeystores(ctx context.Context, publicKeys [][]byte) ([]*KeyStatus, error)
}
Deleter can delete keystores from the keymanager.
type IKeymanager ¶
type IKeymanager interface { PublicKeysFetcher Signer KeyChangeSubscriber KeyStoreExtractor AccountLister Deleter }
IKeymanager defines a general keymanager interface for Prysm wallets.
type Importer ¶
type Importer interface { ImportKeystores( ctx context.Context, keystores []*Keystore, passwords []string, ) ([]*KeyStatus, error) }
Importer can import new keystores into the keymanager.
type KeyChangeSubscriber ¶
type KeyChangeSubscriber interface {
SubscribeAccountChanges(pubKeysChan chan [][fieldparams.BLSPubkeyLength]byte) event.Subscription
}
KeyChangeSubscriber allows subscribing to changes made to the underlying keys.
type KeyStatus ¶
type KeyStatus struct { Status KeyStatusType `json:"status"` Message string `json:"message"` }
KeyStatus is a json representation of the status fields for the keymanager apis
type KeyStatusType ¶
type KeyStatusType string
KeyStatusType is a category of key status
const ( StatusImported KeyStatusType = "IMPORTED" StatusError KeyStatusType = "ERROR" StatusDuplicate KeyStatusType = "DUPLICATE" StatusUnknown KeyStatusType = "UNKNOWN" StatusNotFound KeyStatusType = "NOT_FOUND" StatusDeleted KeyStatusType = "DELETED" StatusNotActive KeyStatusType = "NOT_ACTIVE" )
type KeyStoreExtractor ¶
type KeyStoreExtractor interface {
ExtractKeystores(ctx context.Context, publicKeys []bls.PublicKey, password string) ([]*Keystore, error)
}
KeyStoreExtractor allows keys to be extracted from the keymanager.
type KeysFetcher ¶
type KeysFetcher interface { FetchValidatingPrivateKeys(ctx context.Context) ([][32]byte, error) PublicKeysFetcher }
KeysFetcher for validating private and public keys.
type Keystore ¶
type Keystore struct { Crypto map[string]interface{} `json:"crypto"` ID string `json:"uuid"` Pubkey string `json:"pubkey"` Version uint `json:"version"` Description string `json:"description"` Name string `json:"name,omitempty"` // field deprecated in favor of description, EIP2335 Path string `json:"path"` }
Keystore json file representation as a Go struct.
type Kind ¶
type Kind int
Kind defines an enum for either local, derived, or remote-signing keystores for Prysm wallets.
type PublicKeyAdder ¶
PublicKeyAdder allows adding public keys to the keymanager.
type PublicKeyDeleter ¶
PublicKeyDeleter allows deleting public keys set in keymanager.
type PublicKeysFetcher ¶
type PublicKeysFetcher interface {
FetchValidatingPublicKeys(ctx context.Context) ([][fieldparams.BLSPubkeyLength]byte, error)
}
PublicKeysFetcher for validating public keys.
type Signer ¶
type Signer interface {
Sign(context.Context, *validatorpb.SignRequest) (bls.Signature, error)
}
Signer allows signing messages using a validator private key.
Directories ¶
Path | Synopsis |
---|---|
Package local defines an implementation of an on-disk, EIP-2335 keystore.json approach towards defining validator accounts in Prysm.
|
Package local defines an implementation of an on-disk, EIP-2335 keystore.json approach towards defining validator accounts in Prysm. |
v1
Package v1 defines mappings of types as defined by the web3signer official specification for its v1 version i.e.
|
Package v1 defines mappings of types as defined by the web3signer official specification for its v1 version i.e. |