func NewKuMsgCreateValidator(auth sdk.AccAddress, valAddr chainTypes.AccountID, pubKey crypto.PubKey,
	description Description, commission sdk.Dec, delAcc chainTypes.AccountID) KuMsgCreateValidator {
	var pkStr string
	if pubKey != nil {
		pkStr = sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeConsPub, pubKey)
	}
	return KuMsgCreateValidator{
		*msg.MustNewKuMsg(
			RouterKeyName,
			msg.WithAuth(auth),
			msg.WithData(Cdc(), &MsgCreateValidator{
				Description:      description,
				ValidatorAccount: valAddr,
				Pubkey:           pkStr,
				DelegatorAccount: delAcc,
				CommissionRates:  commission,
			}),
		),
	}
}
func (KuMsgCreateValidator) Type() chainTypes.Name { return types.MustName("createvalidator") }
NewMsgCreate new create coin msg
package types
import (
	"github.com/KuChainNetwork/kuchain/chain/msg"
	chainTypes "github.com/KuChainNetwork/kuchain/chain/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
	"github.com/tendermint/tendermint/crypto"
)
var (
	RouterKeyName = chainTypes.MustName(RouterKey)
)
type KuMsgCreateValidator struct {
	chainTypes.KuMsg
}