The Edomites and Ishmaelites represent all non-Jewish nations, past and present. By offering the Torah to the non-Jewish nations, G‑d rendered them receptive to later accepting their obligation to observe the “Noahide” laws. These are the seven categories of commandments that must be observed by all non-Jews. In order to properly accept this legal code, the non-Jew must acknowledge that G‑d gave it to humanity as part of the Torah that He gave at Mount Sinai.
Furthermore, in the Messianic future, the non-Jewish nations will be refined and no longer oppose the lifestyle and world-vision of the Torah. By approaching the nations of the world with the option to accept the entire Torah, G‑d implanted within them the receptivity to both their present obligation to accept the Torah’s authority over them – obligating them in the Noahide laws – as well as their future acceptance of the Torah’s world-vision, transforming them into active participants in the final Redemption.1

I never understood that when G”D offered the Torah to the other nations. Did He offer thus the story of the Jewish people to them. It seems unlikely that other nations would accept to follow the laws of an complete other culture while they had their own culture and religion ! And how did He offer it to them ? Also from the top of a nearby mountain with very loud voice (for them out of nowhere) with thunder and fire speaking in their own dialect (language) ? It must them scared to dead and they probably would have run for such event. G”D must have known such response so why bother because if it was a serious offer he would have chosen one of their leaders (like he did by Moshe) to communicate in a for them understandable way !
Before the acceptance of the Torah on Mount Sinai, there was no Jewish people. They became the chosen ones after accepting the covenant. Nevertheless, it left a part of the Torah for all the people of the world to accept the Seven Universal Laws. You can search for them, under
AskNoah.org and under Sukkat Shalom B'nei Noach.
Unfortunately I cannot share the URL's here.