github.com/Finschia/finschia-sdk@v0.48.1/crypto/keys/multisig/codec.go (about) 1 package multisig 2 3 import ( 4 "github.com/Finschia/ostracon/crypto/sr25519" 5 6 "github.com/Finschia/finschia-sdk/codec" 7 "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" 8 "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" 9 cryptotypes "github.com/Finschia/finschia-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 // nolint 19 // Deprecated: Amino is being deprecated in the SDK. But even if you need to 20 // use Amino for some reason, please use `codec/legacy.Cdc` instead. 21 var AminoCdc = codec.NewLegacyAmino() 22 23 func init() { 24 AminoCdc.RegisterInterface((*cryptotypes.PubKey)(nil), nil) 25 AminoCdc.RegisterConcrete(ed25519.PubKey{}, 26 ed25519.PubKeyName, nil) 27 AminoCdc.RegisterConcrete(sr25519.PubKey{}, 28 sr25519.PubKeyName, nil) 29 AminoCdc.RegisterConcrete(&secp256k1.PubKey{}, 30 secp256k1.PubKeyName, nil) 31 AminoCdc.RegisterConcrete(&LegacyAminoPubKey{}, 32 PubKeyAminoRoute, nil) 33 }