github.com/vipernet-xyz/tm@v0.34.24/types/signable.go (about)

     1  package types
     2  
     3  import (
     4  	"github.com/vipernet-xyz/tm/crypto/ed25519"
     5  	tmmath "github.com/vipernet-xyz/tm/libs/math"
     6  )
     7  
     8  var (
     9  	// MaxSignatureSize is a maximum allowed signature size for the Proposal
    10  	// and Vote.
    11  	// XXX: secp256k1 does not have Size nor MaxSize defined.
    12  	MaxSignatureSize = tmmath.MaxInt(ed25519.SignatureSize, 64)
    13  )
    14  
    15  // Signable is an interface for all signable things.
    16  // It typically removes signatures before serializing.
    17  // SignBytes returns the bytes to be signed
    18  // NOTE: chainIDs are part of the SignBytes but not
    19  // necessarily the object themselves.
    20  // NOTE: Expected to panic if there is an error marshaling.
    21  type Signable interface {
    22  	SignBytes(chainID string) []byte
    23  }