midnightntwrk/midnight-expert/proof-server-integration

Claude Code and agent skill by midnightntwrk/midnight-expert

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

This skill covers how the Midnight proof server is invoked in practice — who calls it, the client-server contract, self-hosted vs wallet-delegated proving, network proof-server endpoints, production deployment behind a reverse proxy, and CORS. Use it for "who calls the proof server", "ProofProvider", "wallet-delegated proving", "proof server endpoint", "production proof server", "proof server behind a proxy", or wiring a DApp/SDK to a proof server.

Install

npx vskill@latest install midnightntwrk/midnight-expert/proof-server-integration

SKILL.md

Proof Server Integration

How the Midnight proof server is invoked in practice — who calls it, the protocol it exposes, deployment modes, and where to find deeper detail.

For Docker setup and version-tag selection, see midnight-tooling:proof-server. For DApp-side provider assembly (React, Vite), see midnight-dapp-dev:core. For the full HTTP API reference, see proof-server:proof-server-api.


Who Calls the Proof Server

The proof server is not called directly by application code. The call is made by the midnight-js SDK via the ProofProvider abstraction:

text
DApp / CLI script
└─ midnight-js SDK (callTx / submitCallTx)
└─ ProofProvider.proveTx()
└─ POST /prove → proof server (port 6300)

The ProofProvider instance is created by the factory function:

httpClientProofProvider(proofServerUri, zkConfigProvider)

from @midnight-ntwrk/midnight-js-http-client-proof-provider. The DApp supplies the URI; the SDK handles binary serialization of the request body and response parsing.

Do not build the /prove request body yourself — the binary format is complex. Cross-reference proof-server:proof-server-api for the serialization spec if you need low-level detail.

For provider assembly (where httpClientProofProvider fits into the full MidnightProviders object), see midnight-dapp-dev:core and midnight-dapp-dev:midnight-sdk.


Invocation Modes

ModeDescriptionWhen to use
Self-hosted localProof server at localhost:6300; DApp or test suite constructs httpClientProofProvider("http://localhost:6300", zkConfigProvider)Local development; devnet; CI pipelines
Wallet-delegatedThe wallet extension (e.g. Lace) supplies proving on the user's behalf via dappConnectorProofProvider; DApp does not connect to a proof server directlyBrowser DApps where users have a Midnight wallet; see midnight-wallet:wallet-sdk
CI / headlessSelf-hosted with --no-fetch-params and reduced --num-workers to cap resource useAutomated test runs; pre-cached params scenarios
Remote / productionProof server behind a reverse proxy; URI passed as a runtime configuration valueStaging/production DApps; multi-user environments
Detailed deployment and hardening notes are in references/network-and-deployment.md and proof-server:proof-server-operations.

Client-Server Contract

Request and Response

ProofProvider.proveTx() POSTs a binary-encoded proof request to /prove and receives a binary-encoded proof response. The encoding is handled entirely by the SDK — application code only sees typed TypeScript values.

For the binary serialization format and endpoint details, see proof-server:proof-server-api.

CORS

The proof server uses `Cors::permissive()`: all origins are accepted, no credential restrictions. This is appropriate for local/internal use. For public or multi-tenant deployments, place the server behind a reverse proxy that enforces allowed origins.

Backpressure
HTTP statusMeaningWhat to do
503 Service UnavailableWorker pool saturated; server is too busyBack off and retry; check /ready for utilisation
429 Too Many RequestsProof server job queue full (--job-capacity > 0); request rejected at intakeIncrease --job-capacity or add workers — see proof-server:proof-server-configuration

For status-code details, see proof-server:proof-server-api (status-codes reference) and midnight-status-codes:status-codes.

Version Compatibility

The SDK, proof server, and Compact compiler must be kept in sync. Version mismatches are a common source of proof generation failures.

text
Compact compiler version
→ determines proof version string (GET /proof-versions)
→ must match proof server's supported proof versions
→ must match SDK's expected proof format

Check /proof-versions on the running server to confirm compatibility. See proof-server:proof-server-operations for diagnosing version mismatch errors.


Deployment

For production hardening (reverse proxy, TLS, CORS restrictions, load-balancer health probes), see:

  • references/network-and-deployment.md — deployment modes and production checklist
  • proof-server:proof-server-operations — monitoring, scaling, and troubleshooting

For Docker images and configuration flags (--port, --num-workers, --no-fetch-params), see midnight-tooling:proof-server and proof-server:proof-server-configuration.


References

NameDescriptionWhen used
references/network-and-deployment.mdDeployment modes, production hardening, reverse proxy, CORS contextChoosing a deployment mode; production checklist

Cross-references

SkillWhat it covers
midnight-dapp-dev:coreFull DApp provider assembly including where httpClientProofProvider fits
midnight-dapp-dev:midnight-sdkProofProvider type, httpClientProofProvider, dappConnectorProofProvider, SDK packages
midnight-wallet:wallet-sdkWallet-delegated proving via dappConnectorProofProvider
midnight-tooling:proof-serverDocker setup, version-tag selection, running the server
proof-server:proof-server-apiFull HTTP API: endpoints, binary serialization, status codes, CORS policy
proof-server:proof-server-operationsMonitoring, health checks, troubleshooting, scaling, version compatibility

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/midnightntwrk/midnight-expert/proof-server-integration/badge)](https://verified-skill.com/skills/midnightntwrk/midnight-expert/proof-server-integration)

Something wrong with this skill or its page? Tell us.