Summary
zeroDevWallet() returns a CreateConnectorFn typed against a different copy of @wagmi/core than the one a current wagmi app resolves, so passing it to createConfig fails type-checking and requires an as unknown as CreateConnectorFn cast.
Details
A standard app on wagmi@2.19.5 resolves @wagmi/core@2.22.1. With the ZeroDev packages installed, a second @wagmi/core copy (3.5.0) ends up in the tree, and the connector is typed against it. The two CreateConnectorFn types are structurally incompatible.
pnpm why @wagmi/core confirms the split.
Reproduction
import { createConfig } from 'wagmi'
import { zeroDevWallet } from '@zerodev/wallet-react'
const connector = zeroDevWallet({ projectId, chains: [arbitrumSepolia] })
createConfig({
chains: [arbitrumSepolia],
connectors: [connector], // type error: incompatible CreateConnectorFn
transports: { [arbitrumSepolia.id]: http() },
})
tsc fails. Current workaround:
const connector = zeroDevWallet({ ... }) as unknown as CreateConnectorFn
Runtime is fine; the issue is purely the type mismatch. It also surfaces as spurious editor "missing chain, account" errors on writeContract / sendTransaction even though the project tsc -b is clean.
Ask
Align the published peer/runtime @wagmi/core version with current wagmi@2.x (which ships @wagmi/core@2.22.x) so no second copy is pulled and no cast is needed. Same applies to the related @zerodev/sdk and ox version skews.
Environment
@zerodev/wallet-react@0.0.1-alpha.26, @zerodev/wallet-react-kit@0.0.1-alpha.3, wagmi 2.19.5, @wagmi/core 2.22.1 vs 3.5.0, viem 2.52.2.
Summary
zeroDevWallet()returns aCreateConnectorFntyped against a different copy of@wagmi/corethan the one a current wagmi app resolves, so passing it tocreateConfigfails type-checking and requires anas unknown as CreateConnectorFncast.Details
A standard app on
wagmi@2.19.5resolves@wagmi/core@2.22.1. With the ZeroDev packages installed, a second@wagmi/corecopy (3.5.0) ends up in the tree, and the connector is typed against it. The twoCreateConnectorFntypes are structurally incompatible.pnpm why @wagmi/coreconfirms the split.Reproduction
tscfails. Current workaround:Runtime is fine; the issue is purely the type mismatch. It also surfaces as spurious editor "missing chain, account" errors on
writeContract/sendTransactioneven though the projecttsc -bis clean.Ask
Align the published peer/runtime
@wagmi/coreversion with currentwagmi@2.x(which ships@wagmi/core@2.22.x) so no second copy is pulled and no cast is needed. Same applies to the related@zerodev/sdkandoxversion skews.Environment
@zerodev/wallet-react@0.0.1-alpha.26,@zerodev/wallet-react-kit@0.0.1-alpha.3, wagmi2.19.5,@wagmi/core2.22.1vs3.5.0, viem2.52.2.