Files
tendermint/crypto/multisig/codec.go
Marko 99d88cbe2f crypto: remove key suffixes (#4941)
## Description

- remove keyname suffix from keys


Closes: #2228
2020-06-03 05:46:29 +00:00

31 lines
827 B
Go

package multisig
import (
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/crypto/secp256k1"
"github.com/tendermint/tendermint/crypto/sr25519"
)
// TODO: Figure out API for others to either add their own pubkey types, or
// to make verify / marshal accept a cdc.
const (
PubKeyAminoRoute = "tendermint/PubKeyMultisigThreshold"
)
var cdc = amino.NewCodec()
func init() {
cdc.RegisterInterface((*crypto.PubKey)(nil), nil)
cdc.RegisterConcrete(PubKey{},
PubKeyAminoRoute, nil)
cdc.RegisterConcrete(ed25519.PubKey{},
ed25519.PubKeyAminoName, nil)
cdc.RegisterConcrete(sr25519.PubKey{},
sr25519.PubKeyAminoName, nil)
cdc.RegisterConcrete(secp256k1.PubKey{},
secp256k1.PubKeyAminoName, nil)
}