prepare_inputs
Prepares private witness inputs for zero-knowledge proofs, manages any required wallet approval, and returns a prepared_inputs_id to pass to submit_proof before requesting a challenge.
Instructions
Step 1 of the step-by-step flow. WITH ACTION: human wallet approval is required; returns awaiting_approval until resumed with approval_id. Approved action witnesses stay in private local storage; pass the returned prepared_inputs_id to submit_proof. WITHOUT ACTION: retains the existing credential-key signature and private witness result. Handle private witness inputs only in trusted local code, never expose them to the dApp, model or logs. Call this BEFORE request_challenge. For oidc_domain provide jwt and scope.
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. | |
| circuit | Yes | Which circuit to use | |
| 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. | |
| country_list | No | ISO 3166-1 alpha-2 country codes. Required for coinbase_country circuit. |