Mesh LogoMesh
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

ComponentDescription
MidnightSetupAPIDeploy and interact with smart contracts
Provider configurationConnect to indexers, provers, and the network
Wallet integrationFull Lace Beta Wallet support
TypeScript typesComplete type definitions for type-safe development

Installation

npm install @meshsdk/midnight-setup

Quick 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

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

  1. Follow the Getting Started guide to set up your project
  2. Configure Wallet Integration for transaction signing
  3. Explore the API Reference for all available methods

On this page