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





Top comments (0)