{"openapi":"3.1.0","info":{"title":"ZKProver","version":"3.0.0","description":"Full-stack zero-knowledge proving service on Tempo MPP. ZK proof generation, privacy transactions, stealth addresses, ZK/credential/on-chain attestations, Merkle trees, ZK-friendly hashing, and proof compression.","x-guidance":"ZKProver provides 30+ endpoints for zero-knowledge cryptography. ZK Proving: /prove/1x2 ($0.01), /prove/2x2 ($0.02), /prove/batch ($0.008/proof). Privacy: /privacy/deposit, /transfer, /withdraw ($0.03 each). ZK Attestation: /attest/zk/balance-gt ($0.01) for trustless proofs. Credential Attestation: /attest/commitment ($0.001), /attest/balance-gt, /attest/range, /attest/membership ($0.005 each). On-chain (Tempo): /attest/onchain/balance, /nft, /interaction ($0.005 each). Stealth Addresses: /stealth/generate-keys, /derive-address, /compute-key ($0.002 each), /stealth/scan ($0.005). Merkle: /merkle/build ($0.01), /merkle/prove ($0.005). Hashing: /hash/poseidon, /hash/mimc, /hash/pedersen, /hash/keccak256 ($0.001 each). Proof Tools: /proof/compress ($0.002). Verification endpoints are free. Payment is automatic via MPP 402 flow."},"x-service-info":{"categories":["compute","developer-tools"],"docs":{"homepage":"https://github.com/Himess/zk-proof-service","llms":"https://himess-zk-proof-service.hf.space/llms.txt"}},"servers":[{"url":"https://himess-zk-proof-service.hf.space"}],"paths":{"/health":{"get":{"summary":"Health check","description":"Returns service status, wallet address, and chain info. Free, no payment required.","x-payment-info":{"pricingMode":"fixed","price":"0","protocols":["mpp"]},"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json"],"default":"json"}}],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"wallet":{"type":"string"},"chain":{"type":"string"},"chainId":{"type":"integer"}}}}}}}}},"/circuits":{"get":{"summary":"List available circuits and pricing","description":"Returns all supported ZK circuits with constraint counts and per-proof pricing. Free, no payment required.","x-payment-info":{"pricingMode":"fixed","price":"0","protocols":["mpp"]},"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json"],"default":"json"}}],"responses":{"200":{"description":"Circuit list with pricing","content":{"application/json":{"schema":{"type":"object","properties":{"circuits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"constraintCount":{"type":"integer"},"publicSignals":{"type":"integer"}}}},"pricing":{"type":"object"}}}}}}}}},"/prove/1x2":{"post":{"operationId":"prove1x2","summary":"Generate Groth16 proof (1-input, 2-output JoinSplit)","tags":["Proving"],"description":"Generates a Groth16 ZK proof for a 1x2 JoinSplit circuit. Requires MPP payment of $0.01 USDC.","x-payment-info":{"pricingMode":"fixed","price":"0.010000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string","minLength":1,"description":"Merkle tree root"},"publicAmount":{"type":"string","minLength":1,"description":"Public amount for deposit/withdrawal"},"extDataHash":{"type":"string","minLength":1,"description":"External data hash"},"protocolFee":{"type":"string","description":"Protocol fee"},"inputNullifiers":{"type":"array","items":{"type":"string"}},"outputCommitments":{"type":"array","items":{"type":"string"}},"inAmount":{"type":"array","items":{"type":"string"}},"inPrivateKey":{"type":"array","items":{"type":"string"}},"inBlinding":{"type":"array","items":{"type":"string"}},"inPathIndices":{"type":"array","items":{"type":"string"}},"inPathElements":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"outAmount":{"type":"array","items":{"type":"string"}},"outPubkey":{"type":"array","items":{"type":"string"}},"outBlinding":{"type":"array","items":{"type":"string"}}},"required":["root","publicAmount","extDataHash","inputNullifiers","outputCommitments","inAmount","inPrivateKey","inBlinding","inPathIndices","inPathElements","outAmount","outPubkey","outBlinding"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"circuit":{"type":"string"},"proof":{"type":"object"},"publicSignals":{"type":"array","items":{"type":"string"}},"contractProof":{"type":"array","items":{"type":"string"}},"generationTimeMs":{"type":"number"}},"required":["success","circuit","proof","publicSignals","contractProof"]}}}},"402":{"description":"Payment Required"}}}},"/prove/2x2":{"post":{"operationId":"prove2x2","summary":"Generate Groth16 proof (2-input, 2-output JoinSplit)","tags":["Proving"],"description":"Generates a Groth16 ZK proof for a 2x2 JoinSplit circuit. Requires MPP payment of $0.02 USDC.","x-payment-info":{"pricingMode":"fixed","price":"0.020000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string","minLength":1,"description":"Merkle tree root"},"publicAmount":{"type":"string","minLength":1,"description":"Public amount for deposit/withdrawal"},"extDataHash":{"type":"string","minLength":1,"description":"External data hash"},"protocolFee":{"type":"string","description":"Protocol fee"},"inputNullifiers":{"type":"array","items":{"type":"string"}},"outputCommitments":{"type":"array","items":{"type":"string"}},"inAmount":{"type":"array","items":{"type":"string"}},"inPrivateKey":{"type":"array","items":{"type":"string"}},"inBlinding":{"type":"array","items":{"type":"string"}},"inPathIndices":{"type":"array","items":{"type":"string"}},"inPathElements":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"outAmount":{"type":"array","items":{"type":"string"}},"outPubkey":{"type":"array","items":{"type":"string"}},"outBlinding":{"type":"array","items":{"type":"string"}}},"required":["root","publicAmount","extDataHash","inputNullifiers","outputCommitments","inAmount","inPrivateKey","inBlinding","inPathIndices","inPathElements","outAmount","outPubkey","outBlinding"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"circuit":{"type":"string"},"proof":{"type":"object"},"publicSignals":{"type":"array","items":{"type":"string"}},"contractProof":{"type":"array","items":{"type":"string"}},"generationTimeMs":{"type":"number"}},"required":["success","circuit","proof","publicSignals","contractProof"]}}}},"402":{"description":"Payment Required — MPP payment needed"}}}},"/verify/{circuit}":{"post":{"summary":"Verify a Groth16 proof","description":"Verifies a previously generated proof. Free, no payment required.","x-payment-info":{"pricingMode":"fixed","price":"0","protocols":["mpp"]},"parameters":[{"name":"circuit","in":"path","required":true,"schema":{"type":"string","enum":["1x2","2x2"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proof":{"type":"object","description":"Groth16 proof object"},"publicSignals":{"type":"array","items":{"type":"string"}}},"required":["proof","publicSignals"]}}}},"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"valid":{"type":"boolean"},"verificationTimeMs":{"type":"number"}}}}}}}}},"/pool":{"get":{"summary":"Privacy pool info","description":"Returns privacy pool contract addresses, chain info, and available circuits. Free.","x-payment-info":{"pricingMode":"fixed","price":"0","protocols":["mpp"]},"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json"],"default":"json"}}],"responses":{"200":{"description":"Pool info","content":{"application/json":{"schema":{"type":"object","properties":{"pool":{"type":"string"},"chain":{"type":"string"},"chainId":{"type":"integer"},"usdc":{"type":"string"},"circuits":{"type":"array","items":{"type":"string"}},"merkleDepth":{"type":"integer"}}}}}}}}},"/privacy/deposit":{"post":{"operationId":"privacyDeposit","summary":"Generate shielded deposit proof","tags":["Privacy"],"description":"Generates a Groth16 ZK proof for a shielded deposit (public to private). Requires MPP payment of $0.03 USDC.","x-payment-info":{"pricingMode":"fixed","price":"0.030000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"description":"USDC amount in micro-units (6 decimals). e.g. '10000000' = 10 USDC"}},"required":["amount"]}}}},"responses":{"200":{"description":"Deposit proof generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"operation":{"type":"string"},"proof":{"type":"object"},"publicSignals":{"type":"array","items":{"type":"string"}},"commitment":{"type":"string"},"generationTimeMs":{"type":"number"}},"required":["success","proof","publicSignals"]}}}},"402":{"description":"Payment Required"}}}},"/privacy/transfer":{"post":{"operationId":"privacyTransfer","summary":"Generate private transfer proof","tags":["Privacy"],"description":"Generates a Groth16 ZK proof for a private transfer (private to private). Requires MPP payment of $0.03 USDC.","x-payment-info":{"pricingMode":"fixed","price":"0.030000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"description":"USDC amount in micro-units"},"recipientPubkey":{"type":"string","minLength":1,"description":"Recipient Poseidon public key"}},"required":["amount","recipientPubkey"]}}}},"responses":{"200":{"description":"Transfer proof generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"operation":{"type":"string"},"proof":{"type":"object"},"publicSignals":{"type":"array","items":{"type":"string"}},"paymentCommitment":{"type":"string"},"changeCommitment":{"type":"string"},"generationTimeMs":{"type":"number"}},"required":["success","proof","publicSignals"]}}}},"402":{"description":"Payment Required"}}}},"/privacy/withdraw":{"post":{"operationId":"privacyWithdraw","summary":"Generate withdrawal proof","tags":["Privacy"],"description":"Generates a Groth16 ZK proof for a withdrawal (private to public). Requires MPP payment of $0.03 USDC.","x-payment-info":{"pricingMode":"fixed","price":"0.030000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"description":"USDC amount in micro-units"},"recipient":{"type":"string","minLength":1,"description":"Recipient Ethereum address for withdrawal"}},"required":["amount","recipient"]}}}},"responses":{"200":{"description":"Withdrawal proof generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"operation":{"type":"string"},"proof":{"type":"object"},"publicSignals":{"type":"array","items":{"type":"string"}},"generationTimeMs":{"type":"number"}},"required":["success","proof","publicSignals"]}}}},"402":{"description":"Payment Required"}}}},"/prove/batch":{"post":{"operationId":"proveBatch","summary":"Batch proof generation (20% discount)","tags":["ZK Proving"],"description":"Generate multiple Groth16 proofs in a single request at $0.008/proof (20% discount vs individual). Min 2, max 20.","x-payment-info":{"pricingMode":"fixed","price":"0.008000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"circuit":{"type":"string","enum":["1x2","2x2"],"description":"Circuit type"},"inputs":{"type":"array","items":{"type":"object"},"minItems":2,"maxItems":20,"description":"Array of circuit input objects"}},"required":["circuit","inputs"]}}}},"responses":{"200":{"description":"Batch proofs generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"circuit":{"type":"string"},"results":{"type":"array","items":{"type":"object"}},"totalTimeMs":{"type":"number"},"count":{"type":"integer"},"pricing":{"type":"object"}}}}}},"402":{"description":"Payment Required"}}}},"/attest/zk/balance-gt":{"post":{"operationId":"zkAttestBalanceGt","summary":"ZK proof: balance > threshold","tags":["ZK Attestation"],"description":"Generate a Groth16 ZK proof that a committed balance exceeds a threshold. Trustless — anyone can verify. $0.01.","x-payment-info":{"pricingMode":"fixed","price":"0.010000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","description":"Secret value (balance)"},"blinding":{"type":"string","description":"Random blinding factor"},"threshold":{"type":"string","description":"Public threshold to prove against"}},"required":["value","blinding","threshold"]}}}},"responses":{"200":{"description":"ZK attestation proof generated","content":{"application/json":{"schema":{"type":"object","properties":{"proof":{"type":"object"},"publicSignals":{"type":"array","items":{"type":"string"}},"commitment":{"type":"string"},"threshold":{"type":"string"},"verified":{"type":"boolean"},"generationTimeMs":{"type":"number"},"circuit":{"type":"string"},"protocol":{"type":"string"},"curve":{"type":"string"}}}}}},"402":{"description":"Payment Required"}}}},"/attest/zk/verify":{"post":{"operationId":"zkAttestVerify","summary":"Verify ZK attestation","tags":["ZK Attestation"],"description":"Verify a Groth16 ZK attestation proof. Free.","x-payment-info":{"pricingMode":"fixed","price":"0","protocols":["mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proof":{"type":"object","description":"Groth16 proof object"},"publicSignals":{"type":"array","items":{"type":"string"},"description":"[commitment, threshold]"}},"required":["proof","publicSignals"]}}}},"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"verificationTimeMs":{"type":"number"},"publicSignals":{"type":"object"}}}}}}}}},"/attest/commitment":{"post":{"operationId":"attestCommitment","summary":"Create Poseidon commitment","tags":["Credential Attestation"],"description":"Create a Poseidon hash commitment from a value and blinding factor. $0.001.","x-payment-info":{"pricingMode":"fixed","price":"0.001000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","description":"Value to commit"},"blinding":{"type":"string","description":"Random blinding factor"}},"required":["value","blinding"]}}}},"responses":{"200":{"description":"Commitment created","content":{"application/json":{"schema":{"type":"object","properties":{"commitment":{"type":"string"},"value":{"type":"string"},"computeTimeMs":{"type":"number"}}}}}},"402":{"description":"Payment Required"}}}},"/attest/balance-gt":{"post":{"operationId":"attestBalanceGt","summary":"Attest balance > threshold","tags":["Credential Attestation"],"description":"Server-signed attestation that a committed balance exceeds a threshold. $0.005.","x-payment-info":{"pricingMode":"fixed","price":"0.005000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commitment":{"type":"string"},"value":{"type":"string"},"blinding":{"type":"string"},"threshold":{"type":"string"}},"required":["commitment","value","blinding","threshold"]}}}},"responses":{"200":{"description":"Attestation result","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/attest/range":{"post":{"operationId":"attestRange","summary":"Attest value in range","tags":["Credential Attestation"],"description":"Server-signed attestation that a committed value falls within [min, max]. $0.005.","x-payment-info":{"pricingMode":"fixed","price":"0.005000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commitment":{"type":"string"},"value":{"type":"string"},"blinding":{"type":"string"},"min":{"type":"string"},"max":{"type":"string"}},"required":["commitment","value","blinding","min","max"]}}}},"responses":{"200":{"description":"Attestation result","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/attest/membership":{"post":{"operationId":"attestMembership","summary":"Attest set membership","tags":["Credential Attestation"],"description":"Server-signed attestation that a committed value is a member of a Merkle set. $0.005.","x-payment-info":{"pricingMode":"fixed","price":"0.005000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commitment":{"type":"string"},"value":{"type":"string"},"blinding":{"type":"string"},"leaves":{"type":"array","items":{"type":"string"},"description":"Set of leaf values"}},"required":["commitment","value","blinding","leaves"]}}}},"responses":{"200":{"description":"Attestation result","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/attest/verify":{"post":{"operationId":"attestVerify","summary":"Verify attestation","tags":["Credential Attestation"],"description":"Verify a server-signed attestation. Free.","x-payment-info":{"pricingMode":"fixed","price":"0","protocols":["mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attestation":{"type":"object","description":"Attestation object to verify"}},"required":["attestation"]}}}},"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"}}}}}}}}},"/attest/onchain/balance":{"post":{"operationId":"attestOnchainBalance","summary":"Verify token balance on Tempo","tags":["On-chain Attestation"],"description":"Verify that an address holds a token balance above a threshold on Tempo chain. $0.005.","x-payment-info":{"pricingMode":"fixed","price":"0.005000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address"},"token":{"type":"string","description":"Token contract address (optional, native if omitted)"},"threshold":{"type":"string","description":"Minimum balance threshold"}},"required":["address","threshold"]}}}},"responses":{"200":{"description":"Attestation result","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/attest/onchain/nft":{"post":{"operationId":"attestOnchainNft","summary":"Verify NFT ownership","tags":["On-chain Attestation"],"description":"Verify that an address owns a specific NFT on Tempo chain. $0.005.","x-payment-info":{"pricingMode":"fixed","price":"0.005000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address"},"nftContract":{"type":"string","description":"NFT contract address"},"tokenId":{"type":"string","description":"Token ID"}},"required":["address","nftContract","tokenId"]}}}},"responses":{"200":{"description":"Attestation result","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/attest/onchain/interaction":{"post":{"operationId":"attestOnchainInteraction","summary":"Verify contract interaction","tags":["On-chain Attestation"],"description":"Verify that an address has interacted with a specific contract on Tempo chain. $0.005.","x-payment-info":{"pricingMode":"fixed","price":"0.005000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address"},"contractAddress":{"type":"string","description":"Contract address"}},"required":["address","contractAddress"]}}}},"responses":{"200":{"description":"Attestation result","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/stealth/generate-keys":{"post":{"operationId":"stealthGenerateKeys","summary":"Generate stealth meta-address","tags":["Stealth Addresses"],"description":"Generate an ERC-5564 stealth meta-address keypair. No input required — returns a fresh keypair. $0.002.","x-payment-info":{"pricingMode":"fixed","price":"0.002000","protocols":["x402","mpp"]},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","description":"Optional label for the keypair"}}}}}},"responses":{"200":{"description":"Stealth keypair generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"metaAddress":{"type":"string"},"spendingPubKey":{"type":"string"},"viewingPubKey":{"type":"string"},"spendingKey":{"type":"string"},"viewingKey":{"type":"string"},"computeTimeMs":{"type":"number"}}}}}},"402":{"description":"Payment Required"}}}},"/stealth/derive-address":{"post":{"operationId":"stealthDeriveAddress","summary":"Derive one-time stealth address","tags":["Stealth Addresses"],"description":"Derive a one-time stealth address from a stealth meta-address. $0.002.","x-payment-info":{"pricingMode":"fixed","price":"0.002000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"metaAddress":{"type":"string","description":"Stealth meta-address (e.g. 'st:eth:0x...')"}},"required":["metaAddress"]}}}},"responses":{"200":{"description":"Stealth address derived","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"stealthAddress":{"type":"string"},"ephemeralPubKey":{"type":"string"},"computeTimeMs":{"type":"number"}}}}}},"402":{"description":"Payment Required"}}}},"/stealth/scan":{"post":{"operationId":"stealthScan","summary":"Scan for stealth payments","tags":["Stealth Addresses"],"description":"Scan a list of ephemeral public keys to find stealth payments addressed to you. $0.005.","x-payment-info":{"pricingMode":"fixed","price":"0.005000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"viewingKey":{"type":"string","description":"Viewing private key (hex)"},"spendingPubKey":{"type":"string","description":"Spending public key (hex)"},"ephemeralPubKeys":{"type":"array","items":{"type":"string"},"description":"Ephemeral public keys to scan"}},"required":["viewingKey","spendingPubKey","ephemeralPubKeys"]}}}},"responses":{"200":{"description":"Scan results","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/stealth/compute-key":{"post":{"operationId":"stealthComputeKey","summary":"Recover stealth private key","tags":["Stealth Addresses"],"description":"Compute the private key for a stealth address using spending key, viewing key, and ephemeral public key. $0.002.","x-payment-info":{"pricingMode":"fixed","price":"0.002000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spendingKey":{"type":"string","description":"Spending private key (hex)"},"viewingKey":{"type":"string","description":"Viewing private key (hex)"},"ephemeralPubKey":{"type":"string","description":"Ephemeral public key (hex)"}},"required":["spendingKey","viewingKey","ephemeralPubKey"]}}}},"responses":{"200":{"description":"Stealth private key computed","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/merkle/build":{"post":{"operationId":"merkleBuild","summary":"Build Poseidon Merkle tree","tags":["Merkle Tree"],"description":"Build a Poseidon Merkle tree from an array of leaves. Returns root and tree data. $0.01.","x-payment-info":{"pricingMode":"fixed","price":"0.010000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaves":{"type":"array","items":{"type":"string"},"description":"Leaf values"},"depth":{"type":"integer","description":"Tree depth (optional)"}},"required":["leaves"]}}}},"responses":{"200":{"description":"Merkle tree built","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/merkle/prove":{"post":{"operationId":"merkleProve","summary":"Generate Merkle inclusion proof","tags":["Merkle Tree"],"description":"Generate a Merkle inclusion proof for a leaf at a given index. $0.005.","x-payment-info":{"pricingMode":"fixed","price":"0.005000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaves":{"type":"array","items":{"type":"string"},"description":"Leaf values"},"leafIndex":{"type":"integer","description":"Index of the leaf to prove"},"depth":{"type":"integer","description":"Tree depth (optional)"}},"required":["leaves","leafIndex"]}}}},"responses":{"200":{"description":"Merkle proof generated","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment Required"}}}},"/merkle/verify":{"post":{"operationId":"merkleVerify","summary":"Verify Merkle inclusion proof","tags":["Merkle Tree"],"description":"Verify a Merkle inclusion proof. Free.","x-payment-info":{"pricingMode":"fixed","price":"0","protocols":["mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"string"},"leaf":{"type":"string"},"pathElements":{"type":"array","items":{"type":"string"}},"pathIndices":{"type":"array","items":{"type":"integer"}}},"required":["root","leaf","pathElements","pathIndices"]}}}},"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/hash/poseidon":{"post":{"operationId":"hashPoseidon","summary":"Poseidon hash","tags":["Hash Functions"],"description":"Compute a ZK-friendly Poseidon hash. $0.001.","x-payment-info":{"pricingMode":"fixed","price":"0.001000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"string"},"description":"Field element strings to hash"}},"required":["inputs"]}}}},"responses":{"200":{"description":"Hash result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"hash":{"type":"string"},"inputCount":{"type":"integer"},"computeTimeMs":{"type":"number"}}}}}},"402":{"description":"Payment Required"}}}},"/hash/mimc":{"post":{"operationId":"hashMimc","summary":"MiMC sponge hash","tags":["Hash Functions"],"description":"Compute a MiMC sponge hash (1 or 2 inputs). $0.001.","x-payment-info":{"pricingMode":"fixed","price":"0.001000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":2,"description":"1 or 2 field element strings"}},"required":["inputs"]}}}},"responses":{"200":{"description":"Hash result","content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string"},"algorithm":{"type":"string"},"inputCount":{"type":"integer"},"computeTimeMs":{"type":"number"}}}}}},"402":{"description":"Payment Required"}}}},"/hash/pedersen":{"post":{"operationId":"hashPedersen","summary":"Pedersen hash","tags":["Hash Functions"],"description":"Compute a Pedersen hash over BabyJubJub. $0.001.","x-payment-info":{"pricingMode":"fixed","price":"0.001000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"string"},"description":"Field element strings"}},"required":["inputs"]}}}},"responses":{"200":{"description":"Hash result","content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string"},"algorithm":{"type":"string"},"inputCount":{"type":"integer"},"computeTimeMs":{"type":"number"}}}}}},"402":{"description":"Payment Required"}}}},"/hash/keccak256":{"post":{"operationId":"hashKeccak256","summary":"Keccak256 hash","tags":["Hash Functions"],"description":"Compute an Ethereum-compatible Keccak256 hash. Accepts hex (0x...) or plaintext. $0.001.","x-payment-info":{"pricingMode":"fixed","price":"0.001000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"Hex string (0x...) or plaintext to hash"}},"required":["data"]}}}},"responses":{"200":{"description":"Hash result","content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string"},"algorithm":{"type":"string"},"inputSize":{"type":"integer"},"computeTimeMs":{"type":"number"}}}}}},"402":{"description":"Payment Required"}}}},"/proof/compress":{"post":{"operationId":"proofCompress","summary":"Compress proof + Solidity calldata","tags":["Proof Tools"],"description":"Compress a Groth16 proof to minimal 256-byte format and generate Solidity calldata. $0.002.","x-payment-info":{"pricingMode":"fixed","price":"0.002000","protocols":["x402","mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proof":{"type":"object","description":"Groth16 proof with pi_a, pi_b, pi_c"},"publicSignals":{"type":"array","items":{"type":"string"}}},"required":["proof","publicSignals"]}}}},"responses":{"200":{"description":"Compressed proof","content":{"application/json":{"schema":{"type":"object","properties":{"compressed":{"type":"string"},"solidityCalldata":{"type":"string"},"format":{"type":"string"},"originalSize":{"type":"integer"},"compressedSize":{"type":"integer"},"compressionRatio":{"type":"string"},"computeTimeMs":{"type":"number"}}}}}},"402":{"description":"Payment Required"}}}}}}