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?
| Benefit | Description |
|---|---|
| Production-ready templates | Battle-tested contracts with ZK circuits included |
| Zero configuration | Generates complete project structure with all dependencies |
| Privacy by default | All contracts use zero-knowledge proofs for confidentiality |
| TypeScript support | Full type definitions and compiled interfaces included |
Available contracts
| Contract | ZK Circuits | Use case |
|---|---|---|
| Tokenization | 7 | Asset tokenization, fundraising, securities |
| Staking | 8 | Rewards, governance, yield generation |
| Identity | 1 | KYC, credential verification, access control |
| Oracle | 7 | Price feeds, external data, IoT streams |
| Lending | 7 | DeFi protocols, collateralized loans |
Quick start
Run the wizard with npx (no installation required):
npx @meshsdk/midnight-contracts-wizardFollow 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/tokenizationDocumentation sections
Installation
Install the CLI tool and get started with Midnight Contracts Wizard
Usage
Learn how to use the interactive wizard to scaffold your project
Available Contracts
Explore pre-built contract templates for tokenization, staking, identity, oracle, and lending
Project Structure
Understanding the generated project structure and configuration files
Requirements
Before you start, ensure you have:
- Node.js 18+ - Download Node.js
- npm 8+ - Included with Node.js (provides npx)
Next steps
- Installation - Get the CLI tool running
- Usage - Create your first project
- Contracts - Explore available templates
- Project Structure - Understand generated files
Related resources
- Midnight Setup - Connect contracts to your dApp
- Midnight Network Documentation
- Compact Language Guide