func (msg MsgBanUser) GetSigners() []sdk.AccAddress {
	addr, _ := sdk.AccAddressFromBech32(msg.Admin)
	return []sdk.AccAddress{addr}
}
GetSigners defines the required signature
package types
import (
	"encoding/json"
	"strings"
	sdk "github.com/cosmos/cosmos-sdk/types"
	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
func NewMsgCreateSubspace(id, name, creator string, subspaceType SubspaceType) *MsgCreateSubspace {
	return &MsgCreateSubspace{
		SubspaceID:   id,
		Name:         name,
		Creator:      creator,
		SubspaceType: subspaceType,
	}
}
func (msg MsgCreateSubspace) Route() string { return RouterKey }
func (msg MsgCreateSubspace) Type() string { return ActionCreateSubspace }
func (msg MsgCreateSubspace) ValidateBasic() error {
	_, err := sdk.AccAddressFromBech32(msg.Creator)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address")
	}
	if !IsValidSubspace(msg.SubspaceID) {
		return sdkerrors.Wrap(ErrInvalidSubspaceID, "subspace id must be a valid SHA-256 hash")
	}
	if strings.TrimSpace(msg.Name) == "" {
		return sdkerrors.Wrap(ErrInvalidSubspaceName, "subspace name cannot be empty or blank")
	}
	return nil
}
func (msg MsgCreateSubspace) GetSignBytes() []byte {
	return sdk.MustSortJSON(AminoCodec.MustMarshalJSON(&msg))
}
func (msg MsgCreateSubspace) GetSigners() []sdk.AccAddress {
	addr, _ := sdk.AccAddressFromBech32(msg.Creator)
	return []sdk.AccAddress{addr}
}
func (msg MsgCreateSubspace) MarshalJSON() ([]byte, error) {
	type temp MsgCreateSubspace
	return json.Marshal(temp(msg))
}
func NewMsgAddAdmin(id, admin, owner string) *MsgAddAdmin {
	return &MsgAddAdmin{
		SubspaceID: id,
		Admin:      admin,
		Owner:      owner,
	}
}
func (msg MsgAddAdmin) Route() string { return RouterKey }
func (msg MsgAddAdmin) Type() string { return ActionAddAdmin }
func (msg MsgAddAdmin) ValidateBasic() error {
	if msg.Owner == msg.Admin {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "owner address can't be equal to admin address")
	}
	_, err := sdk.AccAddressFromBech32(msg.Owner)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid owner address")
	}
	_, err = sdk.AccAddressFromBech32(msg.Admin)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid new admin address")
	}
	if !IsValidSubspace(msg.SubspaceID) {
		return sdkerrors.Wrap(ErrInvalidSubspaceID, "subspace id must be a valid SHA-256 hash")
	}
	return nil
}
func (msg MsgAddAdmin) GetSignBytes() []byte {
	return sdk.MustSortJSON(AminoCodec.MustMarshalJSON(&msg))
}
func (msg MsgAddAdmin) GetSigners() []sdk.AccAddress {
	addr, _ := sdk.AccAddressFromBech32(msg.Owner)
	return []sdk.AccAddress{addr}
}
func (msg MsgAddAdmin) MarshalJSON() ([]byte, error) {
	type temp MsgAddAdmin
	return json.Marshal(temp(msg))
}
func NewMsgRemoveAdmin(id, admin, owner string) *MsgRemoveAdmin {
	return &MsgRemoveAdmin{
		SubspaceID: id,
		Admin:      admin,
		Owner:      owner,
	}
}
func (msg MsgRemoveAdmin) Route() string { return RouterKey }
func (msg MsgRemoveAdmin) Type() string { return ActionRemoveAdmin }
func (msg MsgRemoveAdmin) ValidateBasic() error {
	if msg.Owner == msg.Admin {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "owner address can't be equal to admin address")
	}
	_, err := sdk.AccAddressFromBech32(msg.Admin)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address")
	}
	_, err = sdk.AccAddressFromBech32(msg.Owner)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid owner address")
	}
	if !IsValidSubspace(msg.SubspaceID) {
		return sdkerrors.Wrap(ErrInvalidSubspaceID, "subspace id must be a valid SHA-256 hash")
	}
	return nil
}
func (msg MsgRemoveAdmin) GetSignBytes() []byte {
	return sdk.MustSortJSON(AminoCodec.MustMarshalJSON(&msg))
}
func (msg MsgRemoveAdmin) GetSigners() []sdk.AccAddress {
	addr, _ := sdk.AccAddressFromBech32(msg.Owner)
	return []sdk.AccAddress{addr}
}
func (msg MsgRemoveAdmin) MarshalJSON() ([]byte, error) {
	type temp MsgRemoveAdmin
	return json.Marshal(temp(msg))
}
func NewMsgRegisterUser(id, user, admin string) *MsgRegisterUser {
	return &MsgRegisterUser{
		SubspaceID: id,
		User:       user,
		Admin:      admin,
	}
}
func (msg MsgRegisterUser) Route() string { return RouterKey }
func (msg MsgRegisterUser) Type() string { return ActionRegisterUser }
func (msg MsgRegisterUser) ValidateBasic() error {
	_, err := sdk.AccAddressFromBech32(msg.Admin)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address")
	}
	_, err = sdk.AccAddressFromBech32(msg.User)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid user address")
	}
	if !IsValidSubspace(msg.SubspaceID) {
		return sdkerrors.Wrap(ErrInvalidSubspaceID, "subspace id must be a valid SHA-256 hash")
	}
	return nil
}
func (msg MsgRegisterUser) GetSignBytes() []byte {
	return sdk.MustSortJSON(AminoCodec.MustMarshalJSON(&msg))
}
func (msg MsgRegisterUser) GetSigners() []sdk.AccAddress {
	addr, _ := sdk.AccAddressFromBech32(msg.Admin)
	return []sdk.AccAddress{addr}
}
func (msg MsgRegisterUser) MarshalJSON() ([]byte, error) {
	type temp MsgRegisterUser
	return json.Marshal(temp(msg))
}
func NewMsgUnregisterUser(id, user, admin string) *MsgUnregisterUser {
	return &MsgUnregisterUser{
		User:       user,
		SubspaceID: id,
		Admin:      admin,
	}
}
func (msg MsgUnregisterUser) Route() string { return RouterKey }
func (msg MsgUnregisterUser) Type() string { return ActionUnregisterUser }
func (msg MsgUnregisterUser) ValidateBasic() error {
	_, err := sdk.AccAddressFromBech32(msg.Admin)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address")
	}
	_, err = sdk.AccAddressFromBech32(msg.User)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid user address")
	}
	if !IsValidSubspace(msg.SubspaceID) {
		return sdkerrors.Wrap(ErrInvalidSubspaceID, "subspace id must be a valid SHA-256 hash")
	}
	return nil
}
func (msg MsgUnregisterUser) GetSignBytes() []byte {
	return sdk.MustSortJSON(AminoCodec.MustMarshalJSON(&msg))
}
func (msg MsgUnregisterUser) GetSigners() []sdk.AccAddress {
	addr, _ := sdk.AccAddressFromBech32(msg.Admin)
	return []sdk.AccAddress{addr}
}
func (msg MsgUnregisterUser) MarshalJSON() ([]byte, error) {
	type temp MsgUnregisterUser
	return json.Marshal(temp(msg))
}
func NewMsgBanUser(id, user, admin string) *MsgBanUser {
	return &MsgBanUser{
		User:       user,
		SubspaceID: id,
		Admin:      admin,
	}
}
func (msg MsgBanUser) Route() string { return RouterKey }
func (msg MsgBanUser) Type() string { return ActionBlockUser }
func (msg MsgBanUser) ValidateBasic() error {
	_, err := sdk.AccAddressFromBech32(msg.Admin)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address")
	}
	_, err = sdk.AccAddressFromBech32(msg.User)
	if err != nil {
		return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid user address")
	}
	if !IsValidSubspace(msg.SubspaceID) {
		return sdkerrors.Wrap(ErrInvalidSubspaceID, "subspace id must be a valid SHA-256 hash")
	}
	return nil
}
func (msg MsgBanUser) GetSignBytes() []byte {
	return sdk.MustSortJSON(AminoCodec.MustMarshalJSON(&msg))
}