Documentation Index
Fetch the complete documentation index at: https://docs.b402.ai/llms.txt
Use this file to discover all available pages before exploring further.
POST /wallet/incognito/verify builds an unsigned ERC-4337 UserOperation for an incognito (privacy) operation using the b402 privacy pool. Shield operations deposit tokens into the privacy pool. Unshield operations withdraw tokens from the privacy pool back to a visible address.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | Nexus smart wallet address |
incognitoData | object | Yes | Privacy pool operation parameters |
incognitoData.type | string | Yes | "shield" (deposit into privacy pool) or "unshield" (withdraw from privacy pool) |
incognitoData.* | various | Yes | Additional privacy-pool-specific parameters for the operation |
paymentRequirements | object | Yes | Payment configuration |
paymentRequirements.network | string | Yes | Target network ("bsc" or "base") |
Shield moves tokens from your visible wallet into the b402 privacy pool, making them untraceable. Unshield withdraws tokens from the privacy pool back to a visible address.
Response
200 - Unsigned UserOp
| Field | Type | Description |
|---|---|---|
isValid | boolean | Whether the incognito operation can proceed |
userOp | object | Unsigned ERC-4337 UserOperation ready for client signing |
userOpHash | string | Hash of the UserOp that the client must sign |
feeAmount | string | Facilitator fee in token wei |
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Missing or invalid fields, unsupported incognito type |
| 400 | validation_error | Wallet not deployed or insufficient balance |
| 500 | blockchain_error | Failed to read on-chain state or estimate gas |
What Happens Server-Side
- Validates wallet - Confirms a deployed contract exists at
walletAddress - Parses incognito data - Reads privacy pool parameters and determines shield/unshield flow
- Builds UserOp - Encodes the privacy pool interaction into
callDatawith fee injection - Estimates gas - Calls the ERC-4337 bundler to estimate gas limits
- Signs paymaster data - The paymaster authorizes gas sponsorship
- Returns unsigned UserOp - Client signs
userOpHashand submits via/wallet/incognito/settle
Examples
cURL
TypeScript
Next Step
After receiving the response, sign theuserOpHash with the wallet owner’s private key and submit the signed UserOp to POST /wallet/incognito/settle.
Related
- Settle Incognito Operation - Submit signed incognito UserOp
- Verify Payment (Smart Wallet) - Standard smart wallet payments
