Documentation ¶
Index ¶
- func NewDenying() rules.Service
- func NewFailing() rules.Service
- type Service
- func (s *Service) ExportSlashingProtection(_ context.Context) (map[[48]byte]*rules.SlashingProtection, error)
- func (s *Service) ImportSlashingProtection(_ context.Context, _ map[[48]byte]*rules.SlashingProtection) error
- func (s *Service) Name() string
- func (s *Service) OnCreateAccount(_ context.Context, _ *rules.ReqMetadata, _ *rules.CreateAccountData) rules.Result
- func (s *Service) OnListAccounts(_ context.Context, _ *rules.ReqMetadata, _ *rules.AccessAccountData) rules.Result
- func (s *Service) OnLockAccount(_ context.Context, _ *rules.ReqMetadata, _ *rules.LockAccountData) rules.Result
- func (s *Service) OnLockWallet(_ context.Context, _ *rules.ReqMetadata, _ *rules.LockWalletData) rules.Result
- func (s *Service) OnSign(_ context.Context, _ *rules.ReqMetadata, _ *rules.SignData) rules.Result
- func (s *Service) OnSignBeaconAttestation(_ context.Context, _ *rules.ReqMetadata, _ *rules.SignBeaconAttestationData) rules.Result
- func (s *Service) OnSignBeaconAttestations(_ context.Context, _ []*rules.ReqMetadata, ...) []rules.Result
- func (s *Service) OnSignBeaconProposal(_ context.Context, _ *rules.ReqMetadata, _ *rules.SignBeaconProposalData) rules.Result
- func (s *Service) OnUnlockAccount(_ context.Context, _ *rules.ReqMetadata, _ *rules.UnlockAccountData) rules.Result
- func (s *Service) OnUnlockWallet(_ context.Context, _ *rules.ReqMetadata, _ *rules.UnlockWalletData) rules.Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDenying ¶ added in v1.1.0
NewDenying creates a mock rules service that denies all requests.
func NewFailing ¶ added in v1.1.0
NewFailing creates a mock rules service that fails all requests.
Types ¶
type Service ¶
type Service struct{}
Service is the structure that keeps track of rules.
func (*Service) ExportSlashingProtection ¶ added in v0.9.0
func (s *Service) ExportSlashingProtection(_ 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(_ context.Context, _ map[[48]byte]*rules.SlashingProtection) error
ImportSlashingProtection impports the slashing protection data.
func (*Service) OnCreateAccount ¶ added in v0.9.0
func (s *Service) OnCreateAccount(_ 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(_ 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(_ 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(_ context.Context, _ *rules.ReqMetadata, _ *rules.LockWalletData) rules.Result
OnLockWallet is called when a request to lock a wallet needs to be approved.
func (*Service) OnSignBeaconAttestation ¶
func (s *Service) OnSignBeaconAttestation(_ context.Context, _ *rules.ReqMetadata, _ *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(_ context.Context, _ []*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(_ context.Context, _ *rules.ReqMetadata, _ *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(_ 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(_ context.Context, _ *rules.ReqMetadata, _ *rules.UnlockWalletData) rules.Result
OnUnlockWallet is called when a request to unlock a wallet needs to be approved.