{"openapi":"3.1.0","info":{"title":"SBC Account Abstraction RPC","description":"ERC-4337 bundler and paymaster JSON-RPC for gasless SBC user operations. Obtain an API key at dashboard.stablecoin.xyz. See /auth.md on the developer hub for agent onboarding.","version":"1.0.0","contact":{"name":"SBC","url":"https://stablecoin.xyz"},"x-streaming":{"paymasterRpc":"Synchronous JSON-RPC — no SSE on RPC. Use POST /ask with prefer.streaming for NLWeb SSE."},"x-rate-limits":{"default":"Fair use per API key; HTTP 429 returns Retry-After header","docs":"/errors.md"},"x-sandbox":{"chain":"baseSepolia","dashboard":"https://dashboard.stablecoin.xyz"}},"servers":[{"url":"https://api.aa.stablecoin.xyz/rpc/v1/baseSepolia/{apiKey}","description":"Sandbox / testnet — use baseSepolia with a dashboard API key","variables":{"apiKey":{"default":"YOUR_API_KEY","description":"Test key from https://dashboard.stablecoin.xyz"}}},{"url":"https://api.aa.stablecoin.xyz/rpc/v1/{chain}/{apiKey}","description":"Production bundler + paymaster (path includes chain and API key)","variables":{"chain":{"default":"base","description":"viem chain id (e.g. base, baseSepolia, radius, radiusTestnet)"},"apiKey":{"default":"YOUR_API_KEY","description":"API key from https://dashboard.stablecoin.xyz"}}}],"security":[{"sbcApiKey":[]}],"paths":{"/":{"post":{"operationId":"sendJsonRpc","summary":"Bundler and paymaster JSON-RPC","description":"Single endpoint for ERC-4337 bundler and paymaster methods. Send JSON-RPC 2.0 requests with Content-Type: application/json.","security":[{"sbcApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"description":"JSON-RPC result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}},"429":{"description":"Rate limited — honor Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HubError"}}}}}}},"/methods/eth_chainId":{"post":{"operationId":"eth_chainId","summary":"Returns chain id (health check)","description":"JSON-RPC method sent to POST / with method eth_chainId","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"},"example":{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}}}}},"/methods/eth_estimateUserOperationGas":{"post":{"operationId":"eth_estimateUserOperationGas","summary":"Estimate gas for a user operation","description":"JSON-RPC method sent to POST /","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}}}}},"/methods/eth_sendUserOperation":{"post":{"operationId":"eth_sendUserOperation","summary":"Submit a signed user operation","description":"JSON-RPC method sent to POST /","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}}}}},"/methods/pm_sponsorUserOperation":{"post":{"operationId":"pm_sponsorUserOperation","summary":"Request paymaster sponsorship","description":"JSON-RPC method sent to POST / when paymaster enabled","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}}}}}},"components":{"securitySchemes":{"sbcApiKey":{"type":"apiKey","in":"path","name":"apiKey","description":"Programmatic credential. Create at https://dashboard.stablecoin.xyz → API keys. No OAuth required for RPC access."}},"schemas":{"JsonRpcRequest":{"type":"object","required":["jsonrpc","method","id"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"method":{"type":"string","description":"ERC-4337 method (e.g. eth_sendUserOperation, eth_estimateUserOperationGas, pm_sponsorUserOperation)"},"params":{"type":"array","items":{}},"id":{"oneOf":[{"type":"integer"},{"type":"string"}]}}},"JsonRpcResponse":{"type":"object","properties":{"jsonrpc":{"type":"string"},"id":{},"result":{}}},"JsonRpcErrorResponse":{"type":"object","properties":{"jsonrpc":{"type":"string"},"id":{},"error":{"type":"object","properties":{"code":{"type":"integer","description":"JSON-RPC error code"},"message":{"type":"string","description":"Human-readable error"},"data":{"type":"object","properties":{"resolution":{"type":"string"},"retryable":{"type":"boolean"}}}},"required":["code","message"]}}},"HubError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"resolution":{"type":"string"},"retryable":{"type":"boolean"}}}}}}},"x-payment-info":{"protocol":"x402","docs":"https://docs.stablecoin.xyz/x402/sdk","facilitator":"https://x402.stablecoin.xyz/","discovery":"https://stablecoin.xyz/discovery/resources"}}