code: func (c *Client) CreateKey(keyName, curveTypeString string, logger *logging.Logger) (crypto.PublicKey, error) {
  	err := c.dial(logger)
  	if err != nil {
  		return crypto.PublicKey{}, err
  	}
  	if c.keyClient == nil {
  		return crypto.PublicKey{}, fmt.Errorf("could not create key pair since no keys service is attached, " +
  			"pass --keys flag")
  	}
  	curveType := crypto.CurveTypeEd25519
  	if curveTypeString != "" {
  		curveType, err = crypto.CurveTypeFromString(curveTypeString)
  		if err != nil {
  			return crypto.PublicKey{}, err
  		}
  	}
  	address, err := c.keyClient.Generate(keyName, curveType)
  	if err != nil {
  		return crypto.PublicKey{}, err
  	}
  	return c.keyClient.PublicKey(address)
  }
docs: // Creates a keypair using attached keys service