Skip to main content
thirdweb doesn’t need a dedicated Trails adapter package. Its Connect SDK can convert any active wallet — injected, in-app/social login, or smart account — into a standard EIP-1193 provider with EIP1193.toProvider, which plugs straight into Trails’s built-in evmAdapter. The division of labor:
  • thirdweb owns the wallet: connection UI (ConnectButton), session persistence, social login, smart accounts.
  • Trails owns the payment: routing, quotes, and cross-chain execution, signed through the provider it was handed.

Install

1. Create the thirdweb client

2. Bridge the active thirdweb wallet to a Trails adapter

This hook is the entire integration. It reads the live wallet state with thirdweb’s hooks, converts the wallet to EIP-1193, and wraps it with evmAdapter:
Two details matter here:
  • showDisconnect: false and supportsWalletSelection: false mark the wallet as host-owned: Trails uses it for signing but never shows its own connect, disconnect, or wallet-picker UI — thirdweb’s ConnectButton owns that lifecycle.
  • The useMemo dependencies mean the adapter rebuilds whenever the user switches accounts or chains in thirdweb, so Trails always tracks the live wallet.

3. Wire it up

thirdweb handles connection; the widget renders once a wallet is active:

The pattern generalizes

Nothing here is thirdweb-specific from Trails’s point of view: any wallet SDK that can expose an EIP-1193 provider integrates the same way — convert to a provider, wrap with evmAdapter, mark it host-owned. See the EIP-1193 adapter page for the full evmAdapter API.