Full Idea
The original contract …is merely an idea of reason, which nonetheless has undoubted practical reality; for it can oblige every legislator to frame his laws in such a way that they could have been produced by the united will of a whole nation.
Gist of Idea
A contract is theoretical, but it can guide rulers to make laws which the whole people will accept
Source
Immanuel Kant (True in Theory, but not in Practice [1792], 2-Concl)
Book Reference
Kant,Immanuel: 'Political Writings', ed/tr. Reiss,Hans [CUP 1996], p.79
A Reaction
The contractualist theory of morality of Thomas Scanlon approaches this. Note that Kant says it 'can' oblige the legislators. Nothing would compel them to follow such a principle.