github.com/cosmos/cosmos-sdk@v0.50.1/crypto/keys/multisig/codec.go (about) 1 package multisig 2 3 import ( 4 "github.com/cometbft/cometbft/crypto/sr25519" 5 6 "github.com/cosmos/cosmos-sdk/codec" 7 "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" 8 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" 9 cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" 10 ) 11 12 // TODO: Figure out API for others to either add their own pubkey types, or 13 // to make verify / marshal accept a AminoCdc. 14 const ( 15 PubKeyAminoRoute = "tendermint/PubKeyMultisigThreshold" 16 ) 17 18 // AminoCdc is being deprecated in the SDK. But even if you need to 19 // use Amino for some reason, please use `codec/legacy.Cdc` instead. 20 var AminoCdc = codec.NewLegacyAmino() 21 22 func init() { 23 AminoCdc.RegisterInterface((*cryptotypes.PubKey)(nil), nil) 24 AminoCdc.RegisterConcrete(ed25519.PubKey{}, 25 ed25519.PubKeyName, nil) 26 AminoCdc.RegisterConcrete(sr25519.PubKey{}, 27 sr25519.PubKeyName, nil) 28 AminoCdc.RegisterConcrete(&secp256k1.PubKey{}, 29 secp256k1.PubKeyName, nil) 30 AminoCdc.RegisterConcrete(&LegacyAminoPubKey{}, 31 PubKeyAminoRoute, nil) 32 }