Quickstart
Get Knight Shield running locally in under 10 minutes.
Prerequisites
- Node.js v22+
- pnpm v9+
- compactc v0.29.0 (Midnight Compact compiler)
- Docker and Docker Compose (for local Midnight network)
- Xcode / Android Studio (for mobile development)
1. Clone and Install
git clone https://github.com/knight-shield-wallet.git
cd knight-shield
pnpm install
2. Start Local Midnight Network
docker compose up -d
This starts three services:
midnight-nodeon port9944— local Midnight nodeindexeron port8088— block indexerproof-serveron port6300— ZK proof generation
Wait for all services to be healthy:
docker compose ps
3. Compile Smart Contracts
pnpm compile:contracts
This runs compactc on all 5 .compact files in packages/contracts/ and outputs JS bindings, ZK proving keys, and ZKIR to build/.
4. Build All Packages
pnpm build
Turbo builds core, relay-server, and docs in dependency order.
5. Start the Relay Server
cd packages/relay-server
node dist/server.js
The relay server starts on port 8443 (default) and proxies WebSocket connections to the local Midnight node.
6. Run the Mobile App
cd packages/mobile
# iOS
npx react-native run-ios
# Android
npx react-native run-android
The app connects to the relay server and Midnight node automatically when configured for the standalone network.
7. Verify Everything Works
- The mobile app should show the Dashboard screen with a balance of
0 - Navigate to GhostCloak and enable it — the relay session should connect
- Navigate to GhostShard and create shards — you should see 5 shard entries
- Check the relay server logs for session activity
Next Steps
- Local Dev Environment — Detailed Docker and tooling setup
- Ghost Features — Understand the privacy features
- SDK Reference — Integrate with Knight Shield programmatically