Documentation ¶
Index ¶
- func DisplayRemotePublicKeys(validatingPubKeys [][dilithium2.CryptoPublicKeyBytes]byte)
- type Keymanager
- func (km *Keymanager) AddPublicKeys(ctx context.Context, pubKeys [][dilithium2.CryptoPublicKeyBytes]byte) ([]*zondpbservice.ImportedRemoteKeysStatus, error)
- func (km *Keymanager) DeleteKeystores(context.Context, [][]byte) ([]*zondpbservice.DeletedKeystoreStatus, error)
- func (km *Keymanager) DeletePublicKeys(ctx context.Context, pubKeys [][dilithium2.CryptoPublicKeyBytes]byte) ([]*zondpbservice.DeletedRemoteKeysStatus, error)
- func (*Keymanager) ExtractKeystores(_ context.Context, _ []dilithium.PublicKey, _ string) ([]*keymanager.Keystore, error)
- func (km *Keymanager) FetchValidatingPublicKeys(ctx context.Context) ([][dilithium2.CryptoPublicKeyBytes]byte, error)
- func (km *Keymanager) ListKeymanagerAccounts(ctx context.Context, cfg keymanager.ListKeymanagerAccountConfig) error
- func (km *Keymanager) Sign(ctx context.Context, request *validatorpb.SignRequest) (dilithium.Signature, error)
- func (km *Keymanager) SubscribeAccountChanges(pubKeysChan chan [][dilithium2.CryptoPublicKeyBytes]byte) event.Subscription
- type SetupConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayRemotePublicKeys ¶
func DisplayRemotePublicKeys(validatingPubKeys [][dilithium2.CryptoPublicKeyBytes]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(ctx context.Context, pubKeys [][dilithium2.CryptoPublicKeyBytes]byte) ([]*zondpbservice.ImportedRemoteKeysStatus, 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) ([]*zondpbservice.DeletedKeystoreStatus, error)
DeleteKeystores is not supported for the remote-web3signer keymanager type.
func (*Keymanager) DeletePublicKeys ¶
func (km *Keymanager) DeletePublicKeys(ctx context.Context, pubKeys [][dilithium2.CryptoPublicKeyBytes]byte) ([]*zondpbservice.DeletedRemoteKeysStatus, 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, _ []dilithium.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) ([][dilithium2.CryptoPublicKeyBytes]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) (dilithium.Signature, error)
Sign signs the message by using a remote web3signer server.
func (*Keymanager) SubscribeAccountChanges ¶
func (km *Keymanager) SubscribeAccountChanges(pubKeysChan chan [][dilithium2.CryptoPublicKeyBytes]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 [][dilithium2.CryptoPublicKeyBytes]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.