midnight-compact-app-builder

Design, implement, test, and deploy Compact smart contracts and DApps on the Midnight blockchain.

Updated Feb 22, 2026
One-click install
npx skills add https://github.com/mashharuki/CareTech-Catalyst-Hackathon --skill midnight-compact-app-builder-mashharuki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: midnight-compact-app-builder
Source: https://github.com/mashharuki/CareTech-Catalyst-Hackathon/tree/main/.trae/skills/midnight-compact-app-builder
Command: npx skills add https://github.com/mashharuki/CareTech-Catalyst-Hackathon --skill midnight-compact-app-builder-mashharuki

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building privacy-preserving DApps on the Midnight blockchain involves many moving parts—Compact contract design, TypeScript generation, wallet integration, proof server configuration, and network selection—and misconfigurations in any of them cause hard-to-diagnose failures. This Skill provides an end-to-end workflow that guides development from requirements through deployment and troubleshooting. ## Core Features & Use Cases - End-to-End Delivery Workflow: Structured phases covering discovery, design, implementation, verification, and deployment/operation for Midnight DApps. - Compact Contract Design Guidance: Rules for separating public and private data, minimizing witnesses, defining circuit boundary conditions, and applying TDD to contract logic. - Integration & Troubleshooting: Practical references for compact-runtime, midnight.js, Wallet API flows (prove/submit separation), proof server operations, and a prioritized failure-diagnosis matrix. - Use Case: You are building a consent-management DApp that anchors audit hashes on Midnight. Use this Skill to design the Compact circuit, integrate the generated TypeScript with a wallet, connect to a testnet proof server, and diagnose proof-generation failures. ## Quick Start Help me design and implement a Compact smart contract on Midnight and integrate it with my TypeScript app using the Wallet API and a testnet proof server.

Frequently Asked Questions about midnight-compact-app-builder

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

FAQPage Schema
How do I build a DApp on the Midnight blockchain with Compact?

Start by designing the Compact contract with separated public and private data, then generate the TypeScript bindings and integrate them via compact-runtime and midnight.js. Connect a wallet through the Wallet SDK or Wallet API, configure a proof server endpoint, and verify with contract and integration tests before deploying to testnet.

How do I choose between local, testnet, and devnet on Midnight?

Use local for the fastest iteration on circuits and integration flows, testnet for team validation and demo preparation close to real conditions, and devnet when verifying experimental features. The choice depends on whether you prioritize development speed, shared testing, or specific feature verification.

Why does proof generation fail on Midnight?

Proof generation failures usually come from an incorrect proof server URL, a network ID mismatch, stale generated TypeScript after contract changes, or input values violating circuit constraints. Check these four causes in order before investigating deeper issues.

How do I integrate a wallet with a Midnight DApp?

Use the Wallet API methods such as balanceAndProveTransaction, proveTransaction, and submitTransaction, separating prove and submit steps so failures can be isolated. Inject network ID and endpoint configuration through environment variables and record transaction IDs for traceability.

What are best practices for Compact smart contract testing?

Write tests before implementation covering both accepted and rejected inputs, state transition consistency, repeated execution, and out-of-order calls. Stabilize one circuit at a time, treat type errors as design mismatch signals, and update related tests whenever the specification changes.