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.

30 lines
901 B

  1. package multisig
  2. import (
  3. amino "github.com/tendermint/go-amino"
  4. "github.com/tendermint/tendermint/crypto"
  5. "github.com/tendermint/tendermint/crypto/ed25519"
  6. "github.com/tendermint/tendermint/crypto/secp256k1"
  7. "github.com/tendermint/tendermint/crypto/sr25519"
  8. )
  9. // TODO: Figure out API for others to either add their own pubkey types, or
  10. // to make verify / marshal accept a cdc.
  11. const (
  12. PubKeyMultisigThresholdAminoRoute = "tendermint/PubKeyMultisigThreshold"
  13. )
  14. var cdc = amino.NewCodec()
  15. func init() {
  16. cdc.RegisterInterface((*crypto.PubKey)(nil), nil)
  17. cdc.RegisterConcrete(PubKeyMultisigThreshold{},
  18. PubKeyMultisigThresholdAminoRoute, nil)
  19. cdc.RegisterConcrete(ed25519.PubKeyEd25519{},
  20. ed25519.PubKeyAminoName, nil)
  21. cdc.RegisterConcrete(sr25519.PubKeySr25519{},
  22. sr25519.PubKeyAminoName, nil)
  23. cdc.RegisterConcrete(secp256k1.PubKeySecp256k1{},
  24. secp256k1.PubKeyAminoName, nil)
  25. }