func NewProfile(
	dTag string, nickname, bio string, pictures Pictures, creationDate time.Time,
	account authtypes.AccountI,
) (*Profile, error) {
	protoAccount, ok := account.(proto.Message)
	if !ok {
		return nil, fmt.Errorf("the given account cannot be serialized using Protobuf")
	}
	myAccountAny, err := codectypes.NewAnyWithValue(protoAccount)
	if err != nil {
		return nil, err
	}
	return &Profile{
		DTag:         dTag,
		Nickname:     nickname,
		Bio:          bio,
		Pictures:     pictures,
		CreationDate: creationDate,
		Account:      myAccountAny,
	}, nil
}
NewProfile builds a new profile having the given DTag, creator and creation date
package types
import (
	"encoding/json"
	"fmt"
	"strings"
	"time"
	codectypes "github.com/cosmos/cosmos-sdk/codec/types"
	cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
	authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
	"github.com/ghodss/yaml"
	"github.com/gogo/protobuf/proto"
)
var (
	_ authtypes.AccountI = (*Profile)(nil)
)