Documentation ¶
Index ¶
- func GetAdaptedReDKG(originalDKG *types.ReDKG) (*types.ReDKG, error)
- type BaseNodeService
- func (s *BaseNodeService) ApproveParticipation(dto *dto.OperationIdDTO) error
- func (s *BaseNodeService) GetLogger() logger.Logger
- func (s *BaseNodeService) GetPubKey() ed25519.PublicKey
- func (s *BaseNodeService) GetSkipCommKeysVerification() bool
- func (s *BaseNodeService) GetStateOffset() (uint64, error)
- func (s *BaseNodeService) GetUsername() string
- func (s *BaseNodeService) Poll() error
- func (s *BaseNodeService) ProcessMessage(message storage.Message) error
- func (s *BaseNodeService) ProcessOperation(dto *dto.OperationDTO) error
- func (s *BaseNodeService) ProposeSignMessages(dtoMsg *dto.ProposeSignBatchMessagesDTO) error
- func (s *BaseNodeService) ReInitDKG(dto *dto.ReInitDKGDTO) error
- func (s *BaseNodeService) SaveOffset(dto *dto.StateOffsetDTO) error
- func (s *BaseNodeService) SendMessage(dto *dto.MessageDTO) error
- func (s *BaseNodeService) SetSkipCommKeysVerification(b bool)
- func (s *BaseNodeService) StartDKG(dto *dto.StartDkgDTO) error
- type NodeService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseNodeService ¶
type BaseNodeService struct { sync.Mutex Logger logger.Logger SkipCommKeysVerification bool // contains filtered or unexported fields }
func (*BaseNodeService) ApproveParticipation ¶
func (s *BaseNodeService) ApproveParticipation(dto *dto.OperationIdDTO) error
func (*BaseNodeService) GetLogger ¶
func (s *BaseNodeService) GetLogger() logger.Logger
func (*BaseNodeService) GetPubKey ¶
func (s *BaseNodeService) GetPubKey() ed25519.PublicKey
func (*BaseNodeService) GetSkipCommKeysVerification ¶
func (s *BaseNodeService) GetSkipCommKeysVerification() bool
func (*BaseNodeService) GetStateOffset ¶
func (s *BaseNodeService) GetStateOffset() (uint64, error)
func (*BaseNodeService) GetUsername ¶
func (s *BaseNodeService) GetUsername() string
func (*BaseNodeService) Poll ¶
func (s *BaseNodeService) Poll() error
Poll is a main node loop, which gets new messages from an append-only log and processes them
func (*BaseNodeService) ProcessMessage ¶
func (s *BaseNodeService) ProcessMessage(message storage.Message) error
func (*BaseNodeService) ProcessOperation ¶
func (s *BaseNodeService) ProcessOperation(dto *dto.OperationDTO) error
ProcessOperation handles an operation which was processed by the airgapped machine It checks that the operation exists in an operation pool, signs the operation, sends it to an append-only log and deletes it from the pool.
func (*BaseNodeService) ProposeSignMessages ¶
func (s *BaseNodeService) ProposeSignMessages(dtoMsg *dto.ProposeSignBatchMessagesDTO) error
func (*BaseNodeService) ReInitDKG ¶
func (s *BaseNodeService) ReInitDKG(dto *dto.ReInitDKGDTO) error
func (*BaseNodeService) SaveOffset ¶
func (s *BaseNodeService) SaveOffset(dto *dto.StateOffsetDTO) error
func (*BaseNodeService) SendMessage ¶
func (s *BaseNodeService) SendMessage(dto *dto.MessageDTO) error
func (*BaseNodeService) SetSkipCommKeysVerification ¶
func (s *BaseNodeService) SetSkipCommKeysVerification(b bool)
func (*BaseNodeService) StartDKG ¶
func (s *BaseNodeService) StartDKG(dto *dto.StartDkgDTO) error
type NodeService ¶
type NodeService interface { Poll() error GetLogger() logger.Logger GetPubKey() ed25519.PublicKey GetUsername() string ApproveParticipation(dto *dto.OperationIdDTO) error SendMessage(dto *dto.MessageDTO) error ProcessMessage(message storage.Message) error ProcessOperation(dto *dto.OperationDTO) error StartDKG(dto *dto.StartDkgDTO) error ReInitDKG(dto *dto.ReInitDKGDTO) error SetSkipCommKeysVerification(bool) ProposeSignMessages(dto *dto.ProposeSignBatchMessagesDTO) error SaveOffset(dto *dto.StateOffsetDTO) error GetStateOffset() (uint64, error) }
func NewNode ¶
func NewNode(ctx context.Context, config *config.Config, sp *services.ServiceProvider) (NodeService, error)
Click to show internal directories.
Click to hide internal directories.