cosmos-sdk/x/ibc/types/codec.go

32 lines
1.3 KiB
Go

package types
import (
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types"
connectiontypes "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types"
channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/04-channel/types"
ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/07-tendermint/types"
localhosttypes "github.com/cosmos/cosmos-sdk/x/ibc/09-localhost/types"
commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/23-commitment/types"
)
// RegisterCodec registers the necessary x/ibc interfaces and concrete types
// on the provided Amino codec. These types are used for Amino JSON serialization.
func RegisterCodec(cdc *codec.LegacyAmino) {
clienttypes.RegisterCodec(cdc)
ibctmtypes.RegisterCodec(cdc)
localhosttypes.RegisterCodec(cdc)
commitmenttypes.RegisterCodec(cdc)
}
// RegisterInterfaces registers x/ibc interfaces into protobuf Any.
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
clienttypes.RegisterInterfaces(registry)
connectiontypes.RegisterInterfaces(registry)
channeltypes.RegisterInterfaces(registry)
ibctmtypes.RegisterInterfaces(registry)
localhosttypes.RegisterInterfaces(registry)
commitmenttypes.RegisterInterfaces(registry)
}