{"openapi":"3.1.0","info":{"title":"Account Abstraction API","version":"1.0.0","description":"Audit ERC-4337 UserOperations supplied in the request. Sponsorship policies and structural checks cover gas, Paymaster fields, factory data, and calldata. No network calls are made. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses the x402 protocol with exact USDC on Base (chain id 8453). Each POST operation has a fixed USD price.\nHow to call an operation:\n1. POST JSON matching the requestBody. Invalid input returns 400 with no payment challenge.\n2. A valid unpaid call returns 402 with the exact amount and payTo.\n3. Pay and retry with payment-signature. Payment settles only if the operation returns 2xx. A 4xx/5xx is not charged.\nInclude an Idempotency-Key header of 64 hex characters from 32 random bytes. Reuse that key only for retries of the same operation and request body.\nAll outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Verify time-sensitive or official data with the cited source before acting."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/account-abstraction/paymaster-sponsorship-audit":{"post":{"operationId":"audit_paymaster_sponsorship","summary":"Audit paymaster sponsorship","description":"Compare ERC-4337 UserOperations with a caller-supplied Paymaster sponsorship policy. EntryPoint versions are 0.6 and 0.7. An omitted paymasterDataFormat is envelope: the EntryPoint address and, on 0.7, the two 16-byte gas limits are read, and later bytes stay opaque. verifying_paymaster also reads validUntil and validAfter as two 6-byte integers; a validUntil of 0 means no upper bound, and the signature is not verified. Call targets and selectors are read only from declared values, raw calldata offsets, or execute(address,uint256,bytes). audit_status is allowed, denied, warnings, invalid, or indeterminate. risk_level is low, medium, high, or critical. Sponsored gas is the EntryPoint required-prefund sum, multiplied by maxFeePerGas for the amount in wei. No Paymaster deposit, balance, reputation, or other chain state is read, and the result does not say whether a bundler will accept the operation.","tags":["account-abstraction"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"entryPointVersion":{"type":"string","const":"0.6"},"userOperations":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"sender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string"},"initCode":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"callData":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"callGasLimit":{"type":"string"},"verificationGasLimit":{"type":"string"},"preVerificationGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"maxPriorityFeePerGas":{"type":"string"},"paymasterAndData":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"signature":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"call":{"type":"object","properties":{"format":{"type":"string","enum":["declared","offsets","account_execute"]},"target":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"selector":{"type":"string","pattern":"^0x[0-9a-fA-F]{8}$"},"targetOffset":{"type":"integer","minimum":0,"maximum":65536},"selectorOffset":{"type":"integer","minimum":0,"maximum":65536}},"required":["format"],"additionalProperties":false}},"required":["sender","nonce","initCode","callData","callGasLimit","verificationGasLimit","preVerificationGas","maxFeePerGas","maxPriorityFeePerGas","paymasterAndData","signature"],"additionalProperties":false}},"chainId":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"paymaster":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"paymasterDataFormat":{"type":"string","enum":["envelope","verifying_paymaster"]},"policy":{"type":"object","properties":{"maxCallGasLimit":{"type":"string"},"maxVerificationGasLimit":{"type":"string"},"maxPreVerificationGas":{"type":"string"},"maxPaymasterVerificationGasLimit":{"type":"string"},"maxPaymasterPostOpGasLimit":{"type":"string"},"maxFeePerGas":{"type":"string"},"maxPriorityFeePerGas":{"type":"string"},"maxSponsoredGas":{"type":"string"},"maxSponsorshipAmount":{"type":"string"},"allowedTargets":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"allowedSelectors":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{8}$"}},"allowedChainIds":{"maxItems":20,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647}},"allowedSenders":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"allowInitCode":{"type":"boolean"},"validAfter":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"validUntil":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"evaluatedAt":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"}},"additionalProperties":false},"aggregate":{"type":"object","properties":{"maxSponsoredGas":{"type":"string"},"maxSponsorshipAmount":{"type":"string"},"maxOperations":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"priorSponsoredGas":{"type":"string"},"priorSponsorshipAmount":{"type":"string"},"priorOperations":{"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}},"required":["entryPointVersion","userOperations","chainId","paymaster"],"additionalProperties":false},{"type":"object","properties":{"entryPointVersion":{"type":"string","const":"0.7"},"userOperations":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"sender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string"},"initCode":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"callData":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"accountGasLimits":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"preVerificationGas":{"type":"string"},"gasFees":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"paymasterAndData":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"signature":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"call":{"type":"object","properties":{"format":{"type":"string","enum":["declared","offsets","account_execute"]},"target":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"selector":{"type":"string","pattern":"^0x[0-9a-fA-F]{8}$"},"targetOffset":{"type":"integer","minimum":0,"maximum":65536},"selectorOffset":{"type":"integer","minimum":0,"maximum":65536}},"required":["format"],"additionalProperties":false}},"required":["sender","nonce","initCode","callData","accountGasLimits","preVerificationGas","gasFees","paymasterAndData","signature"],"additionalProperties":false}},"chainId":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"paymaster":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"paymasterDataFormat":{"type":"string","enum":["envelope","verifying_paymaster"]},"policy":{"type":"object","properties":{"maxCallGasLimit":{"type":"string"},"maxVerificationGasLimit":{"type":"string"},"maxPreVerificationGas":{"type":"string"},"maxPaymasterVerificationGasLimit":{"type":"string"},"maxPaymasterPostOpGasLimit":{"type":"string"},"maxFeePerGas":{"type":"string"},"maxPriorityFeePerGas":{"type":"string"},"maxSponsoredGas":{"type":"string"},"maxSponsorshipAmount":{"type":"string"},"allowedTargets":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"allowedSelectors":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{8}$"}},"allowedChainIds":{"maxItems":20,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647}},"allowedSenders":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"allowInitCode":{"type":"boolean"},"validAfter":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"validUntil":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"evaluatedAt":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"}},"additionalProperties":false},"aggregate":{"type":"object","properties":{"maxSponsoredGas":{"type":"string"},"maxSponsorshipAmount":{"type":"string"},"maxOperations":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"priorSponsoredGas":{"type":"string"},"priorSponsorshipAmount":{"type":"string"},"priorOperations":{"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}},"required":["entryPointVersion","userOperations","chainId","paymaster"],"additionalProperties":false}]},"example":{"entryPointVersion":"0.7","chainId":8453,"paymaster":"0x2222222222222222222222222222222222222222","paymasterDataFormat":"envelope","userOperations":[{"sender":"0x4444444444444444444444444444444444444444","nonce":"1","initCode":"0x","callData":"0xb61d27f60000000000000000000000001111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004a9059cbb00000000000000000000000000000000000000000000000000000000","accountGasLimits":"0x000000000000000000000000000186a00000000000000000000000000007a120","preVerificationGas":"21000","gasFees":"0x0000000000000000000000003b9aca0000000000000000000000000077359400","paymasterAndData":"0x22222222222222222222222222222222222222220000000000000000000000000001000000000000000000000000000000008000","signature":"0x01","call":{"format":"account_execute"}}],"policy":{"maxCallGasLimit":"100000","maxVerificationGasLimit":"200000","maxPreVerificationGas":"50000","maxPaymasterVerificationGasLimit":"100000","maxPaymasterPostOpGasLimit":"50000","maxFeePerGas":"3000000000","maxSponsoredGas":"2000000","allowedTargets":["0x3333333333333333333333333333333333333333"],"allowedSelectors":["0x095ea7b3"],"allowedChainIds":[8453],"allowedSenders":["0x4444444444444444444444444444444444444444"],"allowInitCode":false}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"audit_status":{"type":"string"},"risk_level":{"type":"string"},"policy_violations":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"gas_limit_analysis":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"number"},"field":{"type":"string"},"actual":{"type":"string"},"status":{"type":"string"},"limit":{"type":"string"}},"additionalProperties":true}},"target_analysis":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"number"},"target":{"type":"string"},"selector":{"type":"string"},"status":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"paymaster_data_analysis":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"number"},"paymaster":{"type":"string"},"format":{"type":"string"},"status":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"findings":{"type":"array","items":{"type":"object","properties":{"operation_index":{"type":"number"},"code":{"type":"string"},"severity":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"audit_status":"denied","risk_level":"high","policy_violations":[{"operation_index":0,"code":"gas_limit_exceeded","detail":"callGasLimit is 500000 and the policy maximum is 100000."},{"operation_index":0,"code":"target_not_allowed","detail":"Target 0x1111111111111111111111111111111111111111 is not in allowedTargets."},{"operation_index":0,"code":"selector_not_allowed","detail":"Selector 0xa9059cbb is not in allowedSelectors."}],"gas_limit_analysis":[{"operation_index":0,"field":"callGasLimit","actual":"500000","status":"exceeds_limit","limit":"100000"},{"operation_index":0,"field":"verificationGasLimit","actual":"100000","status":"within_limit","limit":"200000"},{"operation_index":0,"field":"preVerificationGas","actual":"21000","status":"within_limit","limit":"50000"},{"operation_index":0,"field":"paymasterVerificationGasLimit","actual":"65536","status":"within_limit","limit":"100000"},{"operation_index":0,"field":"paymasterPostOpGasLimit","actual":"32768","status":"within_limit","limit":"50000"},{"operation_index":0,"field":"maxFeePerGas","actual":"2000000000","status":"within_limit","limit":"3000000000"},{"operation_index":0,"field":"maxPriorityFeePerGas","actual":"1000000000","status":"not_limited"},{"operation_index":0,"field":"sponsoredGas","actual":"719304","status":"within_limit","limit":"2000000"},{"operation_index":0,"field":"sponsorshipAmount","actual":"1438608000000000","status":"not_limited"}],"target_analysis":[{"operation_index":0,"target":"0x1111111111111111111111111111111111111111","selector":"0xa9059cbb","status":"denied","detail":"Target 0x1111111111111111111111111111111111111111 is not in allowedTargets. Selector 0xa9059cbb is not in allowedSelectors."}],"paymaster_data_analysis":[{"operation_index":0,"paymaster":"0x2222222222222222222222222222222222222222","format":"envelope","status":"matches","detail":"The Paymaster address matches the EntryPoint envelope. Bytes after that envelope were not decoded."}],"findings":[{"operation_index":0,"code":"gas_limit_exceeded","severity":"high","detail":"callGasLimit is 500000 and the policy maximum is 100000."},{"operation_index":0,"code":"target_not_allowed","severity":"high","detail":"Target 0x1111111111111111111111111111111111111111 is not in allowedTargets."},{"operation_index":0,"code":"selector_not_allowed","severity":"high","detail":"Selector 0xa9059cbb is not in allowedSelectors."}],"limitations":["No Paymaster deposit, balance, reputation, or other chain state was read.","This result does not say whether a bundler will accept the UserOperation.","Only EntryPoint 0.6 and 0.7 UserOperation layouts are defined.","Sponsored gas is the EntryPoint required-prefund sum for that version. It is not measured gas used.","The EntryPoint 0.6 sum does not include Paymaster gas. That version has no Paymaster gas fields.","Sponsorship amount is sponsored gas multiplied by maxFeePerGas, in wei, using integer arithmetic.","paymasterAndData is an address plus opaque bytes on EntryPoint 0.6. EntryPoint 0.7 also includes two 16-byte gas limits. Later bytes are decoded only when paymasterDataFormat is verifying_paymaster.","verifying_paymaster reads validUntil and validAfter as two 6-byte integers after the envelope. validUntil 0 means no upper bound. The signature is not verified.","account_execute reads execute(address,uint256,bytes) selector 0xb61d27f6. Other account methods are not inferred.","declared targets and selectors are taken from the request and are not read from calldata. offsets are raw byte positions in calldata.","Validity timestamps are unix seconds supplied in the request. No clock was read.","An omitted paymasterDataFormat is treated as envelope."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object: x402Version, resource with the operation description, accepts with the price and network, and extensions.bazaar with the input schema, input example, output schema, and output example."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed before settlement, so no payment is taken. Reuse the same idempotency key to retrieve the stored error without paying again."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/account-abstraction/sponsorship-risk":{"post":{"operationId":"score_paymaster_sponsorship_risk","summary":"Score paymaster sponsorship risk","description":"Add the caller-supplied call gas and verification gas, multiply by the max fee, and compare that cost with the paymaster deposit. Gas above the stated ceilings, and init code when it is not allowed, raise the risk score. The safety index is how far each gas field sits inside its ceiling. No deposit is read from a chain.","tags":["account-abstraction"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deposit_wei":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_fee_per_gas":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max_call_gas":{"type":"integer","exclusiveMinimum":0,"maximum":30000000},"max_verification_gas":{"type":"integer","minimum":0,"maximum":30000000},"allow_init_code":{"type":"boolean"},"user_operations":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"call_gas_limit":{"type":"integer","exclusiveMinimum":0,"maximum":30000000},"verification_gas_limit":{"type":"integer","minimum":0,"maximum":30000000},"init_code":{"type":"string","maxLength":20000,"pattern":"^0x[0-9a-fA-F]*$"}},"required":["call_gas_limit","verification_gas_limit"],"additionalProperties":false}}},"required":["deposit_wei","max_fee_per_gas","max_call_gas","max_verification_gas","allow_init_code","user_operations"],"additionalProperties":false},"example":{"deposit_wei":1000000000000000,"max_fee_per_gas":1000000000,"max_call_gas":300000,"max_verification_gas":200000,"allow_init_code":false,"user_operations":[{"call_gas_limit":500000,"verification_gas_limit":150000,"init_code":"0x"}]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"sponsorship_risk_score":{"type":"number"},"gas_limit_safety_index":{"type":"number"}},"additionalProperties":true},"example":{"sponsorship_risk_score":25,"gas_limit_safety_index":80}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object: x402Version, resource with the operation description, accepts with the price and network, and extensions.bazaar with the input schema, input example, output schema, and output example."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed before settlement, so no payment is taken. Reuse the same idempotency key to retrieve the stored error without paying again."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/account-abstraction/user-operation-audit":{"post":{"operationId":"audit_user_operation","summary":"Audit user operation","description":"Check the structure of one ERC-4337 UserOperation before it is submitted to a bundler. EntryPoint 0.6 uses initCode and paymasterAndData. EntryPoint 0.7 uses factory, factoryData, and separate Paymaster fields. On 0.7, callGasLimit, verificationGasLimit, the fee fields, and Paymaster gas limits must fit in uint128. Calldata is decoded only with the supplied ABI. Expected targets are compared only with decoded address parameters named dest, target, or to. validation_status is valid, invalid, warnings, or indeterminate. risk_level is low, medium, high, or critical. The signature is not recovered. No chain state is read, execution is not simulated, and the result does not say whether a bundler will accept the operation.","tags":["account-abstraction"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"entryPointVersion":{"type":"string","const":"0.6"},"userOperation":{"type":"object","properties":{"sender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string"},"initCode":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"callData":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"callGasLimit":{"type":"string"},"verificationGasLimit":{"type":"string"},"preVerificationGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"maxPriorityFeePerGas":{"type":"string"},"paymasterAndData":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"signature":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"}},"required":["sender","nonce","initCode","callData","callGasLimit","verificationGasLimit","preVerificationGas","maxFeePerGas","maxPriorityFeePerGas","paymasterAndData","signature"],"additionalProperties":false},"chainId":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"expectedNonce":{"type":"string"},"expectedTargets":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"expectedSelectors":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{8}$"}},"senderAccount":{"type":"object","properties":{"factory":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"allowDeployment":{"type":"boolean"}},"additionalProperties":false},"abi":{"maxItems":48,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["function","constructor","receive","fallback","event","error"]},"name":{"type":"string","maxLength":80},"stateMutability":{"type":"string","enum":["pure","view","nonpayable","payable"]},"inputs":{"maxItems":32,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"outputs":{"maxItems":32,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"anonymous":{"type":"boolean"}},"required":["type"],"additionalProperties":false}}},"required":["entryPointVersion","userOperation","chainId"],"additionalProperties":false},{"type":"object","properties":{"entryPointVersion":{"type":"string","const":"0.7"},"userOperation":{"type":"object","properties":{"sender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string"},"factory":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"factoryData":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"callData":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"callGasLimit":{"type":"string"},"verificationGasLimit":{"type":"string"},"preVerificationGas":{"type":"string"},"maxFeePerGas":{"type":"string"},"maxPriorityFeePerGas":{"type":"string"},"paymaster":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"paymasterVerificationGasLimit":{"type":"string"},"paymasterPostOpGasLimit":{"type":"string"},"paymasterData":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"},"signature":{"type":"string","maxLength":131074,"pattern":"^0x(?:[0-9a-fA-F]{2})*$"}},"required":["sender","nonce","callData","callGasLimit","verificationGasLimit","preVerificationGas","maxFeePerGas","maxPriorityFeePerGas","signature"],"additionalProperties":false},"chainId":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"expectedNonce":{"type":"string"},"expectedTargets":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"expectedSelectors":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^0x[0-9a-fA-F]{8}$"}},"senderAccount":{"type":"object","properties":{"factory":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"allowDeployment":{"type":"boolean"}},"additionalProperties":false},"abi":{"maxItems":48,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["function","constructor","receive","fallback","event","error"]},"name":{"type":"string","maxLength":80},"stateMutability":{"type":"string","enum":["pure","view","nonpayable","payable"]},"inputs":{"maxItems":32,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"outputs":{"maxItems":32,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"anonymous":{"type":"boolean"}},"required":["type"],"additionalProperties":false}}},"required":["entryPointVersion","userOperation","chainId"],"additionalProperties":false}],"$defs":{"__schema0":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"type":{"type":"string","minLength":1,"maxLength":200},"internalType":{"type":"string","maxLength":200},"indexed":{"type":"boolean"},"components":{"maxItems":32,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["type"],"additionalProperties":false}}},"example":{"entryPointVersion":"0.7","chainId":8453,"expectedNonce":"4","expectedTargets":["0x3333333333333333333333333333333333333333"],"expectedSelectors":["0xb61d27f6"],"senderAccount":{"factory":"0x1111111111111111111111111111111111111111","allowDeployment":false},"abi":[{"type":"function","name":"execute","stateMutability":"nonpayable","inputs":[{"name":"dest","type":"address"},{"name":"value","type":"uint256"},{"name":"func","type":"bytes"}],"outputs":[]}],"userOperation":{"sender":"0x4444444444444444444444444444444444444444","nonce":"5","factory":"0x1111111111111111111111111111111111111111","factoryData":"0x","callData":"0xb61d27f60000000000000000000000002222222222222222222222222222222222222222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004a9059cbb00000000000000000000000000000000000000000000000000000000","callGasLimit":"500000","verificationGasLimit":"100000","preVerificationGas":"21000","maxFeePerGas":"1000000000","maxPriorityFeePerGas":"2000000000","paymaster":"0x5555555555555555555555555555555555555555","paymasterVerificationGasLimit":"1","paymasterPostOpGasLimit":"1","paymasterData":"0x","signature":"0x01"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"validation_status":{"type":"string"},"risk_level":{"type":"string"},"field_errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"structural_findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}},"gas_configuration":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}},"paymaster_analysis":{"type":"object","properties":{"status":{"type":"string"},"paymaster":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true},"decoded_calls":{"type":"array","items":{"type":"object","properties":{"selector":{"type":"string"},"function_name":{"type":"string"},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":true}},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"example":{"validation_status":"invalid","risk_level":"high","field_errors":[{"field":"nonce","code":"nonce_mismatch","detail":"nonce is 5 and expectedNonce is 4. The account nonce on chain was not read."},{"field":"maxPriorityFeePerGas","code":"priority_fee_exceeds_max_fee","detail":"maxPriorityFeePerGas is 2000000000 and maxFeePerGas is 1000000000."}],"structural_findings":[{"code":"nonce_mismatch","severity":"high","detail":"nonce is 5 and expectedNonce is 4. The account nonce on chain was not read."},{"code":"deployment_not_allowed","severity":"high","detail":"The UserOperation includes factory initialization data and allowDeployment is false."},{"code":"priority_fee_exceeds_max_fee","severity":"high","detail":"maxPriorityFeePerGas is 2000000000 and maxFeePerGas is 1000000000."},{"code":"target_not_expected","severity":"high","detail":"Target 0x2222222222222222222222222222222222222222 is not in expectedTargets."}],"gas_configuration":[{"field":"callGasLimit","value":"500000","status":"accepted"},{"field":"verificationGasLimit","value":"100000","status":"accepted"},{"field":"preVerificationGas","value":"21000","status":"accepted"},{"field":"maxFeePerGas","value":"1000000000","status":"accepted"},{"field":"maxPriorityFeePerGas","value":"2000000000","status":"inconsistent"},{"field":"paymasterVerificationGasLimit","value":"1","status":"accepted"},{"field":"paymasterPostOpGasLimit","value":"1","status":"accepted"}],"paymaster_analysis":{"status":"present","paymaster":"0x5555555555555555555555555555555555555555","detail":"The Paymaster address and gas limits are present. paymasterData was not decoded. The Paymaster deposit and signature were not checked."},"decoded_calls":[{"selector":"0xb61d27f6","function_name":"execute","parameters":[{"name":"dest","type":"address","value":"0x2222222222222222222222222222222222222222"},{"name":"value","type":"uint256","value":"0"},{"name":"func","type":"bytes","value":"0xa9059cbb"}]}],"limitations":["No sender bytecode, account nonce, factory code, Paymaster deposit, or other chain state was read.","The signature was checked as bytes only. It was not recovered or verified, and it is not assumed to be an ECDSA signature.","No EntryPoint or bundler simulation was run. Validation gas, account deployment, and Paymaster signature checks require that simulation.","This result does not say whether a bundler will accept the UserOperation or whether execution will succeed.","Only EntryPoint 0.6 and 0.7 UserOperation JSON layouts are defined. 0.6 uses initCode and paymasterAndData. 0.7 uses factory, factoryData, and separate Paymaster fields.","EntryPoint 0.7 packs callGasLimit, verificationGasLimit, maxFeePerGas, maxPriorityFeePerGas, and the Paymaster gas limits into 16 bytes. Values above uint128 do not fit that encoding. preVerificationGas remains a uint256.","Calldata is decoded only with the supplied ABI. No account method is assumed. Nested calldata is not decoded.","Expected targets are compared only with decoded address parameters named dest, target, or to.","Bytes after the Paymaster address in 0.6 paymasterAndData, and 0.7 paymasterData, were not decoded.","Chain ID was not checked against a network."]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object: x402Version, resource with the operation description, accepts with the price and network, and extensions.bazaar with the input schema, input example, output schema, and output example."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed before settlement, so no payment is taken. Reuse the same idempotency key to retrieve the stored error without paying again."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/account-abstraction/user-op-validity":{"post":{"operationId":"score_useroperation_format","summary":"Score UserOperation format","description":"Check a caller-supplied nonce, signature length, init code, and calldata length. A signature of 64 or 65 bytes passes the length check and is not recovered. init code of at least 20 bytes is a factory deployment and is not simulated. The rejection index counts format problems. It does not say whether a bundler will accept the operation.","tags":["account-abstraction"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"integer","minimum":0,"maximum":9007199254740991},"expected_nonce":{"type":"integer","minimum":0,"maximum":9007199254740991},"signature":{"type":"string","maxLength":1000,"pattern":"^0x[0-9a-fA-F]*$"},"init_code":{"type":"string","maxLength":20000,"pattern":"^0x[0-9a-fA-F]*$"},"call_data":{"type":"string","maxLength":20000,"pattern":"^0x[0-9a-fA-F]*$"}},"required":["sender","nonce","signature","init_code","call_data"],"additionalProperties":false},"example":{"sender":"0x4444444444444444444444444444444444444444","nonce":5,"expected_nonce":4,"signature":"0x01","init_code":"0x","call_data":"0xa9059cbb"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"user_op_validity_score":{"type":"number"},"rejection_probability_index":{"type":"number"},"validation_errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"detail":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":true},"example":{"user_op_validity_score":50,"rejection_probability_index":60,"validation_errors":[{"code":"signature_length","detail":"The signature is not 64 or 65 bytes. The bytes were not recovered."},{"code":"nonce_mismatch","detail":"The nonce is 5. The expected nonce is 4."}]}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment required. The JSON body is the x402 PaymentRequired object: x402Version, resource with the operation description, accepts with the price and network, and extensions.bazaar with the input schema, input example, output schema, and output example."},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed before settlement, so no payment is taken. Reuse the same idempotency key to retrieve the stored error without paying again."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.04"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}