The Compact language
At this point, you should have already seen Compact, our smart contract programming language, in action in the tutorial and some usage hints in the 'how Midnight works' sections.
This section will provide a more in-depth breakdown of what makes up a Compact smart contract, starting with a walkthrough of the main parts of a Compact program, followed by a reference for the Compact language and the Compact standard library API reference.
The formal grammar for Compact and a specification of the API for
ledger
datatypes are available, as well (both externally generated):