Documentation ¶
Index ¶
- func DisplayRemotePublicKeys(validatingPubKeys [][48]byte)
- type Keymanager
- func (km *Keymanager) AddPublicKeys(pubKeys []string) ([]*keymanager.KeyStatus, error)
- func (km *Keymanager) DeleteKeystores(context.Context, [][]byte) ([]*keymanager.KeyStatus, error)
- func (km *Keymanager) DeletePublicKeys(publicKeys []string) ([]*keymanager.KeyStatus, error)
- func (*Keymanager) ExtractKeystores(_ context.Context, _ []bls.PublicKey, _ string) ([]*keymanager.Keystore, error)
- func (km *Keymanager) FetchValidatingPublicKeys(_ 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(ctx context.Context, cfg *SetupConfig) (*Keymanager, error)
NewKeymanager instantiates a new web3signer key manager.
func (*Keymanager) AddPublicKeys ¶
func (km *Keymanager) AddPublicKeys(pubKeys []string) ([]*keymanager.KeyStatus, error)
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(publicKeys []string) ([]*keymanager.KeyStatus, error)
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(_ context.Context) ([][fieldparams.BLSPubkeyLength]byte, error)
FetchValidatingPublicKeys fetches the validating public keys
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 { KeyFilePath string 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 []string }
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.