Documentation
¶
Index ¶
- type Parameter
- type Service
- func (s *Service) Close(ctx context.Context) error
- func (s *Service) ExportSlashingProtection(ctx context.Context) (map[[48]byte]*rules.SlashingProtection, error)
- func (s *Service) ImportSlashingProtection(ctx context.Context, protection map[[48]byte]*rules.SlashingProtection) error
- func (s *Service) OnCreateAccount(ctx context.Context, _ *rules.ReqMetadata, _ *rules.CreateAccountData) rules.Result
- func (s *Service) OnListAccounts(ctx context.Context, _ *rules.ReqMetadata, _ *rules.AccessAccountData) rules.Result
- func (s *Service) OnLockAccount(ctx context.Context, _ *rules.ReqMetadata, _ *rules.LockAccountData) rules.Result
- func (s *Service) OnLockWallet(ctx context.Context, _ *rules.ReqMetadata, _ *rules.LockWalletData) rules.Result
- func (s *Service) OnSign(ctx context.Context, metadata *rules.ReqMetadata, req *rules.SignData) rules.Result
- func (s *Service) OnSignBeaconAttestation(ctx context.Context, metadata *rules.ReqMetadata, ...) rules.Result
- func (s *Service) OnSignBeaconAttestations(ctx context.Context, metadata []*rules.ReqMetadata, ...) []rules.Result
- func (s *Service) OnSignBeaconProposal(ctx context.Context, metadata *rules.ReqMetadata, ...) rules.Result
- func (s *Service) OnUnlockAccount(ctx context.Context, _ *rules.ReqMetadata, _ *rules.UnlockAccountData) rules.Result
- func (s *Service) OnUnlockWallet(ctx context.Context, _ *rules.ReqMetadata, _ *rules.UnlockWalletData) rules.Result
- type Store
- func (s *Store) BatchStore(ctx context.Context, keys [][]byte, values [][]byte) error
- func (s *Store) Close(_ context.Context) error
- func (s *Store) Fetch(ctx context.Context, key []byte) ([]byte, error)
- func (s *Store) FetchAll(_ context.Context) (map[[49]byte][]byte, error)
- func (s *Store) Store(ctx context.Context, key []byte, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parameter ¶
type Parameter interface {
// contains filtered or unexported methods
}
Parameter is the interface for service parameters.
func WithAdminIPs ¶
WithAdminIPs sets the administration IP addreses for the module.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithStoragePath ¶
WithStoragePath sets the storage path for the module.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the structure that keeps track of rules.
func (*Service) ExportSlashingProtection ¶ added in v0.9.0
func (s *Service) ExportSlashingProtection(ctx context.Context) (map[[48]byte]*rules.SlashingProtection, error)
ExportSlashingProtection exports the slashing protection data.
func (*Service) ImportSlashingProtection ¶ added in v0.9.0
func (s *Service) ImportSlashingProtection(ctx context.Context, protection map[[48]byte]*rules.SlashingProtection) error
ImportSlashingProtection imports the slashing protection data.
func (*Service) OnCreateAccount ¶ added in v0.9.0
func (s *Service) OnCreateAccount(ctx context.Context, _ *rules.ReqMetadata, _ *rules.CreateAccountData) rules.Result
OnCreateAccount is called when a request to create an account needs to be approved.
func (*Service) OnListAccounts ¶
func (s *Service) OnListAccounts(ctx context.Context, _ *rules.ReqMetadata, _ *rules.AccessAccountData) rules.Result
OnListAccounts is called when a request to list accounts needs to be approved.
func (*Service) OnLockAccount ¶
func (s *Service) OnLockAccount(ctx context.Context, _ *rules.ReqMetadata, _ *rules.LockAccountData) rules.Result
OnLockAccount is called when a request to lock an account needs to be approved.
func (*Service) OnLockWallet ¶
func (s *Service) OnLockWallet(ctx context.Context, _ *rules.ReqMetadata, _ *rules.LockWalletData) rules.Result
OnLockWallet is called when a request to lock a wallet needs to be approved.
func (*Service) OnSign ¶
func (s *Service) OnSign(ctx context.Context, metadata *rules.ReqMetadata, req *rules.SignData) rules.Result
OnSign is called when a request to sign generic data needs to be approved.
func (*Service) OnSignBeaconAttestation ¶
func (s *Service) OnSignBeaconAttestation(ctx context.Context, metadata *rules.ReqMetadata, req *rules.SignBeaconAttestationData) rules.Result
OnSignBeaconAttestation is called when a request to sign a beacon block attestation needs to be approved.
func (*Service) OnSignBeaconAttestations ¶ added in v0.9.0
func (s *Service) OnSignBeaconAttestations(ctx context.Context, metadata []*rules.ReqMetadata, req []*rules.SignBeaconAttestationData, ) []rules.Result
OnSignBeaconAttestations is called when a request to sign multiple beacon block attestations needs to be approved.
func (*Service) OnSignBeaconProposal ¶
func (s *Service) OnSignBeaconProposal(ctx context.Context, metadata *rules.ReqMetadata, req *rules.SignBeaconProposalData) rules.Result
OnSignBeaconProposal is called when a request to sign a beacon block proposal needs to be approved.
func (*Service) OnUnlockAccount ¶
func (s *Service) OnUnlockAccount(ctx context.Context, _ *rules.ReqMetadata, _ *rules.UnlockAccountData) rules.Result
OnUnlockAccount is called when a request to unlock an account needs to be approved.
func (*Service) OnUnlockWallet ¶
func (s *Service) OnUnlockWallet(ctx context.Context, _ *rules.ReqMetadata, _ *rules.UnlockWalletData) rules.Result
OnUnlockWallet is called when a request to unlock a wallet needs to be approved.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds key/value pairs in a badger database.
func (*Store) BatchStore ¶ added in v0.9.0
BatchStore stores multiple keys and values.