process

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	// OnPrepare is called when we receive a request from the given participant to prepare for DKG.
	OnPrepare(ctx context.Context, sender uint64, account string, passphrase []byte, threshold uint32, participants []*core.Endpoint) error

	// OnExecute is called when we receive a request from the given participant to execute the given DKG.
	OnExecute(ctx context.Context, sender uint64, account string) error

	// OnCommit is called when we receive a request from the given participant to commit the given DKG.
	OnCommit(ctx context.Context, sender uint64, account string, confirmationData []byte) ([]byte, []byte, error)

	// OnAbort is called when we receive a request from the given participant to abort the given DKG.
	OnAbort(ctx context.Context, sender uint64, account string) error

	// OnGenerate is called when an request to generate a new key is received.
	OnGenerate(ctx context.Context, credentials *checker.Credentials, account string, passphrase []byte, threshold uint32, numParticipants uint32) ([]byte, []*core.Endpoint, error)

	// OnContribute is is called when we need to swap contributions with another participant.
	OnContribute(ctx context.Context, sender uint64, account string, secret bls.SecretKey, vVec []bls.PublicKey) (bls.SecretKey, []bls.PublicKey, error)
}

Service is the interface for a DKG process.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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