> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

# Midnight.js

Midnight.js is a client library designed to facilitate the development of decentralized applications on the Midnight blockchain.

[Link to related documentation](https://docs.midnight.network/api-reference/midnight-js/packages.md)

To download the component, click the appropriate link under **Artifacts**.

***

<!-- -->

Version5.0.0

StatusAll

### [Release <!-- -->5.0.0](https://docs.midnight.network/relnotes/midnight-js/midnight-js-5-0-0.md)LATEST

2026-11-06

#### Artifacts

* [GitHub release](https://github.com/midnightntwrk/midnight-js/releases/tag/v5.0.0)
* [NPM Package](https://www.npmjs.com/package/@midnight-ntwrk/midnight-js/v/5.0.0)

#### Summary

Major release for the ledger 9 network upgrade on Mainnet. Works across both ledger eras, with breaking provider and contract state changes.

* Deploys, finds, calls, and maintains contracts of both ledger eras; pre-upgrade contracts keep their ledger 8 artifacts
* Packages are ESM only and need Node.js 22.12 or later (breaking)
* Requires `providers.config` with `networkId` and `ttlSeconds`; `setNetworkId()` is removed (breaking)
* Transactions and on-chain state are era-tagged handles and serialized records (breaking)
* ZK artifacts are checked against their contract manifest by default (breaking)
* Adds contract-to-contract calls, contract events, predefined network endpoints, and DApp Connector providers
* Every error has a stable `code` and `category`
* Needs indexer 4.4.101, proof server 9.0.0, Compact.js 3.0.0, and wallet SDK 2.0.0
* Accepts artifacts for Compact runtime 0.16 (toolchain 0.31.x) and 0.21 (toolchain 0.36.0) only
* Mainnet, Preview, and Preprod need 5.0.0
