diff --git a/api-reference/before-annotations-trails-api.gen.json b/api-reference/before-annotations-trails-api.gen.json new file mode 100644 index 0000000..e59bd4e --- /dev/null +++ b/api-reference/before-annotations-trails-api.gen.json @@ -0,0 +1,9291 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Trails API", + "version": "" + }, + "servers": [ + { + "url": "https://trails-api.sequence.app", + "description": "Trails API" + } + ], + "components": { + "securitySchemes": { + "ApiKeyAuth": { + "type": "apiKey", + "in": "header", + "description": "Project access key for authenticating requests, get an access key at https://dashboard.trails.build", + "name": "X-Access-Key" + } + }, + "schemas": { + "ErrorWebrpcEndpoint": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcEndpoint" + }, + "code": { + "type": "number", + "example": 0 + }, + "msg": { + "type": "string", + "example": "endpoint error" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorWebrpcRequestFailed": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcRequestFailed" + }, + "code": { + "type": "number", + "example": -1 + }, + "msg": { + "type": "string", + "example": "request failed" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorWebrpcBadRoute": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcBadRoute" + }, + "code": { + "type": "number", + "example": -2 + }, + "msg": { + "type": "string", + "example": "bad route" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 404 + } + } + }, + "ErrorWebrpcBadMethod": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcBadMethod" + }, + "code": { + "type": "number", + "example": -3 + }, + "msg": { + "type": "string", + "example": "bad method" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 405 + } + } + }, + "ErrorWebrpcBadRequest": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcBadRequest" + }, + "code": { + "type": "number", + "example": -4 + }, + "msg": { + "type": "string", + "example": "bad request" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorWebrpcBadResponse": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcBadResponse" + }, + "code": { + "type": "number", + "example": -5 + }, + "msg": { + "type": "string", + "example": "bad response" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 500 + } + } + }, + "ErrorWebrpcServerPanic": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcServerPanic" + }, + "code": { + "type": "number", + "example": -6 + }, + "msg": { + "type": "string", + "example": "server panic" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 500 + } + } + }, + "ErrorWebrpcInternalError": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcInternalError" + }, + "code": { + "type": "number", + "example": -7 + }, + "msg": { + "type": "string", + "example": "internal error" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 500 + } + } + }, + "ErrorWebrpcClientAborted": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcClientAborted" + }, + "code": { + "type": "number", + "example": -8 + }, + "msg": { + "type": "string", + "example": "request aborted by client" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorWebrpcStreamLost": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcStreamLost" + }, + "code": { + "type": "number", + "example": -9 + }, + "msg": { + "type": "string", + "example": "stream lost" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorWebrpcStreamFinished": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "WebrpcStreamFinished" + }, + "code": { + "type": "number", + "example": -10 + }, + "msg": { + "type": "string", + "example": "stream finished" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 200 + } + } + }, + "ErrorUnauthorized": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "Unauthorized" + }, + "code": { + "type": "number", + "example": 1000 + }, + "msg": { + "type": "string", + "example": "Unauthorized access" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 401 + } + } + }, + "ErrorPermissionDenied": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "PermissionDenied" + }, + "code": { + "type": "number", + "example": 1001 + }, + "msg": { + "type": "string", + "example": "Permission denied" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 403 + } + } + }, + "ErrorSessionExpired": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "SessionExpired" + }, + "code": { + "type": "number", + "example": 1002 + }, + "msg": { + "type": "string", + "example": "Session expired" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 403 + } + } + }, + "ErrorMethodNotFound": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "MethodNotFound" + }, + "code": { + "type": "number", + "example": 1003 + }, + "msg": { + "type": "string", + "example": "Method not found" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 404 + } + } + }, + "ErrorRequestConflict": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "RequestConflict" + }, + "code": { + "type": "number", + "example": 1004 + }, + "msg": { + "type": "string", + "example": "Conflict with target resource" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 409 + } + } + }, + "ErrorAborted": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "Aborted" + }, + "code": { + "type": "number", + "example": 1005 + }, + "msg": { + "type": "string", + "example": "Request aborted" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorGeoblocked": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "Geoblocked" + }, + "code": { + "type": "number", + "example": 1006 + }, + "msg": { + "type": "string", + "example": "Geoblocked region" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 451 + } + } + }, + "ErrorRateLimited": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "RateLimited" + }, + "code": { + "type": "number", + "example": 1007 + }, + "msg": { + "type": "string", + "example": "Rate-limited. Please slow down." + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 429 + } + } + }, + "ErrorProjectNotFound": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "ProjectNotFound" + }, + "code": { + "type": "number", + "example": 1008 + }, + "msg": { + "type": "string", + "example": "Project not found" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 401 + } + } + }, + "ErrorAccessKeyNotFound": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "AccessKeyNotFound" + }, + "code": { + "type": "number", + "example": 1101 + }, + "msg": { + "type": "string", + "example": "Access key not found" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 401 + } + } + }, + "ErrorAccessKeyMismatch": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "AccessKeyMismatch" + }, + "code": { + "type": "number", + "example": 1102 + }, + "msg": { + "type": "string", + "example": "Access key mismatch" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 409 + } + } + }, + "ErrorInvalidOrigin": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "InvalidOrigin" + }, + "code": { + "type": "number", + "example": 1103 + }, + "msg": { + "type": "string", + "example": "Invalid origin for Access Key" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 403 + } + } + }, + "ErrorInvalidService": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "InvalidService" + }, + "code": { + "type": "number", + "example": 1104 + }, + "msg": { + "type": "string", + "example": "Service not enabled for Access key" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 403 + } + } + }, + "ErrorUnauthorizedUser": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "UnauthorizedUser" + }, + "code": { + "type": "number", + "example": 1105 + }, + "msg": { + "type": "string", + "example": "Unauthorized user" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 403 + } + } + }, + "ErrorQuotaExceeded": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "QuotaExceeded" + }, + "code": { + "type": "number", + "example": 1200 + }, + "msg": { + "type": "string", + "example": "Quota request exceeded" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 429 + } + } + }, + "ErrorQuotaRateLimit": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "QuotaRateLimit" + }, + "code": { + "type": "number", + "example": 1201 + }, + "msg": { + "type": "string", + "example": "Quota rate limit exceeded" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 429 + } + } + }, + "ErrorNoDefaultKey": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "NoDefaultKey" + }, + "code": { + "type": "number", + "example": 1300 + }, + "msg": { + "type": "string", + "example": "No default access key found" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 403 + } + } + }, + "ErrorMaxAccessKeys": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "MaxAccessKeys" + }, + "code": { + "type": "number", + "example": 1301 + }, + "msg": { + "type": "string", + "example": "Access keys limit reached" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 403 + } + } + }, + "ErrorAtLeastOneKey": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "AtLeastOneKey" + }, + "code": { + "type": "number", + "example": 1302 + }, + "msg": { + "type": "string", + "example": "You need at least one Access Key" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 403 + } + } + }, + "ErrorTimeout": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "Timeout" + }, + "code": { + "type": "number", + "example": 1900 + }, + "msg": { + "type": "string", + "example": "Request timed out" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 408 + } + } + }, + "ErrorInvalidArgument": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "InvalidArgument" + }, + "code": { + "type": "number", + "example": 2000 + }, + "msg": { + "type": "string", + "example": "Invalid argument" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorUnexpected": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "Unexpected" + }, + "code": { + "type": "number", + "example": 2001 + }, + "msg": { + "type": "string", + "example": "Unexpected server error" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 500 + } + } + }, + "ErrorUnavailable": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "Unavailable" + }, + "code": { + "type": "number", + "example": 2002 + }, + "msg": { + "type": "string", + "example": "Unavailable resource" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorQueryFailed": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "QueryFailed" + }, + "code": { + "type": "number", + "example": 2003 + }, + "msg": { + "type": "string", + "example": "Query failed" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorIntentStatus": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "IntentStatus" + }, + "code": { + "type": "number", + "example": 2004 + }, + "msg": { + "type": "string", + "example": "Invalid intent status" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 422 + } + } + }, + "ErrorNotFound": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "NotFound" + }, + "code": { + "type": "number", + "example": 8000 + }, + "msg": { + "type": "string", + "example": "Resource not found" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorUnsupportedNetwork": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "UnsupportedNetwork" + }, + "code": { + "type": "number", + "example": 8008 + }, + "msg": { + "type": "string", + "example": "Unsupported network" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 422 + } + } + }, + "ErrorClientOutdated": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "ClientOutdated" + }, + "code": { + "type": "number", + "example": 8009 + }, + "msg": { + "type": "string", + "example": "Client is outdated" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 422 + } + } + }, + "ErrorIntentsSkipped": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "IntentsSkipped" + }, + "code": { + "type": "number", + "example": 7000 + }, + "msg": { + "type": "string", + "example": "Intents skipped as client is attempting a transaction that does not require intents" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorQuoteExpired": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "QuoteExpired" + }, + "code": { + "type": "number", + "example": 7001 + }, + "msg": { + "type": "string", + "example": "Intent quote has expired. Please try again." + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorHighPriceImpact": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "HighPriceImpact" + }, + "code": { + "type": "number", + "example": 7002 + }, + "msg": { + "type": "string", + "example": "Quote unavailable due to high price impact" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 422 + } + } + }, + "ErrorIntentsDisabled": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "IntentsDisabled" + }, + "code": { + "type": "number", + "example": 9000 + }, + "msg": { + "type": "string", + "example": "Intents service is currently unavailable" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 400 + } + } + }, + "ErrorChainNodeHealth": { + "type": "object", + "required": [ + "error", + "code", + "msg", + "status" + ], + "properties": { + "error": { + "type": "string", + "example": "ChainNodeHealth" + }, + "code": { + "type": "number", + "example": 9001 + }, + "msg": { + "type": "string", + "example": "Intent quote is unavailable due to interrupted chain node access" + }, + "cause": { + "type": "string" + }, + "status": { + "type": "number", + "example": 503 + } + } + }, + "TradeType": { + "type": "string", + "description": "Represented as string on the server side", + "enum": [ + "EXACT_INPUT", + "EXACT_OUTPUT" + ] + }, + "RouteProvider": { + "type": "string", + "description": "Represented as string on the server side", + "enum": [ + "AUTO", + "CCTP", + "LIFI", + "LZ_OFT", + "RELAY", + "SUSHI", + "WETH", + "ZEROX" + ] + }, + "RoutePreference": { + "type": "string", + "description": "Represented as string on the server side", + "enum": [ + "RECOMMENDED", + "FASTEST", + "CHEAPEST", + "TRUSTLESS" + ] + }, + "FundMethod": { + "type": "string", + "description": "Represented as string on the server side", + "enum": [ + "WALLET", + "DIRECT_TRANSFER", + "ONRAMP_MESH", + "ONRAMP_MELD" + ] + }, + "IntentProtocolVersion": { + "type": "string", + "description": "Represented as string on the server side", + "enum": [ + "v1", + "v1_5" + ] + }, + "IntentStatus": { + "type": "string", + "description": "Represented as uint8 on the server side", + "enum": [ + "QUOTED", + "COMMITTED", + "EXECUTING", + "FAILED", + "SUCCEEDED", + "ABORTED", + "REFUNDED", + "INVALID" + ] + }, + "TransactionType": { + "type": "string", + "description": "Represented as uint8 on the server side", + "enum": [ + "UNKNOWN", + "DEPOSIT", + "ORIGIN", + "DESTINATION", + "ROUTE", + "REFUND" + ] + }, + "TransactionContext": { + "type": "string", + "description": "Represented as uint8 on the server side", + "enum": [ + "NONE", + "CCTPV2_MESSAGE", + "LZ_COMPOSE", + "LZ_RECEIVE" + ] + }, + "TransactionStatus": { + "type": "string", + "description": "Represented as uint8 on the server side", + "enum": [ + "UNKNOWN", + "ON_HOLD", + "PENDING", + "RELAYING", + "SENT", + "ERRORED", + "MINING", + "SUCCEEDED", + "FAILED", + "ABORTED", + "REVERTED" + ] + }, + "ChainGasUsageStatus": { + "type": "string", + "description": "Represented as string on the server side", + "enum": [ + "NORMAL", + "BUSY", + "VERY_BUSY" + ] + }, + "SortOrder": { + "type": "string", + "description": "Represented as uint32 on the server side", + "enum": [ + "DESC", + "ASC" + ] + }, + "QuoteIntentRequest": { + "type": "object", + "required": [ + "ownerAddress", + "originChainId", + "originTokenAddress", + "destinationChainId", + "destinationTokenAddress" + ], + "properties": { + "ownerAddress": { + "type": "string" + }, + "originChainId": { + "type": "number" + }, + "originTokenAddress": { + "type": "string" + }, + "destinationChainId": { + "type": "number" + }, + "destinationTokenAddress": { + "type": "string" + }, + "destinationToAddress": { + "type": "string" + }, + "destinationApproveAddress": { + "type": "string" + }, + "destinationCallData": { + "type": "string" + }, + "destinationCallValue": { + "type": "number" + }, + "originTokenAmount": { + "type": "number" + }, + "destinationTokenAmount": { + "type": "number" + }, + "tradeType": { + "$ref": "#/components/schemas/TradeType" + }, + "fundMethod": { + "$ref": "#/components/schemas/FundMethod" + }, + "onlyNativeGasFee": { + "type": "boolean" + }, + "options": { + "$ref": "#/components/schemas/QuoteIntentRequestOptions" + } + } + }, + "QuoteIntentRequestOptions": { + "type": "object", + "properties": { + "intentProtocol": { + "$ref": "#/components/schemas/IntentProtocolVersion" + }, + "swapProvider": { + "$ref": "#/components/schemas/RouteProvider" + }, + "bridgeProvider": { + "$ref": "#/components/schemas/RouteProvider" + }, + "swapProviderFallback": { + "type": "boolean" + }, + "bridgeProviderFallback": { + "type": "boolean" + }, + "preference": { + "$ref": "#/components/schemas/RoutePreference" + }, + "slippageTolerance": { + "type": "number" + }, + "trailsAddressOverrides": { + "$ref": "#/components/schemas/TrailsAddressOverrides" + } + } + }, + "PassthroughInfo": { + "type": "object", + "required": [ + "eligible" + ], + "properties": { + "eligible": { + "type": "boolean" + }, + "passthroughTransaction": { + "$ref": "#/components/schemas/PassThroughTransaction" + }, + "transactionStates": { + "type": "array", + "description": "[]TransactionStateInfo", + "items": { + "$ref": "#/components/schemas/TransactionStateInfo" + } + } + } + }, + "Intent": { + "type": "object", + "required": [ + "id", + "projectId", + "intentId", + "status", + "quoteRequest", + "ownerAddress", + "originChainId", + "destinationChainId", + "originIntentAddress", + "salt", + "depositTransaction", + "originCalls", + "originPrecondition", + "originMetaTxn", + "quote", + "fees", + "trailsVersion", + "trailsContracts", + "expiresAt" + ], + "properties": { + "id": { + "type": "number" + }, + "projectId": { + "type": "number" + }, + "intentId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/IntentStatus" + }, + "quoteRequest": { + "$ref": "#/components/schemas/QuoteIntentRequest" + }, + "ownerAddress": { + "type": "string" + }, + "originChainId": { + "type": "number" + }, + "destinationChainId": { + "type": "number" + }, + "originIntentAddress": { + "type": "string" + }, + "destinationIntentAddress": { + "type": "string" + }, + "salt": { + "type": "number" + }, + "depositTransaction": { + "$ref": "#/components/schemas/DepositTransaction" + }, + "passthrough": { + "type": "boolean" + }, + "originCalls": { + "$ref": "#/components/schemas/IntentCalls" + }, + "destinationCalls": { + "$ref": "#/components/schemas/IntentCalls" + }, + "originPrecondition": { + "$ref": "#/components/schemas/TransactionPrecondition" + }, + "destinationPrecondition": { + "$ref": "#/components/schemas/TransactionPrecondition" + }, + "originMetaTxn": { + "$ref": "#/components/schemas/MetaTxn" + }, + "destinationMetaTxn": { + "$ref": "#/components/schemas/MetaTxn" + }, + "quote": { + "$ref": "#/components/schemas/IntentProviderQuote" + }, + "fees": { + "$ref": "#/components/schemas/IntentFees" + }, + "trailsVersion": { + "type": "string" + }, + "intentProtocol": { + "$ref": "#/components/schemas/IntentProtocolVersion" + }, + "trailsContracts": { + "$ref": "#/components/schemas/TrailsContracts" + }, + "expiresAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "createdAt": { + "type": "string" + } + } + }, + "DepositTransaction": { + "type": "object", + "required": [ + "toAddress", + "tokenAddress", + "amount", + "chainId", + "to", + "data", + "value" + ], + "properties": { + "toAddress": { + "type": "string" + }, + "tokenAddress": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "amount": { + "type": "number" + }, + "chainId": { + "type": "number" + }, + "to": { + "type": "string" + }, + "data": { + "type": "string" + }, + "value": { + "type": "number" + } + } + }, + "PassThroughTransaction": { + "type": "object", + "required": [ + "toAddress", + "tokenAddress", + "amount", + "chainId", + "to", + "data", + "value" + ], + "properties": { + "toAddress": { + "type": "string" + }, + "tokenAddress": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "amount": { + "type": "number" + }, + "chainId": { + "type": "number" + }, + "to": { + "type": "string" + }, + "data": { + "type": "string" + }, + "value": { + "type": "number" + } + } + }, + "TransactionStateInfo": { + "type": "object", + "required": [ + "id", + "label", + "chainId" + ], + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "chainId": { + "type": "number" + } + } + }, + "IntentCalls": { + "type": "object", + "required": [ + "chainId", + "calls" + ], + "properties": { + "chainId": { + "type": "number" + }, + "space": { + "type": "number" + }, + "nonce": { + "type": "number" + }, + "calls": { + "type": "array", + "description": "[]TransactionCall", + "items": { + "$ref": "#/components/schemas/TransactionCall" + } + } + } + }, + "TransactionCall": { + "type": "object", + "required": [ + "to" + ], + "properties": { + "to": { + "type": "string" + }, + "value": { + "type": "number" + }, + "data": { + "type": "string" + }, + "gasLimit": { + "type": "number" + }, + "delegateCall": { + "type": "boolean" + }, + "onlyFallback": { + "type": "boolean" + }, + "behaviorOnError": { + "type": "number" + } + } + }, + "TransactionPrecondition": { + "type": "object", + "required": [ + "type", + "chainId", + "ownerAddress", + "tokenAddress", + "minAmount" + ], + "properties": { + "type": { + "type": "string" + }, + "chainId": { + "type": "number" + }, + "ownerAddress": { + "type": "string" + }, + "tokenAddress": { + "type": "string" + }, + "minAmount": { + "type": "number" + } + } + }, + "MetaTxn": { + "type": "object", + "required": [ + "id", + "chainId", + "walletAddress", + "contract", + "input" + ], + "properties": { + "id": { + "type": "string" + }, + "chainId": { + "type": "number" + }, + "walletAddress": { + "type": "string" + }, + "contract": { + "type": "string" + }, + "input": { + "type": "string" + }, + "bridgeGas": { + "type": "number" + } + } + }, + "IntentHistory": { + "type": "object", + "required": [ + "intentId", + "status", + "expiresAt", + "receipt" + ], + "properties": { + "intentId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/IntentStatus" + }, + "expiresAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "receipt": { + "$ref": "#/components/schemas/IntentReceipt" + }, + "hasBalance": { + "type": "boolean" + }, + "balances": { + "type": "array", + "description": "[]IntentAddressBalance", + "items": { + "$ref": "#/components/schemas/IntentAddressBalance" + } + } + } + }, + "IntentAddressBalance": { + "type": "object", + "required": [ + "intentAddress", + "chainId", + "tokens" + ], + "properties": { + "intentAddress": { + "type": "string" + }, + "chainId": { + "type": "number" + }, + "tokens": { + "type": "array", + "description": "[]IntentTokenBalance", + "items": { + "$ref": "#/components/schemas/IntentTokenBalance" + } + } + } + }, + "IntentTokenBalance": { + "type": "object", + "required": [ + "contractAddress", + "balance", + "balanceUsd", + "priceUsd", + "decimals", + "chainId", + "symbol" + ], + "properties": { + "contractAddress": { + "type": "string" + }, + "balance": { + "type": "string" + }, + "balanceUsd": { + "type": "string" + }, + "priceUsd": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "chainId": { + "type": "number" + }, + "symbol": { + "type": "string" + } + } + }, + "IntentReceiptSummary": { + "type": "object", + "required": [ + "intentId", + "status", + "ownerAddress", + "originChainId", + "destinationChainId", + "tradeType", + "routeProviders", + "originIntentAddress", + "originTokenAddress", + "originTokenAmount", + "originTokenMetadata", + "destinationIntentAddress", + "destinationTokenMetadata", + "destinationHasCallData", + "destinationHasCallValue", + "createdAt", + "expiresAt" + ], + "properties": { + "intentId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/IntentStatus" + }, + "ownerAddress": { + "type": "string" + }, + "originChainId": { + "type": "number" + }, + "destinationChainId": { + "type": "number" + }, + "tradeType": { + "$ref": "#/components/schemas/TradeType" + }, + "routeProviders": { + "type": "array", + "description": "[]RouteProvider", + "items": { + "$ref": "#/components/schemas/RouteProvider" + } + }, + "originIntentAddress": { + "type": "string" + }, + "originTokenAddress": { + "type": "string" + }, + "originTokenAmount": { + "type": "number" + }, + "originTokenMetadata": { + "$ref": "#/components/schemas/TokenMetadata" + }, + "destinationIntentAddress": { + "type": "string" + }, + "destinationTokenAddress": { + "type": "string" + }, + "destinationTokenAmount": { + "type": "number" + }, + "destinationToAddress": { + "type": "string" + }, + "destinationTokenMetadata": { + "$ref": "#/components/schemas/TokenMetadata" + }, + "destinationHasCallData": { + "type": "boolean" + }, + "destinationHasCallValue": { + "type": "boolean" + }, + "memo": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "expiresAt": { + "type": "string" + }, + "startedAt": { + "type": "string" + }, + "finishedAt": { + "type": "string" + } + } + }, + "IntentReceipt": { + "type": "object", + "required": [ + "id", + "projectId", + "intentId", + "status", + "ownerAddress", + "originChainId", + "destinationChainId", + "depositTransactionId", + "depositTransaction", + "originTransactionId", + "originTransaction", + "summary" + ], + "properties": { + "id": { + "type": "number" + }, + "projectId": { + "type": "number" + }, + "intentId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/IntentStatus" + }, + "ownerAddress": { + "type": "string" + }, + "originChainId": { + "type": "number" + }, + "destinationChainId": { + "type": "number" + }, + "depositTransactionId": { + "type": "number" + }, + "depositTransaction": { + "$ref": "#/components/schemas/IntentTransaction" + }, + "originTransactionId": { + "type": "number" + }, + "originTransaction": { + "$ref": "#/components/schemas/IntentTransaction" + }, + "destinationTransactionId": { + "type": "number" + }, + "destinationTransaction": { + "$ref": "#/components/schemas/IntentTransaction" + }, + "refundTransactionId": { + "type": "number" + }, + "refundTransaction": { + "$ref": "#/components/schemas/IntentTransaction" + }, + "summary": { + "$ref": "#/components/schemas/IntentReceiptSummary" + }, + "updatedAt": { + "type": "string" + }, + "createdAt": { + "type": "string" + } + } + }, + "IntentTransaction": { + "type": "object", + "required": [ + "id", + "intentId", + "status", + "chainId", + "type", + "context", + "fromAddress", + "toAddress", + "tokenAddress", + "tokenAmount" + ], + "properties": { + "id": { + "type": "number" + }, + "intentId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "statusReason": { + "type": "string" + }, + "chainId": { + "type": "number" + }, + "type": { + "$ref": "#/components/schemas/TransactionType" + }, + "context": { + "$ref": "#/components/schemas/TransactionContext" + }, + "fromAddress": { + "type": "string" + }, + "toAddress": { + "type": "string" + }, + "tokenAddress": { + "type": "string" + }, + "tokenAmount": { + "type": "number" + }, + "bridgeGas": { + "type": "number" + }, + "calldata": { + "type": "string" + }, + "metaTxnId": { + "type": "string" + }, + "metaTxnFeeQuote": { + "type": "string" + }, + "precondition": { + "$ref": "#/components/schemas/TransactionPrecondition" + }, + "depositIntentEntry": { + "$ref": "#/components/schemas/DepositIntentEntry" + }, + "txnHash": { + "type": "string" + }, + "txnMinedAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "createdAt": { + "type": "string" + } + } + }, + "PriceImpact": { + "type": "object", + "required": [ + "priceImpact", + "priceImpactUsd" + ], + "properties": { + "priceImpact": { + "type": "number" + }, + "priceImpactUsd": { + "type": "number" + } + } + }, + "PriceImpactDetails": { + "type": "object", + "required": [ + "executionPriceImpact", + "marketPriceImpact", + "providerFeesPriceImpact", + "trailsFeesPriceImpact", + "netPriceImpact" + ], + "properties": { + "executionPriceImpact": { + "$ref": "#/components/schemas/PriceImpact" + }, + "marketPriceImpact": { + "$ref": "#/components/schemas/PriceImpact" + }, + "providerFeesPriceImpact": { + "$ref": "#/components/schemas/PriceImpact" + }, + "trailsFeesPriceImpact": { + "$ref": "#/components/schemas/PriceImpact" + }, + "netPriceImpact": { + "$ref": "#/components/schemas/PriceImpact" + } + } + }, + "IntentProviderQuote": { + "type": "object", + "required": [ + "routeProviders", + "routeProvidersRequestIds", + "routeProvidersFeeUsd", + "fromAmount", + "fromAmountMin", + "fromAmountUsd", + "fromAmountMinUsd", + "toAmount", + "toAmountMin", + "toAmountUsd", + "toAmountMinUsd", + "maxSlippage", + "priceImpact", + "priceImpactUsd", + "priceImpactDetails" + ], + "properties": { + "routeProviders": { + "type": "array", + "description": "[]RouteProvider", + "items": { + "$ref": "#/components/schemas/RouteProvider" + } + }, + "routeProvidersRequestIds": { + "type": "array", + "description": "[]string", + "items": { + "type": "string" + } + }, + "routeProvidersFeeUsd": { + "type": "array", + "description": "[]float64", + "items": { + "type": "number" + } + }, + "estimatedDuration": { + "type": "number" + }, + "fromAmount": { + "type": "number" + }, + "fromAmountMin": { + "type": "number" + }, + "fromAmountUsd": { + "type": "number" + }, + "fromAmountMinUsd": { + "type": "number" + }, + "toAmount": { + "type": "number" + }, + "toAmountMin": { + "type": "number" + }, + "toAmountUsd": { + "type": "number" + }, + "toAmountMinUsd": { + "type": "number" + }, + "maxSlippage": { + "type": "number" + }, + "priceImpact": { + "type": "number" + }, + "priceImpactUsd": { + "type": "number" + }, + "priceImpactDetails": { + "$ref": "#/components/schemas/PriceImpactDetails" + } + } + }, + "IntentFees": { + "type": "object", + "required": [ + "originGas", + "provider", + "feeTokenAddress", + "feeTokenAmount", + "feeTokenUsd", + "feeTokenTotal", + "gasFeeTotal", + "gasFeeUsd", + "trailsFeeTotal", + "trailsFeeUsd", + "collectorFeeTotal", + "collectorFeeUsd", + "providerFeeTotal", + "providerFeeUsd", + "totalFeeAmount", + "totalFeeUsd" + ], + "properties": { + "originGas": { + "$ref": "#/components/schemas/IntentTransactionGasFee" + }, + "destinationGas": { + "$ref": "#/components/schemas/IntentTransactionGasFee" + }, + "provider": { + "$ref": "#/components/schemas/IntentProviderFees" + }, + "feeTokenAddress": { + "type": "string" + }, + "feeTokenAmount": { + "type": "number" + }, + "feeTokenUsd": { + "type": "number" + }, + "feeTokenTotal": { + "type": "number" + }, + "gasFeeTotal": { + "type": "number" + }, + "gasFeeUsd": { + "type": "number" + }, + "trailsFeeTotal": { + "type": "number" + }, + "trailsFeeUsd": { + "type": "number" + }, + "collectorFeeTotal": { + "type": "number" + }, + "collectorFeeUsd": { + "type": "number" + }, + "providerFeeTotal": { + "type": "number" + }, + "providerFeeUsd": { + "type": "number" + }, + "totalFeeAmount": { + "type": "number" + }, + "totalFeeUsd": { + "type": "number" + } + } + }, + "IntentProviderFees": { + "type": "object", + "required": [ + "quoteProvider", + "quoteProviderFee", + "quoteProviderFeeUsd", + "trailsFee", + "trailsFeeUsd", + "quoteProviderWithTrailsFee", + "providerWithTrailsFeeUsd", + "totalFeeAmount", + "totalFeeUsd" + ], + "properties": { + "quoteProvider": { + "type": "string" + }, + "quoteProviderFee": { + "type": "number" + }, + "quoteProviderFeeUsd": { + "type": "number" + }, + "trailsFee": { + "type": "number" + }, + "trailsFeeUsd": { + "type": "number" + }, + "quoteProviderWithTrailsFee": { + "type": "number" + }, + "providerWithTrailsFeeUsd": { + "type": "number" + }, + "totalFeeAmount": { + "type": "number" + }, + "totalFeeUsd": { + "type": "number" + } + } + }, + "IntentSummary": { + "type": "object", + "required": [ + "id", + "intentId", + "status", + "ownerAddress", + "originChainId", + "destinationChainId", + "originIntentAddress", + "destinationIntentAddress", + "depositTransactionStatus", + "originTransactionStatus", + "destinationTransactionStatus", + "originTokenAddress", + "originTokenAmount", + "originTokenMetadata", + "destinationTokenAddress", + "destinationTokenAmount", + "destinationTokenMetadata", + "destinationToAddress", + "expiresAt", + "createdAt" + ], + "properties": { + "id": { + "type": "number" + }, + "intentId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/IntentStatus" + }, + "ownerAddress": { + "type": "string" + }, + "originChainId": { + "type": "number" + }, + "destinationChainId": { + "type": "number" + }, + "originIntentAddress": { + "type": "string" + }, + "destinationIntentAddress": { + "type": "string" + }, + "depositTransactionHash": { + "type": "string" + }, + "depositTransactionStatus": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "originTransactionHash": { + "type": "string" + }, + "originTransactionStatus": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "destinationTransactionHash": { + "type": "string" + }, + "destinationTransactionStatus": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "originTokenAddress": { + "type": "string" + }, + "originTokenAmount": { + "type": "number" + }, + "originTokenMetadata": { + "$ref": "#/components/schemas/TokenMetadata" + }, + "destinationTokenAddress": { + "type": "string" + }, + "destinationTokenAmount": { + "type": "number" + }, + "destinationTokenMetadata": { + "$ref": "#/components/schemas/TokenMetadata" + }, + "destinationToAddress": { + "type": "string" + }, + "expiresAt": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "createdAt": { + "type": "string" + } + } + }, + "IntentTransactionGasFee": { + "type": "object", + "required": [ + "chainId", + "totalGasLimit", + "gasPrice", + "nativeTokenSymbol", + "chainGasUsageStatus", + "totalFeeAmount", + "totalFeeUsd", + "metaTxnFeeDetails", + "metaTxnGasQuote" + ], + "properties": { + "chainId": { + "type": "number" + }, + "totalGasLimit": { + "type": "number" + }, + "gasPrice": { + "type": "number" + }, + "nativeTokenSymbol": { + "type": "string" + }, + "nativeTokenPriceUsd": { + "type": "number" + }, + "chainGasUsageStatus": { + "$ref": "#/components/schemas/ChainGasUsageStatus" + }, + "totalFeeAmount": { + "type": "number" + }, + "totalFeeUsd": { + "type": "string" + }, + "metaTxnFeeDetails": { + "$ref": "#/components/schemas/MetaTxnFeeDetails" + }, + "metaTxnGasQuote": { + "type": "string" + } + } + }, + "MetaTxnFeeDetails": { + "type": "object", + "required": [ + "metaTxnId", + "estimatedGasLimit", + "feeNative" + ], + "properties": { + "metaTxnId": { + "type": "string" + }, + "estimatedGasLimit": { + "type": "number" + }, + "feeNative": { + "type": "number" + } + } + }, + "TokenMetadata": { + "type": "object", + "required": [ + "chainId", + "tokenAddress", + "name", + "symbol" + ], + "properties": { + "chainId": { + "type": "number" + }, + "tokenAddress": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + } + } + }, + "Token": { + "type": "object", + "required": [ + "chainId", + "tokenAddress" + ], + "properties": { + "chainId": { + "type": "number" + }, + "tokenAddress": { + "type": "string" + }, + "tokenSymbol": { + "type": "string" + } + } + }, + "TokenPrice": { + "type": "object", + "required": [ + "token", + "updatedAt" + ], + "properties": { + "token": { + "$ref": "#/components/schemas/Token" + }, + "priceUsd": { + "type": "number" + }, + "updatedAt": { + "type": "string" + } + } + }, + "ExchangeRate": { + "type": "object", + "required": [ + "name", + "symbol", + "value", + "vsCurrency", + "currencyType" + ], + "properties": { + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "value": { + "type": "number" + }, + "vsCurrency": { + "type": "string" + }, + "currencyType": { + "type": "string" + } + } + }, + "GasFeeOptions": { + "type": "object", + "required": [ + "gasEstimate", + "feeOptions", + "expiresAt", + "feeCollectorAddress" + ], + "properties": { + "gasEstimate": { + "$ref": "#/components/schemas/GasEstimate" + }, + "feeOptions": { + "type": "array", + "description": "[]FeeOption", + "items": { + "$ref": "#/components/schemas/FeeOption" + } + }, + "expiresAt": { + "type": "string" + }, + "feeCollectorAddress": { + "type": "string" + } + } + }, + "GasEstimate": { + "type": "object", + "required": [ + "totalGas", + "gasPrice", + "nativeCost", + "nativeCostUsd" + ], + "properties": { + "totalGas": { + "type": "number" + }, + "gasPrice": { + "type": "string" + }, + "nativeCost": { + "type": "string" + }, + "nativeCostUsd": { + "type": "number" + } + } + }, + "FeeOption": { + "type": "object", + "required": [ + "tokenAddress", + "tokenSymbol", + "tokenDecimals", + "amount", + "amountUsd", + "feeCollectorAddress", + "is2612" + ], + "properties": { + "tokenAddress": { + "type": "string" + }, + "tokenSymbol": { + "type": "string" + }, + "tokenDecimals": { + "type": "number" + }, + "amount": { + "type": "number" + }, + "amountUsd": { + "type": "number" + }, + "feeCollectorAddress": { + "type": "string" + }, + "is2612": { + "type": "boolean" + }, + "isPassthroughEligible": { + "type": "boolean" + } + } + }, + "DepositSignature": { + "type": "object", + "required": [ + "intentSignature", + "selectedGasFeeOption", + "userNonce", + "deadline" + ], + "properties": { + "intentSignature": { + "type": "string" + }, + "permitSignature": { + "type": "string" + }, + "permitDeadline": { + "type": "number" + }, + "permitAmount": { + "type": "number" + }, + "selectedGasFeeOption": { + "$ref": "#/components/schemas/FeeOption" + }, + "userNonce": { + "type": "number" + }, + "deadline": { + "type": "number" + } + } + }, + "DepositIntentEntry": { + "type": "object", + "required": [ + "intentSignature", + "feeAmount", + "feeToken", + "feeCollector", + "userNonce", + "deadline" + ], + "properties": { + "intentSignature": { + "type": "string" + }, + "permitSignature": { + "type": "string" + }, + "permitDeadline": { + "type": "number" + }, + "permitAmount": { + "type": "number" + }, + "feeAmount": { + "type": "string" + }, + "feeToken": { + "type": "string" + }, + "feeCollector": { + "type": "string" + }, + "userNonce": { + "type": "number" + }, + "deadline": { + "type": "number" + } + } + }, + "TrailsAddressOverrides": { + "type": "object", + "properties": { + "sequenceWalletFactoryAddress": { + "type": "string" + }, + "sequenceWalletMainModuleAddress": { + "type": "string" + }, + "sequenceWalletMainModuleUpgradableAddress": { + "type": "string" + }, + "sequenceWalletGuestModuleAddress": { + "type": "string" + }, + "sequenceWalletUtilsAddress": { + "type": "string" + } + } + }, + "TrailsContracts": { + "type": "object", + "required": [ + "trailsIntentEntrypointAddress", + "trailsRouterAddress", + "trailsRouterShimAddress" + ], + "properties": { + "trailsIntentEntrypointAddress": { + "type": "string" + }, + "trailsRouterAddress": { + "type": "string" + }, + "trailsRouterShimAddress": { + "type": "string" + } + } + }, + "NativeCurrency": { + "type": "object", + "required": [ + "name", + "symbol", + "decimals" + ], + "properties": { + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + } + } + }, + "BlockExplorer": { + "type": "object", + "required": [ + "name", + "url" + ], + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "ChainInfo": { + "type": "object", + "required": [ + "id", + "name", + "nativeCurrency" + ], + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "nativeCurrency": { + "$ref": "#/components/schemas/NativeCurrency" + }, + "logoUri": { + "type": "string" + }, + "blockExplorer": { + "$ref": "#/components/schemas/BlockExplorer" + } + } + }, + "TokenInfo": { + "type": "object", + "required": [ + "chainId", + "address", + "name", + "symbol", + "decimals", + "featured", + "featureIndex" + ], + "properties": { + "chainId": { + "type": "number" + }, + "address": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "supportsBridging": { + "type": "boolean" + }, + "logoUri": { + "type": "string" + }, + "featured": { + "type": "boolean" + }, + "featureIndex": { + "type": "number" + } + } + }, + "EarnPool": { + "type": "object", + "required": [ + "id", + "name", + "protocol", + "chainId", + "apy", + "tvl", + "token", + "depositAddress", + "isActive" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "chainId": { + "type": "number" + }, + "apy": { + "type": "number" + }, + "tvl": { + "type": "number" + }, + "token": { + "$ref": "#/components/schemas/PoolTokenInfo" + }, + "depositAddress": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "poolUrl": { + "type": "string" + }, + "protocolUrl": { + "type": "string" + }, + "wrappedTokenGatewayAddress": { + "type": "string" + } + } + }, + "PoolTokenInfo": { + "type": "object", + "required": [ + "symbol", + "name", + "address", + "decimals" + ], + "properties": { + "symbol": { + "type": "string" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUrl": { + "type": "string" + } + } + }, + "CountryRegion": { + "type": "object", + "required": [ + "regionCode", + "name" + ], + "properties": { + "regionCode": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "Country": { + "type": "object", + "required": [ + "countryCode", + "name", + "flag", + "flagImageUrl" + ], + "properties": { + "countryCode": { + "type": "string" + }, + "name": { + "type": "string" + }, + "flag": { + "type": "string" + }, + "flagImageUrl": { + "type": "string" + }, + "regions": { + "type": "array", + "description": "[]CountryRegion", + "items": { + "$ref": "#/components/schemas/CountryRegion" + } + } + } + }, + "FiatCurrency": { + "type": "object", + "required": [ + "code", + "symbol", + "name", + "flag", + "decimals" + ], + "properties": { + "code": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "name": { + "type": "string" + }, + "flag": { + "type": "string" + }, + "decimals": { + "type": "number" + } + } + }, + "Page": { + "type": "object", + "properties": { + "column": { + "type": "string" + }, + "before": { + "type": "number" + }, + "after": { + "type": "number" + }, + "sort": { + "type": "array", + "description": "[]SortBy", + "items": { + "$ref": "#/components/schemas/SortBy" + } + }, + "pageSize": { + "type": "number" + }, + "more": { + "type": "boolean" + } + } + }, + "SortBy": { + "type": "object", + "required": [ + "column", + "order" + ], + "properties": { + "column": { + "type": "string" + }, + "order": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + "RuntimeStatus": { + "type": "object", + "required": [ + "healthOK", + "version", + "branch", + "commitHash", + "startTime", + "uptime", + "hostname", + "runnables", + "services" + ], + "properties": { + "healthOK": { + "type": "boolean" + }, + "version": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "commitHash": { + "type": "string" + }, + "startTime": { + "type": "string" + }, + "uptime": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "runnables": { + "type": "object" + }, + "services": { + "type": "array", + "description": "[]ServiceStatus", + "items": { + "$ref": "#/components/schemas/ServiceStatus" + } + } + } + }, + "ServiceStatus": { + "type": "object", + "required": [ + "name", + "healthy", + "latency" + ], + "properties": { + "name": { + "type": "string" + }, + "healthy": { + "type": "boolean" + }, + "error": { + "type": "string" + }, + "latency": { + "type": "string" + } + } + }, + "QuoteIntentResponse": { + "type": "object", + "required": [ + "intent", + "gasFeeOptions" + ], + "properties": { + "intent": { + "$ref": "#/components/schemas/Intent" + }, + "gasFeeOptions": { + "$ref": "#/components/schemas/GasFeeOptions" + }, + "transactionStates": { + "type": "array", + "description": "[]TransactionStateInfo", + "items": { + "$ref": "#/components/schemas/TransactionStateInfo" + } + }, + "passthrough": { + "$ref": "#/components/schemas/PassthroughInfo" + } + } + }, + "CommitIntentRequest": { + "type": "object", + "required": [ + "intent" + ], + "properties": { + "intent": { + "$ref": "#/components/schemas/Intent" + } + } + }, + "CommitIntentResponse": { + "type": "object", + "required": [ + "intentId" + ], + "properties": { + "intentId": { + "type": "string" + } + } + }, + "ExecuteIntentRequest": { + "type": "object", + "required": [ + "intentId" + ], + "properties": { + "intentId": { + "type": "string" + }, + "depositTransactionHash": { + "type": "string" + }, + "depositSignature": { + "$ref": "#/components/schemas/DepositSignature" + } + } + }, + "ExecuteIntentResponse": { + "type": "object", + "required": [ + "intentId", + "intentStatus" + ], + "properties": { + "intentId": { + "type": "string" + }, + "intentStatus": { + "$ref": "#/components/schemas/IntentStatus" + } + } + }, + "GetIntentReceiptRequest": { + "type": "object", + "required": [ + "intentId" + ], + "properties": { + "intentId": { + "type": "string" + } + } + }, + "GetIntentReceiptResponse": { + "type": "object", + "required": [ + "intentReceipt" + ], + "properties": { + "intentReceipt": { + "$ref": "#/components/schemas/IntentReceipt" + } + } + }, + "WaitIntentReceiptRequest": { + "type": "object", + "required": [ + "intentId" + ], + "properties": { + "intentId": { + "type": "string" + }, + "lastReceiptStates": { + "type": "array", + "description": "[]TransactionStatus", + "items": { + "$ref": "#/components/schemas/TransactionStatus" + } + } + } + }, + "WaitIntentReceiptResponse": { + "type": "object", + "required": [ + "intentReceipt", + "receiptStates", + "done" + ], + "properties": { + "intentReceipt": { + "$ref": "#/components/schemas/IntentReceipt" + }, + "receiptStates": { + "type": "array", + "description": "[]TransactionStatus", + "items": { + "$ref": "#/components/schemas/TransactionStatus" + } + }, + "done": { + "type": "boolean" + } + } + }, + "GetIntentRequest": { + "type": "object", + "required": [ + "intentId" + ], + "properties": { + "intentId": { + "type": "string" + } + } + }, + "GetIntentResponse": { + "type": "object", + "required": [ + "intent" + ], + "properties": { + "intent": { + "$ref": "#/components/schemas/Intent" + } + } + }, + "SearchIntentsRequest": { + "type": "object", + "properties": { + "byIntentId": { + "type": "string" + }, + "byProjectId": { + "type": "number" + }, + "byTransactionHash": { + "type": "string" + }, + "byOwnerAddress": { + "type": "string" + }, + "byOriginIntentAddress": { + "type": "string" + }, + "byDestinationIntentAddress": { + "type": "string" + }, + "byQueryString": { + "type": "string" + } + } + }, + "SearchIntentsResponse": { + "type": "object", + "required": [ + "intents" + ], + "properties": { + "intents": { + "type": "array", + "description": "[]Intent", + "items": { + "$ref": "#/components/schemas/Intent" + } + } + } + }, + "GetIntentHistoryRequest": { + "type": "object", + "properties": { + "page": { + "$ref": "#/components/schemas/Page" + }, + "byProjectId": { + "type": "number" + }, + "byOwnerAddress": { + "type": "string" + }, + "originChainId": { + "type": "number" + }, + "destinationChainId": { + "type": "number" + }, + "fromTime": { + "type": "number" + }, + "toTime": { + "type": "number" + }, + "includeBalances": { + "type": "boolean" + }, + "onlyRecoverable": { + "type": "boolean" + }, + "byStatus": { + "$ref": "#/components/schemas/IntentStatus" + }, + "byStatuses": { + "type": "array", + "description": "[]IntentStatus", + "items": { + "$ref": "#/components/schemas/IntentStatus" + } + } + } + }, + "GetIntentHistoryResponse": { + "type": "object", + "required": [ + "intents" + ], + "properties": { + "intents": { + "type": "array", + "description": "[]IntentHistory", + "items": { + "$ref": "#/components/schemas/IntentHistory" + } + }, + "nextPage": { + "$ref": "#/components/schemas/Page" + } + } + }, + "AbortIntentRequest": { + "type": "object", + "required": [ + "intentId", + "chainId", + "abortTransactionHash" + ], + "properties": { + "intentId": { + "type": "string" + }, + "chainId": { + "type": "number" + }, + "abortTransactionHash": { + "type": "string" + } + } + }, + "AbortIntentResponse": { + "type": "object", + "required": [ + "intentId", + "status" + ], + "properties": { + "intentId": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/IntentStatus" + } + } + }, + "GetTokenPricesRequest": { + "type": "object", + "required": [ + "tokens" + ], + "properties": { + "tokens": { + "type": "array", + "description": "[]Token", + "items": { + "$ref": "#/components/schemas/Token" + } + } + } + }, + "GetTokenPricesResponse": { + "type": "object", + "required": [ + "tokenPrices" + ], + "properties": { + "tokenPrices": { + "type": "array", + "description": "[]TokenPrice", + "items": { + "$ref": "#/components/schemas/TokenPrice" + } + } + } + }, + "GetChainsRequest": { + "type": "object", + "properties": { + "routeProvider": { + "type": "string" + } + } + }, + "GetChainsResponse": { + "type": "object", + "required": [ + "chains" + ], + "properties": { + "chains": { + "type": "array", + "description": "[]ChainInfo", + "items": { + "$ref": "#/components/schemas/ChainInfo" + } + } + } + }, + "GetExactOutputRoutesRequest": { + "type": "object", + "required": [ + "destinationChainId", + "destinationTokenAddress" + ], + "properties": { + "destinationChainId": { + "type": "number" + }, + "destinationTokenAddress": { + "type": "string" + }, + "originChainId": { + "type": "number" + }, + "originTokenAddress": { + "type": "string" + }, + "ownerAddress": { + "type": "string" + } + } + }, + "GetExactOutputRoutesResponse": { + "type": "object", + "required": [ + "tokens" + ], + "properties": { + "tokens": { + "type": "array", + "description": "[]TokenInfo", + "items": { + "$ref": "#/components/schemas/TokenInfo" + } + } + } + }, + "GetExactInputRoutesRequest": { + "type": "object", + "required": [ + "originChainId", + "originTokenAddress" + ], + "properties": { + "originChainId": { + "type": "number" + }, + "originTokenAddress": { + "type": "string" + }, + "destinationChainId": { + "type": "number" + }, + "destinationTokenAddress": { + "type": "string" + } + } + }, + "GetExactInputRoutesResponse": { + "type": "object", + "required": [ + "tokens" + ], + "properties": { + "tokens": { + "type": "array", + "description": "[]TokenInfo", + "items": { + "$ref": "#/components/schemas/TokenInfo" + } + } + } + }, + "GetTokenListRequest": { + "type": "object", + "required": [ + "chainIds" + ], + "properties": { + "chainIds": { + "type": "array", + "description": "[]uint64", + "items": { + "type": "number" + } + }, + "searchQuery": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "tokenAddress": { + "type": "string" + }, + "includeAllListed": { + "type": "boolean" + }, + "includeExternal": { + "type": "boolean" + }, + "excludeTokens": { + "type": "array", + "description": "[]string", + "items": { + "type": "string" + } + } + } + }, + "GetTokenListResponse": { + "type": "object", + "required": [ + "tokens" + ], + "properties": { + "tokens": { + "type": "array", + "description": "[]TokenInfo", + "items": { + "$ref": "#/components/schemas/TokenInfo" + } + } + } + }, + "GetEarnPoolsRequest": { + "type": "object", + "properties": { + "chainIds": { + "type": "array", + "description": "[]uint64", + "items": { + "type": "number" + } + }, + "protocols": { + "type": "array", + "description": "[]string", + "items": { + "type": "string" + } + }, + "minTvl": { + "type": "number" + }, + "maxApy": { + "type": "number" + } + } + }, + "GetEarnPoolsResponse": { + "type": "object", + "required": [ + "pools", + "timestamp", + "cached" + ], + "properties": { + "pools": { + "type": "array", + "description": "[]EarnPool", + "items": { + "$ref": "#/components/schemas/EarnPool" + } + }, + "timestamp": { + "type": "string" + }, + "cached": { + "type": "boolean" + } + } + }, + "GetIntentTransactionHistoryRequest": { + "type": "object", + "properties": { + "page": { + "$ref": "#/components/schemas/Page" + }, + "byProjectId": { + "type": "number" + }, + "byOwnerAddress": { + "type": "string" + } + } + }, + "GetIntentTransactionHistoryResponse": { + "type": "object", + "required": [ + "intents" + ], + "properties": { + "intents": { + "type": "array", + "description": "[]IntentSummary", + "items": { + "$ref": "#/components/schemas/IntentSummary" + } + }, + "nextPage": { + "$ref": "#/components/schemas/Page" + } + } + }, + "Trails_Ping_Request": { + "type": "object" + }, + "Trails_RuntimeStatus_Request": { + "type": "object" + }, + "Trails_Clock_Request": { + "type": "object" + }, + "Trails_GetExchangeRate_Request": { + "type": "object", + "properties": { + "toCurrency": { + "type": "string" + } + } + }, + "Trails_GetCountryList_Request": { + "type": "object" + }, + "Trails_GetTrailsContracts_Request": { + "type": "object" + }, + "Trails_GetProtocolContracts_Request": { + "type": "object", + "properties": { + "intentProtocol": { + "$ref": "#/components/schemas/IntentProtocolVersion" + } + } + }, + "Trails_GetSupportedIntentProtocols_Request": { + "type": "object" + }, + "Trails_GetDefaultIntentProtocol_Request": { + "type": "object" + }, + "Trails_GetFiatCurrencyList_Request": { + "type": "object" + }, + "Trails_Ping_Response": { + "type": "object", + "properties": { + "version": { + "type": "string" + } + } + }, + "Trails_RuntimeStatus_Response": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/RuntimeStatus" + } + } + }, + "Trails_Clock_Response": { + "type": "object", + "properties": { + "serverTime": { + "type": "string" + } + } + }, + "Trails_GetExchangeRate_Response": { + "type": "object", + "properties": { + "exchangeRate": { + "$ref": "#/components/schemas/ExchangeRate" + } + } + }, + "Trails_GetCountryList_Response": { + "type": "object", + "properties": { + "countries": { + "type": "array", + "description": "[]Country", + "items": { + "$ref": "#/components/schemas/Country" + } + } + } + }, + "Trails_GetTrailsContracts_Response": { + "type": "object", + "properties": { + "TrailsContracts": { + "$ref": "#/components/schemas/TrailsContracts" + } + } + }, + "Trails_GetProtocolContracts_Response": { + "type": "object", + "properties": { + "TrailsContracts": { + "$ref": "#/components/schemas/TrailsContracts" + } + } + }, + "Trails_GetSupportedIntentProtocols_Response": { + "type": "object", + "properties": { + "versions": { + "type": "array", + "description": "[]IntentProtocolVersion", + "items": { + "$ref": "#/components/schemas/IntentProtocolVersion" + } + } + } + }, + "Trails_GetDefaultIntentProtocol_Response": { + "type": "object", + "properties": { + "version": { + "$ref": "#/components/schemas/IntentProtocolVersion" + } + } + }, + "Trails_GetFiatCurrencyList_Response": { + "type": "object", + "properties": { + "currencies": { + "type": "array", + "description": "[]FiatCurrency", + "items": { + "$ref": "#/components/schemas/FiatCurrency" + } + } + } + }, + "GetYieldMarketsRequest": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Filter by protocol ID (e.g. \"aave\", \"morpho\", \"yearn\")" + }, + "chainId": { + "type": "string", + "description": "Filter by chain ID as a string (e.g. \"8453\" for Base)" + }, + "type": { + "type": "string", + "description": "Market category: \"lending\" or \"vault\"" + }, + "search": { + "type": "string", + "description": "Free-text search over market names and tokens" + }, + "sort": { + "type": "string", + "description": "Sort order (e.g. \"rewardRateDesc\")" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Number of results to return" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Pagination offset" + } + } + }, + "GetYieldMarketsResponse": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "type": "object", + "description": "JSON array of market objects from the yield provider", + "additionalProperties": true + } + } + }, + "GetYieldProvidersRequest": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int32", + "description": "Number of providers to return" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Pagination offset" + } + } + }, + "GetYieldProvidersResponse": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "type": "object", + "description": "JSON array of provider objects", + "additionalProperties": true + } + } + }, + "YieldBalanceQuery": { + "type": "object", + "required": [ + "address", + "network" + ], + "properties": { + "address": { + "type": "string", + "description": "Wallet address to look up" + }, + "network": { + "type": "string", + "description": "Network name (e.g. \"base\", \"ethereum\", \"polygon\")" + } + } + }, + "GetYieldAggregateBalancesRequest": { + "type": "object", + "required": [ + "queries" + ], + "properties": { + "queries": { + "type": "array", + "description": "Array of 1–25 balance queries", + "minItems": 1, + "maxItems": 25, + "items": { + "$ref": "#/components/schemas/YieldBalanceQuery" + } + } + } + }, + "GetYieldAggregateBalancesResponse": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "type": "object", + "description": "JSON array of yield balance records", + "additionalProperties": true + } + } + }, + "CreateYieldActionRequest": { + "type": "object", + "required": [ + "earnMarketId", + "userWalletAddress" + ], + "properties": { + "earnMarketId": { + "type": "string", + "description": "Market ID from YieldGetMarkets" + }, + "userWalletAddress": { + "type": "string", + "description": "Wallet address of the user performing the action" + }, + "args": { + "type": "object", + "description": "Optional market-specific arguments (e.g. referral codes, slippage)", + "additionalProperties": true + } + } + }, + "CreateYieldActionResponse": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "type": "object", + "description": "JSON object containing unsigned transaction payloads", + "additionalProperties": true + } + } + } + } + }, + "paths": { + "/rpc/Trails/Ping": { + "post": { + "operationId": "Trails-Ping", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_Ping_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_Ping_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/RuntimeStatus": { + "post": { + "operationId": "Trails-RuntimeStatus", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_RuntimeStatus_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_RuntimeStatus_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/Clock": { + "post": { + "operationId": "Trails-Clock", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_Clock_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_Clock_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/QuoteIntent": { + "post": { + "operationId": "Trails-QuoteIntent", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuoteIntentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuoteIntentResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/CommitIntent": { + "post": { + "operationId": "Trails-CommitIntent", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommitIntentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommitIntentResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/ExecuteIntent": { + "post": { + "operationId": "Trails-ExecuteIntent", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteIntentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteIntentResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/WaitIntentReceipt": { + "post": { + "operationId": "Trails-WaitIntentReceipt", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WaitIntentReceiptRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WaitIntentReceiptResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetIntentReceipt": { + "post": { + "operationId": "Trails-GetIntentReceipt", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntentReceiptRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntentReceiptResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetIntent": { + "post": { + "operationId": "Trails-GetIntent", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntentResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/SearchIntents": { + "post": { + "operationId": "Trails-SearchIntents", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchIntentsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchIntentsResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetIntentHistory": { + "post": { + "operationId": "Trails-GetIntentHistory", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntentHistoryRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntentHistoryResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/AbortIntent": { + "post": { + "operationId": "Trails-AbortIntent", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AbortIntentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AbortIntentResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetChains": { + "post": { + "operationId": "Trails-GetChains", + "tags": [ + "Trails" + ], + "summary": "GetChains will return the list of supported chains by Trails.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetChainsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetChainsResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetExactOutputRoutes": { + "post": { + "operationId": "Trails-GetExactOutputRoutes", + "tags": [ + "Trails" + ], + "summary": "GetExactOutputRoutes will return a list of origin tokens, when given a destination chain and token,", + "description": "that can be used to pay/send from an origin chain the exact output amount on the\ndestination chain.\n\nThe request will include the destination chain and token desired. Optionally, the\nuser can specify an origin chain and token to filter results to only that specific\norigin token. Additionally, an optional owner address can be provided to filter\nresults to only tokens the owner has a balance on (requires indexer gateway to be\nconfigured).\n\nThe response is a list of origin tokens and their chains which can be used to fulfill\nthe exact output request. These are tokens the user can send FROM to achieve the desired\ndestination token amount.\n\naka, the \"pay\" routes\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetExactOutputRoutesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetExactOutputRoutesResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetExactInputRoutes": { + "post": { + "operationId": "Trails-GetExactInputRoutes", + "tags": [ + "Trails" + ], + "summary": "GetExactInputRoutes will return a list of destination tokens, when given an origin chain and token,", + "description": "that can be used to send/swap to a destination chain and token.\n\nThe request will include the origin chain and token used for input. Optionally, the\nuser can specify a destination chain and token to further filter the results.\n\nThe response is a list of destination tokens and their chains which can be reached from\nthe origin token and chain. These are tokens the user can send TO from the given origin token.\n\naka, the \"swap\" routes\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetExactInputRoutesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetExactInputRoutesResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetTokenList": { + "post": { + "operationId": "Trails-GetTokenList", + "tags": [ + "Trails" + ], + "summary": "GetTokenList will return a list of tokens based on the provided filters.", + "description": "NOTE: there are many filters and options on GetTokenListRequest\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTokenListRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTokenListResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetTokenPrices": { + "post": { + "operationId": "Trails-GetTokenPrices", + "tags": [ + "Trails" + ], + "summary": "GetTokenPrices will return the live prices for a list of tokens.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTokenPricesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTokenPricesResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetExchangeRate": { + "post": { + "operationId": "Trails-GetExchangeRate", + "tags": [ + "Trails" + ], + "summary": "GetExchangeRate returns the exchange rate from USD to a specified currency.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetExchangeRate_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetExchangeRate_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetCountryList": { + "post": { + "operationId": "Trails-GetCountryList", + "tags": [ + "Trails" + ], + "summary": "GetCountryList returns the list of supported countries for onramp providers.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetCountryList_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetCountryList_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetTrailsContracts": { + "post": { + "operationId": "Trails-GetTrailsContracts", + "tags": [ + "Trails" + ], + "summary": "Deprecated: please use GetProtocolContracts instead", + "deprecated": true, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetTrailsContracts_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetTrailsContracts_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetProtocolContracts": { + "post": { + "operationId": "Trails-GetProtocolContracts", + "tags": [ + "Trails" + ], + "summary": "GetProtocolContracts returns Trails contract addresses used by the Trails Intents stack for the given protocol.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetProtocolContracts_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetProtocolContracts_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetSupportedIntentProtocols": { + "post": { + "operationId": "Trails-GetSupportedIntentProtocols", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetSupportedIntentProtocols_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetSupportedIntentProtocols_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetDefaultIntentProtocol": { + "post": { + "operationId": "Trails-GetDefaultIntentProtocol", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetDefaultIntentProtocol_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetDefaultIntentProtocol_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetEarnPools": { + "post": { + "operationId": "Trails-GetEarnPools", + "tags": [ + "Trails" + ], + "summary": "GetEarnPools returns aggregated pool information from DeFi protocols (Aave, Morpho).", + "description": "This endpoint provides yield-bearing opportunities across multiple chains.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetEarnPoolsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetEarnPoolsResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetFiatCurrencyList": { + "post": { + "operationId": "Trails-GetFiatCurrencyList", + "tags": [ + "Trails" + ], + "summary": "GetFiatCurrencyList returns the list of supported fiat currencies for display preferences.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetFiatCurrencyList_Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Trails_GetFiatCurrencyList_Response" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/GetIntentTransactionHistory": { + "post": { + "operationId": "Trails-GetIntentTransactionHistory", + "tags": [ + "Trails" + ], + "summary": "Deprecated: please use GetIntentHistory instead", + "deprecated": true, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntentTransactionHistoryRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetIntentTransactionHistoryResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcClientAborted" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcStreamLost" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorized" + }, + { + "$ref": "#/components/schemas/ErrorPermissionDenied" + }, + { + "$ref": "#/components/schemas/ErrorSessionExpired" + }, + { + "$ref": "#/components/schemas/ErrorMethodNotFound" + }, + { + "$ref": "#/components/schemas/ErrorRequestConflict" + }, + { + "$ref": "#/components/schemas/ErrorAborted" + }, + { + "$ref": "#/components/schemas/ErrorGeoblocked" + }, + { + "$ref": "#/components/schemas/ErrorRateLimited" + }, + { + "$ref": "#/components/schemas/ErrorProjectNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyNotFound" + }, + { + "$ref": "#/components/schemas/ErrorAccessKeyMismatch" + }, + { + "$ref": "#/components/schemas/ErrorInvalidOrigin" + }, + { + "$ref": "#/components/schemas/ErrorInvalidService" + }, + { + "$ref": "#/components/schemas/ErrorUnauthorizedUser" + }, + { + "$ref": "#/components/schemas/ErrorQuotaExceeded" + }, + { + "$ref": "#/components/schemas/ErrorQuotaRateLimit" + }, + { + "$ref": "#/components/schemas/ErrorNoDefaultKey" + }, + { + "$ref": "#/components/schemas/ErrorMaxAccessKeys" + }, + { + "$ref": "#/components/schemas/ErrorAtLeastOneKey" + }, + { + "$ref": "#/components/schemas/ErrorTimeout" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorQueryFailed" + }, + { + "$ref": "#/components/schemas/ErrorIntentStatus" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + }, + { + "$ref": "#/components/schemas/ErrorUnsupportedNetwork" + }, + { + "$ref": "#/components/schemas/ErrorClientOutdated" + }, + { + "$ref": "#/components/schemas/ErrorIntentsSkipped" + }, + { + "$ref": "#/components/schemas/ErrorQuoteExpired" + }, + { + "$ref": "#/components/schemas/ErrorHighPriceImpact" + }, + { + "$ref": "#/components/schemas/ErrorIntentsDisabled" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + }, + { + "$ref": "#/components/schemas/ErrorChainNodeHealth" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/YieldGetMarkets": { + "post": { + "operationId": "Trails-YieldGetMarkets", + "tags": [ + "Trails" + ], + "summary": "YieldGetMarkets returns DeFi markets with optional filters.", + "description": "Returns yield-bearing markets (lending pools, ERC-4626 vaults) with APY, TVL, and market IDs\nfor use with composable actions. Use marketId values with the lend() and deposit() SDK builders.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldMarketsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldMarketsResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/YieldGetProviders": { + "post": { + "operationId": "Trails-YieldGetProviders", + "tags": [ + "Trails" + ], + "summary": "YieldGetProviders returns available yield protocol providers.", + "description": "Returns the DeFi protocols (Aave, Morpho, Yearn, etc.) available through Trails' earn system.\nUse provider IDs as filter values for YieldGetMarkets.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldProvidersRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldProvidersResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/YieldGetAggregateBalances": { + "post": { + "operationId": "Trails-YieldGetAggregateBalances", + "tags": [ + "Trails" + ], + "summary": "YieldGetAggregateBalances returns a wallet's earn positions across chains.", + "description": "Fetches active yield positions for one or more wallet/network pairs. Accepts up to 25\nqueries in a single request, enabling multi-chain balance lookups.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldAggregateBalancesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldAggregateBalancesResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/YieldCreateEnterAction": { + "post": { + "operationId": "Trails-YieldCreateEnterAction", + "tags": [ + "Trails" + ], + "summary": "YieldCreateEnterAction generates unsigned deposit transaction calldata for a yield market.", + "description": "Returns the unsigned transaction payload needed to deposit into a DeFi yield market.\nThis backs the lend() and deposit() composable action builders in the SDK.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateYieldActionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateYieldActionResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/YieldCreateExitAction": { + "post": { + "operationId": "Trails-YieldCreateExitAction", + "tags": [ + "Trails" + ], + "summary": "YieldCreateExitAction generates unsigned withdrawal transaction calldata for a yield position.", + "description": "Returns the unsigned transaction payload needed to withdraw from a DeFi yield position.\nCounterpart to YieldCreateEnterAction.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateYieldActionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateYieldActionResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/api-reference/endpoints/get-earn-pools.mdx b/api-reference/endpoints/get-earn-pools.mdx index 3bded12..9d54e95 100644 --- a/api-reference/endpoints/get-earn-pools.mdx +++ b/api-reference/endpoints/get-earn-pools.mdx @@ -1,8 +1,12 @@ --- -title: GetEarnPools +title: GetEarnPools (deprecated) openapi: ../trails-api.gen.json post /rpc/Trails/GetEarnPools --- + +`GetEarnPools` is deprecated. Use [YieldGetMarkets](/api-reference/endpoints/yield-get-markets) instead — it provides richer market data, filtering, and pagination. + + ## Overview The `GetEarnPools` endpoint returns aggregated yield-bearing pool information from supported DeFi protocols such as Aave and Morpho. Use this to display earning opportunities to users and build Earn mode integrations. diff --git a/api-reference/endpoints/yield-create-enter-action.mdx b/api-reference/endpoints/yield-create-enter-action.mdx new file mode 100644 index 0000000..e697413 --- /dev/null +++ b/api-reference/endpoints/yield-create-enter-action.mdx @@ -0,0 +1,98 @@ +--- +title: YieldCreateEnterAction +description: "Generate unsigned deposit transaction calldata for a DeFi yield market" +openapi: ../trails-api.gen.json post /rpc/Trails/YieldCreateEnterAction +--- + +## Overview + +`YieldCreateEnterAction` returns the unsigned transaction payload needed to deposit into a DeFi yield market. This is the low-level endpoint that backs the `lend` and `deposit` composable actions in the SDK. + +Use this endpoint when building custom DeFi UIs outside React, or when you need to construct the calldata manually before passing it to Trails via the `to.calldata` param on `QuoteIntent`. + +For React apps, use the `lend()` or `deposit()` action builders with `useTrailsSendTransaction` — they call this endpoint internally. + +## Request Parameters + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `earnMarketId` | string | Yes | Market ID from `YieldGetMarkets` | +| `userWalletAddress` | string | Yes | Address of the depositing wallet | +| `args` | object | No | Market-specific arguments (varies by protocol) | + +## Response + +Returns `payload` containing unsigned transaction data: + +| Field | Description | +|-------|-------------| +| `transactions` | Array of transaction objects to execute | +| `transactions[].to` | Contract address | +| `transactions[].data` | ABI-encoded calldata | +| `transactions[].value` | ETH value (for native token deposits) | + +## Examples + +### Build a deposit calldata for Aave + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldCreateEnterAction', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({ + earnMarketId: 'base-usdc-aave-v3-lending', + userWalletAddress: '0xYourWalletAddress', + }), +}) + +const { payload } = await response.json() +const action = JSON.parse(payload) + +// Pass action.transactions[0].data to QuoteIntent as to.calldata +``` + +### With protocol-specific arguments + +Some markets accept additional arguments (e.g. slippage, referral codes): + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldCreateEnterAction', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({ + earnMarketId: 'ethereum-usdc-morpho-0x...', + userWalletAddress: '0xYourWalletAddress', + args: { + referralCode: 0, + }, + }), +}) +``` + +## SDK alternative + +For React, use the `lend` or `deposit` builders with `useTrailsSendTransaction`: + +```tsx +import { useTrailsSendTransaction, lend, deposit } from '0xtrails' + +const { sendTransaction } = useTrailsSendTransaction({ + actions: [ + lend({ marketId: 'base-usdc-aave-v3-lending', amount: '100' }), + ], +}) +``` + +See [Composable Actions](/use-cases/composable-actions) for the full SDK approach. + +## See also + +- [YieldCreateExitAction](/api-reference/endpoints/yield-create-exit-action) — Withdraw from a position +- [YieldGetMarkets](/api-reference/endpoints/yield-get-markets) — Discover market IDs +- [Composable Actions](/use-cases/composable-actions) — SDK builders for DeFi deposits diff --git a/api-reference/endpoints/yield-create-exit-action.mdx b/api-reference/endpoints/yield-create-exit-action.mdx new file mode 100644 index 0000000..7c11fc3 --- /dev/null +++ b/api-reference/endpoints/yield-create-exit-action.mdx @@ -0,0 +1,106 @@ +--- +title: YieldCreateExitAction +description: "Generate unsigned withdrawal transaction calldata for a DeFi yield position" +openapi: ../trails-api.gen.json post /rpc/Trails/YieldCreateExitAction +--- + +## Overview + +`YieldCreateExitAction` returns the unsigned transaction payload needed to withdraw from a DeFi yield position. It is the counterpart to `YieldCreateEnterAction`. + +Use this endpoint to build withdrawal UIs or construct exit calldata for Trails routes. For React apps, the composable action builders handle this automatically. + +## Request Parameters + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `earnMarketId` | string | Yes | Market ID from `YieldGetMarkets` | +| `userWalletAddress` | string | Yes | Address of the withdrawing wallet | +| `args` | object | No | Market-specific arguments (e.g. amount, shares) | + +## Response + +Returns `payload` containing unsigned transaction data: + +| Field | Description | +|-------|-------------| +| `transactions` | Array of transaction objects to execute | +| `transactions[].to` | Contract address | +| `transactions[].data` | ABI-encoded calldata | +| `transactions[].value` | ETH value (for native token withdrawals) | + +## Examples + +### Withdraw from an Aave lending position + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldCreateExitAction', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({ + earnMarketId: 'base-usdc-aave-v3-lending', + userWalletAddress: '0xYourWalletAddress', + }), +}) + +const { payload } = await response.json() +const action = JSON.parse(payload) +``` + +### Withdraw a specific amount + +Use `args` to pass withdrawal parameters for markets that require them (e.g. partial withdrawals): + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldCreateExitAction', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({ + earnMarketId: 'ethereum-usdc-morpho-0x...', + userWalletAddress: '0xYourWalletAddress', + args: { + amount: '1000000', // 1 USDC in wei + }, + }), +}) +``` + +## Common pattern: check balance then exit + +```typescript +// 1. Check what positions the wallet holds +const balancesRes = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetAggregateBalances', { + method: 'POST', + headers: { 'Content-Type': 'application/json', 'X-Access-Key': 'YOUR_ACCESS_KEY' }, + body: JSON.stringify({ queries: [{ address: '0xYourWallet', network: 'base' }] }), +}) +const { payload: balPayload } = await balancesRes.json() +const balances = JSON.parse(balPayload) + +// 2. Build exit calldata for each position +for (const position of balances) { + const exitRes = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldCreateExitAction', { + method: 'POST', + headers: { 'Content-Type': 'application/json', 'X-Access-Key': 'YOUR_ACCESS_KEY' }, + body: JSON.stringify({ + earnMarketId: position.yieldId, + userWalletAddress: '0xYourWallet', + }), + }) + const { payload: exitPayload } = await exitRes.json() + const exitAction = JSON.parse(exitPayload) + // Use exitAction.transactions to build and submit the withdrawal +} +``` + +## See also + +- [YieldCreateEnterAction](/api-reference/endpoints/yield-create-enter-action) — Deposit into a position +- [YieldGetAggregateBalances](/api-reference/endpoints/yield-get-balances) — Check existing positions before exiting +- [YieldGetMarkets](/api-reference/endpoints/yield-get-markets) — Discover market IDs diff --git a/api-reference/endpoints/yield-get-balances.mdx b/api-reference/endpoints/yield-get-balances.mdx new file mode 100644 index 0000000..cf0ac57 --- /dev/null +++ b/api-reference/endpoints/yield-get-balances.mdx @@ -0,0 +1,117 @@ +--- +title: YieldGetAggregateBalances +description: "Fetch a wallet's earn balances across chains and yield positions" +openapi: ../trails-api.gen.json post /rpc/Trails/YieldGetAggregateBalances +--- + +## Overview + +`YieldGetAggregateBalances` returns a wallet's active yield positions across one or more chains. Use this to show users their current DeFi holdings — principal, earned yield, and which markets they are in. + +The SDK's `useEarnBalances` hook wraps this endpoint — prefer it in React apps. + +## Request Parameters + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `queries` | object[] | Yes | Array of 1–25 balance queries | + +Each query object: + +| Field | Type | Required | Description | +|-------|------|----------|-------------| +| `address` | string | Yes | Wallet address to look up | +| `network` | string | Yes | Network identifier (e.g. `"ethereum"`, `"base"`, `"polygon"`) | + + +You can pass up to 25 queries per request, enabling multi-chain balance lookups in a single call. + + +## Response + +Returns `payload` containing balance records. Each balance entry includes: + +| Field | Description | +|-------|-------------| +| `yieldId` | Market ID — matches the `id` field from `YieldGetMarkets` | +| `address` | Wallet address | +| `network` | Network the position is on | +| `amount` | Balance amount in the market's token | +| `amountUsd` | USD value of the position | + +## Examples + +### Fetch balances on a single chain + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetAggregateBalances', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({ + queries: [ + { + address: '0xYourWalletAddress', + network: 'base', + }, + ], + }), +}) + +const { payload } = await response.json() +const balances = JSON.parse(payload) + +balances.forEach(position => { + console.log(`${position.yieldId}: ${position.amountUsd} USD`) +}) +``` + +### Multi-chain balance lookup + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetAggregateBalances', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({ + queries: [ + { address: '0xYourWalletAddress', network: 'base' }, + { address: '0xYourWalletAddress', network: 'ethereum' }, + { address: '0xYourWalletAddress', network: 'polygon' }, + ], + }), +}) + +const { payload } = await response.json() +const balances = JSON.parse(payload) +``` + +## SDK alternative + +In React, use the `useEarnBalances` hook: + +```tsx +import { useEarnBalances } from '0xtrails' + +// Single chain +const { data: balances } = useEarnBalances({ + walletAddress: '0xYourWalletAddress', + chain: 'base', +}) + +// Multiple chains +const { data: balances } = useEarnBalances({ + walletAddress: '0xYourWalletAddress', + chains: ['base', 'ethereum', 'polygon'], +}) +``` + +## See also + +- [YieldGetMarkets](/api-reference/endpoints/yield-get-markets) — Match `yieldId` against market IDs +- [YieldCreateExitAction](/api-reference/endpoints/yield-create-exit-action) — Build withdrawal transactions for active positions +- [Markets & Providers](/sdk/composable-actions/markets-and-providers) — SDK hooks reference diff --git a/api-reference/endpoints/yield-get-markets.mdx b/api-reference/endpoints/yield-get-markets.mdx new file mode 100644 index 0000000..01bc37e --- /dev/null +++ b/api-reference/endpoints/yield-get-markets.mdx @@ -0,0 +1,126 @@ +--- +title: YieldGetMarkets +description: "List and filter DeFi markets available through the Trails earn system" +openapi: ../trails-api.gen.json post /rpc/Trails/YieldGetMarkets +--- + +## Overview + +`YieldGetMarkets` returns DeFi markets available for deposit through Trails, including lending markets (Aave, Morpho) and yield vaults (Yearn, ERC-4626). Use this to power market selection UIs or discover `marketId` values for composable actions. + +The SDK's `useEarnMarkets` hook wraps this endpoint with typed filters and caching — prefer it in React apps. + +## Request Parameters + +All fields are optional. + +| Field | Type | Description | +|-------|------|-------------| +| `provider` | string | Filter by protocol (e.g. `"aave"`, `"morpho"`, `"yearn"`) | +| `chainId` | string | Filter by chain ID (e.g. `"8453"` for Base) | +| `type` | string | Market category: `"lending"` or `"vault"` | +| `search` | string | Free-text search over market names and tokens | +| `sort` | string | Sort order (e.g. `"rewardRateDesc"`) | +| `limit` | number | Number of results to return | +| `offset` | number | Pagination offset | + +## Response + +Returns `payload` containing an array of market objects. Each market includes: + +| Field | Description | +|-------|-------------| +| `id` | Unique market ID — pass this to `lend()` or `deposit()` composable actions | +| `providerId` | Protocol identifier (e.g. `"aave"`, `"morpho"`) | +| `rewardRate` | Current APY as a decimal (e.g. `0.045` = 4.5%) | +| `statistics.tvlUsd` | Total value locked in USD | +| `metadata.name` | Human-readable market name | +| `metadata.token` | Underlying token info (symbol, address, decimals) | + +## Examples + +### List all markets on Base + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetMarkets', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({ + chainId: '8453', + limit: 20, + offset: 0, + }), +}) + +const { payload } = await response.json() +const markets = JSON.parse(payload) + +markets.forEach(market => { + console.log(`${market.id}: ${(market.rewardRate * 100).toFixed(2)}% APY`) +}) +``` + +### Filter lending markets by protocol + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetMarkets', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({ + provider: 'aave', + type: 'lending', + sort: 'rewardRateDesc', + }), +}) + +const { payload } = await response.json() +const markets = JSON.parse(payload) +``` + +### Search for USDC markets + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetMarkets', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({ + search: 'usdc', + sort: 'rewardRateDesc', + limit: 10, + }), +}) +``` + +## SDK alternative + +In React, use the typed `useEarnMarkets` hook instead of calling this endpoint directly: + +```tsx +import { useEarnMarkets } from '0xtrails' + +const { data: markets, isLoading } = useEarnMarkets({ + chain: 'base', + type: 'lending', + provider: 'aave', + search: 'usdc', + sortBy: 'rewardRateDesc', + limit: 20, +}) + +// markets[i].id → pass to lend() or deposit() actions +``` + +## See also + +- [YieldGetMarketById](/api-reference/endpoints/yield-get-market-by-id) — Fetch a single market by ID +- [YieldGetProviders](/api-reference/endpoints/yield-get-providers) — List available protocols +- [Markets & Providers](/sdk/composable-actions/markets-and-providers) — SDK hooks reference diff --git a/api-reference/endpoints/yield-get-providers.mdx b/api-reference/endpoints/yield-get-providers.mdx new file mode 100644 index 0000000..ab40f38 --- /dev/null +++ b/api-reference/endpoints/yield-get-providers.mdx @@ -0,0 +1,68 @@ +--- +title: YieldGetProviders +description: "List DeFi protocols available through the Trails earn system" +openapi: ../trails-api.gen.json post /rpc/Trails/YieldGetProviders +--- + +## Overview + +`YieldGetProviders` returns the DeFi protocols (providers) available through Trails' earn system — Aave, Morpho, Yearn, and others. Use the returned provider IDs as filter values for `YieldGetMarkets`. + +The SDK's `useEarnProviders` hook wraps this endpoint — prefer it in React apps. + +## Request Parameters + +All fields are optional. + +| Field | Type | Description | +|-------|------|-------------| +| `limit` | number | Number of providers to return | +| `offset` | number | Pagination offset | + +## Response + +Returns `payload` containing an array of provider objects. Each provider includes: + +| Field | Description | +|-------|-------------| +| `id` | Provider identifier — use as the `provider` filter in `YieldGetMarkets` | +| `name` | Human-readable protocol name | +| `url` | Protocol website | +| `logoUrl` | Protocol logo image URL | + +## Examples + +### List all providers + +```typescript +const response = await fetch('https://trails-api.sequence.app/rpc/Trails/YieldGetProviders', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Access-Key': 'YOUR_ACCESS_KEY', + }, + body: JSON.stringify({}), +}) + +const { payload } = await response.json() +const providers = JSON.parse(payload) + +providers.forEach(provider => { + console.log(`${provider.id}: ${provider.name}`) +}) +``` + +## SDK alternative + +In React, use the `useEarnProviders` hook: + +```tsx +import { useEarnProviders } from '0xtrails' + +const { data: providers } = useEarnProviders() +``` + +## See also + +- [YieldGetMarkets](/api-reference/endpoints/yield-get-markets) — Filter markets by provider ID +- [Markets & Providers](/sdk/composable-actions/markets-and-providers) — SDK hooks reference diff --git a/api-reference/introduction.mdx b/api-reference/introduction.mdx index 85a1d69..0fa5a87 100644 --- a/api-reference/introduction.mdx +++ b/api-reference/introduction.mdx @@ -606,6 +606,14 @@ Explore additional endpoints to enhance your integration: - **[GetExactInputRoutes](/api-reference/endpoints/get-exact-input-routes)** - Find destination tokens from a source token - **[GetExactOutputRoutes](/api-reference/endpoints/get-exact-output-routes)** - Find source tokens that route to a destination +### Earn + +- **[YieldGetMarkets](/api-reference/endpoints/yield-get-markets)** - List and filter DeFi markets (Aave, Morpho, Yearn) with APY and TVL +- **[YieldGetProviders](/api-reference/endpoints/yield-get-providers)** - List available yield protocols +- **[YieldGetAggregateBalances](/api-reference/endpoints/yield-get-balances)** - Fetch a wallet's active yield positions across chains +- **[YieldCreateEnterAction](/api-reference/endpoints/yield-create-enter-action)** - Generate deposit calldata for a yield market +- **[YieldCreateExitAction](/api-reference/endpoints/yield-create-exit-action)** - Generate withdrawal calldata from a yield position + ## Support Need help? Join our community: diff --git a/api-reference/trails-api.gen.json b/api-reference/trails-api.gen.json index c01a90f..e59bd4e 100644 --- a/api-reference/trails-api.gen.json +++ b/api-reference/trails-api.gen.json @@ -3974,6 +3974,164 @@ } } } + }, + "GetYieldMarketsRequest": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Filter by protocol ID (e.g. \"aave\", \"morpho\", \"yearn\")" + }, + "chainId": { + "type": "string", + "description": "Filter by chain ID as a string (e.g. \"8453\" for Base)" + }, + "type": { + "type": "string", + "description": "Market category: \"lending\" or \"vault\"" + }, + "search": { + "type": "string", + "description": "Free-text search over market names and tokens" + }, + "sort": { + "type": "string", + "description": "Sort order (e.g. \"rewardRateDesc\")" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Number of results to return" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Pagination offset" + } + } + }, + "GetYieldMarketsResponse": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "type": "object", + "description": "JSON array of market objects from the yield provider", + "additionalProperties": true + } + } + }, + "GetYieldProvidersRequest": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int32", + "description": "Number of providers to return" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Pagination offset" + } + } + }, + "GetYieldProvidersResponse": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "type": "object", + "description": "JSON array of provider objects", + "additionalProperties": true + } + } + }, + "YieldBalanceQuery": { + "type": "object", + "required": [ + "address", + "network" + ], + "properties": { + "address": { + "type": "string", + "description": "Wallet address to look up" + }, + "network": { + "type": "string", + "description": "Network name (e.g. \"base\", \"ethereum\", \"polygon\")" + } + } + }, + "GetYieldAggregateBalancesRequest": { + "type": "object", + "required": [ + "queries" + ], + "properties": { + "queries": { + "type": "array", + "description": "Array of 1–25 balance queries", + "minItems": 1, + "maxItems": 25, + "items": { + "$ref": "#/components/schemas/YieldBalanceQuery" + } + } + } + }, + "GetYieldAggregateBalancesResponse": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "type": "object", + "description": "JSON array of yield balance records", + "additionalProperties": true + } + } + }, + "CreateYieldActionRequest": { + "type": "object", + "required": [ + "earnMarketId", + "userWalletAddress" + ], + "properties": { + "earnMarketId": { + "type": "string", + "description": "Market ID from YieldGetMarkets" + }, + "userWalletAddress": { + "type": "string", + "description": "Wallet address of the user performing the action" + }, + "args": { + "type": "object", + "description": "Optional market-specific arguments (e.g. referral codes, slippage)", + "additionalProperties": true + } + } + }, + "CreateYieldActionResponse": { + "type": "object", + "required": [ + "payload" + ], + "properties": { + "payload": { + "type": "object", + "description": "JSON object containing unsigned transaction payloads", + "additionalProperties": true + } + } } } }, @@ -8689,6 +8847,445 @@ } } } + }, + "/rpc/Trails/YieldGetMarkets": { + "post": { + "operationId": "Trails-YieldGetMarkets", + "tags": [ + "Trails" + ], + "summary": "YieldGetMarkets returns DeFi markets with optional filters.", + "description": "Returns yield-bearing markets (lending pools, ERC-4626 vaults) with APY, TVL, and market IDs\nfor use with composable actions. Use marketId values with the lend() and deposit() SDK builders.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldMarketsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldMarketsResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/YieldGetProviders": { + "post": { + "operationId": "Trails-YieldGetProviders", + "tags": [ + "Trails" + ], + "summary": "YieldGetProviders returns available yield protocol providers.", + "description": "Returns the DeFi protocols (Aave, Morpho, Yearn, etc.) available through Trails' earn system.\nUse provider IDs as filter values for YieldGetMarkets.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldProvidersRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldProvidersResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/YieldGetAggregateBalances": { + "post": { + "operationId": "Trails-YieldGetAggregateBalances", + "tags": [ + "Trails" + ], + "summary": "YieldGetAggregateBalances returns a wallet's earn positions across chains.", + "description": "Fetches active yield positions for one or more wallet/network pairs. Accepts up to 25\nqueries in a single request, enabling multi-chain balance lookups.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldAggregateBalancesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetYieldAggregateBalancesResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/YieldCreateEnterAction": { + "post": { + "operationId": "Trails-YieldCreateEnterAction", + "tags": [ + "Trails" + ], + "summary": "YieldCreateEnterAction generates unsigned deposit transaction calldata for a yield market.", + "description": "Returns the unsigned transaction payload needed to deposit into a DeFi yield market.\nThis backs the lend() and deposit() composable action builders in the SDK.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateYieldActionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateYieldActionResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } + }, + "/rpc/Trails/YieldCreateExitAction": { + "post": { + "operationId": "Trails-YieldCreateExitAction", + "tags": [ + "Trails" + ], + "summary": "YieldCreateExitAction generates unsigned withdrawal transaction calldata for a yield position.", + "description": "Returns the unsigned transaction payload needed to withdraw from a DeFi yield position.\nCounterpart to YieldCreateEnterAction.\n", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateYieldActionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateYieldActionResponse" + } + } + } + }, + "4XX": { + "description": "Client error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcEndpoint" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcRequestFailed" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRoute" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadMethod" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcBadRequest" + }, + { + "$ref": "#/components/schemas/ErrorInvalidArgument" + }, + { + "$ref": "#/components/schemas/ErrorUnavailable" + }, + { + "$ref": "#/components/schemas/ErrorNotFound" + } + ] + } + } + } + }, + "5XX": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ErrorWebrpcBadResponse" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcServerPanic" + }, + { + "$ref": "#/components/schemas/ErrorWebrpcInternalError" + }, + { + "$ref": "#/components/schemas/ErrorUnexpected" + } + ] + } + } + } + } + } + } } } } \ No newline at end of file diff --git a/api-reference/trails-api.gen.yaml b/api-reference/trails-api.gen.yaml index 76af96d..bdc8212 100644 --- a/api-reference/trails-api.gen.yaml +++ b/api-reference/trails-api.gen.yaml @@ -2820,6 +2820,119 @@ components: description: '[]FiatCurrency' items: $ref: '#/components/schemas/FiatCurrency' + GetYieldMarketsRequest: + type: object + properties: + provider: + type: string + description: 'Filter by protocol ID (e.g. "aave", "morpho", "yearn")' + chainId: + type: string + description: 'Filter by chain ID as a string (e.g. "8453" for Base)' + type: + type: string + description: 'Market category: "lending" or "vault"' + search: + type: string + description: 'Free-text search over market names and tokens' + sort: + type: string + description: 'Sort order (e.g. "rewardRateDesc")' + limit: + type: integer + format: int32 + description: 'Number of results to return' + offset: + type: integer + format: int32 + description: 'Pagination offset' + GetYieldMarketsResponse: + type: object + required: + - payload + properties: + payload: + type: object + description: 'JSON array of market objects from the yield provider' + additionalProperties: true + GetYieldProvidersRequest: + type: object + properties: + limit: + type: integer + format: int32 + description: 'Number of providers to return' + offset: + type: integer + format: int32 + description: 'Pagination offset' + GetYieldProvidersResponse: + type: object + required: + - payload + properties: + payload: + type: object + description: 'JSON array of provider objects' + additionalProperties: true + YieldBalanceQuery: + type: object + required: + - address + - network + properties: + address: + type: string + description: 'Wallet address to look up' + network: + type: string + description: 'Network name (e.g. "base", "ethereum", "polygon")' + GetYieldAggregateBalancesRequest: + type: object + required: + - queries + properties: + queries: + type: array + description: 'Array of 1–25 balance queries' + minItems: 1 + maxItems: 25 + items: + $ref: '#/components/schemas/YieldBalanceQuery' + GetYieldAggregateBalancesResponse: + type: object + required: + - payload + properties: + payload: + type: object + description: 'JSON array of yield balance records' + additionalProperties: true + CreateYieldActionRequest: + type: object + required: + - earnMarketId + - userWalletAddress + properties: + earnMarketId: + type: string + description: 'Market ID from YieldGetMarkets' + userWalletAddress: + type: string + description: 'Wallet address of the user performing the action' + args: + type: object + description: 'Optional market-specific arguments (e.g. referral codes, slippage)' + additionalProperties: true + CreateYieldActionResponse: + type: object + required: + - payload + properties: + payload: + type: object + description: 'JSON object containing unsigned transaction payloads' + additionalProperties: true paths: /rpc/Trails/Ping: @@ -4724,4 +4837,222 @@ paths: - $ref: '#/components/schemas/ErrorWebrpcServerPanic' - $ref: '#/components/schemas/ErrorWebrpcInternalError' - $ref: '#/components/schemas/ErrorUnexpected' - - $ref: '#/components/schemas/ErrorChainNodeHealth' \ No newline at end of file + - $ref: '#/components/schemas/ErrorChainNodeHealth' + /rpc/Trails/YieldGetMarkets: + post: + operationId: Trails-YieldGetMarkets + tags: ["Trails"] + summary: "YieldGetMarkets returns DeFi markets with optional filters." + description: | + Returns yield-bearing markets (lending pools, ERC-4626 vaults) with APY, TVL, and market IDs + for use with composable actions. Use marketId values with the lend() and deposit() SDK builders. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetYieldMarketsRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetYieldMarketsResponse' + '4XX': + description: Client error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcEndpoint' + - $ref: '#/components/schemas/ErrorWebrpcRequestFailed' + - $ref: '#/components/schemas/ErrorWebrpcBadRoute' + - $ref: '#/components/schemas/ErrorWebrpcBadMethod' + - $ref: '#/components/schemas/ErrorWebrpcBadRequest' + - $ref: '#/components/schemas/ErrorInvalidArgument' + - $ref: '#/components/schemas/ErrorUnavailable' + - $ref: '#/components/schemas/ErrorNotFound' + '5XX': + description: Server error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcBadResponse' + - $ref: '#/components/schemas/ErrorWebrpcServerPanic' + - $ref: '#/components/schemas/ErrorWebrpcInternalError' + - $ref: '#/components/schemas/ErrorUnexpected' + /rpc/Trails/YieldGetProviders: + post: + operationId: Trails-YieldGetProviders + tags: ["Trails"] + summary: "YieldGetProviders returns available yield protocol providers." + description: | + Returns the DeFi protocols (Aave, Morpho, Yearn, etc.) available through Trails' earn system. + Use provider IDs as filter values for YieldGetMarkets. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetYieldProvidersRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetYieldProvidersResponse' + '4XX': + description: Client error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcEndpoint' + - $ref: '#/components/schemas/ErrorWebrpcRequestFailed' + - $ref: '#/components/schemas/ErrorWebrpcBadRoute' + - $ref: '#/components/schemas/ErrorWebrpcBadMethod' + - $ref: '#/components/schemas/ErrorWebrpcBadRequest' + - $ref: '#/components/schemas/ErrorInvalidArgument' + - $ref: '#/components/schemas/ErrorUnavailable' + '5XX': + description: Server error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcBadResponse' + - $ref: '#/components/schemas/ErrorWebrpcServerPanic' + - $ref: '#/components/schemas/ErrorWebrpcInternalError' + - $ref: '#/components/schemas/ErrorUnexpected' + /rpc/Trails/YieldGetAggregateBalances: + post: + operationId: Trails-YieldGetAggregateBalances + tags: ["Trails"] + summary: "YieldGetAggregateBalances returns a wallet's earn positions across chains." + description: | + Fetches active yield positions for one or more wallet/network pairs. Accepts up to 25 + queries in a single request, enabling multi-chain balance lookups. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetYieldAggregateBalancesRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetYieldAggregateBalancesResponse' + '4XX': + description: Client error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcEndpoint' + - $ref: '#/components/schemas/ErrorWebrpcRequestFailed' + - $ref: '#/components/schemas/ErrorWebrpcBadRoute' + - $ref: '#/components/schemas/ErrorWebrpcBadMethod' + - $ref: '#/components/schemas/ErrorWebrpcBadRequest' + - $ref: '#/components/schemas/ErrorInvalidArgument' + - $ref: '#/components/schemas/ErrorUnavailable' + '5XX': + description: Server error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcBadResponse' + - $ref: '#/components/schemas/ErrorWebrpcServerPanic' + - $ref: '#/components/schemas/ErrorWebrpcInternalError' + - $ref: '#/components/schemas/ErrorUnexpected' + /rpc/Trails/YieldCreateEnterAction: + post: + operationId: Trails-YieldCreateEnterAction + tags: ["Trails"] + summary: "YieldCreateEnterAction generates unsigned deposit transaction calldata for a yield market." + description: | + Returns the unsigned transaction payload needed to deposit into a DeFi yield market. + This backs the lend() and deposit() composable action builders in the SDK. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateYieldActionRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateYieldActionResponse' + '4XX': + description: Client error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcEndpoint' + - $ref: '#/components/schemas/ErrorWebrpcRequestFailed' + - $ref: '#/components/schemas/ErrorWebrpcBadRoute' + - $ref: '#/components/schemas/ErrorWebrpcBadMethod' + - $ref: '#/components/schemas/ErrorWebrpcBadRequest' + - $ref: '#/components/schemas/ErrorInvalidArgument' + - $ref: '#/components/schemas/ErrorUnavailable' + - $ref: '#/components/schemas/ErrorNotFound' + '5XX': + description: Server error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcBadResponse' + - $ref: '#/components/schemas/ErrorWebrpcServerPanic' + - $ref: '#/components/schemas/ErrorWebrpcInternalError' + - $ref: '#/components/schemas/ErrorUnexpected' + /rpc/Trails/YieldCreateExitAction: + post: + operationId: Trails-YieldCreateExitAction + tags: ["Trails"] + summary: "YieldCreateExitAction generates unsigned withdrawal transaction calldata for a yield position." + description: | + Returns the unsigned transaction payload needed to withdraw from a DeFi yield position. + Counterpart to YieldCreateEnterAction. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateYieldActionRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateYieldActionResponse' + '4XX': + description: Client error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcEndpoint' + - $ref: '#/components/schemas/ErrorWebrpcRequestFailed' + - $ref: '#/components/schemas/ErrorWebrpcBadRoute' + - $ref: '#/components/schemas/ErrorWebrpcBadMethod' + - $ref: '#/components/schemas/ErrorWebrpcBadRequest' + - $ref: '#/components/schemas/ErrorInvalidArgument' + - $ref: '#/components/schemas/ErrorUnavailable' + - $ref: '#/components/schemas/ErrorNotFound' + '5XX': + description: Server error + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/ErrorWebrpcBadResponse' + - $ref: '#/components/schemas/ErrorWebrpcServerPanic' + - $ref: '#/components/schemas/ErrorWebrpcInternalError' + - $ref: '#/components/schemas/ErrorUnexpected' diff --git a/docs.json b/docs.json index 6d59e7d..74c3f1f 100644 --- a/docs.json +++ b/docs.json @@ -159,6 +159,11 @@ { "group": "Earn", "pages": [ + "api-reference/endpoints/yield-get-markets", + "api-reference/endpoints/yield-get-providers", + "api-reference/endpoints/yield-get-balances", + "api-reference/endpoints/yield-create-enter-action", + "api-reference/endpoints/yield-create-exit-action", "api-reference/endpoints/get-earn-pools" ] }, diff --git a/examples/gasless.mdx b/examples/gasless.mdx index 28e1a4d..7f35cd0 100644 --- a/examples/gasless.mdx +++ b/examples/gasless.mdx @@ -172,45 +172,8 @@ You can listen to fee option events: ``` -## 4337 Paymaster Integration - -For apps with existing paymaster infrastructure (Alchemy, Pimlico, ZeroDev, Thirdweb), configure per-chain paymaster URLs: - -```tsx - - - -``` - -### Supported Paymaster Providers - -| Provider | Notes | -|----------|-------| -| Alchemy | Uses bundler-only mode (no separate paymaster client) | -| Pimlico | Full paymaster + bundler support | -| ZeroDev | Full paymaster + bundler support | -| Thirdweb | Full paymaster + bundler support | - - -When using `paymasterUrls`, the paymaster sponsors the gas entirely. Users don't pay any fee—the app/merchant absorbs it. - - ## Gasless Flow Details -### Without Paymaster (ERC-20 Fees) - 1. **Quote Intent** — SDK fetches quote including `gasFeeOptions` with available fee tokens 2. **User Selects Fee** — User picks USDC, USDT, or native gas from dropdown 3. **Permit Signature** — If ERC-20 fee selected, user signs EIP-2612 permit (no on-chain tx) @@ -218,14 +181,6 @@ When using `paymasterUrls`, the paymaster sponsors the gas entirely. Users don't 5. **Relayer Submits** — Trails relayer executes the transaction, deducting fee from user's balance 6. **Completion** — User receives confirmation once destination transaction confirms -### With Paymaster (4337) - -1. **Prepare UserOp** — SDK prepares ERC-4337 user operation -2. **Paymaster Sponsorship** — Paymaster adds `paymasterAndData` to sponsor gas -3. **User Signs** — User signs the user operation -4. **Bundler Submits** — Bundler submits to entry point -5. **Completion** — User receives confirmation - ## Limitations **Smart Contract Wallets**: Gasless deposits via permit signatures require EOA (externally owned account) wallets. Smart contract wallets produce non-standard signatures that the current relayer doesn't support. @@ -263,13 +218,6 @@ The SDK automatically detects smart contract wallets and falls back to native ga Not all ERC-20 tokens support permits. The SDK automatically filters to show only valid fee options, but for API integrations, check token contracts. - - If using custom paymasters: - - Validate paymaster URLs are HTTPS - - Use separate paymaster URLs per environment (dev/prod) - - Monitor paymaster spending and set limits - - Consider allowlisting user operations by contract/method - ## Troubleshooting @@ -279,7 +227,6 @@ The SDK automatically detects smart contract wallets and falls back to native ga | No ERC-20 fee options shown | Token doesn't support permit | User must pay native gas | | "Smart contract wallets not supported" | SC wallet detected | Use native gas flow | | Permit signature fails | Token permit implementation varies | Try a different token or native gas | -| Paymaster rejects UserOp | Paymaster policy/limits | Check paymaster configuration | ## Next Steps diff --git a/examples/refunds.mdx b/examples/refunds.mdx index 3c2396d..08de19d 100644 --- a/examples/refunds.mdx +++ b/examples/refunds.mdx @@ -64,7 +64,7 @@ export const RefundComponent = ({ intentId }: { intentId: string }) => { } = useIntentRecover({ intentId, walletClient, - recoverToAddress: address, // Optional: defaults to connected wallet + refundToAddress: address, // Optional: defaults to connected wallet }) const handleRefund = async () => { diff --git a/sdk/hooks.mdx b/sdk/hooks.mdx index b385b08..7d8d238 100644 --- a/sdk/hooks.mdx +++ b/sdk/hooks.mdx @@ -28,6 +28,48 @@ import { TrailsProvider } from '0xtrails' ``` +### Apps without wagmi and react-query + +The Trails SDK uses wagmi and `@tanstack/react-query` internally. If your app already sets up those providers, `TrailsProvider` will use them automatically. + +If your app does not already include these providers, you need to add them above `TrailsProvider`: + +```tsx +'use client' + +import { TrailsProvider } from '0xtrails' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { createConfig, http, WagmiProvider } from 'wagmi' +import { arbitrum, base, polygon } from 'wagmi/chains' + +const wagmiConfig = createConfig({ + chains: [base, polygon, arbitrum], + transports: { + [base.id]: http(), + [polygon.id]: http(), + [arbitrum.id]: http(), + }, +}) + +const queryClient = new QueryClient() + +export const Providers = ({ children }: { children: React.ReactNode }) => { + return ( + + + + {children} + + + + ) +} +``` + + +This requirement is temporary. A future SDK release will bundle these dependencies so only `TrailsProvider` is needed. + + ### Configuration Options | Option | Type | Required | Description | diff --git a/sdk/modes/fund.mdx b/sdk/modes/fund.mdx index 7a15654..ab4656b 100644 --- a/sdk/modes/fund.mdx +++ b/sdk/modes/fund.mdx @@ -12,27 +12,49 @@ Fund mode implements input-driven deposit flows where users select the amount th ## Quick start +Fund supports four payment methods: connected wallet, crypto transfer (QR/address), fiat on-ramp, and exchange (CEX). Set `paymentMethod` to open a specific flow, or omit it to let the user choose. + ```tsx import { Fund } from '0xtrails/widget' -// Fully open — user picks everything - +// Fiat on-ramp — user buys crypto with a card + console.log("funded", sessionId)} +/> ``` -Pre-set a destination: +```tsx +// CEX transfer — user sends from their exchange account + +``` + + +The exchange (CEX) flow requires your app to be added to the allowlist. Contact us to get access. + ```tsx +// Connected wallet — user pays from their wallet (default) console.log("funded", sessionId)} + paymentMethod="CONNECTED_WALLET" + to={{ recipient: "0xYourAddress", currency: "USDC", chain: "base" }} /> + +// Fully open — let the user pick their preferred method + ``` +See [Source selection](#source-selection-optional) for all `paymentMethod` values and the `from` options each accepts. + ## Props ### Required @@ -63,6 +85,8 @@ Set `paymentMethod` to control how the user funds: | `"CREDIT_DEBIT_CARD"` | Fiat on-ramp | | `"EXCHANGE"` | CEX transfer (Coinbase, Binance, etc.) | +The `from` prop is fully typed based on the selected `paymentMethod`. TypeScript will narrow the allowed fields automatically, so only valid options for that method are accepted. + When `paymentMethod` is set, the `from` object applies to that method: ```tsx diff --git a/sdk/modes/swap.mdx b/sdk/modes/swap.mdx index e884e82..f7f406a 100644 --- a/sdk/modes/swap.mdx +++ b/sdk/modes/swap.mdx @@ -195,7 +195,7 @@ export const CustomSwap = () => {

