cosmos-sdk/crypto/keyring/codec.go
vincent f57828c091
Fix CryptoCdc inconsistent (#7987)
* simple fix

* refactor crypto

* just use codec/legacy.Cdc

* revert armor

* add changelog entry

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2020-12-02 14:50:50 +01:00

22 lines
738 B
Go

package keyring
import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/legacy"
"github.com/cosmos/cosmos-sdk/crypto/hd"
)
func init() {
RegisterLegacyAminoCodec(legacy.Cdc)
}
// RegisterLegacyAminoCodec registers concrete types and interfaces on the given codec.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterInterface((*Info)(nil), nil)
cdc.RegisterConcrete(hd.BIP44Params{}, "crypto/keys/hd/BIP44Params", nil)
cdc.RegisterConcrete(localInfo{}, "crypto/keys/localInfo", nil)
cdc.RegisterConcrete(ledgerInfo{}, "crypto/keys/ledgerInfo", nil)
cdc.RegisterConcrete(offlineInfo{}, "crypto/keys/offlineInfo", nil)
cdc.RegisterConcrete(multiInfo{}, "crypto/keys/multiInfo", nil)
}