{"openapi":"3.1.0","info":{"title":"BlockFinaX Integrator API","version":"1.0.0","description":"Public REST API for the BlockFinaX parametric FX-protection protocol.\n\n## Integration model\n\nEvery state-changing contract function has a corresponding `POST /v1/tx/.../build` endpoint that returns ready-to-sign calldata (`{ chainId, to, data, value }`). You sign with **your own wallet** (Privy, MetaMask, raw key, Rift, anything) and broadcast through **your own RPC**.\n\nView functions are exposed as ordinary REST reads.\n\nAuthentication: most endpoints are public reads. User-scoped endpoints accept `Authorization: Bearer <rift access token>`. Admin endpoints additionally require `x-admin-token` issued by `POST /v1/auth/admin/login`."},"servers":[{"url":"/v1","description":"This server"}],"components":{"securitySchemes":{"riftBearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Rift Finance access token. End-user auth."},"adminToken":{"type":"apiKey","in":"header","name":"x-admin-token","description":"Admin session token returned by POST /v1/auth/admin/login."},"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Server-side integrator API key. Reserved for non-Rift callers."}},"schemas":{"ErrorEnvelope":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","validation_error","conflict","rate_limited","internal_error","upstream_error","service_unavailable"]},"message":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]},"BuiltTx":{"type":"object","properties":{"chainId":{"type":"integer"},"to":{"type":"string","description":"Contract recipient. Diamond proxy for hedge calls; ERC-20 address for approve."},"data":{"type":"string","description":"ABI-encoded calldata (0x-prefixed)."},"value":{"type":"string","description":"Native value in wei (decimal string). \"0\" for hedge calls."},"function":{"type":"string"},"args":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},"estimatedGas":{"type":["string","null"]}},"required":["chainId","to","data","value","function","args","estimatedGas"]},"MeResponse":{"type":"object","properties":{"address":{"type":"string"},"email":{"type":["string","null"],"format":"email"},"phoneNumber":{"type":["string","null"]},"externalId":{"type":["string","null"]},"user":{"type":"string"}},"required":["address","email","phoneNumber","externalId","user"]},"Chain":{"type":"object","properties":{"chainId":{"type":"integer"},"name":{"type":"string"},"symbol":{"type":"string"},"diamond":{"type":"string"},"usdc":{"type":"string"},"usdt":{"type":["string","null"]},"rpcUrl":{"type":"string"},"paymentDecimals":{"type":"object","properties":{"USDC":{"type":"number"},"USDT":{"type":"number"}},"required":["USDC"]}},"required":["chainId","name","symbol","diamond","usdc","usdt","rpcUrl","paymentDecimals"]},"BroadcastBody":{"type":"object","properties":{"chainId":{"type":"integer"},"signedTx":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"}},"required":["chainId","signedTx"]},"PricingQuoteResponse":{"type":"object","properties":{"premiumRate":{"type":"number"},"premiumUsd":{"type":"number"},"maxPayoutUsd":{"type":"number"},"premiumRateFixed6":{"type":"string"},"attestation":{"type":["object","null"],"properties":{"signature":{"type":"string"},"quoteTimestamp":{"type":"string"},"quoteNonce":{"type":"string"},"signerAddress":{"type":"string"},"expiresAt":{"type":"string"}},"required":["signature","quoteTimestamp","quoteNonce","signerAddress","expiresAt"]},"breakdown":{}},"required":["premiumRate","premiumUsd","maxPayoutUsd","premiumRateFixed6","attestation"]},"PricingQuoteBody":{"type":"object","properties":{"pair":{"type":"string","minLength":3,"description":"e.g. USD/GHS, USD/NGN"},"strike":{"type":"number","exclusiveMinimum":0,"description":"Entry-edge of the payout zone"},"payoutCap":{"type":"number","exclusiveMinimum":0,"description":"Far-edge of the payout zone"},"expiryUnixSeconds":{"type":"integer","description":"Expiry as Unix seconds"},"notional":{"type":"number","exclusiveMinimum":0,"description":"Hedge size in payment-token units (USDC)"},"strikeAbove":{"type":"boolean","description":"true = upward hedge (call spread)"},"chainId":{"type":"integer"},"diamondAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"creator":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["pair","strike","payoutCap","expiryUnixSeconds","notional","strikeAbove"]}},"parameters":{}},"paths":{"/me":{"get":{"tags":["Auth"],"summary":"Get the authenticated user","security":[{"riftBearer":[]}],"responses":{"200":{"description":"Authenticated user","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MeResponse"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/chains":{"get":{"tags":["Meta"],"summary":"List supported chains","description":"Returns every chain BlockFinaX is deployed on, with its Diamond address, payment-token addresses, and RPC.","responses":{"200":{"description":"Chain list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Chain"}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/governance/owner":{"get":{"tags":["Governance"],"summary":"Get Diamond owner + pending owner","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"query"}],"responses":{"200":{"description":"Ownership state","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chainId":{"type":"number"},"owner":{"type":"string"},"pendingOwner":{"type":"string"}},"required":["chainId","owner","pendingOwner"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/governance/facets":{"get":{"tags":["Governance"],"summary":"List Diamond facets and their function selectors","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"query"}],"responses":{"200":{"description":"Facets","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chainId":{"type":"number"},"facets":{"type":"array","items":{}}},"required":["chainId","facets"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/fees":{"get":{"tags":["Hedge"],"summary":"Get the active fee config on a chain","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"query"}],"responses":{"200":{"description":"Fee config (raw bigints as strings)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/events/{chainId}/total":{"get":{"tags":["Hedge · Events"],"summary":"Total events ever created on a chain","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Total count","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/events/{chainId}/{id}":{"get":{"tags":["Hedge · Events"],"summary":"Get an event's core state","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Event core fields","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/events/{chainId}/{id}/stats":{"get":{"tags":["Hedge · Events"],"summary":"Aggregate stats for an event","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Stats","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/events/{chainId}/{id}/range":{"get":{"tags":["Hedge · Events"],"summary":"Range parameters (strikeAbove, payoutCap, initialRate)","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Range params","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/events/{chainId}/{id}/utilization":{"get":{"tags":["Hedge · Events"],"summary":"Pool utilization","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Utilization","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/events/{chainId}/{id}/positions":{"get":{"tags":["Hedge · Events"],"summary":"Position IDs in an event","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Position IDs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/events/{chainId}/{id}/deposits":{"get":{"tags":["Hedge · Events"],"summary":"LP deposit IDs in an event","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Deposit IDs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/positions/{chainId}/{id}":{"get":{"tags":["Hedge · Positions"],"summary":"Get a position by id","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Position","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/positions/{chainId}/wallet/{addr}":{"get":{"tags":["Hedge · Positions"],"summary":"Position IDs owned by a wallet","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"required":true,"name":"addr","in":"path"}],"responses":{"200":{"description":"Position IDs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/deposits/{chainId}/{id}":{"get":{"tags":["Hedge · Deposits"],"summary":"Get an LP deposit by id","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Deposit","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/deposits/{chainId}/{id}/pending":{"get":{"tags":["Hedge · Deposits"],"summary":"Unclaimed premiums on a deposit","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Pending amount (token-units)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/deposits/{chainId}/wallet/{addr}":{"get":{"tags":["Hedge · Deposits"],"summary":"LP deposit IDs owned by a wallet","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"required":true,"name":"addr","in":"path"}],"responses":{"200":{"description":"Deposit IDs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/creators/{chainId}/wallet/{addr}":{"get":{"tags":["Hedge · Events"],"summary":"Event IDs created by a wallet","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"required":true,"name":"addr","in":"path"}],"responses":{"200":{"description":"Event IDs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/quote-payout/{chainId}/{id}":{"get":{"tags":["Hedge · Events"],"summary":"Quote the payout for a hypothetical settlement price","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"hypoSettlement","in":"query"},{"schema":{"type":"string"},"required":true,"name":"notional","in":"query"}],"responses":{"200":{"description":"Computed payout","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/paused/{chainId}":{"get":{"tags":["Hedge · Protocol"],"summary":"Is the hedge facet paused","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Pause flag","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/fees-initialized/{chainId}":{"get":{"tags":["Hedge · Protocol"],"summary":"Have fees been initialized","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Initialized flag","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/platform-fees/{chainId}":{"get":{"tags":["Hedge · Protocol"],"summary":"Accumulated USDC platform fees","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Fee balance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/platform-fees/{chainId}/by-token/{token}":{"get":{"tags":["Hedge · Protocol"],"summary":"Accumulated platform fees in a specific token","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"Fee balance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/payment-tokens/{chainId}/{token}":{"get":{"tags":["Hedge · Protocol"],"summary":"Is a token an accepted payment asset","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"Allowed flag","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/events/{chainId}/{id}/payment-token":{"get":{"tags":["Hedge · Events"],"summary":"Payment token an event was created against","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Payment token address","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/events/{chainId}/{id}/quote-signer":{"get":{"tags":["Hedge · Events"],"summary":"Pricing-engine signer the event was attested with","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"id","in":"path"}],"responses":{"200":{"description":"Signer address","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/pricing-engine-signer/{chainId}":{"get":{"tags":["Hedge · Protocol"],"summary":"Active pricing-engine signer","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Signer address","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/hedge/quote-nonce-used/{chainId}/{nonce}":{"get":{"tags":["Hedge · Protocol"],"summary":"Has a pricing-engine quote nonce been consumed","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"nonce","in":"path"}],"responses":{"200":{"description":"Nonce-used flag","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/oracle/oracles/{chainId}":{"get":{"tags":["Oracle"],"summary":"List authorised oracle signers","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Oracle addresses","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/oracle/config/{chainId}":{"get":{"tags":["Oracle"],"summary":"Oracle consensus config","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Consensus config","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/oracle/is-authorised/{chainId}/{addr}":{"get":{"tags":["Oracle"],"summary":"Check whether an address is an authorised oracle","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"required":true,"name":"addr","in":"path"}],"responses":{"200":{"description":"Authorisation flag","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/oracle/submissions/{chainId}/{eventId}":{"get":{"tags":["Oracle"],"summary":"List all rate submissions for an event","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"eventId","in":"path"}],"responses":{"200":{"description":"Submissions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/oracle/submission/{chainId}/{eventId}/{oracle}":{"get":{"tags":["Oracle"],"summary":"A single oracle's submission for an event","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"eventId","in":"path"},{"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"required":true,"name":"oracle","in":"path"}],"responses":{"200":{"description":"Submission","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/oracle/submitter-count/{chainId}/{eventId}":{"get":{"tags":["Oracle"],"summary":"Number of oracles that have submitted for an event","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"eventId","in":"path"}],"responses":{"200":{"description":"Submitter count","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/governance/facet-addresses/{chainId}":{"get":{"tags":["Governance"],"summary":"All facet addresses currently mounted on the Diamond","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Facet addresses","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/governance/facets/{chainId}/by-address/{facetAddress}":{"get":{"tags":["Governance"],"summary":"All function selectors served by a given facet","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"facetAddress","in":"path"}],"responses":{"200":{"description":"Selectors","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/governance/facet-address/{chainId}/{selector}":{"get":{"tags":["Governance"],"summary":"Which facet currently serves a given 4-byte selector","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"selector","in":"path"}],"responses":{"200":{"description":"Facet address","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/governance/proposals/{chainId}/{proposalId}":{"get":{"tags":["Governance · Timelock"],"summary":"Full state of a Diamond-cut proposal","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"proposalId","in":"path"}],"responses":{"200":{"description":"Proposal","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/governance/cut-ids/{chainId}":{"get":{"tags":["Governance · Timelock"],"summary":"Every cut-proposal ID ever created on the Diamond","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Proposal IDs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/governance/pending-cut-ids/{chainId}":{"get":{"tags":["Governance · Timelock"],"summary":"Alias of /cut-ids — kept for backwards compatibility","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"}],"responses":{"200":{"description":"Proposal IDs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/governance/pending-cut-info/{chainId}/{proposalId}":{"get":{"tags":["Governance · Timelock"],"summary":"Lightweight proposal status (eta + executed + cancelled)","parameters":[{"schema":{"type":["integer","null"]},"required":false,"name":"chainId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"proposalId","in":"path"}],"responses":{"200":{"description":"Proposal status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/erc20/approve":{"post":{"tags":["Tx · ERC-20"],"summary":"Build ERC-20 approve calldata","description":"Required before any hedge action that pulls tokens (createEvent, deposit, buyProtection).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"token":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Token contract (USDC/USDT)"},"spender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Diamond proxy address"},"amount":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"description":"Amount in token's smallest unit"}},"required":["chainId","token","spender","amount"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/create-event":{"post":{"tags":["Tx · Hedge"],"summary":"Build createEvent calldata","description":"Requires a prior ERC-20 approve for (creationFee + initialLiquidity) against the Diamond.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"name":{"type":"string","minLength":1},"underlying":{"type":"string","minLength":3,"description":"e.g. USD/GHS"},"strike":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"description":"Strike price in 1e6 fixed-point"},"payoutCap":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"description":"Range upper bound (1e6). Pass 0 for single-strike events"},"premiumRate":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"description":"Rate in 1e6 (e.g. 25000 = 2.5%)"},"expiry":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"description":"Unix-seconds expiry"},"allowExternalLp":{"type":"boolean"},"initialLiquidity":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"description":"Seed liquidity in payment-token decimals"},"initialRate":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"description":"Spot rate at creation (1e6)"},"strikeAbove":{"type":"boolean","description":"true = pays out if rate rises above strike"},"paymentToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"signature":{"type":"string","default":"0x","description":"Pricing-engine attestation; \"0x\" for self-priced"},"quoteTimestamp":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"default":"0"},"quoteNonce":{"type":"string","default":"0x0000000000000000000000000000000000000000000000000000000000000000"}},"required":["chainId","name","underlying","strike","payoutCap","premiumRate","expiry","allowExternalLp","initialLiquidity","initialRate","strikeAbove","paymentToken"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/deposit":{"post":{"tags":["Tx · Hedge"],"summary":"Build LP deposit calldata","description":"Requires a prior ERC-20 approve for `amount` against the Diamond.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"eventId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"amount":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","eventId","amount"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/buy-protection":{"post":{"tags":["Tx · Hedge"],"summary":"Build buyProtection calldata","description":"Requires a prior ERC-20 approve for at least `maxCost` against the Diamond.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"eventId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"notional":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"maxCost":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"description":"Slippage cap = premium + platformFee + buffer"},"deadline":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}],"description":"Unix-seconds deadline"}},"required":["chainId","eventId","notional","maxCost","deadline"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/claim-payout":{"post":{"tags":["Tx · Hedge"],"summary":"Build claimPayout calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"positionId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","positionId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/claim-premiums":{"post":{"tags":["Tx · Hedge"],"summary":"Build claimPremiums calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"depositId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","depositId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/withdraw-capital":{"post":{"tags":["Tx · Hedge"],"summary":"Build withdrawCapital calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"depositId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","depositId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/set-pool-settings":{"post":{"tags":["Tx · Hedge"],"summary":"Build setPoolSettings calldata (creator only)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"eventId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"poolOpen":{"type":"boolean"},"allowExternalLp":{"type":"boolean"}},"required":["chainId","eventId","poolOpen","allowExternalLp"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/withdraw-creator-earnings":{"post":{"tags":["Tx · Hedge"],"summary":"Build withdrawCreatorEarnings calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"eventId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","eventId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/recover-expired-payouts":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build recoverExpiredPayouts calldata (owner only)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"eventId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","eventId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/initialize-fees":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build initializeHedgeFees calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"creationFee":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"hedgerFeeRate":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"payoutFeeRate":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"lpProfitFeeRate":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"creatorLoyaltyRate":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","creationFee","hedgerFeeRate","payoutFeeRate","lpProfitFeeRate","creatorLoyaltyRate"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/settle-event":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build settleEvent calldata (oracle admin / owner)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"eventId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"settlementPrice":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","eventId","settlementPrice"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/pause":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build pause calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"}},"required":["chainId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/unpause":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build unpause calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"}},"required":["chainId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/activate-oracle-v2":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build activateOracleV2 calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"}},"required":["chainId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/set-oracle-admin":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build setOracleAdmin calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["chainId","address"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/set-pricing-engine-signer":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build setPricingEngineSigner calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["chainId","address"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/withdraw-platform-fees":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build withdrawPlatformFees calldata (USDC)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"amount":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","amount"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/withdraw-platform-fees-by-token":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build withdrawPlatformFeesByToken calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"token":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","token","amount"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/rescue-eth":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build rescueETH calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["chainId","to"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/rescue-erc20":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build rescueERC20 calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"token":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["chainId","token","to"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/hedge/set-allowed-payment-token":{"post":{"tags":["Tx · Hedge (admin)"],"summary":"Build setAllowedPaymentToken calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"token":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"allowed":{"type":"boolean"}},"required":["chainId","token","allowed"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/oracle/submit-rate":{"post":{"tags":["Tx · Oracle"],"summary":"Build submitRate calldata (authorised oracles only)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"eventId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]},"price":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","eventId","price"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/oracle/add-oracle":{"post":{"tags":["Tx · Oracle (admin)"],"summary":"Build addOracle calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["chainId","address"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/oracle/remove-oracle":{"post":{"tags":["Tx · Oracle (admin)"],"summary":"Build removeOracle calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["chainId","address"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/oracle/set-required-signers":{"post":{"tags":["Tx · Oracle (admin)"],"summary":"Build setRequiredSigners calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"value":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","value"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/oracle/set-tolerance-bps":{"post":{"tags":["Tx · Oracle (admin)"],"summary":"Build setToleranceBps calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"value":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","value"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/oracle/clear-stale-submissions":{"post":{"tags":["Tx · Oracle (admin)"],"summary":"Build clearStaleSubmissions calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"eventId":{"anyOf":[{"type":"string","pattern":"^\\d+$"},{"type":"integer","minimum":0}]}},"required":["chainId","eventId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/ownership/transfer-ownership":{"post":{"tags":["Tx · Ownership"],"summary":"Build transferOwnership calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["chainId","address"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/ownership/accept-ownership":{"post":{"tags":["Tx · Ownership"],"summary":"Build acceptOwnership calldata","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"}},"required":["chainId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/governance/diamond-cut":{"post":{"tags":["Tx · Governance"],"summary":"Build diamondCut calldata (queues an upgrade through the timelock)","description":"Owner-only on-chain. The proposal must then sit through the timelock delay before executeCut() can run it.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"cuts":{"type":"array","items":{"type":"object","properties":{"facetAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"action":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]}],"description":"0 = Add, 1 = Replace, 2 = Remove (matches EIP-2535)"},"functionSelectors":{"type":"array","items":{"type":"string","pattern":"^0x[a-fA-F0-9]{8}$"}}},"required":["facetAddress","action","functionSelectors"]}},"init":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","default":"0x0000000000000000000000000000000000000000","description":"Initializer contract; ZeroAddress if no init call"},"initData":{"type":"string","pattern":"^0x([a-fA-F0-9]{2})*$","default":"0x","description":"Calldata for the init call; \"0x\" when init is ZeroAddress"}},"required":["chainId","cuts"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/governance/execute-cut":{"post":{"tags":["Tx · Governance"],"summary":"Build executeCut calldata (apply a proposal after the delay)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"proposalId":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}},"required":["chainId","proposalId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/governance/cancel-cut":{"post":{"tags":["Tx · Governance"],"summary":"Build cancelCut calldata (abort a pending proposal)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"proposalId":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"}},"required":["chainId","proposalId"]}}}},"responses":{"200":{"description":"Built transaction","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BuiltTx"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/tx/broadcast":{"post":{"tags":["Tx · Broadcast"],"summary":"Relay a signed raw transaction to the chain RPC","description":"Optional convenience. The server never signs — you sign locally with your own wallet, then POST the bytes here for relay.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastBody"}}}},"responses":{"200":{"description":"Transaction broadcast","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/pricing/quote":{"post":{"tags":["Pricing"],"summary":"Get a fair-premium quote (optionally signed for on-chain attestation)","description":"Computes a fair premium using Garman–Kohlhagen with empirical drift + EWMA volatility. If `chainId` + `diamondAddress` + `creator` are all provided AND the engine has a signing key configured, the response includes an `attestation` block whose fields plug directly into `createEvent`'s `signature` / `quoteTimestamp` / `quoteNonce` slots.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingQuoteBody"}}}},"responses":{"200":{"description":"Quote with breakdown","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PricingQuoteResponse"}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/pricing/health":{"get":{"tags":["Pricing"],"summary":"Pricing engine status (signer, USD rate cache, per-pair history)","description":"Useful for verifying that `pricingEngineSigner` matches what's set on-chain via `setPricingEngineSigner`.","responses":{"200":{"description":"Engine status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/pricing/signer":{"get":{"tags":["Pricing"],"summary":"Address of the active pricing-engine signer (or null when unset)","responses":{"200":{"description":"Signer address","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"signerAddress":{"type":["string","null"]}},"required":["signerAddress"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"webhooks":{}}