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.
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; usecompact update 0.31for contracts deployed today - Language version 0.27.0 and Compact runtime 0.20.0; compiled contracts require
@midnight-ntwrk/compact-runtime0.20.x - With
--feature-zkir-v3: secp256r1 (P256) and Curve25519 types,secp256r1EcdsaVerify,ed25519Verify, andsha512 - New
kernel.caller()ledger operation andPublicAddresstype; 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 tocreateCircuitContextandcrossContractCall jubjubSchnorrVerifyandsecp256k1EcdsaVerifyfail an assertion when the public key is the identity pointcompactc --versionprints the commit and date after the version;contract-info.jsongains acompiler-commitfield