zerodevapp / sdk

MIT License
38 stars 36 forks source link

`createKernelAccountClient` is not assignable to viem `Client` #177

Open johanneskares opened 2 months ago

johanneskares commented 2 months ago

This doesn't compile. Shouldn't this be compatible?

import { Client } from "viem";
import { createKernelAccountClient } from "@zerodev/sdk";

const client: Client = createKernelAccountClient({...});
mmatila commented 2 months ago

I'd say so. At least according to the docs it says:

Since the Kernel account client implements Viem's wallet client interface, you can send UserOps with standard Viem methods.

freeatnet commented 2 months ago

@johanneskares any chance you're instantiating it with an OP stack chain? If so, this may be relevant: https://github.com/wevm/viem/issues/1784 https://github.com/wevm/viem/discussions/2282#discussioncomment-9502349