Skip to content
Midday SDK Midday SDK

Midday SDK

Build privacy-preserving dapps on Midnight Network with ease

Features

Multiple API Styles

Choose between Promise API for simplicity or Effect API for functional programming with dependency injection.

Browser & Node.js

Works seamlessly in both browser environments with Lace wallet and Node.js for backend applications.

Type-Safe

Full TypeScript support with comprehensive type definitions for contracts, state, and operations.

Zero-Knowledge Ready

Built-in support for ZK proofs and privacy-preserving contract interactions on Midnight Network.

Quick Example

import * as Midday from '@no-witness-labs/midday-sdk';
import * as CounterContract from './contracts/counter/contract/index.js';
// Create client (no zkConfig at client level)
const client = await Midday.Client.create({
networkConfig: Midday.Config.NETWORKS.preview,
seed: 'your-64-char-hex-seed',
privateStateProvider: Midday.PrivateState.inMemoryPrivateStateProvider(),
});
// Load contract (zkConfig loaded per-contract)
const loaded = await client.loadContract({
module: CounterContract,
zkConfig: Midday.ZkConfig.fromPath('./contracts/counter'),
privateStateId: 'my-counter',
});
// Deploy and interact
const deployed = await loaded.deploy();
await deployed.actions.increment();
const state = await deployed.ledgerState();