If npm and Docker are giving errors, use this completely manual approach.
- Midnight CLI (command-line tool)
- Your wallet mnemonic (24 words from Lace)
- Contract files (already compiled in your repo)
This approach requires:
- Understanding command-line basics
- Following exact steps
- Having Midnight SDK installed separately
midnight --versionIf you see a version number: ✅ You have it
If error "command not found": ❌ Need to install
# Option A: Using npm (if npm works)
npm install -g @midnight-ntwrk/cli
# Option B: Download pre-built binary
# https://midnight.network/downloadsYour 6 compiled contracts are at:
AutoDiscovery\autodiscovery-contract\src\managed\
├── discovery-core
├── compliance-proof
├── document-registry
├── access-control
├── jurisdiction-registry
└── expert-witness
Each contains:
.proverfile.verifierfile.zkirfile
Instead of command-line, use the web-based IDE:
- Go to https://midnight.network (check current URL)
- Look for "IDE" or "Playground"
- Click "Deploy Contract"
- Upload each contract file (
.zkirfile) - Connect Lace wallet
- Click Deploy
- Approve in Lace
- Copy contract address
- Repeat for all 6 contracts
If you can run TypeScript directly:
Create file: deploy.ts
import { deployContract } from '@midnight-ntwrk/midnight-js-contracts';
import { httpClientProofProvider } from '@midnight-ntwrk/midnight-js-http-client-proof-provider';
import * as fs from 'fs';
// Your wallet mnemonic
const mnemonic = 'your 24-word phrase';
// Contract path
const contractPath = './AutoDiscovery/autodiscovery-contract/src/managed/discovery-core';
async function deploy() {
try {
const contract = await deployContract({
contractPath,
mnemonic,
network: 'preprod',
proofProvider: httpClientProofProvider('http://localhost:6300'),
});
console.log('✅ Deployed:', contract.address);
} catch (error) {
console.error('❌ Error:', error);
}
}
deploy();Then run:
npx ts-node deploy.tsIf all else fails:
- Use existing deployed contracts from another project
- Or ask Midnight team for test contract addresses
- Use those addresses in
.env.prod
Example .env.contracts:
VITE_CONTRACT_DISCOVERY_CORE=<existing-address>
VITE_CONTRACT_JURISDICTION_REGISTRY=<existing-address>
VITE_CONTRACT_COMPLIANCE_PROOF=<existing-address>
VITE_CONTRACT_DOCUMENT_REGISTRY=<existing-address>
VITE_CONTRACT_ACCESS_CONTROL=<existing-address>
VITE_CONTRACT_EXPERT_WITNESS=<existing-address>Then proceed with UI deployment.
-
Check Midnight documentation: https://docs.midnight.network/getting-started
-
Contact Midnight support: https://github.com/midnightntwrk/midnight-local-dev/issues
-
Use reference implementation: https://github.com/Mackenzie-OO7/midnight-doc-manager
Manual deployment options:
- ✅ Use Midnight IDE (web-based, easiest)
- ✅ Install Midnight CLI + deploy command
- ✅ Use existing deployed contracts
- ✅ Write custom TypeScript script
Pick the one that works for your setup!
Last Updated: 2026-05-27