The first rendering exactly matches what Muslim transmits in his Ṣaḥīḥ, that the Prophet—may Allah bless him and grant him peace—used to say:
“O Allah, Lord of the seven heavens and the earth, Lord of the Tremendous Throne, our Lord and the Lord of all things, Splitter of grain and date-stone, Revealer of the Torah, the Gospel, and the Qur’an, I seek refuge in You from the evil of every creature; You hold it by its forelock. You are the First—nothing precedes You; You are the Last—nothing comes after You; You are the Manifest—nothing is above You; and You are the Hidden—nothing is beneath You. Settle my debt for me and enrich me, freeing me from poverty.”
His words, “You are the First—nothing precedes You,” correspond to his statement, “Allah was, and nothing existed before Him.” This ḥadīth indicates that His Throne was upon the water, and that He inscribed everything in the Preserved Record before creating the heavens and the earth.
Likewise, Muslim relates from ʿAbd Allāh ibn ʿAmr ibn al-ʿĀṣ that the Prophet—may Allah bless him and grant him peace—said:
“Allah wrote the decrees of all creation fifty thousand years before He created the heavens and the earth, and His Throne was upon the water.”
He thus informed in