diff --git a/resources/llm-integration.mdx b/resources/llm-integration.mdx index c1c1bfd..2d90137 100644 --- a/resources/llm-integration.mdx +++ b/resources/llm-integration.mdx @@ -291,9 +291,10 @@ async function handlePaymentTool(params: { }; } -// After user confirms, commit and execute +// After user confirms, execute the quoted intent directly. +// CommitIntent is deprecated — ExecuteIntent accepts QUOTED intents. async function executePayment(intent: any, signature: string) { - const { intentId } = await trails.commitIntent({ intent }); + const intentId = intent.intentId; const { intentStatus } = await trails.executeIntent({ intentId, diff --git a/use-cases/fund.mdx b/use-cases/fund.mdx index fa12486..17f4f1a 100644 --- a/use-cases/fund.mdx +++ b/use-cases/fund.mdx @@ -196,19 +196,10 @@ const quoteResponse = await fetch('https://trails-api.sequence.app/rpc/Trails/Qu const { intent } = await quoteResponse.json() const intentAddress = intent.depositTransaction.toAddress +const intentId = intent.intentId -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() - -// Ask the user to deposit to the intent address, then execute +// Ask the user to deposit to the intent address, then execute directly from QUOTED +// (no separate CommitIntent step — that call is deprecated for new integrations) const executeResponse = await fetch('https://trails-api.sequence.app/rpc/Trails/ExecuteIntent', { method: 'POST', headers: { @@ -224,7 +215,7 @@ const executeResponse = await fetch('https://trails-api.sequence.app/rpc/Trails/ -Quotes expire after **10 minutes**. +Quotes expire **15 minutes** after `QuoteIntent`. Call `ExecuteIntent` before that window closes or request a new quote. For a Solana or Tron origin, call [`ExecuteIntentEdge`](/api-reference/endpoints/execute-intent-edge) instead — it arms the server-side fill monitor before the user pays on the edge chain. ## Next steps