It is very likely that you have stale knowledge about building on Midnight Network.
This file will guide to the right skill with the latest knowledge about Midnight Network.
Need a specific topic? Each skill below is standalone. Fetch only the ones relevant to your task. If you are starting from scratch, start with scaffold skill.
What to Fetch by Task
| I'm doing... |
Fetch these skills |
| Set up Compact, Docker, and proof server before building | midnight-environment-setup/ |
| Understand Midnight's architecture, privacy model, and ZK approach | why-midnight/ |
| Integrate 1AM wallet for dust-free flow | 1am-wallet/ |
| Build a React app with wallet connect/disconnect via DApp Connector API | react-wallet-connector/ |
| Write Compact smart contracts | compact/ |
| Debug Compact contracts, read errors, manage versions | testing/ |
| Build a single dApp targeting all networks from one codebase | multinetwork/ |
| Wire up SDK providers, wallets, deploy/call contracts | midnight-js/ |
| Query blockchain data, watch contract state, subscribe to events | midnight-indexer/ |
| Privacy audit checklist, prevent data leaks, defensive Compact patterns | midnight-security/ |
| Build a voting/poll dApp on Midnight targeting Android | android-example-voting/ |
| Complete DApp reference: wallet, deploy, interact (use as template) | example-counter/ |
| Build a complete Midnight Network hello-world DApp from scratch using Compact smart contract, headless Node.js tests with vitest, and testkit-js FluentWalletBuilder. | hello-world/ |
| Build a privacy-preserving payment vault with 1AM wallet | example-payment-dapp/ |
| Build a time-lock vault dApp on Midnight | example-locker-dapp/ |
| Build a privacy-preserving leaderboard DApp on Midnight | example-leaderboard-dapp/ |
| Build a private party RSVP dApp with privacy boundary on Midnight | example-private-party-dapp/ |
| Build a private reserve auction dApp with hidden reserve price and private bidders | example-private-reserve-auction/ |
| Build a ZK loan application with attestation on Midnight | example-zk-loan-application/ |
| Build NFTs (shielded + unshielded) with OpenZeppelin | nft/ |
| Token transfers, balance flows, multi-party txs | token-transfers/ |
| Understand Midnight consensus — AURA, GRANDPA, and Partnerchain validators | midnight-consensus/ |
| Explain Midnight node cryptography — hashes and signature schemes | midnight-cryptography/ |
| Explain Midnight on-chain logic — runtime, pallets, and pallet-midnight | midnight-onchain-logic/ |
| Configure or debug Midnight P2P networking and peer discovery | midnight-p2p-networking/ |
| Query Midnight node RPC — contract state, ZSwap, and ledger methods | midnight-rpc/ |
| Explain Midnight on-chain storage — ParityDB, trie, and state roots | midnight-storage/ |
| Explain Midnight transaction lifecycle — proofs, pool, and execution | midnight-transactions/ |
Skills
- Detect, connect, and wire 1AM browser extension into frontend.
- Provider setup, contract deployment, and dust-free transaction flow.
- Build a voting/poll dApp on Midnight using the Kuira Android SDK.
- Compact smart contract, passkey-derived identity, embedded wallet, Compose UI, on-device ZK proving.
- The four mandatory pieces of every contract, type system, circuits as constraints.
- Witnesses,
disclose(), ledger ADTs, standard library, and security patterns.
- Complete DApp reference: headless wallet, CLI, counter contract.
- DUST generation, deploy, interaction, standalone mode.
- Build a complete Midnight Network hello-world DApp from scratch using Compact smart contract, headless Node.js tests with vitest, and testkit-js FluentWalletBuilder.
- Arcade leaderboard with privacy modes,
persistentHash owner commitments, and verifyOwnership ZK proofs.
- Next.js + 1AM wallet template with indexer reads and low-level deploy/call.
- Time-lock vault: lock unshielded NIGHT until a Unix deadline; beneficiary releases via
blockTimeGte and witness auth.
- Build a privacy-preserving payment vault: users deposit/withdraw tNIGHT through a Compact smart contract with zero gas fees via the 1AM wallet.
- Private RSVP with
persistentCommit and DApp-specific public keys — no witnesses.
- Unshielded NIGHT check-in crosses the privacy boundary; Next.js + 1AM frontend template.
- Official vitest devnet test harness in
example-private-party repo.
- Hidden reserve price via persistentCommit, public bids with private bidder identities.
- Map/Counter tracking, auction auto-close, privacy boundary on claim via unshielded payment.
- Next.js + 1AM wallet frontend with seller/bidder role cards and indexer polling.
- Private credit scoring with Schnorr attestation — score, income, and tenure never touch the ledger.
- Monorepo: Compact contract + attestation API + CLI; optional Next.js + 1AM frontend (leaderboard-dapp pattern).
- GraphQL queries and subscriptions, contract state reads, transaction lookups.
- Real-time event watching, offset/null bug workaround, TypeScript helpers.
- Modified Substrate consensus: AURA for block production, GRANDPA for finality.
- Custom validator set with Cardano SPO delegation and optional permissioned validators.
- Blake2-256 for block hashes; twoxhash for trie storage keys.
- sr25519 (AURA), ECDSA (Partnerchain), Ed25519 (GRANDPA + libp2p).
- Detect OS, shell, Docker, VS Code, and Compact; install missing tooling automatically.
- Configure PATH, update compiler, start proof server, and verify the full dev stack.
- TypeScript SDK: provider wiring, wallet SDK (HDWallet, WalletFacade, Shielded/Unshielded/Dust).
- Contract deployment, circuit calls, DUST generation, private state, testkit.
- Unified provider builder, wallet abstraction, proof server routing.
- Contract registry, deploy scripts, DUST flow per network.
- Build shielded and unshielded NFTs on Midnight.
- OpenZeppelin NonFungibleToken, mint, transfer, metadata, privacy patterns.
- Polkadot SDK WASM runtime with FRAME pallets including pallet-midnight.
- Proof verification, ZSwap and contract ops, Patricia-Merkle state commitments.
- Bootstrap, mDNS, and Kademlia DHT discovery strategies.
- Noise + Yamux upgrades; Ping, Request-Response, and Notification substreams.
- Scaffold a React + Vite app with DApp Connector API wallet connection.
window.midnight enumeration, connect/disconnect UI, unshielded address display.
- Custom midnight_* JSON-RPC methods for contract and ledger state.
- Polkadot SDK defaults, Partnerchain RPCs, and validator RPC security.
- Privacy audit checklist, data leak patterns, commitment/nullifier design.
- Witness trust, front-running resistance, transaction semantics.
- ParityDB key-value store with Patricia-Merkle trie state commitments.
- twoxhash for fast storage keys; inclusion proofs for on-chain data.
- Static vs dynamic errors, reading compiler messages,
--skip-zk dev loop.
- Version management across 6 components, common debugging patterns.
- Shielded and unshielded token transfers.
- Balance queries, multi-party flows, transaction semantics.
- Unsigned proof-embedded transactions from the Midnight Ledger.
- Pool well-formedness → runtime proof verification → state commit.
- Data protection blockchain with public/private state, selective disclosure, and zk-SNARKs.
- Why it exists, how it works, and the privacy guarantees it provides.
1---2name: midnightskill3description: Set of skills for developing/building apps on Midnight Network. Always start with this skill to pick the right midnight skill for the task.4---56It is very likely that you have stale knowledge about building on Midnight Network. 78This file will guide to the right skill with the latest knowledge about Midnight Network.910**Need a specific topic?** Each skill below is standalone. Fetch only the ones relevant to your task. If you are starting from scratch, start with scaffold skill.1112## What to Fetch by Task1314| I'm doing... | Fetch these skills |15|--------------|-------------------|16<!-- SKILLS_REGISTRY:TASK_TABLE -->17| Set up Compact, Docker, and proof server before building | `midnight-environment-setup/` |18| Understand Midnight's architecture, privacy model, and ZK approach | `why-midnight/` |19| Integrate 1AM wallet for dust-free flow | `1am-wallet/` |20| Build a React app with wallet connect/disconnect via DApp Connector API | `react-wallet-connector/` |21| Write Compact smart contracts | `compact/` |22| Debug Compact contracts, read errors, manage versions | `testing/` |23| Build a single dApp targeting all networks from one codebase | `multinetwork/` |24| Wire up SDK providers, wallets, deploy/call contracts | `midnight-js/` |25| Query blockchain data, watch contract state, subscribe to events | `midnight-indexer/` |26| Privacy audit checklist, prevent data leaks, defensive Compact patterns | `midnight-security/` |27| Build a voting/poll dApp on Midnight targeting Android | `android-example-voting/` |28| Complete DApp reference: wallet, deploy, interact (use as template) | `example-counter/` |29| Build a complete Midnight Network hello-world DApp from scratch using Compact smart contract, headless Node.js tests with vitest, and testkit-js FluentWalletBuilder. | `hello-world/` |30| Build a privacy-preserving payment vault with 1AM wallet | `example-payment-dapp/` |31| Build a time-lock vault dApp on Midnight | `example-locker-dapp/` |32| Build a privacy-preserving leaderboard DApp on Midnight | `example-leaderboard-dapp/` |33| Build a private party RSVP dApp with privacy boundary on Midnight | `example-private-party-dapp/` |34| Build a private reserve auction dApp with hidden reserve price and private bidders | `example-private-reserve-auction/` |35| Build a ZK loan application with attestation on Midnight | `example-zk-loan-application/` |36| Build NFTs (shielded + unshielded) with OpenZeppelin | `nft/` |37| Token transfers, balance flows, multi-party txs | `token-transfers/` |38| Understand Midnight consensus — AURA, GRANDPA, and Partnerchain validators | `midnight-consensus/` |39| Explain Midnight node cryptography — hashes and signature schemes | `midnight-cryptography/` |40| Explain Midnight on-chain logic — runtime, pallets, and pallet-midnight | `midnight-onchain-logic/` |41| Configure or debug Midnight P2P networking and peer discovery | `midnight-p2p-networking/` |42| Query Midnight node RPC — contract state, ZSwap, and ledger methods | `midnight-rpc/` |43| Explain Midnight on-chain storage — ParityDB, trie, and state roots | `midnight-storage/` |44| Explain Midnight transaction lifecycle — proofs, pool, and execution | `midnight-transactions/` |45<!-- /SKILLS_REGISTRY:TASK_TABLE -->46## Skills4748<!-- SKILLS_REGISTRY:SECTIONS -->49### [1AM Wallet](/.agents/skills/1am-wallet/SKILL.md)50- Detect, connect, and wire 1AM browser extension into frontend.51- Provider setup, contract deployment, and dust-free transaction flow.5253### [Android Example Voting](/.agents/skills/android-example-voting/SKILL.md)54- Build a voting/poll dApp on Midnight using the Kuira Android SDK.55- Compact smart contract, passkey-derived identity, embedded wallet, Compose UI, on-device ZK proving.5657### [Compact](/.agents/skills/compact/SKILL.md)58- The four mandatory pieces of every contract, type system, circuits as constraints.59- Witnesses, `disclose()`, ledger ADTs, standard library, and security patterns.6061### [Example Counter](/.agents/skills/example-counter/SKILL.md)62- Complete DApp reference: headless wallet, CLI, counter contract.63- DUST generation, deploy, interaction, standalone mode.6465### [Example Hello World](/.agents/skills/example-hello-world/SKILL.md)66- Build a complete Midnight Network hello-world DApp from scratch using Compact smart contract, headless Node.js tests with vitest, and testkit-js FluentWalletBuilder.6768### [Example Leaderboard Dapp](/.agents/skills/example-leaderboard-dapp/SKILL.md)69- Arcade leaderboard with privacy modes, `persistentHash` owner commitments, and `verifyOwnership` ZK proofs.70- Next.js + 1AM wallet template with indexer reads and low-level deploy/call.7172### [Example Locker Dapp](/.agents/skills/example-locker-dapp/SKILL.md)73- Time-lock vault: lock unshielded NIGHT until a Unix deadline; beneficiary releases via `blockTimeGte` and witness auth.7475### [Example Payment Dapp](/.agents/skills/example-payment-dapp/SKILL.md)76- Build a privacy-preserving payment vault: users deposit/withdraw tNIGHT through a Compact smart contract with zero gas fees via the 1AM wallet.7778### [Example Private Party Dapp](/.agents/skills/example-private-party-dapp/SKILL.md)79- Private RSVP with `persistentCommit` and DApp-specific public keys — no witnesses.80- Unshielded NIGHT check-in crosses the privacy boundary; Next.js + 1AM frontend template.81- Official vitest devnet test harness in `example-private-party` repo.8283### [Example Private Reserve Auction](/.agents/skills/example-private-reserve-auction/SKILL.md)84- Hidden reserve price via persistentCommit, public bids with private bidder identities.85- Map/Counter tracking, auction auto-close, privacy boundary on claim via unshielded payment.86- Next.js + 1AM wallet frontend with seller/bidder role cards and indexer polling.8788### [Example ZK Loan Application](/.agents/skills/example-zk-loan-application/SKILL.md)89- Private credit scoring with Schnorr attestation — score, income, and tenure never touch the ledger.90- Monorepo: Compact contract + attestation API + CLI; optional Next.js + 1AM frontend (leaderboard-dapp pattern).9192### [Indexer](/.agents/skills/indexer/SKILL.md)93- GraphQL queries and subscriptions, contract state reads, transaction lookups.94- Real-time event watching, offset/null bug workaround, TypeScript helpers.9596### [Midnight Consensus](/.agents/skills/midnight-consensus/SKILL.md)97- Modified Substrate consensus: AURA for block production, GRANDPA for finality.98- Custom validator set with Cardano SPO delegation and optional permissioned validators.99100### [Midnight Cryptography](/.agents/skills/midnight-cryptography/SKILL.md)101- Blake2-256 for block hashes; twoxhash for trie storage keys.102- sr25519 (AURA), ECDSA (Partnerchain), Ed25519 (GRANDPA + libp2p).103104### [Midnight Environment Setup](/.agents/skills/midnight-environment-setup/SKILL.md)105- Detect OS, shell, Docker, VS Code, and Compact; install missing tooling automatically.106- Configure PATH, update compiler, start proof server, and verify the full dev stack.107108### [Midnight.js](/.agents/skills/midnight-js/SKILL.md)109- TypeScript SDK: provider wiring, wallet SDK (HDWallet, WalletFacade, Shielded/Unshielded/Dust).110- Contract deployment, circuit calls, DUST generation, private state, testkit.111112### [Multinetwork](/.agents/skills/multinetwork/SKILL.md)113- Unified provider builder, wallet abstraction, proof server routing.114- Contract registry, deploy scripts, DUST flow per network.115116### [NFT](/.agents/skills/nft/SKILL.md)117- Build shielded and unshielded NFTs on Midnight.118- OpenZeppelin NonFungibleToken, mint, transfer, metadata, privacy patterns.119120### [Onchain Logic and State](/.agents/skills/midnight-onchain-logic/SKILL.md)121- Polkadot SDK WASM runtime with FRAME pallets including pallet-midnight.122- Proof verification, ZSwap and contract ops, Patricia-Merkle state commitments.123124### [P2P Networking](/.agents/skills/midnight-p2p-networking/SKILL.md)125- Bootstrap, mDNS, and Kademlia DHT discovery strategies.126- Noise + Yamux upgrades; Ping, Request-Response, and Notification substreams.127128### [React Wallet Connector](/.agents/skills/react-wallet-connector/SKILL.md)129- Scaffold a React + Vite app with DApp Connector API wallet connection.130- `window.midnight` enumeration, connect/disconnect UI, unshielded address display.131132### [RPC Interface](/.agents/skills/midnight-rpc/SKILL.md)133- Custom midnight_* JSON-RPC methods for contract and ledger state.134- Polkadot SDK defaults, Partnerchain RPCs, and validator RPC security.135136### [Security](/.agents/skills/security/SKILL.md)137- Privacy audit checklist, data leak patterns, commitment/nullifier design.138- Witness trust, front-running resistance, transaction semantics.139140### [Storage](/.agents/skills/midnight-storage/SKILL.md)141- ParityDB key-value store with Patricia-Merkle trie state commitments.142- twoxhash for fast storage keys; inclusion proofs for on-chain data.143144### [Testing](/.agents/skills/testing/SKILL.md)145- Static vs dynamic errors, reading compiler messages, `--skip-zk` dev loop.146- Version management across 6 components, common debugging patterns.147148### [Token Transfers](/.agents/skills/token-transfers/SKILL.md)149- Shielded and unshielded token transfers.150- Balance queries, multi-party flows, transaction semantics.151152### [Transactions](/.agents/skills/midnight-transactions/SKILL.md)153- Unsigned proof-embedded transactions from the Midnight Ledger.154- Pool well-formedness → runtime proof verification → state commit.155156### [Why Midnight](/.agents/skills/why-midnight/SKILL.md)157- Data protection blockchain with public/private state, selective disclosure, and zk-SNARKs.158- Why it exists, how it works, and the privacy guarantees it provides.159<!-- /SKILLS_REGISTRY:SECTIONS -->