Skip to content
Closed
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
2 changes: 2 additions & 0 deletions sdk/adapters/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Omit adapters entirely and Trails uses its **built-in EVM wallet runtime**, your
| [`wagmiAdapter`](/sdk/adapters/wagmi) | `@0xtrails/adapter-wagmi` | Your app uses wagmi (v2 or v3), or a wagmi-based stack such as [Dynamic](/sdk/adapters/dynamic), Privy, or Sequence Connect |
| [`evmAdapter`](/sdk/adapters/eip-1193) | `0xtrails` (built in) | You have a raw EIP-1193 provider — `window.ethereum`, an embedded wallet, or any SDK that can expose one |
| [`svmAdapter`](/sdk/adapters/solana) | `@0xtrails/svm` | You want to accept or send payments from Solana wallets |
| `tronAdapter` | `@0xtrails/tvm` | You want to accept payments from Tron wallets (TronLink, etc.) via the TVM edge rail |

Wallet SDKs that can produce an EIP-1193 provider don't need a dedicated adapter — they plug into `evmAdapter` directly. See the [thirdweb](/sdk/adapters/thirdweb) guide for a complete example of this pattern.

Expand Down Expand Up @@ -52,3 +53,4 @@ const adapters = [
2. **App on wagmi?** Use [`wagmiAdapter`](/sdk/adapters/wagmi). One package supports wagmi 2 and wagmi 3. Wagmi-based wallet SDKs such as [Dynamic](/sdk/adapters/dynamic) (Fireblocks embedded wallets) plug in the same way — no custom Trails code needed.
3. **Embedded or custom wallet that speaks EIP-1193?** Use [`evmAdapter`](/sdk/adapters/eip-1193). This covers wallet SDKs that expose an EIP-1193 provider directly, such as [thirdweb](/sdk/adapters/thirdweb).
4. **Solana?** Add [`svmAdapter`](/sdk/adapters/solana).
5. **Tron?** Add `tronAdapter` from `@0xtrails/tvm`. It stacks alongside EVM and Solana adapters just like `svmAdapter`. Note that `@0xtrails/tvm` requires a `Buffer` polyfill in the browser — see the [`@0xtrails/tvm` README](https://www.npmjs.com/package/@0xtrails/tvm) for the setup snippet.
4 changes: 4 additions & 0 deletions sdk/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ description: "Release notes and migration notes for the 0xtrails SDK"
Track SDK releases, migration guidance, and notable changes.

<CardGroup cols={1}>
<Card title="0xtrails@0.18.0" icon="tag" href="/sdk/changelog/0xtrails-0.18.0">
August 18, 2026 · Tron edge support arrives via the new `@0xtrails/tvm` adapter, and the intent lifecycle drops `CommitIntent` —
new integrations call `ExecuteIntent` (or `ExecuteIntentEdge` for edge origins) directly on a quoted intent.
</Card>
<Card title="0xtrails@0.17.0" icon="tag" href="/sdk/changelog/0xtrails-0.17.0">
July 21, 2026 · Solana support arrives — pay from and to Solana via edge rails with the new `@0xtrails/svm` adapter, plus gasless
transactions and new bridge providers.
Expand Down
80 changes: 80 additions & 0 deletions sdk/changelog/0xtrails-0.18.0.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: "0xtrails@0.18.0"
description: "Release notes for the 0xtrails SDK v0.18.0 — Tron edge support and a simplified intent lifecycle"
---

_Released August 18, 2026_

Two headline changes in this release: **Tron (TVM) support** joins Solana as an [edge rail](/architecture/edge-alt-vms), and the **intent lifecycle drops the separate commit step** — new integrations execute directly on a quoted intent.

## Highlights

- **Tron (TVM) support** — pay *from* Tron with the new [`@0xtrails/tvm`](https://www.npmjs.com/package/@0xtrails/tvm) adapter, auto-detecting TronLink and other TIP-6963 wallets.
- **Direct execution from `QUOTED`** — `send()` calls `ExecuteIntent` right after quoting; `CommitIntent` is no longer invoked in the send flow. `useCommitIntent` and `skipCommit` remain exported but deprecated.
- **`ExecuteIntentEdge` RPC** — the new arm step for Solana / Tron origin flows. `send()` calls it internally before the edge deposit, replacing the old `CommitIntent` call on the edge path. See the [ExecuteIntentEdge](/api-reference/endpoints/execute-intent-edge) endpoint reference.
- **Composable `actions` on `TrailsWidget`** — widget payment forms now forward destination `actions` so composable destination calls execute instead of falling back to a plain payment transfer.

## Introducing Tron

Tron is Trails' second **edge chain**, following the same [edge rail](/architecture/edge-alt-vms) model as Solana: the intent is anchored in EVM orchestration and the Tron leg sits at the edge as the origin the user funds from. Paying **to** Tron via the edge destination path continues to be supported via Relay.

### Add it to your widget

```tsx
import { TrailsWidget, evmAdapter } from '0xtrails'
import { tronAdapter } from '@0xtrails/tvm'

<TrailsWidget
apiKey="YOUR_API_KEY"
adapters={[
evmAdapter({ wallets: [{ id: 'injected', name: 'MetaMask' }] }),
tronAdapter(),
]}
renderInline
/>
```

<Note>
`@0xtrails/tvm` pulls in TronWeb, which references Node's `Buffer` at module-evaluation time. Add a `Buffer` polyfill to your app entry before importing the adapter — see the [`@0xtrails/tvm` README](https://www.npmjs.com/package/@0xtrails/tvm) for the two-line polyfill and Vite alternative.
</Note>

For the current list of edge chains, see [Supported Chains → Edge Chains](/resources/supported-chains#edge-chains).

## Simplified intent lifecycle

Before 0.18.0, the SDK ran `QuoteIntent → CommitIntent → ExecuteIntent`. As of 0.18.0:

- **EVM flows** — `send()` calls `ExecuteIntent` on the quoted intent directly. No `CommitIntent`.
- **Edge flows (Solana, Tron)** — `send()` calls the new `ExecuteIntentEdge(intentId)` to arm fill monitoring server-side, then prompts the user to deposit on the edge chain. The Relay fill and downstream EVM execution are server-owned.

### What's still exported (but deprecated)

- `useCommitIntent` — the mutation hook
- `commitIntent` — the low-level helper
- `commitIntentFn` — the `send()` option
- `skipCommit` — the `send()` option

None of these are invoked by the SDK any more. They remain exported so existing integrations keep compiling; migrate at your own pace.

### Server requirements

Requires a trails-api deployment that executes `QUOTED` intents (i.e. supports `ExecuteIntentEdge`). If you self-host trails-api, deploy the release tagged for 0xtrails 0.18.0 or newer.

## Migration checklist

- Remove any explicit `commitIntent` call before `executeIntent` — pass the quoted `intent.intentId` directly to `useExecuteIntent` or `trailsApi.executeIntent`.
- Delete the `skipCommit` and `commitIntentFn` `send()` options if you passed them.
- For Solana/Tron origin flows via direct API integration, replace the old `CommitIntent` call with [`ExecuteIntentEdge`](/api-reference/endpoints/execute-intent-edge) before the edge deposit.
- If you use `TrailsWidget` with composable destination `actions`, no change — they now propagate through payment forms.

## Patch updates (0.18.1 / 0.18.2)

- **0.18.1** — publish `dist` in `@0xtrails/api` after the changesets v3 upgrade.
- **0.18.2** — small fix on the Tron connector; correct EIP-6963 provider misattribution when providers advertise unknown `rdns` via flag selectors.

## Related documentation

- [ExecuteIntentEdge endpoint reference](/api-reference/endpoints/execute-intent-edge)
- [CommitIntent (deprecated) reference](/api-reference/endpoints/commit-intent)
- [Edge & Alternative VMs](/architecture/edge-alt-vms)
- [Adapters overview](/sdk/adapters/overview)
22 changes: 16 additions & 6 deletions sdk/hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1627,18 +1627,24 @@ type UseIntentRecoverWithSignatureReturn = {

## useCommitIntent / useExecuteIntent

Mutation hooks for committing and executing intents. These are lower-level hooks for advanced users who need direct control over the intent lifecycle.
Mutation hooks for the intent lifecycle. These are lower-level hooks for advanced users who need direct control.

```ts
import { useCommitIntent, useExecuteIntent } from '0xtrails'
```

### useCommitIntent
<Warning>
**`useCommitIntent` is deprecated as of 0xtrails 0.18.0.** New integrations call `useExecuteIntent` directly on the intent returned from `useQuote` — `ExecuteIntent` accepts `QUOTED` intents and folds in the same validation. The hook remains exported for legacy callers.

For Solana or Tron origin flows, `send()` now arms the intent via the server's new `ExecuteIntentEdge` RPC internally. Use the widget or `useTrailsSendTransaction` — the deprecated `commitIntentFn` / `skipCommit` options are no longer invoked.
</Warning>

### useCommitIntent (deprecated)

```tsx
const { mutate: commitIntent, isPending, isError, error, data } = useCommitIntent()

// Commit an intent
// Legacy: commit an intent before executing
commitIntent(intent)
```

Expand All @@ -1647,7 +1653,7 @@ commitIntent(intent)
```tsx
const { mutate: executeIntent, isPending, isError, error, data } = useExecuteIntent()

// Execute an intent with deposit signature
// Execute the quoted intent directly (no commit step needed)
executeIntent({
intent,
depositSignature,
Expand Down Expand Up @@ -1729,9 +1735,13 @@ type TrailsFee = {
}
```

### commitIntent
### commitIntent (deprecated)

<Warning>
Deprecated as of 0xtrails 0.18.0. Skip this call entirely — pass the quoted intent to `sendOriginTransaction` (or use the widget hooks) and the SDK routes to `ExecuteIntent` / `ExecuteIntentEdge` on its own.
</Warning>

Commits an intent to the blockchain.
Legacy commit helper. Committed to the API, not the blockchain — the deprecated `CommitIntent` RPC still validates a quoted intent and transitions it from `QUOTED` to `COMMITTED` for callers that have not migrated.

**Signature**: `(params: CommitIntentParams) => Promise<CommitIntentResult>`

Expand Down