@zerodev/sdk 5.4.9 → 5.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/_cjs/accounts/kernel/abi/kernel_v_3_0_0/KernelModuleAbi.js +38 -1
  2. package/_cjs/accounts/kernel/abi/kernel_v_3_0_0/KernelModuleAbi.js.map +1 -1
  3. package/_cjs/accounts/kernel/createKernelAccount.js +26 -1
  4. package/_cjs/accounts/kernel/createKernelAccount.js.map +1 -1
  5. package/_cjs/accounts/kernel/utils/plugins/ep0_7/getPluginInstallCallData.js +18 -0
  6. package/_cjs/accounts/kernel/utils/plugins/ep0_7/getPluginInstallCallData.js.map +1 -0
  7. package/_cjs/accounts/utils/toKernelPluginManager.js +1 -0
  8. package/_cjs/accounts/utils/toKernelPluginManager.js.map +1 -1
  9. package/_cjs/actions/public/index.js +3 -1
  10. package/_cjs/actions/public/index.js.map +1 -1
  11. package/_cjs/actions/public/isPluginInstalled.js +23 -0
  12. package/_cjs/actions/public/isPluginInstalled.js.map +1 -0
  13. package/_cjs/constants.js +9 -1
  14. package/_cjs/constants.js.map +1 -1
  15. package/_cjs/types/index.js.map +1 -1
  16. package/_cjs/types/kernel.js.map +1 -1
  17. package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelModuleAbi.js +37 -0
  18. package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelModuleAbi.js.map +1 -1
  19. package/_esm/accounts/kernel/createKernelAccount.js +33 -2
  20. package/_esm/accounts/kernel/createKernelAccount.js.map +1 -1
  21. package/_esm/accounts/kernel/utils/plugins/ep0_7/getPluginInstallCallData.js +14 -0
  22. package/_esm/accounts/kernel/utils/plugins/ep0_7/getPluginInstallCallData.js.map +1 -0
  23. package/_esm/accounts/utils/toKernelPluginManager.js +1 -0
  24. package/_esm/accounts/utils/toKernelPluginManager.js.map +1 -1
  25. package/_esm/actions/public/index.js +1 -0
  26. package/_esm/actions/public/index.js.map +1 -1
  27. package/_esm/actions/public/isPluginInstalled.js +44 -0
  28. package/_esm/actions/public/isPluginInstalled.js.map +1 -0
  29. package/_esm/constants.js +8 -0
  30. package/_esm/constants.js.map +1 -1
  31. package/_esm/types/index.js.map +1 -1
  32. package/_esm/types/kernel.js.map +1 -1
  33. package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelModuleAbi.d.ts +41 -0
  34. package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelModuleAbi.d.ts.map +1 -1
  35. package/_types/accounts/kernel/createKernelAccount.d.ts +3 -2
  36. package/_types/accounts/kernel/createKernelAccount.d.ts.map +1 -1
  37. package/_types/accounts/kernel/utils/plugins/ep0_7/getPluginInstallCallData.d.ts +5 -0
  38. package/_types/accounts/kernel/utils/plugins/ep0_7/getPluginInstallCallData.d.ts.map +1 -0
  39. package/_types/accounts/utils/toKernelPluginManager.d.ts.map +1 -1
  40. package/_types/actions/public/index.d.ts +1 -0
  41. package/_types/actions/public/index.d.ts.map +1 -1
  42. package/_types/actions/public/isPluginInstalled.d.ts +37 -0
  43. package/_types/actions/public/isPluginInstalled.d.ts.map +1 -0
  44. package/_types/constants.d.ts +8 -0
  45. package/_types/constants.d.ts.map +1 -1
  46. package/_types/types/index.d.ts +1 -1
  47. package/_types/types/index.d.ts.map +1 -1
  48. package/_types/types/kernel.d.ts +8 -1
  49. package/_types/types/kernel.d.ts.map +1 -1
  50. package/accounts/kernel/abi/kernel_v_3_0_0/KernelModuleAbi.ts +39 -0
  51. package/accounts/kernel/createKernelAccount.ts +64 -3
  52. package/accounts/kernel/utils/plugins/ep0_7/getPluginInstallCallData.ts +19 -0
  53. package/accounts/utils/toKernelPluginManager.ts +1 -0
  54. package/actions/public/index.ts +1 -0
  55. package/actions/public/isPluginInstalled.ts +62 -0
  56. package/constants.ts +9 -0
  57. package/package.json +1 -1
  58. package/types/index.ts +2 -1
  59. package/types/kernel.ts +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerodev/sdk",
3
- "version": "5.4.9",
3
+ "version": "5.4.10",
4
4
  "author": "ZeroDev",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
package/types/index.ts CHANGED
@@ -14,7 +14,8 @@ export type {
14
14
  KERNEL_VERSION_TYPE,
15
15
  GetKernelVersion,
16
16
  GetEntryPointAbi,
17
- EntryPointType
17
+ EntryPointType,
18
+ PluginMigrationData
18
19
  } from "./kernel.js"
19
20
 
20
21
  export { ValidatorMode } from "./kernel.js"
package/types/kernel.ts CHANGED
@@ -5,7 +5,7 @@ import type {
5
5
  entryPoint06Abi,
6
6
  entryPoint07Abi
7
7
  } from "viem/account-abstraction"
8
- import type { VALIDATOR_TYPE } from "../constants.js"
8
+ import type { PLUGIN_TYPE, VALIDATOR_TYPE } from "../constants.js"
9
9
  export type ZeroDevPaymasterRpcSchema<
10
10
  entryPointVersion extends EntryPointVersion
11
11
  > = [
@@ -154,10 +154,13 @@ export type ValidatorInitData = {
154
154
  initConfig?: Hex[]
155
155
  }
156
156
 
157
+ export type ActiveValidatorMode = "sudo" | "regular"
158
+
157
159
  export type KernelPluginManager<entryPointVersion extends EntryPointVersion> =
158
160
  KernelValidator & {
159
161
  sudoValidator?: KernelValidator
160
162
  regularValidator?: KernelValidator
163
+ activeValidatorMode: ActiveValidatorMode
161
164
  hook?: KernelValidatorHook
162
165
  getPluginEnableSignature(accountAddress: Address): Promise<Hex>
163
166
  getValidatorInitData(): Promise<ValidatorInitData>
@@ -221,6 +224,12 @@ export enum ValidatorMode {
221
224
  enable = "0x00000002"
222
225
  }
223
226
 
227
+ export type PluginMigrationData = {
228
+ type: (typeof PLUGIN_TYPE)[keyof typeof PLUGIN_TYPE]
229
+ address: Address
230
+ data: Hex
231
+ }
232
+
224
233
  export type CallType = "call" | "delegatecall"
225
234
 
226
235
  export type KernelEncodeCallDataArgs = {