generate_proof
Generate a zero-knowledge proof in one call by preparing inputs, requesting a challenge, and submitting the proof for an end-to-end proof flow.
Instructions
All-in-one ZK proof generation. Handles: prepare inputs, request challenge, and submit proof in a single call. Use this when you want the simplest path to a proof. For fine-grained control over each step, use prepare_inputs, request_challenge, and submit_proof individually.
CIRCUITS:
"coinbase_kyc": Proves the user passed Coinbase KYC verification, optionally binding the wallet's signature to ONE EIP-712 action (as giwa_attestation). Without action it signs the request signal hash.
"coinbase_country": Proves the user's country of residence is (or is not) in a given list, optionally binding the wallet's signature to ONE EIP-712 action (as coinbase_kyc). Requires country_list and is_included.
"oidc_domain": Proves the user authenticated via OIDC and their email belongs to a specific domain. Requires jwt and scope.
"human_passport": Proves the wallet holds an unexpired Human Passport score at or above min_score, without revealing the wallet or the exact score; optionally binds ONE EIP-712 action (as coinbase_kyc). Requires min_score and chain (the chain id the person recorded the score on).
"giwa_attestation": GIWA attestation, optionally binding the wallet's signature to ONE EIP-712 action. Without action it signs the request signal hash. With one, the proof carries that action's hash, so a contract can check WHICH instruction was authorised -- not merely that somebody eligible signed something. Uses a GIWA-attested wallet; verified on GIWA Sepolia (chain 91342).
WITH ACTION: Returns awaiting_approval with an approval URL for the HUMAN to review and sign in their wallet. Keep the request parameters unchanged, query get_action_approval, then repeat with approval_id when approved. ATTESTATION_KEY cannot authorize an action on the human's behalf. Ordinary proofs without action retain automatic signing.
SIGNAL HASH: without an action the wallet signs signal_hash = keccak256(scope ++ circuitId ++ request_id). It contains no wallet address. Pass request_id when the verifier issued one; otherwise a fresh one is minted and returned as requestId.
NULLIFIER: wallet circuits require oprf_domain (the service the proof is for). The nullifier is one per wallet per (oprf_domain, scope), computed with the OPRF network before the wallet signs; a service whose environment has no OPRF network refuses before anything is signed or paid.
RETURNS: awaiting_approval or the full ProofResult with proof bytes, public inputs, timing information, and the requestId, scope and oprfDomain the proof answers. Use verify_proof separately to verify on-chain.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"circuit": "<circuit>",
"scope": "<scope>"
},
"name": "generate_proof"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jwt | No | OIDC JWT token (id_token) for oidc_domain circuit | |
| chain | No | Required for human_passport: the chain id the Human Passport score is recorded on -- 8453 Base, 10 OP Mainnet, 42161 Arbitrum One, 59144 Linea, 534352 Scroll, 324 zkSync Era. Ask the user; there is no default. | |
| scope | Yes | Required: what the proof is for within the service, e.g. "myapp:membership". There is no default. Wallet circuits: 1 to 256 UTF-8 bytes, no control or format characters; the nullifier is one per wallet per (oprf_domain, scope). For oidc_domain, the domain scope string. | |
| action | No | The EIP-712 action to authorise. Optional for coinbase_kyc, coinbase_country, giwa_attestation and human_passport; rejected for other circuits. Any structure is provable: the circuit hashes it without reading it, so a deposit, a grant of authority or an agreement in prose all work. The wallet signs exactly these fields, and the proof carries their hash. | |
| pay_on | No | Which chain to pay on: a CAIP-2 id ("eip155:84532") or a plain name ("base-sepolia", "ethereum-sepolia"). Call request_challenge to see what a service offers. Omitted takes the first chain offered. The payer signs an authorization and the service settles it, so no gas or native balance is needed on the paying chain -- only USDC. | |
| circuit | Yes | Which circuit to use | |
| pay_with | No | Which wallet pays, when the service charges. "key" signs with PAYMENT_PRIVATE_KEY. "cdp" uses a Coinbase CDP server wallet (CDP_API_KEY_ID, CDP_API_KEY_SECRET, CDP_WALLET_SECRET). Omit it and the single configured wallet is used; omit it with none configured against a paying service and the error names what to set. Wallet and chain are separate choices; both must support the actual offered signing domain. | |
| provider | No | OIDC provider. "google" (default) for Google Workspace, "microsoft" for Microsoft 365. | |
| min_score | No | Required for human_passport: the Human Passport score threshold in points (e.g. 20; above 0, at most four decimals). The server finds the wallet's score on the chain named by `chain` and refuses, before payment, a wallet with none or below it. | |
| request_id | No | The id of the request this proof answers, when the party that will verify it issued one (ASCII letters, digits and "-", at most 128 characters). Without an action the wallet signs signal_hash = keccak256(scope ++ circuitId ++ request_id), which contains no wallet address, so the verifier can recompute it. Omit it and a fresh UUID is minted; it is returned as request_id / requestId -- hand it, with the scope, to whoever verifies the proof. Not used by oidc_domain. | |
| approval_id | No | Resume the SAME original action request using the approval_id returned with awaiting_approval. Keep all original parameters unchanged. | |
| is_included | No | true = prove country IS in list, false = prove NOT in list. Required for coinbase_country circuit. | |
| max_payment | No | Maximum USDC proof fee allowed by the user. | |
| oprf_domain | No | Required for every wallet circuit (coinbase_kyc, coinbase_country, giwa_attestation, human_passport): the name of the service the proof is for, usually its host (e.g. "app.example.com"). The nullifier is one per wallet per (oprf_domain, scope), so two services cannot link one wallet's proofs. 1 to 256 UTF-8 bytes, no control or format characters, used exactly as given. Required here: this server never fills it in. Ask the user or the verifying service. Hand it, with the scope, to whoever verifies the proof. Not used by oidc_domain. | |
| country_list | No | ISO 3166-1 alpha-2 country codes. Required for coinbase_country circuit. | |
| approved_payment | No | Exact user-approved terms. Set extra.verifyingContract to the offer asset (EIP-3009). Changed fee, recipient, token, chain or signing domain is rejected before signing. |