grpc

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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 WithCACert

func WithCACert(caCert []byte) Parameter

WithCACert sets the CA certificate for this module.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.SenderMonitor) Parameter

WithMonitor sets the monitor for this module.

func WithName

func WithName(name string) Parameter

WithName sets the name for this module.

func WithServerCert

func WithServerCert(serverCert []byte) Parameter

WithServerCert sets the server certificate for this module.

func WithServerKey

func WithServerKey(serverKey []byte) Parameter

WithServerKey sets the server key for this module.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is used to manage the sender piece of distributed key generation operations.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new GRPC-based received service.

func (*Service) Abort

func (s *Service) Abort(ctx context.Context, peer *core.Endpoint, account string) error

Abort sends a request to the given participant to abort the given DKG.

func (*Service) Commit

func (s *Service) Commit(ctx context.Context, peer *core.Endpoint, account string, confirmationData []byte) ([]byte, []byte, error)

Commit sends a request to the given participant to commit the given DKG.

func (*Service) Execute

func (s *Service) Execute(ctx context.Context, peer *core.Endpoint, account string) error

Execute sends a request to the given participant to execute the given DKG.

func (*Service) Prepare

func (s *Service) Prepare(ctx context.Context,
	peer *core.Endpoint,
	account string,
	passphrase []byte,
	threshold uint32,
	participants []*core.Endpoint,
) error

Prepare sends a request to the given recipient to prepare for DKG.

func (*Service) SendContribution

func (s *Service) SendContribution(ctx context.Context, peer *core.Endpoint, account string, distributionSecret bls.SecretKey, verificationVector []bls.PublicKey) (bls.SecretKey, []bls.PublicKey, error)

SendContribution sends a contribution to a recipient.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL