Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions resources/llm-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
17 changes: 4 additions & 13 deletions use-cases/fund.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -224,7 +215,7 @@ const executeResponse = await fetch('https://trails-api.sequence.app/rpc/Trails/
</CodeGroup>

<Note>
Quotes expire after **10 minutes**.
Quotes expire after **5 minutes**. 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.
</Note>

## Next steps
Expand Down