# StealthMark ZK & BitVec Formal Prover

> StealthMark ZK & BitVec Formal Prover is a paid API for AI agents from gateway.stealthmark.io, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-16).

Formally verifies ZK circuit constraints and bit-vector expressions using the Z3 SMT solver, returning satisfiability results and counterexamples.

## Facts

- Endpoint: POST https://gateway.stealthmark.io/x402/verify-zk-and-bitvec?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stealthmark-zk-bitvec-formal-prover-4f210583
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Wcq8l9xQCm9hdZXBnUpqm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability stealthmark-zk-bitvec-formal-prover-4f210583 -d '<json body>'
```

Example prompt: Formally verify this ZK circuit constraint — the expression is `sha256_out == hash(witness)`, mode is zk, with output_var `sha256_out`, witness_vars `['witness']`, and public_inputs `['sha256_out']` — and tell me if it's satisfiable or give me a counterexample.

## When to prefer this

Choose this endpoint when you need on-chain-paid, pay-per-call formal SMT verification without running Z3 locally — especially for ZK circuit constraint checking or bit-vector arithmetic invariants in smart contract contexts. Prefer it over local Z3 or heavyweight auditing tools when you want a lightweight, API-accessible formal prover with Base Mainnet x402 micropayment access and no infrastructure setup.

## Known failure modes

- Unsupported expression syntax causes Z3 parse error
- Bit-width mismatches between var_bitwidths and target_bitwidth produce invalid results
- Undeclared variables in witness_vars or public_inputs cause solver failures
- Timeout on complex constraint systems with many variables
- Invalid mode enum value returns a 400 error
- Missing required expr field returns a validation error

## How this service works

Autonomous Z3 Formal Invariant Prover (ERC-4626 Vaults, Polymarket Baskets, ZK Circuits, Differential Consensus) &amp; 100-Point Perimeter Security Gateway on Base Mainnet (x402 v2).

## Output

A JSON object containing: `verified` (boolean indicating whether the expression/constraints are satisfiable or proven), `check_type` (what kind of check was performed), `solver_mode` (zk or bitvec), and `counterexample` (an object with variable assignments that violate the constraints, or null if verified).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "expr": {
   "type": "string"
  },
  "mode": {
   "enum": [
    "zk",
    "bitvec"
   ],
   "type": "string"
  },
  "output_var": {
   "type": "string"
  },
  "witness_vars": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "public_inputs": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "var_bitwidths": {
   "type": "object"
  },
  "target_bitwidth": {
   "type": "integer"
  },
  "constraints_exprs": {
   "type": "array",
   "items": {
    "type": "string"
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "verified": {
   "type": "boolean"
  },
  "check_type": {
   "type": "string"
  },
  "solver_mode": {
   "type": "string"
  },
  "counterexample": {
   "type": [
    "object",
    "null"
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stealthmark-zk-bitvec-formal-prover-4f210583/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.stealthmark.io](https://www.zero.xyz/host/gateway.stealthmark.io/llms.txt)
