  Gross-Pandharipande-Siebert have shown that the 2-dimensional
Kontsevich-Soibelman scattering diagrams compute certain genus zero log
Gromov-Witten invariants of log Calabi-Yau surfaces. We show that the
$q$-refined 2-dimensional Kontsevich-Soibelman scattering diagrams compute,
after the change of variables $q=e^{i \hbar}$, generating series of certain
higher genus log Gromov-Witten invariants of log Calabi-Yau surfaces.
  This result provides a mathematically rigorous realization of the physical
derivation of the refined wall-crossing formula from topological string theory
proposed by Cecotti-Vafa, and in particular can be seen as a non-trivial
mathematical check of the connection suggested by Witten between higher genus
open A-model and Chern-Simons theory.
  We also prove some new BPS integrality results and propose some other BPS
integrality conjectures.
