Documentation ¶
Index ¶
- func DisplayRemotePublicKeys(validatingPubKeys [][48]byte)
- type Keymanager
- func (km *Keymanager) AddPublicKeys(pubKeys []string) []*keymanager.KeyStatus
- func (km *Keymanager) DeleteKeystores(context.Context, [][]byte) ([]*keymanager.KeyStatus, error)
- func (km *Keymanager) DeletePublicKeys(pubKeys []string) []*keymanager.KeyStatus
- func (*Keymanager) ExtractKeystores(_ context.Context, _ []bls.PublicKey, _ string) ([]*keymanager.Keystore, error)
- func (km *Keymanager) FetchValidatingPublicKeys(ctx context.Context) ([][fieldparams.BLSPubkeyLength]byte, error)
- func (km *Keymanager) ListKeymanagerAccounts(ctx context.Context, cfg keymanager.ListKeymanagerAccountConfig) error
- func (km *Keymanager) Sign(ctx context.Context, request *validatorpb.SignRequest) (bls.Signature, error)
- func (km *Keymanager) SubscribeAccountChanges(pubKeysChan chan [][fieldparams.BLSPubkeyLength]byte) event.Subscription
- type SetupConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayRemotePublicKeys ¶
func DisplayRemotePublicKeys(validatingPubKeys [][48]byte)
DisplayRemotePublicKeys prints remote public keys to stdout.
Types ¶
type Keymanager ¶
type Keymanager struct {
// contains filtered or unexported fields
}
Keymanager defines the web3signer keymanager.
func NewKeymanager ¶
func NewKeymanager(_ context.Context, cfg *SetupConfig) (*Keymanager, error)
NewKeymanager instantiates a new web3signer key manager.
func (*Keymanager) AddPublicKeys ¶
func (km *Keymanager) AddPublicKeys(pubKeys []string) []*keymanager.KeyStatus
AddPublicKeys imports a list of public keys into the keymanager for web3signer use. Returns status with message.
func (*Keymanager) DeleteKeystores ¶
func (km *Keymanager) DeleteKeystores(context.Context, [][]byte) ([]*keymanager.KeyStatus, error)
DeleteKeystores is not supported for the remote-web3signer keymanager type.
func (*Keymanager) DeletePublicKeys ¶
func (km *Keymanager) DeletePublicKeys(pubKeys []string) []*keymanager.KeyStatus
DeletePublicKeys removes a list of public keys from the keymanager for web3signer use. Returns status with message.
func (*Keymanager) ExtractKeystores ¶
func (*Keymanager) ExtractKeystores( _ context.Context, _ []bls.PublicKey, _ string, ) ([]*keymanager.Keystore, error)
ExtractKeystores is not supported for the remote-web3signer keymanager type.
func (*Keymanager) FetchValidatingPublicKeys ¶
func (km *Keymanager) FetchValidatingPublicKeys(ctx context.Context) ([][fieldparams.BLSPubkeyLength]byte, error)
FetchValidatingPublicKeys fetches the validating public keys from the remote server or from the provided keys if there are no existing public keys set or provides the existing keys in the keymanager.
func (*Keymanager) ListKeymanagerAccounts ¶
func (km *Keymanager) ListKeymanagerAccounts(ctx context.Context, cfg keymanager.ListKeymanagerAccountConfig) error
func (*Keymanager) Sign ¶
func (km *Keymanager) Sign(ctx context.Context, request *validatorpb.SignRequest) (bls.Signature, error)
Sign signs the message by using a remote web3signer server.
func (*Keymanager) SubscribeAccountChanges ¶
func (km *Keymanager) SubscribeAccountChanges(pubKeysChan chan [][fieldparams.BLSPubkeyLength]byte) event.Subscription
SubscribeAccountChanges returns the event subscription for changes to public keys.
type SetupConfig ¶
type SetupConfig struct { BaseEndpoint string GenesisValidatorsRoot []byte // Either URL or keylist must be set. // If the URL is set, the keymanager will fetch the public keys from the URL. // caution: this option is susceptible to slashing if the web3signer's validator keys are shared across validators PublicKeysURL string // Either URL or keylist must be set. // a static list of public keys to be passed by the user to determine what accounts should sign. // This will provide a layer of safety against slashing if the web3signer is shared across validators. ProvidedPublicKeys [][48]byte }
SetupConfig includes configuration values for initializing. a keymanager, such as passwords, the wallet, and more. Web3Signer contains one public keys option. Either through a URL or a static key list.