From 58eb36b19e900211eb55d214bde6a9af2bebec73 Mon Sep 17 00:00:00 2001 From: trails-docs-agent Date: Mon, 31 Aug 2026 09:18:14 +0000 Subject: [PATCH] docs: sync api reference 2026-08-31 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sync OpenAPI spec to trails-api release, document ExecuteIntentEdge, and reflect the CommitIntent deprecation across endpoint docs. Source-of-truth commit: 0xsequence/trails-api@5c42fda7 - api-reference/trails-api.gen.yaml — regenerate from proto/docs/trails-api.gen.yaml and preserve the servers block Mintlify needs to render examples - api-reference/trails-api.gen.json, before-annotations-*.json — regenerate - api-reference/endpoints/execute-intent-edge.mdx — new page for the ExecuteIntentEdge RPC (arms Solana/Tron origin edge intents) - api-reference/endpoints/commit-intent.mdx — mark deprecated for new integrations; still behaviorally stable for legacy callers - api-reference/endpoints/execute-intent.mdx — note it now accepts QUOTED intents directly; intentId comes from QuoteIntent - api-reference/endpoints/quote-intent.mdx — direct callers should call ExecuteIntent (or ExecuteIntentEdge for edge origins) after quoting - api-reference/introduction.mdx — quickstart no longer walks through CommitIntent; timing table shows the new default flow - api-reference/trails-api-sdk.mdx — example calls executeIntent directly - docs.json — add execute-intent-edge to the Intents navigation group --- .../before-annotations-trails-api.gen.json | 234 +++++++++++++++++- api-reference/endpoints/commit-intent.mdx | 34 ++- .../endpoints/execute-intent-edge.mdx | 85 +++++++ api-reference/endpoints/execute-intent.mdx | 25 +- api-reference/endpoints/quote-intent.mdx | 10 +- api-reference/introduction.mdx | 30 +-- api-reference/trails-api-sdk.mdx | 21 +- api-reference/trails-api.gen.json | 234 +++++++++++++++++- api-reference/trails-api.gen.yaml | 112 ++++++++- docs.json | 1 + 10 files changed, 724 insertions(+), 62 deletions(-) create mode 100644 api-reference/endpoints/execute-intent-edge.mdx diff --git a/api-reference/before-annotations-trails-api.gen.json b/api-reference/before-annotations-trails-api.gen.json index 296c0a7f..62eeb88d 100644 --- a/api-reference/before-annotations-trails-api.gen.json +++ b/api-reference/before-annotations-trails-api.gen.json @@ -1780,12 +1780,21 @@ "initTransactionHash": { "type": "string" }, + "initChainId": { + "type": "number" + }, "fillTransactionHash": { "type": "string" }, + "fillChainId": { + "type": "number" + }, "refundTransactionHash": { "type": "string" }, + "refundChainId": { + "type": "number" + }, "edgeTokenMetadata": { "$ref": "#/components/schemas/TokenMetadata" }, @@ -1932,6 +1941,9 @@ "timedRefundUnlockTimestamp": { "type": "number" }, + "pausableSapientSignerAddress": { + "type": "string" + }, "trailsContracts": { "$ref": "#/components/schemas/TrailsContracts" }, @@ -5049,12 +5061,21 @@ "initTransactionHash": { "type": "string" }, + "initChainId": { + "type": "number" + }, "fillTransactionHash": { "type": "string" }, + "fillChainId": { + "type": "number" + }, "refundTransactionHash": { "type": "string" }, + "refundChainId": { + "type": "number" + }, "transactionStates": { "type": "array", "description": "[]TransactionStateInfo", @@ -5140,6 +5161,32 @@ } } }, + "ExecuteIntentEdgeRequest": { + "type": "object", + "required": [ + "intentId" + ], + "properties": { + "intentId": { + "type": "string" + } + } + }, + "ExecuteIntentEdgeResponse": { + "type": "object", + "required": [ + "intentId", + "intentStatus" + ], + "properties": { + "intentId": { + "type": "string" + }, + "intentStatus": { + "$ref": "#/components/schemas/IntentStatus" + } + } + }, "RetryIntentRequest": { "type": "object", "required": [ @@ -7532,7 +7579,8 @@ "tags": [ "Trails" ], - "summary": "", + "summary": "DEPRECATED for new integrations; behaviorally stable for existing ones.", + "description": "New clients call ExecuteIntent directly after QuoteIntent (edge flows arm\nvia ExecuteIntentEdge). Existing callers keep the full legacy contract:\nvalidate, atomically arm origin edge quotes, write QUOTED -> COMMITTED.\n", "requestBody": { "content": { "application/json": { @@ -7894,6 +7942,190 @@ } } }, + "/rpc/Trails/ExecuteIntentEdge": { + "post": { + "operationId": "Trails-ExecuteIntentEdge", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteIntentEdgeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteIntentEdgeResponse" + } + } + } + }, + "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/ErrorIntentProtocolDeprecated" + }, + { + "$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/RetryIntent": { "post": { "operationId": "Trails-RetryIntent", diff --git a/api-reference/endpoints/commit-intent.mdx b/api-reference/endpoints/commit-intent.mdx index f60ff371..d2996f98 100644 --- a/api-reference/endpoints/commit-intent.mdx +++ b/api-reference/endpoints/commit-intent.mdx @@ -3,15 +3,18 @@ title: CommitIntent openapi: ../trails-api.gen.json post /rpc/Trails/CommitIntent --- + +**Deprecated for new integrations.** `CommitIntent` remains behaviorally stable for existing callers, but new integrations should call [`ExecuteIntent`](/api-reference/endpoints/execute-intent) directly on a `QUOTED` intent. For a Solana or Tron origin, arm fill monitoring with [`ExecuteIntentEdge`](/api-reference/endpoints/execute-intent-edge) instead. + + ## Overview -The `CommitIntent` endpoint commits an intent to the Trails system, reserving the quote and preparing it for execution. This is a required step between getting a quote and executing the transaction. +The `CommitIntent` endpoint validates a quoted intent, atomically arms origin edge quotes, and transitions the intent from `QUOTED` to `COMMITTED`. New clients skip this step — `ExecuteIntent` accepts `QUOTED` intents directly and folds in the same validation. ## Use Cases -- Lock in a quote before execution -- Prepare the intent for signing and execution -- Transition from quoted to committed state and preparing a deposit intent address +- Legacy integrations that still separate the commit step from execution +- Preserving compatibility with older SDKs that call `CommitIntent` before `ExecuteIntent` ## Request Parameters @@ -27,14 +30,19 @@ The response includes: ## Intent Lifecycle +Legacy flow (existing callers): + ``` QuoteIntent → CommitIntent → ExecuteIntent → Receipt ``` -The `CommitIntent` step is crucial because it: -1. Reserves the quoted rates -2. Locks in the gas fee estimates -3. Validates the intent parameters +Current flow (new integrations): + +``` +QuoteIntent → ExecuteIntent → Receipt +``` + +For Solana/Tron origins, replace `ExecuteIntent` with `ExecuteIntentEdge` to arm fill monitoring before the user pays on the edge chain. ## Example @@ -68,17 +76,17 @@ console.log('Intent committed:', intentId); ## Important Notes -Committed intents must be executed within **10 minutes**. Make sure to call `ExecuteIntent` before this window expires, or you'll need to get a new quote and commit again. +Committed intents must be executed within **10 minutes**. Call `ExecuteIntent` before this window expires or the intent will expire and require a fresh quote. -The intent object from `QuoteIntent` should not be modified, otherwise the API will reject the commitment. +The intent object from `QuoteIntent` must be forwarded unmodified — the server rejects mutated intents. ## Next Steps After committing an intent: -1. Prepare the transaction signature using the provided intent details for the user to deposit into the intent address -2. Execute the transaction with `ExecuteIntent` -3. Monitor the transaction status with `WaitIntentReceipt` +1. Prepare the transaction signature using the provided intent details for the user to deposit into the intent address. +2. Execute the transaction with [`ExecuteIntent`](/api-reference/endpoints/execute-intent). +3. Monitor the transaction status with [`WaitIntentReceipt`](/api-reference/endpoints/wait-intent-receipt). diff --git a/api-reference/endpoints/execute-intent-edge.mdx b/api-reference/endpoints/execute-intent-edge.mdx new file mode 100644 index 00000000..b55c170f --- /dev/null +++ b/api-reference/endpoints/execute-intent-edge.mdx @@ -0,0 +1,85 @@ +--- +title: ExecuteIntentEdge +openapi: ../trails-api.gen.json post /rpc/Trails/ExecuteIntentEdge +--- + +## Overview + +The `ExecuteIntentEdge` endpoint arms an origin-mode edge intent (Solana or Tron origin) for execution. It flips the intent's edge status so the server-side edge monitor begins watching for the Relay fill on the edge chain and completes execution on the EVM side once funds arrive. + +Call it **before** the user pays on the edge chain. `ExecuteIntentEdge` takes only the `intentId` — no deposit hash, no `edgeId`. The edge quote is resolved and validated from the intent, and the fill transaction hash is discovered server-side. + + +This endpoint is idempotent. Re-arming an already-armed intent succeeds and returns the current status. + + +## When to use + +- Solana → EVM payment (edge as origin) +- Tron → EVM payment (edge as origin) + +For EVM origins, call [`ExecuteIntent`](/api-reference/endpoints/execute-intent) instead. For EVM → Solana or EVM → Tron (edge as destination), the origin call is a plain EVM intent — use `ExecuteIntent` there too. + +## Request Parameters + +### Required Fields + +- **intentId** (string): The intent identifier from `QuoteIntentEdgeResponse.intent.intentId` + +## Response + +- **intentId** (string): The intent identifier +- **intentStatus** (IntentStatus): The current intent status after arming + +## Edge Intent Lifecycle + +``` +QuoteIntentEdge → ExecuteIntentEdge → user deposits on edge chain + → server observes Relay fill + → EVM execution + Receipt +``` + +Because the edge deposit is initiated by the user's Solana/Tron wallet, no deposit hash is sent to the API. The server correlates the arrival on the EVM side against the Relay bridge and progresses the intent automatically. + +## Example + +```typescript +import { TrailsApi } from '@0xtrails/api' + +const trailsApi = new TrailsApi('YOUR_API_KEY') + +// Step 1: Quote the edge intent +const { intent, gasFeeOptions, edge } = await trailsApi.quoteIntentEdge({ + intent: quoteRequest, + edge: { rail: 'SOLANA', mode: 'ORIGIN', tokenAddress: '...', userAddress: '...' }, +}) + +// Step 2: Arm the edge monitor before the user pays on the edge chain +const { intentStatus } = await trailsApi.executeIntentEdge({ + intentId: intent.intentId, +}) + +// Step 3: Prompt the user to sign the edge deposit with their Solana / Tron wallet +// (handled by the SDK's edge adapters — see 0xtrails/svm or 0xtrails/tvm) + +// Step 4: Monitor completion +const receipt = await trailsApi.waitIntentReceipt({ intentId: intent.intentId }) +``` + +## Timing Requirements + + +Arm the intent within the quote's expiration window (**5 minutes** from `QuoteIntentEdge`). After arming, the user must complete the edge deposit before the intent's overall expiry, otherwise the intent refunds. + + +## Errors + +- **QuoteExpired** — the quoted edge intent expired before arming +- **IntentStatus** — the intent is not in a state that permits arming (already executing, terminal, or unknown) +- **InvalidArgument** — the intent is not an origin-mode edge intent + +## Next Steps + +- Track the external bridge hop with [`GetEdgeStatus`](/api-reference/endpoints/get-edge-status) +- Poll or stream the intent receipt with [`WaitIntentReceipt`](/api-reference/endpoints/wait-intent-receipt) +- Discover currently-enabled edge rails with [`GetEdges`](/api-reference/endpoints/get-edges) diff --git a/api-reference/endpoints/execute-intent.mdx b/api-reference/endpoints/execute-intent.mdx index 42b966fe..f1a1b8ee 100644 --- a/api-reference/endpoints/execute-intent.mdx +++ b/api-reference/endpoints/execute-intent.mdx @@ -5,11 +5,17 @@ openapi: ../trails-api.gen.json post /rpc/Trails/ExecuteIntent ## Overview -The `ExecuteIntent` endpoint initiates the execution of a committed intent. This endpoint triggers the actual cross-chain transaction flow, including deposits, swaps, bridges, and destination calls. +The `ExecuteIntent` endpoint initiates the execution of a quoted intent. It accepts intents directly out of `QuoteIntent` — no separate `CommitIntent` step is required for new integrations. Existing callers that still commit before executing continue to work unchanged. + +The call triggers the cross-chain transaction flow: deposit confirmation, swaps, bridges, and destination calls. + + +For Solana or Tron origins, call [`ExecuteIntentEdge`](/api-reference/endpoints/execute-intent-edge) instead. `ExecuteIntent` covers the EVM-to-EVM path; the edge equivalent arms a Relay fill monitor and doesn't take a deposit hash — the server discovers it on-chain. + ## Use Cases -- Execute a committed cross-chain transaction +- Execute a quoted cross-chain transaction - Initiate gasless transactions with deposit signatures - Trigger intent execution after deposit confirmation - Start the cross-chain bridging process @@ -18,7 +24,7 @@ The `ExecuteIntent` endpoint initiates the execution of a committed intent. This ### Required Fields -- **intentId** (string): The unique identifier returned from `CommitIntent` +- **intentId** (string): The intent identifier — read from `QuoteIntentResponse.intent.intentId` (or the `intentId` returned by `CommitIntent` for legacy flows) ### Optional Fields @@ -156,12 +162,9 @@ const quoteRequest = { const quoteResponse = await trailsApi.quoteIntent(quoteRequest); const { intent, gasFeeOptions } = quoteResponse; -// Step 2: Commit -const { intentId } = await trailsApi.commitIntent({ intent }); - -// Step 3: Execute +// Step 2: Execute directly from QUOTED (no separate commit step) const { intentStatus } = await trailsApi.executeIntent({ - intentId, + intentId: intent.intentId, depositSignature: { intentSignature: await signIntent(intent), selectedGasFeeOption: gasFeeOptions.feeOptions[0], @@ -172,15 +175,15 @@ const { intentStatus } = await trailsApi.executeIntent({ console.log('Status:', intentStatus); // EXECUTING -// Step 4: Monitor -const receipt = await trailsApi.waitIntentReceipt({ intentId }); +// Step 3: Monitor +const receipt = await trailsApi.waitIntentReceipt({ intentId: intent.intentId }); console.log('Receipt:', receipt); ``` ## Timing Requirements -You must call `ExecuteIntent` within **10 minutes** of committing the intent. If this window expires, the committed intent becomes invalid and you'll need to request a new quote and commit again. +Call `ExecuteIntent` within the quote's expiration window (**5 minutes** from `QuoteIntent`). If the quote expires before execution, request a new quote and execute again. Legacy callers that committed first have **10 minutes** after `CommitIntent` to execute. ## Error Handling diff --git a/api-reference/endpoints/quote-intent.mdx b/api-reference/endpoints/quote-intent.mdx index 0a698b6d..f01e07e0 100644 --- a/api-reference/endpoints/quote-intent.mdx +++ b/api-reference/endpoints/quote-intent.mdx @@ -98,12 +98,16 @@ console.log('Quote:', quote); ## Quote Expiration -Quotes expire **5 minutes** after being issued. You must commit the intent using `CommitIntent` before the quote expires, or you'll need to request a new quote. +Quotes expire **5 minutes** after being issued. You must call `ExecuteIntent` (or `ExecuteIntentEdge` for a Solana/Tron origin) before the quote expires, or you'll need to request a new quote. ## Next Steps After receiving a quote: -1. Review the quote details, fees, and estimated amounts -2. Use `CommitIntent` to commit the intent before the quote expires (5-minute window) +1. Review the quote details, fees, and estimated amounts. +2. Call [`ExecuteIntent`](/api-reference/endpoints/execute-intent) with the `intent.intentId` from the response to execute directly from `QUOTED`. For a Solana or Tron origin, call [`ExecuteIntentEdge`](/api-reference/endpoints/execute-intent-edge) first to arm fill monitoring, then have the user deposit on the edge chain. + + +`CommitIntent` is deprecated for new integrations. Existing callers may still commit before executing; new integrations should skip it and call `ExecuteIntent` directly on the quoted intent. See [CommitIntent](/api-reference/endpoints/commit-intent) for details. + diff --git a/api-reference/introduction.mdx b/api-reference/introduction.mdx index 2cce6ae0..9d124870 100644 --- a/api-reference/introduction.mdx +++ b/api-reference/introduction.mdx @@ -113,28 +113,16 @@ Use `EXACT_INPUT` when you know how much you want to spend, and `EXACT_OUTPUT` w - ### Commit the Intent - Lock in the quote by committing the intent with the fetched contract addresses. This reserves the rates. + ### (Legacy) Commit the Intent -```typescript -const commitResponse = await fetch('https://trails-api.sequence.app/rpc/Trails/CommitIntent', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'X-Access-Key': 'YOUR_ACCESS_KEY' - }, - body: JSON.stringify({ intent }) -}); - -const { intentId } = await commitResponse.json(); - -console.log('Intent committed:', intentId); -``` + + `CommitIntent` is deprecated for new integrations. New integrations skip this step and call `ExecuteIntent` directly on the quoted intent — `ExecuteIntent` accepts `QUOTED` intents and folds in the same validation `CommitIntent` used to perform. Existing callers may still commit before executing. + -You cannot change the contents of the intent, or the server will reject the commit. The `intent` object contains everything needed to relay and execute the intent. + The `intent` object contains everything needed to execute the intent and the server rejects mutated payloads, so pass it back unchanged. -Quotes expire **5 minutes** after being issued. Once committed, you have **10 minutes** to call `ExecuteIntent`. If either window expires, you'll need to request a new quote. +Quotes expire **5 minutes** after being issued. Call `ExecuteIntent` (or `ExecuteIntentEdge` for Solana/Tron origins) within this window, or request a new quote. Legacy callers that commit first have **10 minutes** after commit to execute. @@ -549,11 +537,11 @@ Quotes have strict time limits: | Stage | Time Limit | What Happens | |-------|------------|--------------| | Quote validity | 5 minutes | Quote expires, request a new one | -| After CommitIntent | 10 minutes | Must call ExecuteIntent within this window | -| Intent execution | N/A | Trails handles execution timing | +| After ExecuteIntent / ExecuteIntentEdge | N/A | Trails handles execution timing | +| Legacy: After CommitIntent | 10 minutes | Must call ExecuteIntent within this window | -Always check quote expiration before committing. The `intent.expiresAt` timestamp indicates when the quote becomes invalid. +Always check quote expiration before executing. The `intent.expiresAt` timestamp indicates when the quote becomes invalid. ## Rate Limiting diff --git a/api-reference/trails-api-sdk.mdx b/api-reference/trails-api-sdk.mdx index 2f842a1e..e2323404 100644 --- a/api-reference/trails-api-sdk.mdx +++ b/api-reference/trails-api-sdk.mdx @@ -59,20 +59,20 @@ const quoteResponse = await trailsApi.quoteIntent({ } }) -// Commit the intent -const { intentId } = await trailsApi.commitIntent({ - intent: quoteResponse.intent -}) - -// Execute the intent +// Execute the intent directly from QUOTED — no separate commit step +const { intent } = quoteResponse await trailsApi.executeIntent({ - intentId + intentId: intent.intentId }) // Monitor completion -const receipt = await trailsApi.waitIntentReceipt({ intentId }) +const receipt = await trailsApi.waitIntentReceipt({ intentId: intent.intentId }) ``` + +For Solana or Tron origins, use `trailsApi.quoteIntentEdge()` and `trailsApi.executeIntentEdge()` instead. See [ExecuteIntentEdge](/api-reference/endpoints/execute-intent-edge). + + ## TypeScript Support The SDK is written in TypeScript and includes complete type definitions for all methods, request parameters, and response objects. You'll get full autocomplete and type checking in your IDE. @@ -82,8 +82,9 @@ The SDK is written in TypeScript and includes complete type definitions for all All SDK methods correspond directly to the Trails API endpoints. For detailed information about request parameters, response formats, and advanced options, refer to the endpoint documentation: - [QuoteIntent](/api-reference/endpoints/quote-intent) - Get quotes for cross-chain transactions -- [CommitIntent](/api-reference/endpoints/commit-intent) - Lock in rates -- [ExecuteIntent](/api-reference/endpoints/execute-intent) - Execute transactions +- [ExecuteIntent](/api-reference/endpoints/execute-intent) - Execute a quoted intent (EVM origin) +- [ExecuteIntentEdge](/api-reference/endpoints/execute-intent-edge) - Arm a Solana or Tron origin edge intent for execution +- [CommitIntent](/api-reference/endpoints/commit-intent) - Legacy commit step (deprecated for new integrations) - [WaitIntentReceipt](/api-reference/endpoints/wait-intent-receipt) - Monitor completion - [GetIntent](/api-reference/endpoints/get-intent) - Retrieve intent details - [GetIntentReceipt](/api-reference/endpoints/get-intent-receipt) - Get transaction receipt diff --git a/api-reference/trails-api.gen.json b/api-reference/trails-api.gen.json index 9eccb355..7df9d35c 100644 --- a/api-reference/trails-api.gen.json +++ b/api-reference/trails-api.gen.json @@ -1780,12 +1780,21 @@ "initTransactionHash": { "type": "string" }, + "initChainId": { + "type": "number" + }, "fillTransactionHash": { "type": "string" }, + "fillChainId": { + "type": "number" + }, "refundTransactionHash": { "type": "string" }, + "refundChainId": { + "type": "number" + }, "edgeTokenMetadata": { "$ref": "#/components/schemas/TokenMetadata" }, @@ -1932,6 +1941,9 @@ "timedRefundUnlockTimestamp": { "type": "number" }, + "pausableSapientSignerAddress": { + "type": "string" + }, "trailsContracts": { "$ref": "#/components/schemas/TrailsContracts" }, @@ -5049,12 +5061,21 @@ "initTransactionHash": { "type": "string" }, + "initChainId": { + "type": "number" + }, "fillTransactionHash": { "type": "string" }, + "fillChainId": { + "type": "number" + }, "refundTransactionHash": { "type": "string" }, + "refundChainId": { + "type": "number" + }, "transactionStates": { "type": "array", "description": "[]TransactionStateInfo", @@ -5140,6 +5161,32 @@ } } }, + "ExecuteIntentEdgeRequest": { + "type": "object", + "required": [ + "intentId" + ], + "properties": { + "intentId": { + "type": "string" + } + } + }, + "ExecuteIntentEdgeResponse": { + "type": "object", + "required": [ + "intentId", + "intentStatus" + ], + "properties": { + "intentId": { + "type": "string" + }, + "intentStatus": { + "$ref": "#/components/schemas/IntentStatus" + } + } + }, "RetryIntentRequest": { "type": "object", "required": [ @@ -7532,7 +7579,8 @@ "tags": [ "Trails" ], - "summary": "", + "summary": "DEPRECATED for new integrations; behaviorally stable for existing ones.", + "description": "New clients call ExecuteIntent directly after QuoteIntent (edge flows arm\nvia ExecuteIntentEdge). Existing callers keep the full legacy contract:\nvalidate, atomically arm origin edge quotes, write QUOTED -> COMMITTED.\n", "requestBody": { "content": { "application/json": { @@ -7894,6 +7942,190 @@ } } }, + "/rpc/Trails/ExecuteIntentEdge": { + "post": { + "operationId": "Trails-ExecuteIntentEdge", + "tags": [ + "Trails" + ], + "summary": "", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteIntentEdgeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteIntentEdgeResponse" + } + } + } + }, + "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/ErrorIntentProtocolDeprecated" + }, + { + "$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/RetryIntent": { "post": { "operationId": "Trails-RetryIntent", diff --git a/api-reference/trails-api.gen.yaml b/api-reference/trails-api.gen.yaml index 0ea436d0..4bfc2c4a 100644 --- a/api-reference/trails-api.gen.yaml +++ b/api-reference/trails-api.gen.yaml @@ -1,4 +1,4 @@ -# trails-api v1 6cf9188c5e4b19ba31646a1448e66daf4691a6af +# trails-api v1 5c42fda72e8f9f44a7c3064d817685ef58e3cde6 # -- # Code generated by webrpc-gen@v0.38.0 with openapi generator; DO NOT EDIT # @@ -1310,10 +1310,16 @@ components: type: string initTransactionHash: type: string + initChainId: + type: number fillTransactionHash: type: string + fillChainId: + type: number refundTransactionHash: type: string + refundChainId: + type: number edgeTokenMetadata: $ref: '#/components/schemas/TokenMetadata' createdAt: @@ -1418,6 +1424,8 @@ components: $ref: '#/components/schemas/IntentProtocolVersion' timedRefundUnlockTimestamp: type: number + pausableSapientSignerAddress: + type: string trailsContracts: $ref: '#/components/schemas/TrailsContracts' expiresAt: @@ -3580,10 +3588,16 @@ components: type: string initTransactionHash: type: string + initChainId: + type: number fillTransactionHash: type: string + fillChainId: + type: number refundTransactionHash: type: string + refundChainId: + type: number transactionStates: type: array description: '[]TransactionStateInfo' @@ -3639,6 +3653,23 @@ components: type: string intentStatus: $ref: '#/components/schemas/IntentStatus' + ExecuteIntentEdgeRequest: + type: object + required: + - intentId + properties: + intentId: + type: string + ExecuteIntentEdgeResponse: + type: object + required: + - intentId + - intentStatus + properties: + intentId: + type: string + intentStatus: + $ref: '#/components/schemas/IntentStatus' RetryIntentRequest: type: object required: @@ -4889,7 +4920,11 @@ paths: post: operationId: Trails-CommitIntent tags: ["Trails"] - summary: "" + summary: "DEPRECATED for new integrations; behaviorally stable for existing ones." + description: | + New clients call ExecuteIntent directly after QuoteIntent (edge flows arm + via ExecuteIntentEdge). Existing callers keep the full legacy contract: + validate, atomically arm origin edge quotes, write QUOTED -> COMMITTED. requestBody: content: application/json: @@ -5031,6 +5066,79 @@ paths: - $ref: '#/components/schemas/ErrorWebrpcInternalError' - $ref: '#/components/schemas/ErrorUnexpected' - $ref: '#/components/schemas/ErrorChainNodeHealth' + /rpc/Trails/ExecuteIntentEdge: + post: + operationId: Trails-ExecuteIntentEdge + tags: ["Trails"] + summary: "" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExecuteIntentEdgeRequest' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ExecuteIntentEdgeResponse' + '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/ErrorIntentProtocolDeprecated' + - $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/RetryIntent: post: operationId: Trails-RetryIntent diff --git a/docs.json b/docs.json index bbf733b2..d223905b 100644 --- a/docs.json +++ b/docs.json @@ -146,6 +146,7 @@ "api-reference/endpoints/quote-intent-edge", "api-reference/endpoints/commit-intent", "api-reference/endpoints/execute-intent", + "api-reference/endpoints/execute-intent-edge", "api-reference/endpoints/get-intent-receipt", "api-reference/endpoints/wait-intent-receipt", "api-reference/endpoints/get-edge-status",