prepare_inputs
Prepares private witness inputs for zero-knowledge proof submission, handling wallet approval or credential signing and returning prepared_inputs_id or request/scope details for verification.
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. The action hash is public: an action whose proof is shown off-chain should not contain the wallet's address. WITHOUT ACTION: the credential key signs signal_hash = keccak256(scope ++ circuitId ++ request_id), no wallet address; the first result block is the inputs for submit_proof, the second names request_id and scope for the verifier. 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.
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": "prepare_inputs"
}
}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. | |
| 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. | |
| 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. | |
| 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. |