prove
Submit proof inputs to generate a ZK proof via the x402 single-step flow. Atomically verifies USDC payment on-chain and runs the Noir circuit in a TEE to produce a Groth16 SNARK proof.
IMPORTANT: MCP tool calls have timeout limitations that make this tool UNSUITABLE for the 30-90 second proof generation process. This tool returns a redirect message. Use the REST endpoint directly: POST https://stg-ai.zkproofport.app/api/v1/prove (staging) POST https://ai.zkproofport.app/api/v1/prove (production)
x402 SINGLE-STEP FLOW:
POST /api/v1/prove with { circuit, inputs } — no payment yet
Server returns 402 with nonce in body
Pay USDC using nonce, get tx hash
Retry POST /api/v1/prove with same body + X-Payment-TX and X-Payment-Nonce headers
REQUEST BODY SCHEMA: { "circuit": "coinbase_kyc" | "coinbase_country", "inputs": { "signal_hash": "", // 0x, 32 bytes: keccak256(abi.encodePacked(address, scope, circuitId)) "nullifier": "", // 0x, 32 bytes: privacy-preserving unique identifier "scope_bytes": "", // 0x, 32 bytes: keccak256 of the scope string "merkle_root": "", // 0x, 32 bytes: Merkle root of authorized attesters "user_address": "", // 0x, 20 bytes: the KYC wallet address "signature": "", // 65-byte hex: eth_sign(signal_hash) by KYC wallet "user_pubkey_x": "", // 32-byte hex: secp256k1 public key X coordinate "user_pubkey_y": "", // 32-byte hex: secp256k1 public key Y coordinate "raw_transaction": "", // 0x-prefixed RLP-encoded EAS attestation TX (padded to 300 bytes by server) "tx_length": , // actual byte length of raw_transaction BEFORE zero-padding "coinbase_attester_pubkey_x": "", // 32-byte hex: Coinbase attester secp256k1 X coordinate "coinbase_attester_pubkey_y": "", // 32-byte hex: Coinbase attester secp256k1 Y coordinate "merkle_proof": ["", ...], // array of 32-byte hex sibling hashes (one per tree level) "leaf_index": , // 0-based index of attester leaf in the Merkle tree "depth": , // number of levels in the Merkle tree (max 8) "country_list": ["", ...], // optional: only for coinbase_country circuit "is_included": // optional: only for coinbase_country circuit } }
VERIFIER ADDRESSES (Ethereum Mainnet, chain ID 1): coinbase_kyc (coinbase_attestation): 0xf3d5a09d2c85b28c52ef2905c1be3a852b609d0c coinbase_country (coinbase_country_attestation): 0x78792554e1582cb49d858eacb5c3607b42d28224
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputs | Yes | All circuit inputs required to generate the ZK proof. | |
| circuit | Yes | Which circuit to use. |