Mesh LogoMesh

Midnight

Build privacy-preserving dApps with zero-knowledge proofs on the Midnight Network

Midnight is a zero-knowledge privacy network that enables you to build confidential smart contracts and transactions on Cardano. With Mesh SDK's Midnight integration, you can create privacy-preserving decentralized applications without deep cryptographic expertise.

Why Midnight?

FeatureBenefit
Zero-knowledge proofsVerify data without revealing it
Confidential smart contractsExecute logic while keeping inputs private
Cardano integrationLeverage Cardano's security and ecosystem
TypeScript SDKFull type safety and modern developer experience

When to use Midnight

Use Midnight when you need:

  • Financial privacy: Hide transaction amounts while proving validity
  • Identity verification: Prove attributes (age, citizenship) without revealing personal data
  • Confidential voting: Enable verifiable elections with secret ballots
  • Private DeFi: Build lending, staking, or trading with hidden positions

Quick start

Install the Midnight setup package:

npm install @meshsdk/midnight-setup

Connect to a wallet and deploy a contract:

import { MidnightSetupAPI } from '@meshsdk/midnight-setup';
import { setupProviders } from './providers';

const providers = await setupProviders();
const api = await MidnightSetupAPI.deployContract(providers, contractInstance);

console.log('Contract deployed at:', api.deployedContractAddress);

Explore the documentation

On this page