From c682fcbb396459b53477f79f4569d17e61c3a850 Mon Sep 17 00:00:00 2001 From: rhinestone-bot Date: Thu, 21 May 2026 10:09:53 +0000 Subject: [PATCH] chore(orchestrator): update OpenAPI spec from rhinestonewtf/orchestrator@73a0fbd795d1d95bb37abdeeedba0013b655db51 --- orchestrator.json | 3369 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 3060 insertions(+), 309 deletions(-) diff --git a/orchestrator.json b/orchestrator.json index e4ee9a2..587753b 100644 --- a/orchestrator.json +++ b/orchestrator.json @@ -27,13 +27,6 @@ "description": "API version (YYYY-MM.name). Will become required in a future release.", "example": "2026-01.alps" } - }, - { - "name": "x-feature-flags", - "in": "header", - "schema": { - "type": "string" - } } ], "requestBody": { @@ -1504,6 +1497,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -1546,8 +1631,8 @@ } } }, - "500": { - "description": "500", + "403": { + "description": "403", "content": { "application/json": { "schema": { @@ -1657,6 +1742,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -1694,142 +1871,18 @@ ] } ], - "description": "Server error" + "description": "API key scope denied" } } } - } - } - } - }, - "/intents/splits": { - "post": { - "description": "Splits token amounts into multiple intents based on available relayer liquidity. Each returned intent can be filled by a single relayer.", - "summary": "Split Intent by Liquidity", - "tags": [ - "Intents" - ], - "parameters": [ - { - "name": "x-api-key", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "Rhinestone API key" - } }, - { - "name": "x-api-version", - "in": "header", - "schema": { - "type": "string", - "pattern": "^\\d{4}-\\d{2}\\.[a-z0-9]+$", - "description": "API version (YYYY-MM.name). Will become required in a future release.", - "example": "2026-01.alps" - } - } - ], - "requestBody": { - "description": "Body", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "chainId": { - "type": "string", - "pattern": "^eip155:\\d+$", - "description": "The destination chain ID", - "example": "eip155:42161" - }, - "tokens": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "uint256" - }, - "description": "Map of token addresses to amounts", - "example": { - "0xaf88d065e77c8cc2239327c5edb3a432268e5831": "5000000000000" - } - }, - "settlementLayers": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "INTENT_EXECUTOR", - "SAME_CHAIN", - "ACROSS", - "ECO", - "RELAY", - "OFT", - "NEAR", - "RHINO", - "CCTP" - ] - }, - "description": "Optional array of settlement layers to filter by. If not provided, all layers are considered.", - "example": [ - "ACROSS", - "ECO" - ] - } - }, - "required": [ - "chainId", - "tokens" - ] - } - } - } - }, - "responses": { - "200": { - "description": "200", + "500": { + "description": "500", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "intents": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "description": "Array of intents, each mapping token addresses to amounts that can be filled by a single relayer", - "example": [ - { - "0xaf88d065e77c8cc2239327c5edb3a432268e5831": "2400000000000" - }, - { - "0xaf88d065e77c8cc2239327c5edb3a432268e5831": "1700000000000" - }, - { - "0xaf88d065e77c8cc2239327c5edb3a432268e5831": "900000000000" - } - ] - } - }, - "required": [ - "intents" - ], - "description": "Successfully split the intent by available liquidity" - } - } - } - }, - "400": { - "description": "400", - "content": { - "application/json": { - "schema": { - "discriminator": { - "propertyName": "code" + "discriminator": { + "propertyName": "code" }, "oneOf": [ { @@ -1934,6 +1987,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -1971,74 +2116,137 @@ ] } ], - "description": "Invalid request parameters" + "description": "Server error" } } } + } + } + } + }, + "/intents/splits": { + "post": { + "description": "Splits token amounts into multiple intents based on available relayer liquidity. Each returned intent can be filled by a single relayer.", + "summary": "Split Intent by Liquidity", + "tags": [ + "Intents" + ], + "parameters": [ + { + "name": "x-api-key", + "in": "header", + "required": true, + "schema": { + "type": "string", + "description": "Rhinestone API key" + } }, - "422": { - "description": "422", + { + "name": "x-api-version", + "in": "header", + "schema": { + "type": "string", + "pattern": "^\\d{4}-\\d{2}\\.[a-z0-9]+$", + "description": "API version (YYYY-MM.name). Will become required in a future release.", + "example": "2026-01.alps" + } + } + ], + "requestBody": { + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chainId": { + "type": "string", + "pattern": "^eip155:\\d+$", + "description": "The destination chain ID", + "example": "eip155:42161" + }, + "tokens": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "uint256" + }, + "description": "Map of token addresses to amounts", + "example": { + "0xaf88d065e77c8cc2239327c5edb3a432268e5831": "5000000000000" + } + }, + "settlementLayers": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "INTENT_EXECUTOR", + "SAME_CHAIN", + "ACROSS", + "ECO", + "RELAY", + "OFT", + "NEAR", + "RHINO", + "CCTP" + ] + }, + "description": "Optional array of settlement layers to filter by. If not provided, all layers are considered.", + "example": [ + "ACROSS", + "ECO" + ] + } + }, + "required": [ + "chainId", + "tokens" + ] + } + } + } + }, + "responses": { + "200": { + "description": "200", "content": { "application/json": { "schema": { "type": "object", "properties": { - "code": { - "type": "string", - "enum": [ - "INSUFFICIENT_LIQUIDITY" - ], - "description": "Machine-readable error code" - }, - "message": { - "type": "string", - "description": "Human-readable error message", - "example": "Insufficient liquidity to fill the requested amounts. Partial splits available." - }, - "traceId": { - "type": "string", - "description": "Trace ID", - "example": "eb0ba4657f36364b33ec565c15f98368" - }, - "details": { - "type": "object", - "properties": { - "availableIntents": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "description": "Intents that can be filled with available liquidity" - }, - "unfillable": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Token amounts that cannot be filled due to insufficient liquidity" + "intents": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" } }, - "required": [ - "availableIntents", - "unfillable" + "description": "Array of intents, each mapping token addresses to amounts that can be filled by a single relayer", + "example": [ + { + "0xaf88d065e77c8cc2239327c5edb3a432268e5831": "2400000000000" + }, + { + "0xaf88d065e77c8cc2239327c5edb3a432268e5831": "1700000000000" + }, + { + "0xaf88d065e77c8cc2239327c5edb3a432268e5831": "900000000000" + } ] } }, "required": [ - "code", - "message", - "traceId" + "intents" ], - "description": "Insufficient liquidity to fill the full amount. Partial splits returned." + "description": "Successfully split the intent by available liquidity" } } } }, - "500": { - "description": "500", + "400": { + "description": "400", "content": { "application/json": { "schema": { @@ -2154,17 +2362,7 @@ "code": { "type": "string", "enum": [ - "NOT_FOUND", - "UNAUTHORIZED", - "FORBIDDEN", - "CONFLICT", - "UNPROCESSABLE_CONTENT", - "TOO_MANY_REQUESTS", - "SETTLEMENT_QUOTE_ERROR", - "SETTLEMENT_EXECUTION_ERROR", - "EXTERNAL_SERVICE_TIMEOUT", - "RELAYER_MARKET_UNAVAILABLE", - "INTERNAL_ERROR" + "KEY_SCOPE_DENIED" ] }, "message": { @@ -2176,19 +2374,672 @@ "type": "string", "description": "Trace ID", "example": "eb0ba4657f36364b33ec565c15f98368" - } - }, - "required": [ - "code", - "message", - "traceId" - ] - } - ], - "description": "Server error" - } - } - } + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "NOT_FOUND", + "UNAUTHORIZED", + "FORBIDDEN", + "CONFLICT", + "UNPROCESSABLE_CONTENT", + "TOO_MANY_REQUESTS", + "SETTLEMENT_QUOTE_ERROR", + "SETTLEMENT_EXECUTION_ERROR", + "EXTERNAL_SERVICE_TIMEOUT", + "RELAYER_MARKET_UNAVAILABLE", + "INTERNAL_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + } + ], + "description": "Invalid request parameters" + } + } + } + }, + "403": { + "description": "403", + "content": { + "application/json": { + "schema": { + "discriminator": { + "propertyName": "code" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "VALIDATION_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable issue description" + }, + "context": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "description": "Structured issue context (e.g. `{ path: \"body.accountAddress\" }`)" + } + }, + "required": [ + "message" + ] + }, + "description": "Per-field validation issues" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "INSUFFICIENT_LIQUIDITY" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "object", + "properties": { + "availableIntents": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "Intents fillable with current liquidity" + }, + "unfillable": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Token amounts that cannot be filled" + } + }, + "required": [ + "availableIntents", + "unfillable" + ], + "description": "Fillable subset and unfillable remainder" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "NOT_FOUND", + "UNAUTHORIZED", + "FORBIDDEN", + "CONFLICT", + "UNPROCESSABLE_CONTENT", + "TOO_MANY_REQUESTS", + "SETTLEMENT_QUOTE_ERROR", + "SETTLEMENT_EXECUTION_ERROR", + "EXTERNAL_SERVICE_TIMEOUT", + "RELAYER_MARKET_UNAVAILABLE", + "INTERNAL_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + } + ], + "description": "API key scope denied" + } + } + } + }, + "422": { + "description": "422", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "INSUFFICIENT_LIQUIDITY" + ], + "description": "Machine-readable error code" + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Insufficient liquidity to fill the requested amounts. Partial splits available." + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "object", + "properties": { + "availableIntents": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "Intents that can be filled with available liquidity" + }, + "unfillable": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Token amounts that cannot be filled due to insufficient liquidity" + } + }, + "required": [ + "availableIntents", + "unfillable" + ] + } + }, + "required": [ + "code", + "message", + "traceId" + ], + "description": "Insufficient liquidity to fill the full amount. Partial splits returned." + } + } + } + }, + "500": { + "description": "500", + "content": { + "application/json": { + "schema": { + "discriminator": { + "propertyName": "code" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "VALIDATION_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable issue description" + }, + "context": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "description": "Structured issue context (e.g. `{ path: \"body.accountAddress\" }`)" + } + }, + "required": [ + "message" + ] + }, + "description": "Per-field validation issues" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "INSUFFICIENT_LIQUIDITY" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "object", + "properties": { + "availableIntents": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "Intents fillable with current liquidity" + }, + "unfillable": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Token amounts that cannot be filled" + } + }, + "required": [ + "availableIntents", + "unfillable" + ], + "description": "Fillable subset and unfillable remainder" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "NOT_FOUND", + "UNAUTHORIZED", + "FORBIDDEN", + "CONFLICT", + "UNPROCESSABLE_CONTENT", + "TOO_MANY_REQUESTS", + "SETTLEMENT_QUOTE_ERROR", + "SETTLEMENT_EXECUTION_ERROR", + "EXTERNAL_SERVICE_TIMEOUT", + "RELAYER_MARKET_UNAVAILABLE", + "INTERNAL_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + } + ], + "description": "Server error" + } + } + } } } } @@ -2372,58 +3223,303 @@ "description": "R value for EIP-7702 delegation", "example": "0x..." }, - "s": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]*$", - "description": "S value for EIP-7702 delegation", - "example": "0x..." + "s": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]*$", + "description": "S value for EIP-7702 delegation", + "example": "0x..." + } + }, + "required": [ + "chainId", + "address", + "nonce", + "yParity", + "r", + "s" + ] + }, + "description": "EIP-7702 authorizations signed by the recipient account" + } + } + } + }, + "required": [ + "intentId", + "signatures" + ] + } + } + } + }, + "responses": { + "201": { + "description": "201", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "intentId": { + "type": "string", + "pattern": "^\\d+$" + } + }, + "required": [ + "intentId" + ], + "description": "Intent operations submitted successfully" + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "discriminator": { + "propertyName": "code" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "VALIDATION_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable issue description" + }, + "context": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "description": "Structured issue context (e.g. `{ path: \"body.accountAddress\" }`)" + } + }, + "required": [ + "message" + ] + }, + "description": "Per-field validation issues" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "INSUFFICIENT_LIQUIDITY" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "object", + "properties": { + "availableIntents": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "Intents fillable with current liquidity" + }, + "unfillable": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Token amounts that cannot be filled" } }, "required": [ - "chainId", - "address", - "nonce", - "yParity", - "r", - "s" + "availableIntents", + "unfillable" + ], + "description": "Fillable subset and unfillable remainder" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" ] }, - "description": "EIP-7702 authorizations signed by the recipient account" - } - } - } - }, - "required": [ - "intentId", - "signatures" - ] - } - } - } - }, - "responses": { - "201": { - "description": "201", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "intentId": { - "type": "string", - "pattern": "^\\d+$" + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "NOT_FOUND", + "UNAUTHORIZED", + "FORBIDDEN", + "CONFLICT", + "UNPROCESSABLE_CONTENT", + "TOO_MANY_REQUESTS", + "SETTLEMENT_QUOTE_ERROR", + "SETTLEMENT_EXECUTION_ERROR", + "EXTERNAL_SERVICE_TIMEOUT", + "RELAYER_MARKET_UNAVAILABLE", + "INTERNAL_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + } + }, + "required": [ + "code", + "message", + "traceId" + ] } - }, - "required": [ - "intentId" ], - "description": "Intent operations submitted successfully" + "description": "Invalid request parameters" } } } }, - "400": { - "description": "400", + "403": { + "description": "403", "content": { "application/json": { "schema": { @@ -2533,6 +3629,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -2570,7 +3758,7 @@ ] } ], - "description": "Invalid request parameters" + "description": "API key scope denied" } } } @@ -2670,14 +3858,106 @@ "additionalProperties": { "type": "string" }, - "description": "Token amounts that cannot be filled" - } + "description": "Token amounts that cannot be filled" + } + }, + "required": [ + "availableIntents", + "unfillable" + ], + "description": "Fillable subset and unfillable remainder" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] }, - "required": [ - "availableIntents", - "unfillable" - ], - "description": "Fillable subset and unfillable remainder" + "description": "Single-element list describing the failing scope" } }, "required": [ @@ -2839,6 +4119,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -2991,33 +4363,278 @@ "example": 1633493192 } }, - "required": [ - "status" - ] + "required": [ + "status" + ] + }, + "description": "Operations on this chain" + } + }, + "required": [ + "chain", + "items" + ] + }, + "description": "Operations grouped by chain. Each chain has one or more operations (e.g. CLAIM, FILL, BRIDGE_FILL)." + } + }, + "required": [ + "status", + "accountAddress", + "operations" + ], + "description": "Successfully retrieved intent operation status" + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "discriminator": { + "propertyName": "code" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "VALIDATION_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable issue description" + }, + "context": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "description": "Structured issue context (e.g. `{ path: \"body.accountAddress\" }`)" + } + }, + "required": [ + "message" + ] + }, + "description": "Per-field validation issues" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "INSUFFICIENT_LIQUIDITY" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "object", + "properties": { + "availableIntents": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "Intents fillable with current liquidity" + }, + "unfillable": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Token amounts that cannot be filled" + } + }, + "required": [ + "availableIntents", + "unfillable" + ], + "description": "Fillable subset and unfillable remainder" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } }, - "description": "Operations on this chain" - } + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "NOT_FOUND", + "UNAUTHORIZED", + "FORBIDDEN", + "CONFLICT", + "UNPROCESSABLE_CONTENT", + "TOO_MANY_REQUESTS", + "SETTLEMENT_QUOTE_ERROR", + "SETTLEMENT_EXECUTION_ERROR", + "EXTERNAL_SERVICE_TIMEOUT", + "RELAYER_MARKET_UNAVAILABLE", + "INTERNAL_ERROR" + ] }, - "required": [ - "chain", - "items" - ] + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + } }, - "description": "Operations grouped by chain. Each chain has one or more operations (e.g. CLAIM, FILL, BRIDGE_FILL)." + "required": [ + "code", + "message", + "traceId" + ] } - }, - "required": [ - "status", - "accountAddress", - "operations" ], - "description": "Successfully retrieved intent operation status" + "description": "Invalid intent ID" } } } }, - "400": { - "description": "400", + "403": { + "description": "403", "content": { "application/json": { "schema": { @@ -3127,6 +4744,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -3164,7 +4873,7 @@ ] } ], - "description": "Invalid intent ID" + "description": "API key scope denied" } } } @@ -3280,6 +4989,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -3417,14 +5218,106 @@ "additionalProperties": { "type": "string" }, - "description": "Token amounts that cannot be filled" - } + "description": "Token amounts that cannot be filled" + } + }, + "required": [ + "availableIntents", + "unfillable" + ], + "description": "Fillable subset and unfillable remainder" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] }, - "required": [ - "availableIntents", - "unfillable" - ], - "description": "Fillable subset and unfillable remainder" + "description": "Single-element list describing the failing scope" } }, "required": [ @@ -3686,13 +5579,258 @@ } ] } - } + } + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "discriminator": { + "propertyName": "code" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "VALIDATION_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable issue description" + }, + "context": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "description": "Structured issue context (e.g. `{ path: \"body.accountAddress\" }`)" + } + }, + "required": [ + "message" + ] + }, + "description": "Per-field validation issues" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "INSUFFICIENT_LIQUIDITY" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "object", + "properties": { + "availableIntents": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "Intents fillable with current liquidity" + }, + "unfillable": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Token amounts that cannot be filled" + } + }, + "required": [ + "availableIntents", + "unfillable" + ], + "description": "Fillable subset and unfillable remainder" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "NOT_FOUND", + "UNAUTHORIZED", + "FORBIDDEN", + "CONFLICT", + "UNPROCESSABLE_CONTENT", + "TOO_MANY_REQUESTS", + "SETTLEMENT_QUOTE_ERROR", + "SETTLEMENT_EXECUTION_ERROR", + "EXTERNAL_SERVICE_TIMEOUT", + "RELAYER_MARKET_UNAVAILABLE", + "INTERNAL_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + } + ], + "description": "Invalid request parameters" } } } }, - "400": { - "description": "400", + "403": { + "description": "403", "content": { "application/json": { "schema": { @@ -3802,6 +5940,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -3839,7 +6069,7 @@ ] } ], - "description": "Invalid request parameters" + "description": "API key scope denied" } } } @@ -3955,6 +6185,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -4086,7 +6408,7 @@ }, "/liquidity": { "get": { - "description": "Returns the maximum fillable amount for a single deposit on the given source→destination route.", + "description": "Returns the largest known fillable amount for a single deposit on the given source→destination route. Relayer-market layers return exact capacity; bridge-backed layers return a conservative probed lower bound.", "summary": "Route liquidity limit", "tags": [ "Utilities" @@ -4174,31 +6496,276 @@ "description": "Destination token decimals", "example": 6 }, - "unlimited": { - "type": "boolean", - "description": "True when an uncapped settlement layer (e.g. OFT) supports this route", - "example": false + "unlimited": { + "type": "boolean", + "description": "True when an uncapped settlement layer (e.g. OFT) supports this route", + "example": false + }, + "maxAmount": { + "type": "string", + "nullable": true, + "description": "Largest known fillable amount for this token by a single relayer instance. Exact for relayer-market settlement layers (ACROSS, ECO); bridge-backed layers (Relay, NEAR, Rhino) return a conservative probed lower bound. Null when unlimited.", + "example": "200000000000" + } + }, + "required": [ + "symbol", + "decimals", + "unlimited", + "maxAmount" + ], + "description": "Liquidity information for the requested route" + } + } + } + }, + "400": { + "description": "400", + "content": { + "application/json": { + "schema": { + "discriminator": { + "propertyName": "code" + }, + "oneOf": [ + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "VALIDATION_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable issue description" + }, + "context": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "description": "Structured issue context (e.g. `{ path: \"body.accountAddress\" }`)" + } + }, + "required": [ + "message" + ] + }, + "description": "Per-field validation issues" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "INSUFFICIENT_LIQUIDITY" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "object", + "properties": { + "availableIntents": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": "Intents fillable with current liquidity" + }, + "unfillable": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Token amounts that cannot be filled" + } + }, + "required": [ + "availableIntents", + "unfillable" + ], + "description": "Fillable subset and unfillable remainder" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] }, - "maxAmount": { - "type": "string", - "nullable": true, - "description": "Largest fillable amount for this token by a single relayer instance. Null when unlimited.", - "example": "200000000000" + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "NOT_FOUND", + "UNAUTHORIZED", + "FORBIDDEN", + "CONFLICT", + "UNPROCESSABLE_CONTENT", + "TOO_MANY_REQUESTS", + "SETTLEMENT_QUOTE_ERROR", + "SETTLEMENT_EXECUTION_ERROR", + "EXTERNAL_SERVICE_TIMEOUT", + "RELAYER_MARKET_UNAVAILABLE", + "INTERNAL_ERROR" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + } + }, + "required": [ + "code", + "message", + "traceId" + ] } - }, - "required": [ - "symbol", - "decimals", - "unlimited", - "maxAmount" ], - "description": "Liquidity information for the requested route" + "description": "Invalid request parameters" } } } }, - "400": { - "description": "400", + "403": { + "description": "403", "content": { "application/json": { "schema": { @@ -4308,6 +6875,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": { @@ -4345,7 +7004,7 @@ ] } ], - "description": "Invalid request parameters" + "description": "API key scope denied" } } } @@ -4461,6 +7120,98 @@ "traceId" ] }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "KEY_SCOPE_DENIED" + ] + }, + "message": { + "type": "string", + "description": "Human-readable error message", + "example": "Invalid input" + }, + "traceId": { + "type": "string", + "description": "Trace ID", + "example": "eb0ba4657f36364b33ec565c15f98368" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "context": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": [ + "allowMainnet", + "intents", + "deposits" + ], + "description": "Which scope rejected the request" + }, + "required": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "read", + "write" + ] + } + ], + "description": "Minimum level the endpoint demands" + }, + "actual": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "none", + "read", + "write" + ] + } + ], + "description": "Level resolved on the key" + } + }, + "required": [ + "scope", + "required", + "actual" + ] + } + }, + "required": [ + "message", + "context" + ] + }, + "description": "Single-element list describing the failing scope" + } + }, + "required": [ + "code", + "message", + "traceId" + ] + }, { "type": "object", "properties": {