code: func (k *KeyStore) GenerateKey(ctx context.Context, in *GenRequest) (*GenResponse, error) {
  	curveT, err := crypto.CurveTypeFromString(in.CurveType)
  	if err != nil {
  		return nil, err
  	}
  
  	key, err := k.Gen(in.Passphrase, curveT)
  	if err != nil {
  		return nil, fmt.Errorf("error generating key %s %s", curveT, err)
  	}
  
  	addrH := key.Address.String()
  	if in.KeyName != "" {
  		err = coreNameAdd(k.keysDirPath, in.KeyName, addrH)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	return &GenResponse{Address: addrH}, nil
  }
docs: //------------------------------------------------------------------------
  // handlers