Skip to content

midnightntwrk/midnight-sdk

Midnight SDK

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.

Repositories and Components

Infrastructure (server-side)

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.

Client-side (libraries and tools)

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

Developer Paths

Smart Contract Developers

Write and test Compact smart contracts.

DApp Developers

Build web and Node.js applications on Midnight.

DApps need a local infrastructure stack (proof-server + indexer + midnight-node) or connection to a public testnet. See midnight-local-dev.

Tool Builders

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

Wallet Builders

Build wallets or integrate Midnight into existing wallets.

Libraries (this repo)

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.

Development

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 test

Contributing

See CONTRIBUTING.md for the full contribution guide. This project uses Conventional Commits with scopes compact-js and platform-js.

License

Apache-2.0

About

Midnight SDK - managed by terraform

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors