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.

26 lines
772 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. )
  8. // TODO: Figure out API for others to either add their own pubkey types, or
  9. // to make verify / marshal accept a cdc.
  10. const (
  11. PubKeyMultisigThresholdAminoRoute = "tendermint/PubKeyMultisigThreshold"
  12. )
  13. var cdc = amino.NewCodec()
  14. func init() {
  15. cdc.RegisterInterface((*crypto.PubKey)(nil), nil)
  16. cdc.RegisterConcrete(PubKeyMultisigThreshold{},
  17. PubKeyMultisigThresholdAminoRoute, nil)
  18. cdc.RegisterConcrete(ed25519.PubKeyEd25519{},
  19. ed25519.PubKeyAminoRoute, nil)
  20. cdc.RegisterConcrete(secp256k1.PubKeySecp256k1{},
  21. secp256k1.PubKeyAminoRoute, nil)
  22. }