For the complete documentation index, see llms.txt
Compact.js
Compact.js provides a TypeScript-based execution environment for smart contracts compiled with the Compact compiler. When a Compact smart contract is compiled, the output includes a JavaScript file and a TypeScript declaration file.
Compact.js uses these files at runtime to execute the circuits. The circuit execution results are then used by higher-level tools and frameworks (such as Midnight.js) to create and submit transactions to the Midnight blockchain.
For more information, see the Compact language documentation.
Release 3.0.0LATEST
2026-11-05
Artifacts
Summary
Major release for the ledger 9 network upgrade on Mainnet, used by Midnight.js 5.
- Runs contracts on Mainnet after the ledger 9 network upgrade, and on Preview.
- Built against compact-runtime 0.21.0 and on-chain runtime 4.0.0.
- Requires Compact toolchain 0.36.0 for ledger 9 contracts; recompiling changes a deployed contract's verifier keys (breaking).
- Adds
/v8and/v9entry points so you pick the ledger era at import. - Publishes as ESM only (breaking).
- Type surfaces are aware of the ledger era; select the era explicitly (breaking).
- Preprod moved to ledger 9 on 9 November 2026 and uses 3.0.0 too.