Complete guide for running the proof server and client application.
- Rust 1.70+
- Node.js 18+
- Sui CLI
- Sui Wallet browser extension
# 1. Install dependencies
npm install
npm run client:install
# 2. Configure environment
cp .env.local.example .env.local
# Edit .env.local with your Sui keypair
# 3. Start everything
npm run start:local # Requires: cargo install mprocs# Terminal 1
npm run start:sui# Terminal 2 (wait 3-5 seconds after network starts)
npm run fundnpm run publish:localThis automatically updates:
packages/location/.env.local- Package ID referencecrates/proof-server/.env- Server configuration
# Terminal 3
npm run server:startServer endpoints:
GET /health- Health checkGET /api/info- Server status and commitment infoPOST /api/generate-proof- Generate proximity proof
# Terminal 4
npm run client:dev- Connect Wallet - Click "Connect Wallet"
- Enter Coordinates - Input player X, Y, Z (millimeters)
- Set Distance - Max proximity threshold (e.g., 10km)
- Request Proof - Sign message and generate proof
- Verify On-Chain - Submit proof for blockchain verification
SERVER_ADDR=127.0.0.1:3001VITE_PROOF_SERVER_URL=http://localhost:3001Generate new keypair:
sui keytool generate ed25519
# Copy the suiprivkey1... to .env.local- Check network is running:
ps aux | grep sui - Wait 5 seconds for faucet to start
- Increase FUND_DELAY_SECONDS
Ensure release mode:
cd crates/proof-server
cargo build --releaseDebug mode is 20-100x slower than release (15-20ms).
The server can auto-publish commitments on startup:
# Build with feature
cargo build --release --features sui-auto-publish
# Configure
cd crates/proof-server
cat > .env <<EOF
SUI_PACKAGE_ID=0x...
SUI_SERVER_CAP_ID=0x...
SUI_RPC_URL=http://127.0.0.1:9000
EOF
# Run
cargo run --release --features sui-auto-publishSee crates/proof-server/AUTO_PUBLISH_GUIDE.md for details.
- DEPLOYMENT.md - Deploy to testnet/mainnet
- SECURITY.md - Security properties