Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/docs/src/pages/en/packages/_meta.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
export default {

Check warning on line 1 in apps/docs/src/pages/en/packages/_meta.js

View workflow job for this annotation

GitHub Actions / build (20)

Assign object to a variable before exporting as module default

Check warning on line 1 in apps/docs/src/pages/en/packages/_meta.js

View workflow job for this annotation

GitHub Actions / build (20)

Assign object to a variable before exporting as module default
"midnight_setup": {
title: "Midnight Setup",
route: "/midnight_setup",
},
"midnight_contracts_wizard": {
title: "Contracts Wizard",
route: "/midnight_contracts_wizard",
},
"wallet_widget": {
title: "Wallet Widget",
route: "/wallet_widget",
Expand Down
23 changes: 23 additions & 0 deletions apps/docs/src/pages/en/packages/midnight_contracts_wizard/_meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export default {

Check warning on line 1 in apps/docs/src/pages/en/packages/midnight_contracts_wizard/_meta.js

View workflow job for this annotation

GitHub Actions / build (20)

Assign object to a variable before exporting as module default

Check warning on line 1 in apps/docs/src/pages/en/packages/midnight_contracts_wizard/_meta.js

View workflow job for this annotation

GitHub Actions / build (20)

Assign object to a variable before exporting as module default
"index": {
title: "Introduction",
route: "/",
},
"installation": {
title: "Installation",
route: "/installation",
},
"usage": {
title: "Usage",
route: "/usage",
},
"contracts": {
title: "Available Contracts",
route: "/contracts",
},
"project_structure": {
title: "Project Structure",
route: "/project_structure",
},
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
title: Available Contracts
description: Explore the smart contract templates available in the Midnight Contracts Wizard
---

# Available Contracts

The Midnight Contracts Wizard includes several production-ready smart contract templates. Each contract is designed with privacy and zero-knowledge proofs in mind.

## Tokenization Contract

**7 ZK Circuits**

A complete project tokenization system with zero-knowledge privacy for investments.

### Features
- Private token minting and burning
- Confidential balance management
- Investment tracking with ZK proofs
- Transfer with privacy guarantees

### Use Cases
- Real estate tokenization
- Asset-backed securities
- Private equity tracking
- Confidential fundraising

---

## Staking Contract

**8 ZK Circuits**

A privacy-focused staking system with rewards and configurable lock periods.

### Features
- Private stake amounts
- Confidential reward distribution
- Flexible lock periods
- Slashing mechanisms

### Use Cases
- Network validation
- Governance participation
- Yield generation
- Long-term holding incentives

---

## Identity Contracts

**1 ZK Circuit**

Complete identity management system with cryptographic libraries for privacy-preserving verification.

### Features
- Zero-knowledge identity proofs
- Selective disclosure
- Credential verification
- Privacy-preserving authentication

### Use Cases
- KYC compliance
- Age verification
- Credential validation
- Access control

---

## Oracle Contract

**7 ZK Circuits**

Decentralized oracle system with privacy-preserving data feeds.

### Features
- Confidential data ingestion
- Multi-source aggregation
- Tamper-proof feeds
- Privacy-preserving validation

### Use Cases
- Price feeds
- Weather data
- Sports results
- IoT data streams

---

## Lending & Borrowing Contract

**7 ZK Circuits**

Privacy-preserving decentralized lending protocol.

### Features
- Confidential collateral management
- Private loan amounts
- Interest rate privacy
- Liquidation with ZK proofs

### Use Cases
- DeFi lending platforms
- Peer-to-peer lending
- Collateralized loans
- Credit lines

---

## Contract Selection Tips

### Single Contract Projects
Perfect for focused applications or proof-of-concepts. Select one contract type and build a specialized solution.

### Multi-Contract Projects
Combine multiple contracts for complex dApps. For example:
- **Tokenization + Oracle** - Real-world asset pricing
- **Staking + Identity** - Governance with verified participants
- **Lending + Oracle** - Price-aware DeFi protocols

### All Contracts
Select all contracts to explore the full ecosystem or build a comprehensive platform.

## Technical Details

Each contract includes:
- Complete `.compact` source files
- Compiled TypeScript interfaces
- ZK circuit configurations
- Build and deployment scripts
- Example usage documentation

## Next Steps

Learn about the [Project Structure](/en/packages/midnight_contracts_wizard/project_structure) that gets generated for your selected contracts.

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Midnight Contracts Wizard
description: A CLI tool to create new Midnight contracts projects with selected smart contracts
asIndexPage: true
sidebarTitle: Contracts Wizard
---

# Midnight Contracts Wizard

**A CLI tool to create new Midnight contracts projects with selected smart contracts.**

## Overview

The Midnight Contracts Wizard is an interactive command-line tool that helps you quickly scaffold new Midnight smart contract projects. With a simple interactive interface, you can select from multiple pre-built contract templates and generate a complete project structure ready for development.

## What's Included

- **Interactive CLI** - Select which contracts to include through an easy-to-use interface
- **Multiple Contract Types** - Choose from Tokenization, Staking, Identity, Oracle, and Lending & Borrowing contracts
- **Complete Setup** - Automatically generates package.json, tsconfig, and build scripts
- **Ready to Use** - All necessary files for compilation and build included
- **Self-Contained** - All contract templates included, no external dependencies required

## Quick Installation

- npm:
```bash
npm install @meshsdk/midnight-contracts-wizard
```

- yarn:
```bash
yarn add @meshsdk/midnight-contracts-wizard
```

## Getting Started

1. **[Installation](/en/packages/midnight_contracts_wizard/installation)** - Install the CLI tool
2. **[Usage](/en/packages/midnight_contracts_wizard/usage)** - Learn how to use the interactive wizard
3. **[Available Contracts](/en/packages/midnight_contracts_wizard/contracts)** - Explore the contract templates
4. **[Project Structure](/en/packages/midnight_contracts_wizard/project_structure)** - Understanding generated projects

## Key Features

- **Zero-knowledge contracts** - Pre-built ZK circuit implementations
- **Privacy-focused** - All contracts designed with privacy in mind
- **Production-ready** - Battle-tested contract templates
- **TypeScript support** - Full type safety and IntelliSense
- **Quick setup** - Get started in minutes

Start building your Midnight smart contracts today! Explore the sections below to get started.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Installation
description: How to install the Midnight Contracts Wizard CLI tool
---

# Installation

Install the Midnight Contracts Wizard globally or as a project dependency.

## Global Installation

Install globally to use the wizard from anywhere:

```bash
npm install -g @meshsdk/midnight-contracts-wizard
```

## Project Installation

Install as a project dependency:

```bash
npm install @meshsdk/midnight-contracts-wizard
```

Or with yarn:

```bash
yarn add @meshsdk/midnight-contracts-wizard
```

## Verify Installation

After installation, verify that the wizard is available:

```bash
npx @meshsdk/midnight-contracts-wizard --version
```

## Requirements

- **Node.js**: Version 18 or higher
- **npm**: Version 8 or higher (or yarn equivalent)

## Next Steps

Once installed, proceed to the [Usage](/en/packages/midnight_contracts_wizard/usage) section to learn how to create your first project.

Loading
Loading