2020-04-17 19:36:12 -07:00
|
|
|
package types
|
2020-04-17 07:36:47 -07:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
2020-06-26 09:30:49 -07:00
|
|
|
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
|
2020-04-17 07:36:47 -07:00
|
|
|
)
|
|
|
|
|
2020-04-17 19:36:12 -07:00
|
|
|
const (
|
|
|
|
// SubModuleName for the localhost (loopback) client
|
|
|
|
SubModuleName = "localhost"
|
|
|
|
)
|
|
|
|
|
2020-04-17 07:36:47 -07:00
|
|
|
// SubModuleCdc defines the IBC localhost client codec.
|
|
|
|
var SubModuleCdc *codec.Codec
|
|
|
|
|
2020-06-26 09:30:49 -07:00
|
|
|
func init() {
|
|
|
|
SubModuleCdc = codec.New()
|
|
|
|
cryptocodec.RegisterCrypto(SubModuleCdc)
|
|
|
|
RegisterCodec(SubModuleCdc)
|
|
|
|
}
|
|
|
|
|
2020-04-17 07:36:47 -07:00
|
|
|
// RegisterCodec registers the localhost types
|
|
|
|
func RegisterCodec(cdc *codec.Codec) {
|
|
|
|
cdc.RegisterConcrete(ClientState{}, "ibc/client/localhost/ClientState", nil)
|
2020-06-03 12:52:05 -07:00
|
|
|
cdc.RegisterConcrete(&MsgCreateClient{}, "ibc/client/localhost/MsgCreateClient", nil)
|
2020-04-17 07:36:47 -07:00
|
|
|
}
|