github.com/project-88388/tendermint-v0.34.14-terra.2@v1.0.0/types/signable.go (about) 1 package types 2 3 import ( 4 "github.com/tendermint/tendermint/crypto/ed25519" 5 tmmath "github.com/tendermint/tendermint/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 marshalling. 21 type Signable interface { 22 SignBytes(chainID string) []byte 23 }