Mesh LogoMesh
MidnightMidnight Contracts Wizard

Midnight Contracts Wizard

Generate production-ready Midnight smart contract projects with zero-knowledge privacy

The Midnight Contracts Wizard is a CLI tool that generates complete smart contract projects for the Midnight Network. Select from pre-built contract templates with zero-knowledge privacy built in, and get a fully configured TypeScript project ready for development.

Why use the Contracts Wizard?

BenefitDescription
Production-ready templatesBattle-tested contracts with ZK circuits included
Zero configurationGenerates complete project structure with all dependencies
Privacy by defaultAll contracts use zero-knowledge proofs for confidentiality
TypeScript supportFull type definitions and compiled interfaces included

Available contracts

ContractZK CircuitsUse case
Tokenization7Asset tokenization, fundraising, securities
Staking8Rewards, governance, yield generation
Identity1KYC, credential verification, access control
Oracle7Price feeds, external data, IoT streams
Lending7DeFi protocols, collateralized loans

Quick start

Run the wizard with npx (no installation required):

npx @meshsdk/midnight-contracts-wizard

Follow the interactive prompts to select your contracts and generate your project.

Example output

$ npx @meshsdk/midnight-contracts-wizard

Welcome to Midnight Contracts Wizard!
? Enter your project name: my-defi-app
? Select contracts to include:
  [x] Tokenization Contract (7 ZK circuits)
  [x] Lending & Borrowing Contract (7 ZK circuits)

Creating project structure...
Adding Tokenization contract...
Adding Lending contract...

Project created successfully!

Next steps:
1. cd my-defi-app
2. npm install
3. compact compile src/tokenization/token.compact src/managed/tokenization

Documentation sections

Requirements

Before you start, ensure you have:

Next steps

  1. Installation - Get the CLI tool running
  2. Usage - Create your first project
  3. Contracts - Explore available templates
  4. Project Structure - Understand generated files

On this page