generate_proof
Generate zero-knowledge proofs in one call by preparing inputs, requesting a challenge, and submitting proof, so AI agents can prove identity claims without exposing personal data.
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.
RETURNS: awaiting_approval or the full ProofResult with proof bytes, public inputs, and timing information. Use verify_proof separately to verify on-chain.
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 | No | Scope string for nullifier derivation. Defaults to "proofport" if omitted. For oidc_domain circuit, this is 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. | |
| 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. | |
| 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. |