Developer hub for Midnight. This repo provides a map of all Midnight repositories and the components they produce, a compatibility matrix for testnets and mainnet, an ecosystem overview of the full architecture, and the source code for four npm libraries (compact-js, platform-js) that provide the execution environment for Compact smart contracts.
Networks: Local (undeployed) for fastest iteration, Preview / Preprod for public testnets, Mainnet for production. See COMPATIBILITY.md for which versions are deployed on each network and which client libraries are compatible.
| Repository | Produces | Artifacts |
|---|---|---|
| midnightntwrk/midnight-node | Node | Docker |
| midnightntwrk/midnight-ledger | Ledger, Proof Server*, On-chain Runtime | Docker, npm |
| midnightntwrk/midnight-indexer | Indexer API, Chain Indexer, Wallet Indexer | Docker |
| input-output-hk/partner-chains | Partner Chains | GitHub releases |
| midnightntwrk/midnight-local-dev | Local dev stack | Docker Compose |
| midnightntwrk/midnight-faucet | Faucet (tNIGHT) | Docker |
| midnightntwrk/midnight-explorer | Block Explorer | Docker |
| midnightntwrk/midnight-cnight-to-dust-dapp | cNgD App — cNIGHT-generates-Dust registration (Cardano) | — |
*Proof Server can be run as shared infrastructure or locally by DApp developers for proof generation.
| Repository | Produces | Artifacts |
|---|---|---|
| LFDT-Minokawa/compact | Compact toolchain manager (compact) — installs and updates compiler versions, compiles contracts (compact compile). Also: compactc (compiler), Compact language, Compact runtime |
Releases, npm |
| midnightntwrk/midnight-sdk (this repo) | compact-js, compact-js-node, compact-js-command, platform-js | npm |
| midnightntwrk/midnight-js | 12 @midnight-ntwrk/midnight-js-* packages, testkit-js (E2E testing via midnight-js, dapp-connector-api, and wallet-sdk) |
npm |
| midnightntwrk/midnight-wallet | Wallet SDK (wallet-sdk-* packages) |
npm |
| midnightntwrk/midnight-dapp-connector-api | DApp Connector API | npm |
| midnightntwrk/midnight-wallet-dapp | Wallet DApp (reference app) | Docker |
| midnightntwrk/midnight-node | Midnight Toolkit — CLI for deploying and interacting with contracts | Docker |
Write and test Compact smart contracts.
- LFDT-Minokawa/compact — install the
compacttoolchain manager to install compilers and compile contracts (compact compile) - Compact language reference — documentation
- Midnight Toolkit — CLI for deploying and interacting with contracts
- create-mn-app — scaffold a new project
- example-counter / example-bboard — reference contracts (use as templates)
- testkit-js — E2E testing framework using midnight-js, dapp-connector-api, and wallet-sdk (in the midnight-js repo)
- Examples — walkthroughs
Build web and Node.js applications on Midnight.
- Getting started — first-time setup
- midnight-js — DApp framework; install
@midnight-ntwrk/midnight-jsfor core modules, plus individual provider packages as needed - create-mn-app — scaffold a new project
- midnight-wallet-dapp — reference DApp showing the provider pattern and wallet integration
- midnight-wallet — wallet SDK, useful as an integration layer for Node.js DApps and with testkit-js
- DApp Connector API — wallet-DApp interface
- Tutorials — end-to-end walkthroughs
DApps need a local infrastructure stack (proof-server + indexer + midnight-node) or connection to a public testnet. See midnight-local-dev.
Build new tooling, providers, or frameworks on Midnight.
- platform-js (this repo) — core abstractions and types that midnight-js and other frameworks build on
- midnight-js — reference implementation of a DApp framework; study its provider pattern to build alternatives
- midnight-wallet-dapp — reference for the provider pattern in practice
- compact-js (this repo) — if building tooling that works with compiled Compact contracts
- DApp Connector API — spec for wallet-DApp communication
Build wallets or integrate Midnight into existing wallets.
- midnight-wallet — wallet SDK;
wallet-sdk-facadeis the key entry point (also used by Node.js DApps as an integration layer) - DApp Connector API — the interface between wallets and DApps
- platform-js (this repo) — shared types and abstractions
- Wallet SDK release notes — latest changes and migration guides
| Library | npm | Description |
|---|---|---|
| compact-js | @midnight-ntwrk/compact-js | TypeScript execution environment for Compact smart contracts compiled with compactc |
| compact-js-node | @midnight-ntwrk/compact-js-node | Node.js platform layer — ZK file configuration, clustering, workflows, RPC |
| compact-js-command | @midnight-ntwrk/compact-js-command | CLI tooling for compiled Compact contracts (deploy, circuit management) |
| platform-js | @midnight-ntwrk/platform-js | Core abstractions, utilities, and types for building Midnight services and libraries |
The repo is organized into two workspaces — compact-js/ and platform-js/ — managed with Yarn 4 workspaces and Turborepo.
Prerequisites: Node.js >= 22, Yarn 4.
# compact-js workspace
cd compact-js
yarn install
yarn build
yarn test
# platform-js workspace
cd platform-js
yarn install
yarn build
yarn testSee CONTRIBUTING.md for the full contribution guide. This project uses Conventional Commits with scopes compact-js and platform-js.