Use Dynamic embedded wallets (Fireblocks) with Trails — connect via Dynamic, sync into wagmi, and pass wagmiAdapter to the widget.
Dynamic powers Fireblocks embedded wallets on web. Dynamic does not need a dedicated Trails adapter — it plugs into wagmi via @dynamic-labs/wagmi-connector, and Trails shares that session through the standard wagmiAdapter.No custom hook is required. Once the user connects with Dynamic’s embedded wallet, the Trails widget reads the same wagmi connection state.The division of labor:
Dynamic owns the wallet: embedded wallet creation, auth, recovery, and connect UI (DynamicWidget).
Trails owns the payment: routing, quotes, and cross-chain execution, signed through the bridged wagmi session.
Include every chain you enable in the Dynamic dashboard. Dynamic no longer auto-syncs chains into your wagmi config — you declare them explicitly in both places.
Define adapters once at module scope. Pass the same wagmiConfig instance you use in WagmiProvider, or call wagmiAdapter() with no options to auto-bridge into the surrounding provider.
// Checkout.tsximport { Fund } from '0xtrails/widget'import { wagmiAdapter } from '@0xtrails/adapter-wagmi'import { useAccount } from 'wagmi'import { wagmiConfig } from './wagmi.config'const adapters = [wagmiAdapter({ wagmiConfig })]export function Checkout() { const { isConnected } = useAccount() if (!isConnected) { return <p>Connect with Dynamic first.</p> } return ( <Fund apiKey="YOUR_TRAILS_API_KEY" adapters={adapters} to={{ chain: "polygon", token: "USDC", amount: "100", recipient: "0x..." }} /> )}
That’s the full integration — Dynamic connects the embedded wallet, wagmi holds the session, and Trails signs through wagmiAdapter.