You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
709 B

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