> ## Documentation Index
> Fetch the complete documentation index at: https://anypay-edge.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Adapters Overview

> Wallet adapters let Trails plug into any wallet stack — wagmi, raw EIP-1193 providers, Solana wallets, or embedded wallets like Thirdweb, Privy, and Fireblocks.

The Trails Widget is not tied to any particular wallet library. The SDK talks to wallets through **adapters**: small factories that bridge an existing wallet runtime (wagmi, an EIP-1193 provider, a Solana wallet, an embedded wallet SDK) into the Trails widget.

Omit adapters entirely and Trails uses its **built-in EVM wallet runtime**, your app wallet context stays separate. Pass adapters when your app already owns wallet state and Trails should share it instead of managing its own.

## Available adapters

| Adapter                                | Package                   | Use it when                                                                                                                 |
| -------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [`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                                                                     |

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.

## Where to pass adapters

Adapters are a **widget-only** feature. Pass them on focused widget components such as `Pay`, `Fund`, `Swap`, `Earn`, `Withdraw`.

```tsx theme={null}
import { Fund } from '0xtrails/widget'
import { wagmiAdapter } from '@0xtrails/adapter-wagmi'

const adapters = [wagmiAdapter()]

<Fund apiKey="YOUR_API_KEY" adapters={adapters} renderInline />
```

## Mixing adapters

You can pass several adapters together. EVM adapters compose into one wallet runtime; Solana adapters stack alongside, so EVM and Solana wallets work in the same widget:

```tsx theme={null}
import { evmAdapter } from '0xtrails'
import { svmAdapter } from '@0xtrails/svm'

const adapters = [
  evmAdapter({
    wallets: { id: 'browser', name: 'Browser Wallet', provider: () => window.ethereum ?? null },
  }),
  svmAdapter({ rpcUrls: ['https://api.mainnet-beta.solana.com'] }),
]
```

## Choosing an adapter

1. **No existing wallet stack?** Pass no adapters — the built-in runtime handles injected wallets and WalletConnect.
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).
