This content originally appeared on DEV Community and was authored by Martin Rivero
Midnight is a new blockchain for building privacy-focused decentralized applications using zero-knowledge (ZK) technology. This tutorial covers everything you need to set up your dev environment for Midnight and start building private dApps using the Compact smart contract language.
Prerequisites
Make sure you have:
- Google Chrome browser
- Terminal/CLI knowledge
- Admin privileges to install Docker & Compact
Step 1: Install the Lace Midnight Wallet
Lace is the official wallet for the Midnight testnet.
- Install from Chrome Web Store
- Pin it to your toolbar
- Click it → Create Wallet → Write down your seed phrase safely!
Verification: Wallet dashboard shows 0 tDUST
Step 2: Get Test Tokens (tDUST)
- Copy your wallet address in Lace
- Go to the Midnight Faucet
- Paste your address and request tokens
> Your address should start with
mn_shield-addr_test...
Verification: You now have tDUST in your wallet.
Step 3: Install the Compact Compiler
Compact is Midnight’s smart contract language.
Install it using:
bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/midnightntwrk/compact/releases/download/compact-v0.2.0/compact-installer.sh | sh
Then run:
bash
compact --version
which compact
Verification: You see the version and path printed.
Step 4: Run the Proof Server with Docker
- Install Docker Desktop
- Start the proof server:
docker run -p 6300:6300 midnightnetwork/proof-server -- 'midnight-proof-server --network testnet'
Verification: Terminal shows logs and proof server runs at http://localhost:6300
Tip: In Lace, go to: Settings → Midnight → Local to use this local server.
Step 5: Install the Compact VS Code Extension
- Download from Releases
- In VS Code: go to Extensions → Install from .vsix
Verification: You see Compact Language Support enabled in VS Code.
You’re Ready!
With all tools installed, you’re now ready to:
- Compile & deploy ZK smart contracts
- Interact with dApps using your Lace wallet
- Build private logic using Compact
Want to try a real project?
Fork and deploy this one:
Midnight Kitties – GitHub fork
And you’ll be able to mint your first NFT like this one:
If you found this helpful, follow for more ZK dev cont
You can find out more info: Midnight
This content originally appeared on DEV Community and was authored by Martin Rivero




