midnight-dapp-dev:midnight-sdk

Document the Midnight.js SDK for deploying and maintaining Compact contracts.

37|9|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/devrelaicom/midnight-expert --skill midnight-dapp-dev-midnight-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: midnight-dapp-dev:midnight-sdk
Source: https://github.com/devrelaicom/midnight-expert/tree/main/plugins/midnight-dapp-dev/skills/midnight-sdk
Command: npx skills add https://github.com/devrelaicom/midnight-expert --skill midnight-dapp-dev-midnight-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill centralizes operational knowledge for the Midnight.js SDK so developers can reliably deploy, call, and maintain Compact contracts without guessing provider wiring, transaction sequencing, or verifier management.

Core Features & Use Cases

  • Package map and exports: authoritative list of the 10 midnight-js packages and their primary exports for deployment, proving, indexing, and utilities.
  • Provider architecture: clear definitions and usage patterns for WalletProvider, MidnightProvider, PublicDataProvider, PrivateStateProvider, ZkConfigProvider, and ProofProvider.
  • Transaction lifecycle: end-to-end guidance for build, prove, balance, submit, and finalize stages, including high-level callTx and low-level create/submit flows.
  • Operational tasks: contract deployment and discovery, verifier key insertion/removal, authority replacement, observable state subscriptions, and testkit-js based integration tests.
  • Use case: integrate browser wallets or Node.js test wallets, generate proofs via a proof server, add fees via wallet balancing, submit transactions to a Midnight node, and watch finalization via the indexer.

Quick Start

Ask how to configure MidnightProviders, deploy a Compact contract with deployContract, call a circuit, and observe finalization using the publicDataProvider.

Frequently Asked Questions about midnight-dapp-dev:midnight-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy and call a Compact contract using the Midnight SDK?

The Midnight SDK transaction lifecycle includes five stages: build, prove, balance, submit, and finalize. You build the transaction, generate proofs via a proof server, add fees through wallet balancing, submit it to a node, and track finalization via the indexer.

What providers do I need to configure for Midnight contract operations?

Midnight contract operations require configuring WalletProvider, MidnightProvider, PublicDataProvider, PrivateStateProvider, ZkConfigProvider, and ProofProvider. These components manage wallet integration, public state indexing, private states, zero-knowledge configuration, and proof generation respectively.

Can I use the Midnight SDK in both Node.js and browser environments?

Yes, the Midnight SDK operates in both Node.js and browser environments. You can integrate browser wallets or Node.js test wallets, generate proofs, add fees via wallet balancing, and observe transaction finalization using observable state subscriptions across both platforms.

How do I manage verifier keys and authorities for deployed Compact contracts?

You manage verifier keys and authorities for deployed Compact contracts using the Midnight SDK's operational APIs. These allow you to insert and remove verifier keys, replace contract authorities, and discover existing contracts deployed on the Midnight network.

Does the Midnight SDK support integration testing for zero-knowledge proofs?

Yes, the Midnight SDK supports integration testing for zero-knowledge proofs using testkit-js. This package allows you to simulate transaction lifecycles, test contract deployment, and verify observable state subscriptions within a controlled Node.js environment.