func (MsgUnlinkApplication) Type() string {
	return ActionUnlinkApplication
}
Type implements sdk.Msg
package types
import (
	"encoding/hex"
	"strings"
	sdk "github.com/cosmos/cosmos-sdk/types"
	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
	clienttypes "github.com/cosmos/ibc-go/modules/core/02-client/types"
	host "github.com/cosmos/ibc-go/modules/core/24-host"
)
func NewMsgLinkApplication(
	linkData Data, callData string, sender string,
	sourcePort, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64,
) *MsgLinkApplication {
	return &MsgLinkApplication{
		Sender:           sender,
		LinkData:         linkData,
		CallData:         callData,
		SourcePort:       sourcePort,
		SourceChannel:    sourceChannel,
		TimeoutHeight:    timeoutHeight,
		TimeoutTimestamp: timeoutTimestamp,
	}
}
func (MsgLinkApplication) Route() string {
	return RouterKey
}
func (MsgLinkApplication) Type() string {
	return ActionLinkApplication
}
func (msg MsgLinkApplication) ValidateBasic() error {
	err := msg.LinkData.Validate()
	if err != nil {
		return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, err.Error())
	}
	if _, err := hex.DecodeString(msg.CallData); err != nil {
		return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid call data: must be hex encoded")
	}
	err = host.ChannelIdentifierValidator(msg.SourceChannel)
	if err != nil {
		return sdkerrors.Wrap(err, "invalid source channel ID")
	}
	err = host.PortIdentifierValidator(msg.SourcePort)
	if err != nil {
		return sdkerrors.Wrap(err, "invalid source port ID")
	}
	_, err = sdk.AccAddressFromBech32(msg.Sender)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err)
	}
	return nil
}
func (msg MsgLinkApplication) GetSignBytes() []byte {
	return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg))
}
func (msg MsgLinkApplication) GetSigners() []sdk.AccAddress {
	valAddr, err := sdk.AccAddressFromBech32(msg.Sender)
	if err != nil {
		panic(err)
	}
	return []sdk.AccAddress{valAddr}
}
func NewMsgUnlinkApplication(application, username string, signer string) *MsgUnlinkApplication {
	return &MsgUnlinkApplication{
		Application: application,
		Username:    username,
		Signer:      signer,
	}
}
func (MsgUnlinkApplication) Route() string {
	return RouterKey
}