Israel was called to be "a holy (set-apart) nation" (Ex.19:6) and this means that Israel belonged to Yahweh. Before the organisation and structure of a nation-state were worked out under the monarchy, the confederacy of Israelite tribes had a unity derived from their common relationship to Yahweh. Two ideas are important here.
First, they owed their unity to what Yahweh had done for them. In some parts of the Old Testament this is expressed by saying that Yahweh 'chose' Israel; they were in that sense the 'elect' people, owing their existence not to their own achievements but to the action and purpose of Yahweh.
Second, this relationship was expressed in a covenant. The covenant idea is of fundamental importance in Old Testament religion. It expresses a relationship in which the element of obligation is present. In the stories of the covenants with Noah (Gen.9:8ff) and Abraham (Gen.15:17) Yahweh promises that He will do certain things; and accordingly the emphasis is on the divine pledge. But in the story of the covenant which follows the Exodus what is made explicit is the obligation which will rest on Israel once the covenant has been established. Yahweh's care for His people, and His side of the covenant, is, of course, also involved. He has already delivered them; and amongst the results of the deliverance will be the gift of the Promised Land and the blessings which He will give them there; but the most important outcome of the deliverance is the relationship with Israel which is established in the covenants. The essence of this covenant is tersely summed up in the formula: "I will take you for My people, and I will be your Elohim (God)" (Ex.6:7; cp. Jer.31:33).
It has sometimes been supposed that the covenant idea represents a later theological development (i.e. after Moses) which has been super-imposed on the narratives. But the covenant forms, as represented by the Ten Commandments (Decalogue) (Ex.20:1-17) is strikingly parallel in structure to treaties made between Hittite kings and their vassals in the period 1450-1200 B.C. The vassals are reminded of what the king has done for them and of their obligations to him: allegiance, tribute, service, acceptance of his jurisdiction, and the like. So Israel is reminded of Yahweh's mighty acts, and summoned to respond in loyalty and obedience.
From this is follows that the Israelite community was constituted not by ties of blood but by Yahweh's act. They belonged to each other because He had made them His own. A further consequence is that the obedience which is required of Israel is the grateful response to what Yahweh has done. Nothing could be further from the truth than the notion that Israel bixed Elohim (God) up in a set of commandments. The Ten Commandments appropriately begin: "I am Yahweh your Elohim (God, who brought you out of the land of Egypt, out of the house of bondage" (Ex.20:2). The gracious act of the Saviour Elohim (God) is the presupposition of the commands laid on Israel.
To determine what were the specific requirements made on Israel in the Mosaic age is far from easy. In the opinion of many scholars (but by no means all), the mass of legislation contained in the Pentateuch is a complex literary compilation. The whole of Leviticus and much of he legislation in Exodus and Numbers comes from the Priestly Code (P), which, though it may embody much ancient material, was probably compiled during or soon after the Exile. In it is embodied the Code of Holiness (Lev.17-26), which is of uncertaindate and provenance. The Deuteronomic Code (D) (Dt.12-26) is in all probability the book which was found in the Temple in the reign of King Josiah (2 Kings 22): some features in it reflect 7th century conditions; but its stape material must be older. Exodus 20:22-23:33, the Book of the Covenant, presupposes settled agricultural life. It has interesting resemblances to the Code of Hammurabi, and also the Assyrian, Hittite and Sumerial law codes; but no doubt such elements were mediated to Israel through Canaanite influence. This collection combined in an interesting way two types of law: causistic law, which is hypothetical in form (e.g. Ex.22:1-17) and has its appropriate setting in courts, where cases would be argued, and apodictic or categorical law, expressed in terms of "you shall" and "you shall not" (e.g. Ex.22:21ff), which has its appropriate seting in the religious assembly. But the whole collection is regarded as expressing the will of Israel's Elohim (God).
Of special interest are the familiar Ten Commandments in their two forms (Ex.20:1-17 & Dt.5:6-21) and thw short code in Exodus 34:12-26. The latter is sometimes called the 'Ritual Decalogue'. A little arithmetic adjustment is needed to make the number of commandments which it contains no more than ten; but its ritual interest is obvious. By contrast, the term 'Ethical Decalogue' is applied to Exodus 20:1-17 & Deuteronomy 5:6-21. This is not entirely apt, since the commandment about the Sabbath, for example, is a ritual commandment; but the rpesence of a strong ethical emphasis cannot be denied either. It has sometimes been argued as a general principle that the ethical interest in religion is a later development than the ritual interest, and, in particular, that the Ethical Decalogue reflects and is derived from the moral teaching of the 8th century prophets. But the supposed general principle is questionable; and it is arguable that the moral teaching of the prophets is based on traditional standards of which the Ethical Decalogue is an ancient formulation. In substance the Ten Commandments are so representitive of Israel's moral and religious precepts, that it is difficult to think of a period after the conquest at which they would have represented an innovation. It is not unreasonable to suppose that, possibly in a terser form, they are Mosaic in origin. The interesting suggestion has been made that the Ritual Decalogue, which some scholars claim belongs to the hypothetical southern source (J) was a code which was adopted by a group of tribes who moved into Canaan from the south and who acquired their knowledge of worship of Yahweh from the Kenites by a process op gradual absorption, whereas the Ten Commandments are in essence a code given to those tribes who crossed the wilderness under Moses and invaded Canaan under Joshua, tribes whose experience of divine deliverance and the need for decision is reflected in the ethical character of the code. However that may be, the familiar Ten Commandments and an effective expression of fundamental religious and moral standards in ancient Israel and of their relation to Yahweh's saving acts.
It is therefore my conclusion that the biblical account of the Mosaic Covenant could conceivably have been influenced to some extent by ideas later than the time of Moses but that the evidence taken together strongly suggests that all the main themes of the covenant are of Mosaic origin.