how to get a list of all the boolean fields of a node?
You can get a list of an entity's field definitions with EntityFieldManager::getFieldDefinitions(). You should then have a list of fields defined on that entity and should be able to determine which are the boolean fields.

You can access this via a service like:

$product_field_definitions = \Drupal::service('entity_field.manager')-&gt;getFieldDefinitions('node', 'product');