Files
tendermint/crypto/secp256k1/encoding.go
Erik Grinaker db8f1b3df3 migrate all JSON to new JSON encoder (#4975)
Uses new JSON encoder in #4955 for all JSON. Branched off of #4968.
2020-06-08 12:22:59 +00:00

29 lines
639 B
Go

package secp256k1
import (
amino "github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/crypto"
tmjson "github.com/tendermint/tendermint/libs/json"
)
const (
PrivKeyAminoName = "tendermint/PrivKeySecp256k1"
PubKeyAminoName = "tendermint/PubKeySecp256k1"
)
var cdc = amino.NewCodec()
func init() {
cdc.RegisterInterface((*crypto.PubKey)(nil), nil)
cdc.RegisterConcrete(PubKey{},
PubKeyAminoName, nil)
cdc.RegisterInterface((*crypto.PrivKey)(nil), nil)
cdc.RegisterConcrete(PrivKey{},
PrivKeyAminoName, nil)
tmjson.RegisterType(PubKey{}, PubKeyAminoName)
tmjson.RegisterType(PrivKey{}, PrivKeyAminoName)
}