keymanager

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2024 License: GPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const IncorrectPasswordErrMsg = "invalid checksum"

IncorrectPasswordErrMsg defines a common error string representing an EIP-2335 keystore password was incorrect.

View Source
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) ([]*ethpbservice.DeletedKeystoreStatus, error)
}

Deleter can delete keystores from the keymanager.

type IKeymanager

IKeymanager defines a general keymanager interface for Prysm wallets.

type Importer

type Importer interface {
	ImportKeystores(
		ctx context.Context, keystores []*Keystore, passwords []string,
	) ([]*ethpbservice.ImportedKeystoreStatus, 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 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.

const (
	// Local keymanager defines an on-disk, encrypted keystore-capable store.
	Local Kind = iota
	// Derived keymanager using a hierarchical-deterministic algorithm.
	Derived
	// Web3Signer keymanager capable of signing data using a remote signer called Web3Signer.
	Web3Signer
)

func ParseKind

func ParseKind(k string) (Kind, error)

ParseKind from a raw string, returning a keymanager kind.

func (Kind) String

func (k Kind) String() string

String marshals a keymanager kind to a string value.

type ListKeymanagerAccountConfig

type ListKeymanagerAccountConfig struct {
	ShowDepositData          bool
	ShowPrivateKeys          bool
	WalletAccountsDir        string
	KeymanagerConfigFileName string
}

type PublicKeyAdder

type PublicKeyAdder interface {
	AddPublicKeys(ctx context.Context, publicKeys [][fieldparams.BLSPubkeyLength]byte) ([]*ethpbservice.ImportedRemoteKeysStatus, error)
}

PublicKeyAdder allows adding public keys to the keymanager.

type PublicKeyDeleter

type PublicKeyDeleter interface {
	DeletePublicKeys(ctx context.Context, publicKeys [][fieldparams.BLSPubkeyLength]byte) ([]*ethpbservice.DeletedRemoteKeysStatus, error)
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL