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