You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1.0 KiB

package crypto
import (
"github.com/tendermint/go-wire"
)
var cdc = wire.NewCodec()
func init() {
// NOTE: It's important that there be no conflicts here,
// as that would change the canonical representations,
// and therefore change the address.
// TODO: Add feature to go-wire to ensure that there
// are no conflicts.
RegisterWire(cdc)
}
func RegisterWire(cdc *wire.Codec) {
cdc.RegisterInterface((*PubKey)(nil), nil)
cdc.RegisterConcrete(PubKeyEd25519{},
"com.tendermint.wire.PubKeyEd25519", nil)
cdc.RegisterConcrete(PubKeySecp256k1{},
"com.tendermint.wire.PubKeySecp256k1", nil)
cdc.RegisterInterface((*PrivKey)(nil), nil)
cdc.RegisterConcrete(PrivKeyEd25519{},
"com.tendermint.wire.PrivKeyEd25519", nil)
cdc.RegisterConcrete(PrivKeySecp256k1{},
"com.tendermint.wire.PrivKeySecp256k1", nil)
cdc.RegisterInterface((*Signature)(nil), nil)
cdc.RegisterConcrete(SignatureEd25519{},
"com.tendermint.wire.SignatureKeyEd25519", nil)
cdc.RegisterConcrete(SignatureSecp256k1{},
"com.tendermint.wire.SignatureKeySecp256k1", nil)
}