From: {quote.originAmountFormatted} {quote.originToken.symbol}

To: {quote.destinationAmountFormatted} {quote.destinationToken.symbol}

- +
) } @@ -252,7 +252,7 @@ type UseQuoteProps = { type UseQuoteReturn = { quote: Quote | null - swap: (() => Promise) | null + send: (() => Promise) | null isLoadingQuote: boolean quoteError: unknown refetchQuote: (() => Promise) | null @@ -285,16 +285,15 @@ useEffect(() => { ### Widget Events ```tsx - { + onSwapStart={({ sessionId }) => { console.log('Swap started:', sessionId) }} - onCheckoutComplete={({ sessionId }) => { + onSwapSuccess={({ sessionId }) => { console.log('Swap completed:', sessionId) }} - onCheckoutError={({ sessionId, error }) => { + onSwapError={({ sessionId, error }) => { console.error('Swap failed:', error) }} /> diff --git a/use-cases/earn.mdx b/use-cases/earn.mdx index 2b542ac..fd85cd7 100644 --- a/use-cases/earn.mdx +++ b/use-cases/earn.mdx @@ -41,62 +41,39 @@ export const App = () => { ### Deposit into a specific DeFi pool -Pass a `to.calldata` to target any contract and function. The user can pay from any token on any chain: - - -```tsx AaveDeposit.tsx -import { Earn } from '0xtrails/widget' -import { encodeFunctionData } from 'viem' -import { aaveABI } from './abi.ts' - -export const AaveDepositExample = () => { - const AAVE_POOL_CONTRACT = "0xa0d9C1E9E48Ca30c8d8C3B5D69FF5dc1f6DFfC24" - - const depositCalldata = encodeFunctionData({ - abi: aaveABI, - functionName: 'depositETH', - args: [ - "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5", // pool address - "0x97c4a952b46becad0663f76357d3776ba11566e1", // user wallet - 0, // referralCode +For natively supported protocols like Aave and Morpho, use composable actions — no ABI encoding required. The `lend` and `deposit` builders handle the contract calls internally: + +```tsx +import { useTrailsSendTransaction, lend, erc20Utils } from '0xtrails' + +export function AaveLendButton({ recipient }: { recipient: `0x${string}` }) { + const { sendTransaction, isPending } = useTrailsSendTransaction({ + actions: [ + lend({ + marketId: 'base-usdc-aave-v3-lending', + amount: '100', + }), ], }) return ( - { - console.log('Aave deposit completed:', sessionId) - }} - /> + ) } ``` -```typescript abi.ts -export const aaveABI = [ - { - type: "function", - name: "depositETH", - stateMutability: "payable", - inputs: [ - { name: "pool", type: "address" }, - { name: "onBehalfOf", type: "address" }, - { name: "referralCode", type: "uint16" }, - ], - outputs: [], - }, -] as const -``` - +Use [`useEarnMarkets`](/sdk/composable-actions/markets-and-providers) to discover available `marketId` values at runtime. For protocols not covered by the action builders, see [Composable Actions — custom](/sdk/composable-actions/building-actions#custom-arbitrary-contract-call-escape-hatch). ## Next steps