Skip to main content
For the complete documentation index, see llms.txt

Compact toolchain

Compact is Midnight's smart contract programming language, designed for building secure, efficient, and adaptable decentralized applications.

The Compact toolchain includes the Compact compiler, formatter, and the Compact "fixup" tool. The compiler translates Compact smart contract code into JavaScript implementations and a representation of the zero-knowledge circuits.

Link to related documentation

To install the toolchain, first install the Compact devtools. Then run compact update 0.31 to get the toolchain for the current public networks, as listed in the compatibility matrix. A bare compact update installs the newest release, which can target a ledger version that the public networks do not run yet.


Release 0.35.0LATEST

Compact language 0.27.0

29 September 2026

Artifacts

Summary

Release for ledger 9: P256, Curve25519, Ed25519, and SHA-512 support, kernel.caller(), run-time resolution of cross-contract calls; not for the current public networks

  • Targets ledger 9 (ledger-9.1.0.0-rc.3), which is not yet deployed on the public networks; use compact update 0.31 for contracts deployed today
  • Language version 0.27.0 and Compact runtime 0.20.0; compiled contracts require @midnight-ntwrk/compact-runtime 0.20.x
  • With --feature-zkir-v3: secp256r1 (P256) and Curve25519 types, secp256r1EcdsaVerify, ed25519Verify, and sha512
  • New kernel.caller() ledger operation and PublicAddress type; read the caller only where the call is known to come from a contract
  • Cross-contract calls resolve the callee module at run time through a ContractModuleProvider; breaking changes to createCircuitContext and crossContractCall
  • jubjubSchnorrVerify and secp256k1EcdsaVerify fail an assertion when the public key is the identity point
  • compactc --version prints the commit and date after the version; contract-info.json gains a compiler-commit field