github.com/koko1123/flow-go-1@v0.29.6/module/signer.go (about)

     1  package module
     2  
     3  import (
     4  	"errors"
     5  
     6  	"github.com/onflow/flow-go/crypto"
     7  )
     8  
     9  var (
    10  	// DKGFailError indicates that the node has completed DKG, but failed to genereate private key
    11  	// in the given epoch
    12  	DKGFailError = errors.New("dkg failed, no DKG private key generated")
    13  )
    14  
    15  // RandomBeaconKeyStore returns the random beacon private key for the given view,
    16  type RandomBeaconKeyStore interface {
    17  	// It returns:
    18  	//  - (signer, nil) if the node has beacon keys in the epoch of the view
    19  	//  - (nil, DKGFailError) if the node doesn't have beacon keys in the epoch of the view
    20  	//  - (nil, error) if there is any exception
    21  	ByView(view uint64) (crypto.PrivateKey, error)
    22  }