[Go to site: main page, start]

Skip to main content
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 2.5.0LATEST

20 March 2026

ArtifactsSummary
  • Adds --input-ledger-params support to the circuit command in @midnight-ntwrk/compact-js-command.
  • Defaults to initial ledger parameters when --input-ledger-params is not provided.
  • Built against @midnight-ntwrk/compact-runtime 0.15.0 and requires compact-compiler 0.30.0.
  • Contracts must be recompiled against the updated dependencies.