github.com/koko1123/flow-go-1@v0.29.6/model/encoding/sigtypes.go (about)

     1  package encoding
     2  
     3  // SigType is the aggregable signature type.
     4  type SigType uint8
     5  
     6  // SigType specifies the role of the signature in the protocol.
     7  // Both types are aggregatable cryptographic signatures.
     8  //   - SigTypeRandomBeacon type is for random beacon signatures.
     9  //   - SigTypeStaking is for Hotstuff signatures.
    10  const (
    11  	SigTypeStaking      SigType = 0
    12  	SigTypeRandomBeacon SigType = 1
    13  )
    14  
    15  // Valid returns true if the signature is either SigTypeStaking or SigTypeRandomBeacon
    16  // else return false
    17  func (t SigType) Valid() bool {
    18  	return t == SigTypeStaking || t == SigTypeRandomBeacon
    19  }