Commit 82bbdb8
docs: update SDK provider setup for 0.16 wagmi-opt-in 2026-05-26 (#89)
* docs: update SDK provider setup for 0.16 wagmi-opt-in 2026-05-26
Reflect the `0xtrails@0.16.0` change that makes wagmi opt-in via
`@0xtrails/adapter-wagmi`. The hooks reference still showed
`WagmiProvider` as a required wrapper.
- sdk/hooks.mdx: split the provider-setup section into "Apps without
wagmi" (default in 0.16) and "Apps with wagmi" (use the adapter).
Drop the stale "future SDK release" note since the bundled
runtime now exists.
- examples/wallet-compatibility.mdx: add a 0.16 note clarifying
that wagmi is no longer required and that the existing patterns
apply when sharing an existing wagmi session.
Source: trails @ production, 0xtrails@0.16.0 release notes; see
the published changelog at sdk/changelog/0xtrails-0.16.0.mdx.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: update resources for 0.16 chain support 2026-05-26
- Remove Xai (660279) and Blast (81457) from mainnet chain tables;
both were dropped from `0xtrails@0.16.0` SDK chain support.
- Add HyperEVM (999) to the chain tables; added to SDK
`ALL_CHAINS` and resolver in 0.16.
- Add missing Etherlink and Berachain entries to the fees snippet
and the composable-actions chain identifier list so the docs
match `SupportedChainName` in `widget/shared/resolution.ts`.
Source: trails @ production, packages/0xtrails/src/chainRegistry.ts
and packages/0xtrails/src/widget/shared/resolution.ts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: stop tracking package-lock.json
Picked up accidentally during the docs automation run; the repo uses pnpm
and node_modules is already gitignored. Add package-lock.json to .gitignore
so future automation runs don't re-include it.
* docs: update examples for 0xtrails@0.16.0 wagmi opt-in
In 0.16, Trails no longer requires wagmi by default. Add adapter-wagmi
callouts and update the x402 Providers example to wire wagmiAdapter
through TrailsProvider so the existing wagmi-based snippets work in 0.16+.
- examples/refunds.mdx, examples/tokens-chains-prices.mdx,
examples/transaction-history.mdx, use-cases/swap.mdx,
sdk/modes/swap.mdx: add adapter-wagmi callouts on the wagmi-using snippets
- examples/x402.mdx: extend the Providers.tsx example to wrap in TrailsProvider
with wagmiAdapter, and add the @0xtrails/adapter-wagmi install step
- api-reference/introduction.mdx: clarify the wagmi hooks comment to reference
the SDK's usePublicClient and the wagmi adapter
* docs: align modes & widget typing with 0xtrails@0.16.0
In 0.16 the widget props were tightened: `from.currency` is reserved for
ISO 4217 fiat codes on the fiat-onramp arm, `from.token` is ERC-20 only,
and the destination prop name is `to.token` / `to.defaultToken` (not
`currency` / `defaultCurrency`).
- sdk/modes/swap.mdx, sdk/modes/earn.mdx, sdk/modes/withdraw.mdx:
rewrite the Source prop tables to reflect the discriminated union on
`paymentMethod` (crypto arms expose `from.token`, fiat arm exposes
`from.currency`). Add new 0.16 destination-support props
(`supportedChains`, `supportedTokensByChain`, `originSupportedChains`,
`originSupportedTokensByChain`).
- sdk/modes/fund.mdx, sdk/modes/pay.mdx: rename destination prop rows
(`to.currency` -> `to.token`, `to.defaultCurrency` -> `to.defaultToken`)
and add the new destination-support props on fund.
- All widget code samples in sdk/modes/*, sdk/get-started.mdx,
sdk/quote-providers.mdx, use-cases/swap.mdx: rename
`currency: "<TOKEN>"` -> `token: "<TOKEN>"` and
`defaultCurrency:` -> `defaultToken:` except for ISO 4217 fiat codes
on the credit-card flow examples in fund.mdx, which stay as `currency`.
- sdk/configuration.mdx: drop removed `wagmiConnectors` / `decoupleWagmi`
props and document the new `adapters` prop for wallet runtime adapters.
* docs: document new 0xtrails@0.16.0 SDK surface
Adds reference docs for the public exports introduced in 0.16 that
weren't covered by the wagmi-migration changelog page.
- Adapters: document `evmAdapter` (built-in EIP-1193 helper) and link to
`wagmiAdapter` from @0xtrails/adapter-wagmi.
- Public clients: `usePublicClient` and `usePublicClientGetter` for
getting viem PublicClients via the Sequence node gateway.
- Composable actions: `useResolveActions` for resolving action arrays
into the concrete Call[] used by useTrailsSendTransaction.
- Fiat: `useFiatCurrencyList` and `useExchangeRate` for fiat-aware UI.
- Onramp: `useMeldPaymentMethods` and `useMeldServiceProviders` for
building custom on-ramp UI on top of Mesh.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent bc6dfb1 commit 82bbdb8
20 files changed
Lines changed: 377 additions & 95 deletions
File tree
- api-reference
- examples
- resources
- sdk
- composable-actions
- modes
- snippets
- use-cases
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
218 | | - | |
| 219 | + | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | | - | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
| 104 | + | |
| 105 | + | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
| |||
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
| 118 | + | |
| 119 | + | |
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
113 | 123 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
117 | 129 | | |
118 | 130 | | |
119 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
0 commit comments