Getting mainnet ready: A developer’s guide

Avatar of the content author
Sign up now so you never miss an update
contributors
Avatar of the content author
Midnight
Avatar of the content author
Ian MacRaeCopywriter
Prepare for the Midnight mainnet by deploying to the Preprod network, mastering privacy-enhancing logic in the Midnight Developer Academy, and increasing your project’s visibility. Here is your guide to ensuring your application is ready for mainnet launch in the coming weeks.

Midnight mainnet is scheduled to launch at the end of March 2026. This milestone represents the move toward a production environment where developers will be able to deploy live, privacy-enhancing applications.

The launch also initiates the shift toward a federated network. Midnight will expand to include distinct federated node operators who collectively operate the protocol under explicit rules for participation and coordination.

In preparation for mainnet launch in the coming weeks, developers can focus on four primary areas:

  • Learning and upskilling through the Midnight Academy: Master the fundamentals of zero-knowledge proofs and the Compact toolchain to build privacy-preserving applications.
  • Deploying applications to the Preprod environment: Use this environment to test smart contract logic and zero-knowledge circuits to be production ready.
  • Ensuring project visibility through repository tagging: Add specific GitHub topics to your repositories to ensure your work and the Midnight network is recognized in ecosystem rankings.
  • Generating DUST on Preprod: Acquire test tokens and establish the necessary workflows to produce DUST the resource required for transaction processing.

Learning and upskilling

Whether you’re a new to developing on Midnight, or are experienced and looking for the latest resources, here’s what’s available:

Midnight Developer Academy

The Midnight Developer Academy is a core educational resource, designed specifically for developers ready to ship production-grade applications. The curriculum advances builders directly to execution, offering a hands-on, builder-native workflow that moves directly from concept to deployment.

The Academy provides authoritative, practical guidance on privacy and compliance, breaking down complex ZK concepts into usable code. It offers a direct pathway for every level of builder:

  • Web2 Developers: Apply existing TypeScript skills to build privacy-preserving smart contracts without requiring a background in cryptography.
  • Web3 Natives: Develop hybrid DApps that solve real-world compliance constraints by combining "privacy-first" logic with transparent ledgers.
  • The ZK-Curious: Learn and master the functional application of zero-knowledge proofs in live environments.

Start learning with Midnight Academy

Documentation updates

The official Midnight documentation is undergoing an extensive structural overhaul to better support the developer community. The documentation is being improved to ensure it serves as a reliable, production-ready resource for Preprod and mainnet.

This overhaul is an iterative process driven by developer needs. To help improve these resources, share feedback on specific guides, discuss implementation strategies on the Midnight forums, and highlight which technical details are most critical for your project's success.

Building and deploying DApps

All core packages and examples have been updated to align with the latest Preprod environment. Starting a new project is now more efficient with updated configurations that are ready to run on Preprod. Key updates include:

  • create-mn-app: Scaffold a new Midnight project in seconds via npm or GitHub.
  • Updated examples: The Counter and Bulletin Board DApps are fully updated and pre-configured for Preprod.
  • Core package alignment: Ensure your environment is running the latest versions of midnight-js, wallet-sdk, Compact, and the Proof Server. For a full list of technical changes, review the latest release notes.

AI-assisted coding with MCP

The Midnight Model Context Protocol (MCP) server provides AI coding assistants with real-time access to the Compact toolchain and Midnight repositories. This integration eliminates AI hallucinations by allowing your assistant to validate code against the actual compiler and perform semantic searches across current documentation.

For setup instructions and a deep dive into AI-assisted Compact development, read the full article: Midnight MCP: AI-assisted development for Compact smart contracts.

Join the Aliit

If you’ve already mastered all of the above, and you’re helping other builders move forward you could be a prime candidate for the Midnight Aliit Fellowship. Applications for Cohort 2 are open now, learn more in the latest blog update.

Build Club

Build Club is a two-month accelerator and support hub for startups and independent developers building the first wave of commercial applications on Midnight. It provides projects with direct access to technical guidance from core engineers, visibility across official channels, and pathways toward strategic partnerships. The next cohort of Build Club will have the opportunity to deploy to mainnet. Learn more about Build Club.

Migrating to Preprod environment

Preprod is the final testing stage for developers before deploying applications to mainnet. It functions as a mirror of the production environment, allowing developers to verify that application logic and zero-knowledge circuits function correctly under real-world conditions.

Here’s what to do when moving to Preprod:

1. Update the development toolkit

Ensure every component of the technical stack, including Node.js, the Compact compiler, and proof server uses the correct version for Preprod compatibility. Version mismatches can cause proof generation failures or transaction rejection.

2. Configure environment endpoints

Applications must point to Preprod-specific infrastructure to interact with the blockchain. Update the network configuration in the DApp to reference the following Preprod services:

  • Indexer and RPC nodes: Redirect these from local or testnet-02 nodes to the official Preprod endpoints.
  • Network ID: Set the network identifier to preprod within the SDK configuration.

3. Core code and dependency migration The transition to Preprod requires updates to the codebase to accommodate changes in APIs and library structures.

  • Update packages: Ensure the package.json file uses the latest Midnight libraries, such as @midnight-ntwrk/midnight-js. Always check the compatibility matrix for the latest updates. These updates contain necessary changes for protocol compatibility.
  • Address prefixes: Verify that the application logic handles the Preprod-specific prefixes for shielded, unshielded, and DUST addresses.

Specific implementation details and code snippets for these changes are located in the Midnight examples repository.

Increasing visibility with repository tags

As Midnight approaches mainnet, public recognition of development activity becomes a priority. Industry organizations like Electric Capital monitor and rank blockchain ecosystems based on open-source activity on platforms like GitHub.

Developers can support network growth by adding descriptive tags (known as topics) to their public repositories. Midnight developers should add the tag midnightntwrk (and compact where applicable) to help ecosystem aggregators identify and track development progress. This practice ensures that individual work contributes to the overall visibility and ranking of the Midnight ecosystem in the Electric Capital Developer Report. There’s a Zealy quest for that.

Learn more in this blog explaining how to make sure your work is visible, counted, and recognized as part of the Midnight ecosystem.

Obtaining DUST on Preprod

Every transaction on the Midnight network requires DUST. This shielded resource pays for the computation and storage necessary to verify zero-knowledge proofs.

The Midnight Preprod environment is now live and serves as the primary testing ground for developers before mainnet deployment. Because Preprod functions as a mirror of the production environment, testing here allows developers to experience exactly how their applications will perform under live network conditions.

Unlike earlier testnets where DUST was provided directly, the Preprod environment requires developers to generate DUST using test NIGHT (tNIGHT). Use the Midnight Lace wallet to designate a DUST address and trigger the generation process through the user interface.

You can find the step-by-step instructions for generating DUST in Lace wallet here.

Share your project

As mainnet launch approaches, the Midnight team is tracking projects planning to go live in the production environment. Sharing your project details enables better support for your development and will help to ensure the network is ready for your deployment.

Share