MidnightMidnight Setup
Midnight Setup
Complete development setup for building privacy-preserving dApps on Midnight Network
The @meshsdk/midnight-setup package provides everything you need to build decentralized applications on the Midnight Network. It handles wallet integration, provider configuration, and contract deployment so you can focus on your application logic.
What you get
| Component | Description |
|---|---|
| MidnightSetupAPI | Deploy and interact with smart contracts |
| Provider configuration | Connect to indexers, provers, and the network |
| Wallet integration | Full Lace Beta Wallet support |
| TypeScript types | Complete type definitions for type-safe development |
Installation
npm install @meshsdk/midnight-setupQuick example
import { MidnightSetupAPI } from '@meshsdk/midnight-setup';
import { setupProviders } from './providers';
// Set up providers with wallet connection
const providers = await setupProviders();
// Deploy a new contract
const api = await MidnightSetupAPI.deployContract(providers, contractInstance);
console.log('Deployed at:', api.deployedContractAddress);
// Read contract state
const state = await api.getContractState();
console.log('Current state:', state);Documentation sections
Getting Started
Install and set up @meshsdk/midnight-setup for building zero-knowledge privacy dApps
Core API Methods
Complete reference for MidnightSetupAPI methods and provider setup
Lace Wallet Integration
Complete guide for integrating Lace Beta Wallet with Midnight Network dApps
Integration Examples
React hooks, contract management, and complete dApp examples for Midnight Network
Requirements
Before you begin, ensure you have:
- Node.js 18+ installed
- Lace Beta Wallet browser extension for Midnight Network
- Basic familiarity with TypeScript and React (for frontend integration)
Next steps
- Follow the Getting Started guide to set up your project
- Configure Wallet Integration for transaction signing
- Explore the API Reference for all available methods