For the complete documentation index, see llms.txt
Contract examples
Standalone Compact contracts that each demonstrate a specific language feature. These are not production-ready implementations. Use them to learn a feature in isolation before combining patterns in your own contracts.
Calculator
Witness functions and on-chain verification of off-chain computation with assert statements.
Token transfers
Mint, send, and receive shielded and unshielded tokens using NIGHT token operations in Compact.
Private guest list
Set operations, native NIGHT token handling, and the privacy boundary in Midnight DApps.
Election
Commit to private state, use Set and Map operations, and generate DApp-specific public keys.
Private reserve auction
Hide reserve prices on the public ledger and reduce user trackability with DApp-specific keys.
Battleship
Explicit state management, private state verification, access control, List operations, and intermediate witnesses.