diff --git a/api-reference/trails-api.gen.json b/api-reference/trails-api.gen.json index 17611fe..b238119 100644 --- a/api-reference/trails-api.gen.json +++ b/api-reference/trails-api.gen.json @@ -9,7 +9,7 @@ "ApiKeyAuth": { "type": "apiKey", "in": "header", - "description": "API Key for authenticating requests, get an access key at https://trails.build and request early access", + "description": "Project access key for authenticating requests, get an access key at https://sequence.build", "name": "X-Access-Key" } }, @@ -1154,6 +1154,66 @@ } } }, + "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 + } + } + }, "ErrorIntentsDisabled": { "type": "object", "required": [ @@ -1201,6 +1261,36 @@ "LIFI" ] }, + "IntentStatus": { + "type": "string", + "description": "Represented as uint8 on the server side", + "enum": [ + "QUOTED", + "COMMITTED", + "EXECUTING", + "FAILED", + "SUCCEEDED" + ] + }, + "TransactionType": { + "type": "string", + "description": "Represented as uint8 on the server side", + "enum": [ + "UNKNOWN", + "DEPOSIT", + "ORIGIN", + "DESTINATION", + "ROUTE" + ] + }, + "TransactionContext": { + "type": "string", + "description": "Represented as uint8 on the server side", + "enum": [ + "NONE", + "CCTPV2_MESSAGE" + ] + }, "TransactionStatus": { "type": "string", "description": "Represented as uint8 on the server side", @@ -1217,17 +1307,6 @@ "ABORTED" ] }, - "IntentStatus": { - "type": "string", - "description": "Represented as uint8 on the server side", - "enum": [ - "QUOTED", - "COMMITTED", - "EXECUTING", - "FAILED", - "SUCCEEDED" - ] - }, "ChainGasUsageStatus": { "type": "string", "description": "Represented as string on the server side", @@ -1237,6 +1316,18 @@ "VERY_BUSY" ] }, + "CCTPTransferStatus": { + "type": "string", + "description": "Represented as uint8 on the server side", + "enum": [ + "UNKNOWN", + "ON_HOLD", + "PENDING", + "FETCHING", + "COMPLETE", + "FAILED" + ] + }, "QuoteIntentRequest": { "type": "object", "required": [ @@ -1244,8 +1335,7 @@ "originChainId", "originTokenAddress", "destinationChainId", - "destinationTokenAddress", - "destinationToAddress" + "destinationTokenAddress" ], "properties": { "ownerAddress": { @@ -1270,7 +1360,7 @@ "type": "string" }, "destinationCallValue": { - "type": "string" + "type": "number" }, "originTokenAmount": { "type": "number" @@ -1281,6 +1371,9 @@ "tradeType": { "$ref": "#/components/schemas/TradeType" }, + "onlyNativeGasFee": { + "type": "boolean" + }, "options": { "$ref": "#/components/schemas/QuoteIntentRequestOptions" } @@ -1290,7 +1383,7 @@ "type": "object", "properties": { "quoteProvider": { - "$ref": "#/components/schemas/QuoteProviderType" + "type": "string" }, "slippageTolerance": { "type": "number" @@ -1309,13 +1402,14 @@ "status", "quoteRequest", "ownerAddress", + "originChainId", + "destinationChainId", "originIntentAddress", - "destinationIntentAddress", - "destinationSalt", + "salt", "depositTransaction", - "calls", - "preconditions", - "metaTxns", + "originCalls", + "originPrecondition", + "originMetaTxn", "quote", "fees", "trailsVersion", @@ -1340,38 +1434,41 @@ "ownerAddress": { "type": "string" }, + "originChainId": { + "type": "number" + }, + "destinationChainId": { + "type": "number" + }, "originIntentAddress": { "type": "string" }, "destinationIntentAddress": { "type": "string" }, - "destinationSalt": { + "salt": { "type": "number" }, "depositTransaction": { "$ref": "#/components/schemas/DepositTransaction" }, - "calls": { - "type": "array", - "description": "[]IntentCalls", - "items": { - "$ref": "#/components/schemas/IntentCalls" - } + "originCalls": { + "$ref": "#/components/schemas/IntentCalls" }, - "preconditions": { - "type": "array", - "description": "[]TransactionPrecondition", - "items": { - "$ref": "#/components/schemas/TransactionPrecondition" - } + "destinationCalls": { + "$ref": "#/components/schemas/IntentCalls" }, - "metaTxns": { - "type": "array", - "description": "[]MetaTxn", - "items": { - "$ref": "#/components/schemas/MetaTxn" - } + "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" @@ -1592,6 +1689,8 @@ "id", "intentId", "chainId", + "type", + "context", "fromAddress", "toAddress", "tokenAddress", @@ -1608,6 +1707,12 @@ "chainId": { "type": "number" }, + "type": { + "$ref": "#/components/schemas/TransactionType" + }, + "context": { + "$ref": "#/components/schemas/TransactionContext" + }, "fromAddress": { "type": "string" }, @@ -1706,7 +1811,6 @@ "type": "object", "required": [ "originGas", - "destinationGas", "provider", "feeTokenAddress", "feeTokenTotal", @@ -1857,6 +1961,7 @@ "destinationTokenAddress", "destinationTokenAmount", "destinationTokenMetadata", + "destinationToAddress", "createdAt" ], "properties": { @@ -1920,6 +2025,9 @@ "destinationTokenMetadata": { "$ref": "#/components/schemas/TokenMetadata" }, + "destinationToAddress": { + "type": "string" + }, "updatedAt": { "type": "string" }, @@ -2018,26 +2126,40 @@ "type": "object", "required": [ "id", - "sourceTxHash", - "sourceChainId", + "intentId", + "originChainId", "destinationChainId", + "originTxnId", + "originTxnHash", + "destinationTxnId", "message", "attestation", - "status" + "status", + "createdAt", + "updatedAt" ], "properties": { "id": { - "type": "string" + "type": "number" }, - "sourceTxHash": { + "intentId": { "type": "string" }, - "sourceChainId": { + "originChainId": { "type": "number" }, "destinationChainId": { "type": "number" }, + "originTxnId": { + "type": "number" + }, + "originTxnHash": { + "type": "string" + }, + "destinationTxnId": { + "type": "number" + }, "message": { "type": "string" }, @@ -2045,13 +2167,16 @@ "type": "string" }, "status": { - "type": "string" + "type": "number" }, - "updatedAt": { + "statusReason": { "type": "string" }, "createdAt": { "type": "string" + }, + "updatedAt": { + "type": "string" } } }, @@ -2113,7 +2238,8 @@ "tokenDecimals", "amount", "amountUsd", - "feeCollectorAddress" + "feeCollectorAddress", + "is2612" ], "properties": { "tokenAddress": { @@ -2133,6 +2259,9 @@ }, "feeCollectorAddress": { "type": "string" + }, + "is2612": { + "type": "boolean" } } }, @@ -2228,6 +2357,107 @@ } } }, + "TrailsContracts": { + "type": "object", + "required": [ + "trailsIntentEntrypointAddress", + "trailsRouterAddress", + "trailsRouterShimAddress" + ], + "properties": { + "trailsIntentEntrypointAddress": { + "type": "string" + }, + "trailsRouterAddress": { + "type": "string" + }, + "trailsRouterShimAddress": { + "type": "string" + } + } + }, + "ChainInfo": { + "type": "object", + "required": [ + "id", + "name", + "tokenName", + "tokenSymbol", + "tokenDecimals", + "isTestnet", + "supportsBridging" + ], + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "tokenName": { + "type": "string" + }, + "tokenSymbol": { + "type": "string" + }, + "tokenDecimals": { + "type": "number" + }, + "isTestnet": { + "type": "boolean" + }, + "supportsBridging": { + "type": "boolean" + }, + "logoUri": { + "type": "string" + }, + "blockExplorerUrl": { + "type": "string" + } + } + }, + "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" + } + } + }, "SortOrder": { "type": "string", "description": "Represented as uint32 on the server side", @@ -2264,6 +2494,7 @@ "required": [ "healthOK", "startTime", + "hostname", "uptime", "ver", "branch", @@ -2278,6 +2509,9 @@ "startTime": { "type": "string" }, + "hostname": { + "type": "string" + }, "uptime": { "type": "number" }, @@ -2342,11 +2576,15 @@ "CommitIntentRequest": { "type": "object", "required": [ - "intent" + "intent", + "trailsContracts" ], "properties": { "intent": { "$ref": "#/components/schemas/Intent" + }, + "trailsContracts": { + "$ref": "#/components/schemas/TrailsContracts" } } }, @@ -2423,6 +2661,13 @@ "properties": { "intentId": { "type": "string" + }, + "lastReceiptStates": { + "type": "array", + "description": "[]TransactionStatus", + "items": { + "$ref": "#/components/schemas/TransactionStatus" + } } } }, @@ -2430,12 +2675,20 @@ "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" } @@ -2480,6 +2733,9 @@ }, "byOriginIntentAddress": { "type": "string" + }, + "byDestinationIntentAddress": { + "type": "string" } } }, @@ -2530,463 +2786,222 @@ } } }, - "Page": { + "GetTokenPricesRequest": { "type": "object", + "required": [ + "tokens" + ], "properties": { - "column": { - "type": "string" - }, - "before": { - "type": "object" - }, - "after": { - "type": "object" - }, - "sort": { + "tokens": { "type": "array", - "description": "[]SortBy", + "description": "[]Token", "items": { - "$ref": "#/components/schemas/SortBy" + "$ref": "#/components/schemas/Token" } - }, - "pageSize": { - "type": "number" - }, - "more": { - "type": "boolean" } } }, - "SortBy": { + "GetTokenPricesResponse": { "type": "object", "required": [ - "column", - "order" + "tokenPrices" ], "properties": { - "column": { - "type": "string" - }, - "order": { - "$ref": "#/components/schemas/SortOrder" - } - } - } - } - }, - "paths": { - "/rpc/Trails/QuoteIntent": { - "post": { - "summary": "Quote Intent", - "description": "Request a quote for a cross-chain intent transaction", - "operationId": "quoteIntent", - "security": [ - { - "ApiKeyAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QuoteIntentRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QuoteIntentResponse" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorWebrpcBadRequest" - } - } + "tokenPrices": { + "type": "array", + "description": "[]TokenPrice", + "items": { + "$ref": "#/components/schemas/TokenPrice" } } } - } - }, - "/rpc/Trails/CommitIntent": { - "post": { - "summary": "Commit Intent", - "description": "Commit an intent to the Trails system", - "operationId": "commitIntent", - "security": [ - { - "ApiKeyAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitIntentRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommitIntentResponse" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorWebrpcBadRequest" - } - } - } + }, + "GetChainsRequest": { + "type": "object", + "properties": { + "routeProvider": { + "type": "string" } } - } - }, - "/rpc/Trails/ExecuteIntent": { - "post": { - "summary": "Execute Intent", - "description": "Execute a committed intent transaction", - "operationId": "executeIntent", - "security": [ - { - "ApiKeyAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExecuteIntentRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExecuteIntentResponse" - } - } - } - }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorWebrpcBadRequest" - } - } + }, + "GetChainsResponse": { + "type": "object", + "required": [ + "chains" + ], + "properties": { + "chains": { + "type": "array", + "description": "[]ChainInfo", + "items": { + "$ref": "#/components/schemas/ChainInfo" } } } - } - }, - "/rpc/Trails/GetIntentReceipt": { - "post": { - "summary": "Get Intent Receipt", - "description": "Retrieve the receipt for an executed intent", - "operationId": "getIntentReceipt", - "security": [ - { - "ApiKeyAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetIntentReceiptRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetIntentReceiptResponse" - } - } - } + }, + "GetExactOutputRoutesRequest": { + "type": "object", + "required": [ + "destinationChainId", + "destinationTokenAddress" + ], + "properties": { + "destinationChainId": { + "type": "number" }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorWebrpcBadRequest" - } - } - } - } - } - } - }, - "/rpc/Trails/WaitIntentReceipt": { - "post": { - "summary": "Wait Intent Receipt", - "description": "Wait for an intent receipt to be ready", - "operationId": "waitIntentReceipt", - "security": [ - { - "ApiKeyAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WaitIntentReceiptRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WaitIntentReceiptResponse" - } - } - } + "destinationTokenAddress": { + "type": "string" }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorWebrpcBadRequest" - } - } - } + "originChainId": { + "type": "number" + }, + "originTokenAddress": { + "type": "string" + }, + "ownerAddress": { + "type": "string" } } - } - }, - "/rpc/Trails/GetIntent": { - "post": { - "summary": "Get Intent", - "description": "Retrieve a specific intent by ID", - "operationId": "getIntent", - "security": [ - { - "ApiKeyAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetIntentRequest" - } + }, + "GetExactOutputRoutesResponse": { + "type": "object", + "required": [ + "tokens" + ], + "properties": { + "tokens": { + "type": "array", + "description": "[]TokenInfo", + "items": { + "$ref": "#/components/schemas/TokenInfo" } } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetIntentResponse" - } - } - } + } + }, + "GetExactInputRoutesRequest": { + "type": "object", + "required": [ + "originChainId", + "originTokenAddress" + ], + "properties": { + "originChainId": { + "type": "number" }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorWebrpcBadRequest" - } - } - } + "originTokenAddress": { + "type": "string" + }, + "destinationChainId": { + "type": "number" + }, + "destinationTokenAddress": { + "type": "string" } } - } - }, - "/rpc/Trails/SearchIntents": { - "post": { - "summary": "Search Intents", - "description": "Search for intents by various criteria", - "operationId": "searchIntents", - "security": [ - { - "ApiKeyAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchIntentsRequest" - } + }, + "GetExactInputRoutesResponse": { + "type": "object", + "required": [ + "tokens" + ], + "properties": { + "tokens": { + "type": "array", + "description": "[]TokenInfo", + "items": { + "$ref": "#/components/schemas/TokenInfo" } } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SearchIntentsResponse" - } - } + } + }, + "GetTokenListRequest": { + "type": "object", + "required": [ + "chainIds" + ], + "properties": { + "chainIds": { + "type": "array", + "description": "[]uint64", + "items": { + "type": "number" } }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorWebrpcBadRequest" - } - } - } + "searchQuery": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "tokenAddress": { + "type": "string" + }, + "includeAllListed": { + "type": "boolean" + }, + "includeExternal": { + "type": "boolean" } } - } - }, - "/rpc/Trails/GetIntentTransactionHistory": { - "post": { - "summary": "Get Intent Transaction History", - "description": "Retrieve transaction history for an intent", - "operationId": "getIntentTransactionHistory", - "security": [ - { - "ApiKeyAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetIntentTransactionHistoryRequest" - } + }, + "GetTokenListResponse": { + "type": "object", + "required": [ + "tokens" + ], + "properties": { + "tokens": { + "type": "array", + "description": "[]TokenInfo", + "items": { + "$ref": "#/components/schemas/TokenInfo" } } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetIntentTransactionHistoryResponse" - } - } - } + } + }, + "Page": { + "type": "object", + "properties": { + "column": { + "type": "string" + }, + "before": { + "type": "number" }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorWebrpcBadRequest" - } - } + "after": { + "type": "number" + }, + "sort": { + "type": "array", + "description": "[]SortBy", + "items": { + "$ref": "#/components/schemas/SortBy" } + }, + "pageSize": { + "type": "number" + }, + "more": { + "type": "boolean" } } - } - }, - "/rpc/Trails/GetTokenPrices": { - "post": { - "summary": "Get Token Prices", - "description": "Retrieve current USD prices for tokens", - "operationId": "getTokenPrices", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "tokens" - ], - "properties": { - "tokens": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Token" - } - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "tokenPrices" - ], - "properties": { - "tokenPrices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TokenPrice" - } - } - } - } - } - } + }, + "SortBy": { + "type": "object", + "required": [ + "column", + "order" + ], + "properties": { + "column": { + "type": "string" }, - "400": { - "description": "Bad request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorWebrpcBadRequest" - } - } - } + "order": { + "$ref": "#/components/schemas/SortOrder" } } } } - } + }, + "paths": null } \ No newline at end of file diff --git a/api-reference/trails-api.gen.yaml b/api-reference/trails-api.gen.yaml index 14f09c0..8206aac 100644 --- a/api-reference/trails-api.gen.yaml +++ b/api-reference/trails-api.gen.yaml @@ -1,6 +1,6 @@ -# trails-api v1.0.0 005f3be0cfe130e92ee5ab03d992cac2bf9d2919 +# trails-api v1 084ea43253074ae6cb7cf6173a6e5f82cd2ed766 # -- -# Code generated by webrpc-gen@v0.30.3 with openapi generator; DO NOT EDIT +# Code generated by webrpc-gen@v0.31.2 with openapi generator; DO NOT EDIT # # webrpc-gen -service=Trails -match=@public -schema=proto/trails-api.ridl -target=openapi -title=Trails API -securityAnnotation=@auth -securitySchemes={ 'ApiKeyAuth': { 'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests, get an access key at https://sequence.build', 'name': 'X-Access-Key' }, } -out=proto/docs/trails-api.gen.yaml openapi: 3.0.0 @@ -8,7 +8,7 @@ info: title: 'Trails API' version: '' components: - securitySchemes: {'ApiKeyAuth': {'type': 'apiKey', 'in': 'header', 'description': 'API Key for authenticating requests, get an access key at https://trails.build and request early access', 'name': 'X-Access-Key'}} + securitySchemes: {'ApiKeyAuth': {'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests, get an access key at https://sequence.build', 'name': 'X-Access-Key'}} schemas: ErrorWebrpcEndpoint: type: object @@ -846,6 +846,50 @@ components: 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 ErrorIntentsDisabled: type: object required: @@ -874,13 +918,40 @@ components: enum: - EXACT_INPUT - EXACT_OUTPUT - QuoteProviderType: + RouteProvider: type: string description: Represented as string on the server side enum: - - RELAY - - CCTPV2 + - AUTO + - CCTP - LIFI + - RELAY + - SUSHI + - ZEROX + IntentStatus: + type: string + description: Represented as uint8 on the server side + enum: + - QUOTED + - COMMITTED + - EXECUTING + - FAILED + - SUCCEEDED + TransactionType: + type: string + description: Represented as uint8 on the server side + enum: + - UNKNOWN + - DEPOSIT + - ORIGIN + - DESTINATION + - ROUTE + TransactionContext: + type: string + description: Represented as uint8 on the server side + enum: + - NONE + - CCTPV2_MESSAGE TransactionStatus: type: string description: Represented as uint8 on the server side @@ -895,15 +966,6 @@ components: - SUCCEEDED - FAILED - ABORTED - IntentStatus: - type: string - description: Represented as uint8 on the server side - enum: - - QUOTED - - COMMITTED - - EXECUTING - - FAILED - - SUCCEEDED ChainGasUsageStatus: type: string description: Represented as string on the server side @@ -911,6 +973,16 @@ components: - NORMAL - BUSY - VERY_BUSY + CCTPTransferStatus: + type: string + description: Represented as uint8 on the server side + enum: + - UNKNOWN + - ON_HOLD + - PENDING + - FETCHING + - COMPLETE + - FAILED QuoteIntentRequest: type: object required: @@ -919,7 +991,6 @@ components: - originTokenAddress - destinationChainId - destinationTokenAddress - - destinationToAddress properties: ownerAddress: type: string @@ -936,20 +1007,24 @@ components: destinationCallData: type: string destinationCallValue: - type: string + type: number originTokenAmount: type: number destinationTokenAmount: type: number tradeType: $ref: '#/components/schemas/TradeType' + onlyNativeGasFee: + type: boolean options: $ref: '#/components/schemas/QuoteIntentRequestOptions' QuoteIntentRequestOptions: type: object properties: - quoteProvider: - $ref: '#/components/schemas/QuoteProviderType' + swapProvider: + $ref: '#/components/schemas/RouteProvider' + bridgeProvider: + $ref: '#/components/schemas/RouteProvider' slippageTolerance: type: number trailsAddressOverrides: @@ -963,13 +1038,14 @@ components: - status - quoteRequest - ownerAddress + - originChainId + - destinationChainId - originIntentAddress - - destinationIntentAddress - - destinationSalt + - salt - depositTransaction - - calls - - preconditions - - metaTxns + - originCalls + - originPrecondition + - originMetaTxn - quote - fees - trailsVersion @@ -987,29 +1063,30 @@ components: $ref: '#/components/schemas/QuoteIntentRequest' ownerAddress: type: string + originChainId: + type: number + destinationChainId: + type: number originIntentAddress: type: string destinationIntentAddress: type: string - destinationSalt: + salt: type: number depositTransaction: $ref: '#/components/schemas/DepositTransaction' - calls: - type: array - description: '[]IntentCalls' - items: - $ref: '#/components/schemas/IntentCalls' - preconditions: - type: array - description: '[]TransactionPrecondition' - items: - $ref: '#/components/schemas/TransactionPrecondition' - metaTxns: - type: array - description: '[]MetaTxn' - items: - $ref: '#/components/schemas/MetaTxn' + 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: @@ -1162,6 +1239,8 @@ components: - id - intentId - chainId + - type + - context - fromAddress - toAddress - tokenAddress @@ -1174,6 +1253,10 @@ components: type: string chainId: type: number + type: + $ref: '#/components/schemas/TransactionType' + context: + $ref: '#/components/schemas/TransactionContext' fromAddress: type: string toAddress: @@ -1207,6 +1290,9 @@ components: IntentProviderQuote: type: object required: + - routeProviders + - routeProvidersRequestIds + - routeProvidersFeeUsd - quoteProvider - quoteProviderRequestId - quoteProviderFeeUsd @@ -1218,6 +1304,21 @@ components: - priceImpact - priceImpactUsd 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 quoteProvider: type: string quoteProviderRequestId: @@ -1242,7 +1343,6 @@ components: type: object required: - originGas - - destinationGas - provider - feeTokenAddress - feeTokenTotal @@ -1354,6 +1454,7 @@ components: - destinationTokenAddress - destinationTokenAmount - destinationTokenMetadata + - destinationToAddress - createdAt properties: id: @@ -1396,6 +1497,8 @@ components: type: number destinationTokenMetadata: $ref: '#/components/schemas/TokenMetadata' + destinationToAddress: + type: string updatedAt: type: string createdAt: @@ -1462,31 +1565,44 @@ components: type: object required: - id - - sourceTxHash - - sourceChainId + - intentId + - originChainId - destinationChainId + - originTxnId + - originTxnHash + - destinationTxnId - message - attestation - status + - createdAt + - updatedAt properties: id: + type: number + intentId: type: string - sourceTxHash: - type: string - sourceChainId: + originChainId: type: number destinationChainId: type: number + originTxnId: + type: number + originTxnHash: + type: string + destinationTxnId: + type: number message: type: string attestation: type: string status: - type: string - updatedAt: + type: number + statusReason: type: string createdAt: type: string + updatedAt: + type: string GasFeeOptions: type: object required: @@ -1531,6 +1647,7 @@ components: - amount - amountUsd - feeCollectorAddress + - is2612 properties: tokenAddress: type: string @@ -1544,6 +1661,8 @@ components: type: number feeCollectorAddress: type: string + is2612: + type: boolean DepositSignature: type: object required: @@ -1607,6 +1726,77 @@ components: type: string sequenceWalletUtilsAddress: type: string + TrailsContracts: + type: object + required: + - trailsIntentEntrypointAddress + - trailsRouterAddress + - trailsRouterShimAddress + properties: + trailsIntentEntrypointAddress: + type: string + trailsRouterAddress: + type: string + trailsRouterShimAddress: + type: string + ChainInfo: + type: object + required: + - id + - name + - tokenName + - tokenSymbol + - tokenDecimals + - isTestnet + - supportsBridging + properties: + id: + type: number + name: + type: string + tokenName: + type: string + tokenSymbol: + type: string + tokenDecimals: + type: number + isTestnet: + type: boolean + supportsBridging: + type: boolean + logoUri: + type: string + blockExplorerUrl: + type: string + 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 SortOrder: type: string description: Represented as uint32 on the server side @@ -1634,6 +1824,7 @@ components: required: - healthOK - startTime + - hostname - uptime - ver - branch @@ -1645,6 +1836,8 @@ components: type: boolean startTime: type: string + hostname: + type: string uptime: type: number ver: @@ -1689,9 +1882,12 @@ components: type: object required: - intent + - trailsContracts properties: intent: $ref: '#/components/schemas/Intent' + trailsContracts: + $ref: '#/components/schemas/TrailsContracts' CommitIntentResponse: type: object required: @@ -1741,14 +1937,25 @@ components: 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: @@ -1778,6 +1985,8 @@ components: type: string byOriginIntentAddress: type: string + byDestinationIntentAddress: + type: string SearchIntentsResponse: type: object required: @@ -1809,15 +2018,135 @@ components: $ref: '#/components/schemas/IntentSummary' nextPage: $ref: '#/components/schemas/Page' + 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' Page: type: object properties: column: type: string before: - type: object + type: number after: - type: object + type: number sort: type: array description: '[]SortBy' @@ -1838,249 +2167,3 @@ components: order: $ref: '#/components/schemas/SortOrder' paths: - /rpc/Trails/QuoteIntent: - post: - summary: Quote Intent - description: Request a quote for a cross-chain intent transaction - operationId: quoteIntent - security: - - ApiKeyAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/QuoteIntentRequest' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/QuoteIntentResponse' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorWebrpcBadRequest' - /rpc/Trails/CommitIntent: - post: - summary: Commit Intent - description: Commit an intent to the Trails system - operationId: commitIntent - security: - - ApiKeyAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CommitIntentRequest' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/CommitIntentResponse' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorWebrpcBadRequest' - /rpc/Trails/ExecuteIntent: - post: - summary: Execute Intent - description: Execute a committed intent transaction - operationId: executeIntent - security: - - ApiKeyAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ExecuteIntentRequest' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/ExecuteIntentResponse' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorWebrpcBadRequest' - /rpc/Trails/GetIntentReceipt: - post: - summary: Get Intent Receipt - description: Retrieve the receipt for an executed intent - operationId: getIntentReceipt - security: - - ApiKeyAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/GetIntentReceiptRequest' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/GetIntentReceiptResponse' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorWebrpcBadRequest' - /rpc/Trails/WaitIntentReceipt: - post: - summary: Wait Intent Receipt - description: Wait for an intent receipt to be ready - operationId: waitIntentReceipt - security: - - ApiKeyAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/WaitIntentReceiptRequest' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/WaitIntentReceiptResponse' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorWebrpcBadRequest' - /rpc/Trails/GetIntent: - post: - summary: Get Intent - description: Retrieve a specific intent by ID - operationId: getIntent - security: - - ApiKeyAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/GetIntentRequest' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/GetIntentResponse' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorWebrpcBadRequest' - /rpc/Trails/SearchIntents: - post: - summary: Search Intents - description: Search for intents by various criteria - operationId: searchIntents - security: - - ApiKeyAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SearchIntentsRequest' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/SearchIntentsResponse' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorWebrpcBadRequest' - /rpc/Trails/GetIntentTransactionHistory: - post: - summary: Get Intent Transaction History - description: Retrieve transaction history for an intent - operationId: getIntentTransactionHistory - security: - - ApiKeyAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/GetIntentTransactionHistoryRequest' - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/GetIntentTransactionHistoryResponse' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorWebrpcBadRequest' - /rpc/Trails/GetTokenPrices: - post: - summary: Get Token Prices - description: Retrieve current USD prices for tokens - operationId: getTokenPrices - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - tokens - properties: - tokens: - type: array - items: - $ref: '#/components/schemas/Token' - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - required: - - tokenPrices - properties: - tokenPrices: - type: array - items: - $ref: '#/components/schemas/TokenPrice' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorWebrpcBadRequest'