github.com/koko1123/flow-go-1@v0.29.6/state/protocol/dkg.go (about) 1 package protocol 2 3 import ( 4 "github.com/koko1123/flow-go-1/model/flow" 5 "github.com/onflow/flow-go/crypto" 6 ) 7 8 // DKG represents the result of running the distributed key generation 9 // procedure for the random beacon. 10 type DKG interface { 11 12 // Size is the number of members in the DKG. 13 Size() uint 14 15 // GroupKey is the group public key. 16 GroupKey() crypto.PublicKey 17 18 // Index returns the index for the given node. 19 // Error Returns: 20 // * protocol.IdentityNotFoundError if nodeID is not a valid DKG participant. 21 Index(nodeID flow.Identifier) (uint, error) 22 23 // KeyShare returns the public key share for the given node. 24 // Error Returns: 25 // * protocol.IdentityNotFoundError if nodeID is not a valid DKG participant. 26 KeyShare(nodeID flow.Identifier) (crypto.PublicKey, error) 27 }