diff --git a/bun.lockb b/bun.lockb index 8007b749..ce5eb26e 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 217e71ea..fe9ebcc7 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @zerodev/sdk +## 5.2.6 + +### Patch Changes + +- Fix typing in createKernelAccountClient + ## 5.2.5 ### Patch Changes diff --git a/packages/core/clients/kernelAccountClient.ts b/packages/core/clients/kernelAccountClient.ts index 160df474..2eef7def 100644 --- a/packages/core/clients/kernelAccountClient.ts +++ b/packages/core/clients/kernelAccountClient.ts @@ -56,20 +56,22 @@ export type SmartAccountClientConfig< > export const createKernelAccountClient = < - entryPoint extends EntryPoint, - TTransport extends Transport, + TSmartAccount extends KernelSmartAccount | undefined, + TTransport extends Transport = Transport, TChain extends Chain | undefined = undefined, - TSmartAccount extends KernelSmartAccount | undefined = - | KernelSmartAccount - | undefined + TEntryPoint extends EntryPoint = TSmartAccount extends KernelSmartAccount< + infer U + > + ? U + : never >( parameters: SmartAccountClientConfig< - entryPoint, + TEntryPoint, TTransport, TChain, TSmartAccount > -): KernelAccountClient => { +): KernelAccountClient => { const { key = "Account", name = "Kernel Account Client", @@ -116,5 +118,5 @@ export const createKernelAccountClient = < kernelAccountClientActions({ middleware }) - ) as KernelAccountClient + ) as KernelAccountClient } diff --git a/packages/core/package.json b/packages/core/package.json index e3a2baa2..5087c9da 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@zerodev/sdk", - "version": "5.2.5", + "version": "5.2.6", "author": "ZeroDev", "main": "./_cjs/index.js", "module": "./_esm/index.js",