How to get all the fields defined by a particular module? Suppose i have a module1 where i define fields and i get list of all the fields in module2 using module1_fields_info(); this is done in D7. How to get list of fields defined by module1 in module2 in Drupal 8?
hook_field_info() defines field types in Drupal 7, so I think you're actaully interested in field types, not fields?

If so, field types, like any other plugin definition have a provider key, if you want to get the field types of a certain modules, call \Drupal::service('plugin.manager.field.field_type')->getDefinitions() and then filter on the provider key:

$field_types = \Drupal::service('plugin.manager.field.field_type')-&gt;getDefinitions();
$field_types = array_filter($field_types, function (array $definition) { 
  return $definition['provider'] == 'yourmodule';
});


Code example written in browser and untested.