@zerodev/sdk 5.3.26 → 5.4.0-beta.0

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 (320) hide show
  1. package/_cjs/accounts/index.js.map +1 -1
  2. package/_cjs/accounts/kernel/createKernelAccount.js +171 -199
  3. package/_cjs/accounts/kernel/createKernelAccount.js.map +1 -1
  4. package/_cjs/accounts/kernel/utils/account/ep0_6/encodeCallData.js +13 -9
  5. package/_cjs/accounts/kernel/utils/account/ep0_6/encodeCallData.js.map +1 -1
  6. package/_cjs/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.js.map +1 -1
  7. package/_cjs/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js +18 -17
  8. package/_cjs/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js.map +1 -1
  9. package/_cjs/accounts/kernel/utils/account/ep0_7/encodeCallData.js +12 -8
  10. package/_cjs/accounts/kernel/utils/account/ep0_7/encodeCallData.js.map +1 -1
  11. package/_cjs/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.js.map +1 -1
  12. package/_cjs/accounts/kernel/utils/common/accountMetadata.js.map +1 -1
  13. package/_cjs/accounts/kernel/utils/common/getActionSelector.js +2 -2
  14. package/_cjs/accounts/kernel/utils/common/getActionSelector.js.map +1 -1
  15. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js +2 -2
  16. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js.map +1 -1
  17. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js +1 -1
  18. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js.map +1 -1
  19. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js +1 -1
  20. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js.map +1 -1
  21. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js +2 -2
  22. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js.map +1 -1
  23. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteCall.js +2 -2
  24. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteCall.js.map +1 -1
  25. package/_cjs/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.js.map +1 -1
  26. package/_cjs/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.js.map +1 -1
  27. package/_cjs/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js.map +1 -1
  28. package/_cjs/accounts/kernel/v1/createKernelAccountV1.js +81 -94
  29. package/_cjs/accounts/kernel/v1/createKernelAccountV1.js.map +1 -1
  30. package/_cjs/accounts/kernel/v2/createKernelAccountV0_2.js +104 -110
  31. package/_cjs/accounts/kernel/v2/createKernelAccountV0_2.js.map +1 -1
  32. package/_cjs/accounts/utils/getCustomNonceKeyFromString.js +2 -4
  33. package/_cjs/accounts/utils/getCustomNonceKeyFromString.js.map +1 -1
  34. package/_cjs/accounts/utils/index.js +1 -7
  35. package/_cjs/accounts/utils/index.js.map +1 -1
  36. package/_cjs/accounts/utils/multisend.js.map +1 -1
  37. package/_cjs/accounts/utils/toKernelPluginManager.js +14 -16
  38. package/_cjs/accounts/utils/toKernelPluginManager.js.map +1 -1
  39. package/_cjs/actions/account-client/changeSudoValidator.js +27 -21
  40. package/_cjs/actions/account-client/changeSudoValidator.js.map +1 -1
  41. package/_cjs/actions/account-client/getKernelV3ModuleCurrentNonce.js +8 -6
  42. package/_cjs/actions/account-client/getKernelV3ModuleCurrentNonce.js.map +1 -1
  43. package/_cjs/actions/account-client/invalidateNonce.js +20 -15
  44. package/_cjs/actions/account-client/invalidateNonce.js.map +1 -1
  45. package/_cjs/actions/account-client/sendTransaction.js +42 -0
  46. package/_cjs/actions/account-client/sendTransaction.js.map +1 -0
  47. package/_cjs/actions/account-client/signMessage.js +15 -0
  48. package/_cjs/actions/account-client/signMessage.js.map +1 -0
  49. package/_cjs/actions/account-client/signTypedData.js +32 -0
  50. package/_cjs/actions/account-client/signTypedData.js.map +1 -0
  51. package/_cjs/actions/account-client/signUserOperation.js +7 -5
  52. package/_cjs/actions/account-client/signUserOperation.js.map +1 -1
  53. package/_cjs/actions/account-client/uninstallPlugin.js +13 -12
  54. package/_cjs/actions/account-client/uninstallPlugin.js.map +1 -1
  55. package/_cjs/actions/account-client/writeContract.js +21 -0
  56. package/_cjs/actions/account-client/writeContract.js.map +1 -0
  57. package/_cjs/actions/index.js +13 -3
  58. package/_cjs/actions/index.js.map +1 -1
  59. package/_cjs/actions/paymaster/estimateGasInERC20.js +4 -4
  60. package/_cjs/actions/paymaster/estimateGasInERC20.js.map +1 -1
  61. package/_cjs/actions/paymaster/sponsorUserOperation.js +4 -6
  62. package/_cjs/actions/paymaster/sponsorUserOperation.js.map +1 -1
  63. package/_cjs/actions/public/getAccountNonce.js +38 -0
  64. package/_cjs/actions/public/getAccountNonce.js.map +1 -0
  65. package/_cjs/actions/public/getSenderAddress.js +166 -0
  66. package/_cjs/actions/public/getSenderAddress.js.map +1 -0
  67. package/_cjs/actions/public/index.js +8 -0
  68. package/_cjs/actions/public/index.js.map +1 -0
  69. package/_cjs/clients/decorators/kernel.js +17 -27
  70. package/_cjs/clients/decorators/kernel.js.map +1 -1
  71. package/_cjs/clients/fallbackKernelAccountClient.js.map +1 -1
  72. package/_cjs/clients/kernelAccountClient.js +27 -45
  73. package/_cjs/clients/kernelAccountClient.js.map +1 -1
  74. package/_cjs/clients/paymasterClient.js +7 -18
  75. package/_cjs/clients/paymasterClient.js.map +1 -1
  76. package/_cjs/errors/index.js +18 -0
  77. package/_cjs/errors/index.js.map +1 -0
  78. package/_cjs/gasTokenAddresses.js +2 -1
  79. package/_cjs/gasTokenAddresses.js.map +1 -1
  80. package/_cjs/index.js.map +1 -1
  81. package/_cjs/providers/KernelEIP1193Provider.js.map +1 -1
  82. package/_cjs/types/kernel.js.map +1 -1
  83. package/_cjs/utils.js +27 -7
  84. package/_cjs/utils.js.map +1 -1
  85. package/_esm/accounts/index.js.map +1 -1
  86. package/_esm/accounts/kernel/createKernelAccount.js +181 -217
  87. package/_esm/accounts/kernel/createKernelAccount.js.map +1 -1
  88. package/_esm/accounts/kernel/utils/account/ep0_6/encodeCallData.js +13 -9
  89. package/_esm/accounts/kernel/utils/account/ep0_6/encodeCallData.js.map +1 -1
  90. package/_esm/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.js.map +1 -1
  91. package/_esm/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js +18 -17
  92. package/_esm/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js.map +1 -1
  93. package/_esm/accounts/kernel/utils/account/ep0_7/encodeCallData.js +12 -8
  94. package/_esm/accounts/kernel/utils/account/ep0_7/encodeCallData.js.map +1 -1
  95. package/_esm/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.js.map +1 -1
  96. package/_esm/accounts/kernel/utils/common/accountMetadata.js.map +1 -1
  97. package/_esm/accounts/kernel/utils/common/getActionSelector.js +2 -2
  98. package/_esm/accounts/kernel/utils/common/getActionSelector.js.map +1 -1
  99. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js +2 -2
  100. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js.map +1 -1
  101. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js +1 -1
  102. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js.map +1 -1
  103. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js +1 -1
  104. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js.map +1 -1
  105. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js +2 -2
  106. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js.map +1 -1
  107. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteCall.js +2 -2
  108. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteCall.js.map +1 -1
  109. package/_esm/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.js.map +1 -1
  110. package/_esm/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.js.map +1 -1
  111. package/_esm/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js.map +1 -1
  112. package/_esm/accounts/kernel/v1/createKernelAccountV1.js +91 -98
  113. package/_esm/accounts/kernel/v1/createKernelAccountV1.js.map +1 -1
  114. package/_esm/accounts/kernel/v2/createKernelAccountV0_2.js +105 -118
  115. package/_esm/accounts/kernel/v2/createKernelAccountV0_2.js.map +1 -1
  116. package/_esm/accounts/utils/getCustomNonceKeyFromString.js +2 -4
  117. package/_esm/accounts/utils/getCustomNonceKeyFromString.js.map +1 -1
  118. package/_esm/accounts/utils/index.js +0 -5
  119. package/_esm/accounts/utils/index.js.map +1 -1
  120. package/_esm/accounts/utils/multisend.js.map +1 -1
  121. package/_esm/accounts/utils/toKernelPluginManager.js +14 -16
  122. package/_esm/accounts/utils/toKernelPluginManager.js.map +1 -1
  123. package/_esm/actions/account-client/changeSudoValidator.js +23 -17
  124. package/_esm/actions/account-client/changeSudoValidator.js.map +1 -1
  125. package/_esm/actions/account-client/getKernelV3ModuleCurrentNonce.js +8 -6
  126. package/_esm/actions/account-client/getKernelV3ModuleCurrentNonce.js.map +1 -1
  127. package/_esm/actions/account-client/invalidateNonce.js +20 -15
  128. package/_esm/actions/account-client/invalidateNonce.js.map +1 -1
  129. package/_esm/actions/account-client/sendTransaction.js +85 -0
  130. package/_esm/actions/account-client/sendTransaction.js.map +1 -0
  131. package/_esm/actions/account-client/signMessage.js +58 -0
  132. package/_esm/actions/account-client/signMessage.js.map +1 -0
  133. package/_esm/actions/account-client/signTypedData.js +127 -0
  134. package/_esm/actions/account-client/signTypedData.js.map +1 -0
  135. package/_esm/actions/account-client/signUserOperation.js +7 -5
  136. package/_esm/actions/account-client/signUserOperation.js.map +1 -1
  137. package/_esm/actions/account-client/uninstallPlugin.js +10 -9
  138. package/_esm/actions/account-client/uninstallPlugin.js.map +1 -1
  139. package/_esm/actions/account-client/writeContract.js +18 -0
  140. package/_esm/actions/account-client/writeContract.js.map +1 -0
  141. package/_esm/actions/index.js +6 -1
  142. package/_esm/actions/index.js.map +1 -1
  143. package/_esm/actions/paymaster/estimateGasInERC20.js +3 -3
  144. package/_esm/actions/paymaster/estimateGasInERC20.js.map +1 -1
  145. package/_esm/actions/paymaster/sponsorUserOperation.js +3 -5
  146. package/_esm/actions/paymaster/sponsorUserOperation.js.map +1 -1
  147. package/_esm/actions/public/getAccountNonce.js +61 -0
  148. package/_esm/actions/public/getAccountNonce.js.map +1 -0
  149. package/_esm/actions/public/getSenderAddress.js +191 -0
  150. package/_esm/actions/public/getSenderAddress.js.map +1 -0
  151. package/_esm/actions/public/index.js +3 -0
  152. package/_esm/actions/public/index.js.map +1 -0
  153. package/_esm/clients/decorators/kernel.js +19 -28
  154. package/_esm/clients/decorators/kernel.js.map +1 -1
  155. package/_esm/clients/fallbackKernelAccountClient.js.map +1 -1
  156. package/_esm/clients/kernelAccountClient.js +28 -46
  157. package/_esm/clients/kernelAccountClient.js.map +1 -1
  158. package/_esm/clients/paymasterClient.js +8 -19
  159. package/_esm/clients/paymasterClient.js.map +1 -1
  160. package/_esm/errors/index.js +14 -0
  161. package/_esm/errors/index.js.map +1 -0
  162. package/_esm/gasTokenAddresses.js +2 -1
  163. package/_esm/gasTokenAddresses.js.map +1 -1
  164. package/_esm/index.js.map +1 -1
  165. package/_esm/providers/KernelEIP1193Provider.js.map +1 -1
  166. package/_esm/types/kernel.js.map +1 -1
  167. package/_esm/utils.js +29 -7
  168. package/_esm/utils.js.map +1 -1
  169. package/_types/accounts/index.d.ts +2 -2
  170. package/_types/accounts/index.d.ts.map +1 -1
  171. package/_types/accounts/kernel/createKernelAccount.d.ts +21 -18
  172. package/_types/accounts/kernel/createKernelAccount.d.ts.map +1 -1
  173. package/_types/accounts/kernel/utils/account/ep0_6/encodeCallData.d.ts +8 -3
  174. package/_types/accounts/kernel/utils/account/ep0_6/encodeCallData.d.ts.map +1 -1
  175. package/_types/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.d.ts +3 -2
  176. package/_types/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.d.ts.map +1 -1
  177. package/_types/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.d.ts +0 -1
  178. package/_types/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.d.ts.map +1 -1
  179. package/_types/accounts/kernel/utils/account/ep0_7/encodeCallData.d.ts +8 -3
  180. package/_types/accounts/kernel/utils/account/ep0_7/encodeCallData.d.ts.map +1 -1
  181. package/_types/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.d.ts +3 -2
  182. package/_types/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.d.ts.map +1 -1
  183. package/_types/accounts/kernel/utils/common/accountMetadata.d.ts +2 -2
  184. package/_types/accounts/kernel/utils/common/accountMetadata.d.ts.map +1 -1
  185. package/_types/accounts/kernel/utils/common/getActionSelector.d.ts +1 -1
  186. package/_types/accounts/kernel/utils/common/getActionSelector.d.ts.map +1 -1
  187. package/_types/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.d.ts +1 -1
  188. package/_types/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.d.ts.map +1 -1
  189. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.d.ts +1 -1
  190. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.d.ts.map +1 -1
  191. package/_types/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.d.ts +2 -3
  192. package/_types/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.d.ts.map +1 -1
  193. package/_types/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.d.ts +4 -5
  194. package/_types/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.d.ts.map +1 -1
  195. package/_types/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.d.ts +2 -3
  196. package/_types/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.d.ts.map +1 -1
  197. package/_types/accounts/kernel/utils/types.d.ts +2 -2
  198. package/_types/accounts/kernel/utils/types.d.ts.map +1 -1
  199. package/_types/accounts/kernel/v1/createKernelAccountV1.d.ts +18 -9
  200. package/_types/accounts/kernel/v1/createKernelAccountV1.d.ts.map +1 -1
  201. package/_types/accounts/kernel/v2/createKernelAccountV0_2.d.ts +9 -7
  202. package/_types/accounts/kernel/v2/createKernelAccountV0_2.d.ts.map +1 -1
  203. package/_types/accounts/utils/getCustomNonceKeyFromString.d.ts +2 -2
  204. package/_types/accounts/utils/getCustomNonceKeyFromString.d.ts.map +1 -1
  205. package/_types/accounts/utils/index.d.ts +0 -2
  206. package/_types/accounts/utils/index.d.ts.map +1 -1
  207. package/_types/accounts/utils/multisend.d.ts +2 -2
  208. package/_types/accounts/utils/multisend.d.ts.map +1 -1
  209. package/_types/accounts/utils/toKernelPluginManager.d.ts +4 -4
  210. package/_types/accounts/utils/toKernelPluginManager.d.ts.map +1 -1
  211. package/_types/actions/account-client/changeSudoValidator.d.ts +5 -11
  212. package/_types/actions/account-client/changeSudoValidator.d.ts.map +1 -1
  213. package/_types/actions/account-client/getKernelV3ModuleCurrentNonce.d.ts +2 -5
  214. package/_types/actions/account-client/getKernelV3ModuleCurrentNonce.d.ts.map +1 -1
  215. package/_types/actions/account-client/invalidateNonce.d.ts +4 -6
  216. package/_types/actions/account-client/invalidateNonce.d.ts.map +1 -1
  217. package/_types/actions/account-client/sendTransaction.d.ts +50 -0
  218. package/_types/actions/account-client/sendTransaction.d.ts.map +1 -0
  219. package/_types/actions/account-client/signMessage.d.ts +50 -0
  220. package/_types/actions/account-client/signMessage.d.ts.map +1 -0
  221. package/_types/actions/account-client/signTypedData.d.ts +104 -0
  222. package/_types/actions/account-client/signTypedData.d.ts.map +1 -0
  223. package/_types/actions/account-client/signUserOperation.d.ts +4 -6
  224. package/_types/actions/account-client/signUserOperation.d.ts.map +1 -1
  225. package/_types/actions/account-client/uninstallPlugin.d.ts +5 -7
  226. package/_types/actions/account-client/uninstallPlugin.d.ts.map +1 -1
  227. package/_types/actions/account-client/writeContract.d.ts +4 -0
  228. package/_types/actions/account-client/writeContract.d.ts.map +1 -0
  229. package/_types/actions/index.d.ts +6 -1
  230. package/_types/actions/index.d.ts.map +1 -1
  231. package/_types/actions/paymaster/estimateGasInERC20.d.ts +1305 -4
  232. package/_types/actions/paymaster/estimateGasInERC20.d.ts.map +1 -1
  233. package/_types/actions/paymaster/sponsorUserOperation.d.ts +1314 -10
  234. package/_types/actions/paymaster/sponsorUserOperation.d.ts.map +1 -1
  235. package/_types/actions/public/getAccountNonce.d.ts +34 -0
  236. package/_types/actions/public/getAccountNonce.d.ts.map +1 -0
  237. package/_types/actions/public/getSenderAddress.d.ts +46 -0
  238. package/_types/actions/public/getSenderAddress.d.ts.map +1 -0
  239. package/_types/actions/public/index.d.ts +3 -0
  240. package/_types/actions/public/index.d.ts.map +1 -0
  241. package/_types/clients/decorators/kernel.d.ts +774 -20
  242. package/_types/clients/decorators/kernel.d.ts.map +1 -1
  243. package/_types/clients/fallbackKernelAccountClient.d.ts +255 -4
  244. package/_types/clients/fallbackKernelAccountClient.d.ts.map +1 -1
  245. package/_types/clients/kernelAccountClient.d.ts +34 -36
  246. package/_types/clients/kernelAccountClient.d.ts.map +1 -1
  247. package/_types/clients/paymasterClient.d.ts +10 -24
  248. package/_types/clients/paymasterClient.d.ts.map +1 -1
  249. package/_types/errors/index.d.ts +7 -0
  250. package/_types/errors/index.d.ts.map +1 -0
  251. package/_types/gasTokenAddresses.d.ts +1 -1
  252. package/_types/gasTokenAddresses.d.ts.map +1 -1
  253. package/_types/index.d.ts +1 -1
  254. package/_types/index.d.ts.map +1 -1
  255. package/_types/providers/KernelEIP1193Provider.d.ts +3 -4
  256. package/_types/providers/KernelEIP1193Provider.d.ts.map +1 -1
  257. package/_types/types/index.d.ts +1 -0
  258. package/_types/types/index.d.ts.map +1 -1
  259. package/_types/types/kernel.d.ts +25 -27
  260. package/_types/types/kernel.d.ts.map +1 -1
  261. package/_types/utils.d.ts +1310 -4
  262. package/_types/utils.d.ts.map +1 -1
  263. package/accounts/index.ts +5 -2
  264. package/accounts/kernel/createKernelAccount.ts +312 -357
  265. package/accounts/kernel/utils/account/ep0_6/encodeCallData.ts +22 -12
  266. package/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.ts +6 -3
  267. package/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.ts +22 -19
  268. package/accounts/kernel/utils/account/ep0_7/encodeCallData.ts +21 -11
  269. package/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.ts +6 -3
  270. package/accounts/kernel/utils/common/accountMetadata.ts +2 -7
  271. package/accounts/kernel/utils/common/getActionSelector.ts +3 -3
  272. package/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.ts +3 -3
  273. package/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.ts +1 -1
  274. package/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.ts +1 -1
  275. package/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.ts +3 -3
  276. package/accounts/kernel/utils/ep0_7/encodeExecuteCall.ts +2 -2
  277. package/accounts/kernel/utils/plugins/ep0_6/getEncodedPluginsData.ts +2 -8
  278. package/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.ts +4 -10
  279. package/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.ts +2 -8
  280. package/accounts/kernel/utils/types.ts +2 -2
  281. package/accounts/kernel/v1/createKernelAccountV1.ts +147 -174
  282. package/accounts/kernel/v2/createKernelAccountV0_2.ts +135 -179
  283. package/accounts/utils/getCustomNonceKeyFromString.ts +3 -6
  284. package/accounts/utils/index.ts +0 -9
  285. package/accounts/utils/multisend.ts +5 -2
  286. package/accounts/utils/toKernelPluginManager.ts +23 -27
  287. package/actions/account-client/changeSudoValidator.ts +61 -85
  288. package/actions/account-client/getKernelV3ModuleCurrentNonce.ts +12 -51
  289. package/actions/account-client/invalidateNonce.ts +38 -67
  290. package/actions/account-client/sendTransaction.ts +134 -0
  291. package/actions/account-client/signMessage.ts +75 -0
  292. package/actions/account-client/signTypedData.ts +159 -0
  293. package/actions/account-client/signUserOperation.ts +31 -63
  294. package/actions/account-client/uninstallPlugin.ts +35 -56
  295. package/actions/account-client/writeContract.ts +72 -0
  296. package/actions/index.ts +15 -6
  297. package/actions/paymaster/estimateGasInERC20.ts +12 -8
  298. package/actions/paymaster/sponsorUserOperation.ts +52 -50
  299. package/actions/public/getAccountNonce.ts +77 -0
  300. package/actions/public/getSenderAddress.ts +276 -0
  301. package/actions/public/index.ts +9 -0
  302. package/clients/decorators/kernel.ts +363 -159
  303. package/clients/fallbackKernelAccountClient.ts +9 -11
  304. package/clients/kernelAccountClient.ts +142 -104
  305. package/clients/paymasterClient.ts +69 -43
  306. package/errors/index.ts +17 -0
  307. package/gasTokenAddresses.ts +3 -2
  308. package/index.ts +5 -2
  309. package/package.json +11 -34
  310. package/providers/KernelEIP1193Provider.ts +4 -7
  311. package/types/index.ts +2 -0
  312. package/types/kernel.ts +64 -63
  313. package/utils.ts +41 -13
  314. package/_cjs/actions/paymaster/sponsorUserOperationEip7677.js +0 -59
  315. package/_cjs/actions/paymaster/sponsorUserOperationEip7677.js.map +0 -1
  316. package/_esm/actions/paymaster/sponsorUserOperationEip7677.js +0 -58
  317. package/_esm/actions/paymaster/sponsorUserOperationEip7677.js.map +0 -1
  318. package/_types/actions/paymaster/sponsorUserOperationEip7677.d.ts +0 -16
  319. package/_types/actions/paymaster/sponsorUserOperationEip7677.d.ts.map +0 -1
  320. package/actions/paymaster/sponsorUserOperationEip7677.ts +0 -152
@@ -1,12 +1,8 @@
1
- import { getEntryPointVersion } from "permissionless"
2
- import type { EntryPoint } from "permissionless/types/entrypoint"
3
1
  import { satisfies } from "semver"
4
2
  import {
5
3
  type Address,
6
- type Chain,
7
4
  type Client,
8
5
  type Hex,
9
- type Transport,
10
6
  concat,
11
7
  concatHex,
12
8
  maxUint16,
@@ -15,6 +11,7 @@ import {
15
11
  toHex,
16
12
  zeroAddress
17
13
  } from "viem"
14
+ import type { EntryPointVersion } from "viem/account-abstraction"
18
15
  import { getChainId } from "viem/actions"
19
16
  import { encodeModuleInstallCallData as encodeModuleInstallCallDataEpV06 } from "../../accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js"
20
17
  import {
@@ -36,19 +33,19 @@ import { getEncodedPluginsData as getEncodedPluginsDataV2 } from "../kernel/util
36
33
  import { getPluginsEnableTypedData as getPluginsEnableTypedDataV2 } from "../kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js"
37
34
  import { isPluginInitialized } from "../kernel/utils/plugins/ep0_7/isPluginInitialized.js"
38
35
 
39
- export function isKernelPluginManager<entryPoint extends EntryPoint>(
36
+ export function isKernelPluginManager<
37
+ entryPointVersion extends EntryPointVersion
38
+ >(
40
39
  // biome-ignore lint/suspicious/noExplicitAny: <explanation>
41
40
  plugin: any
42
- ): plugin is KernelPluginManager<entryPoint> {
41
+ ): plugin is KernelPluginManager<entryPointVersion> {
43
42
  return plugin.getPluginEnableSignature !== undefined
44
43
  }
45
44
 
46
45
  export async function toKernelPluginManager<
47
- entryPoint extends EntryPoint,
48
- TTransport extends Transport = Transport,
49
- TChain extends Chain | undefined = Chain | undefined
46
+ entryPointVersion extends EntryPointVersion
50
47
  >(
51
- client: Client<TTransport, TChain, undefined>,
48
+ client: Client,
52
49
  {
53
50
  sudo,
54
51
  regular,
@@ -58,11 +55,11 @@ export async function toKernelPluginManager<
58
55
  action,
59
56
  validAfter = 0,
60
57
  validUntil = 0,
61
- entryPoint: entryPointAddress,
58
+ entryPoint,
62
59
  kernelVersion,
63
60
  chainId
64
- }: KernelPluginManagerParams<entryPoint>
65
- ): Promise<KernelPluginManager<entryPoint>> {
61
+ }: KernelPluginManagerParams<entryPointVersion>
62
+ ): Promise<KernelPluginManager<entryPointVersion>> {
66
63
  if (
67
64
  (sudo && !satisfies(kernelVersion, sudo?.supportedKernelVersions)) ||
68
65
  (regular && !satisfies(kernelVersion, regular?.supportedKernelVersions))
@@ -72,20 +69,19 @@ export async function toKernelPluginManager<
72
69
  )
73
70
  }
74
71
  let pluginEnabled: boolean
75
- const entryPointVersion = getEntryPointVersion(entryPointAddress)
76
72
  const activeValidator = regular || sudo
77
73
  if (!activeValidator) {
78
74
  throw new Error("One of `sudo` or `regular` validator must be set")
79
75
  }
80
76
  action = {
81
- selector: action?.selector ?? getActionSelector(entryPointVersion),
77
+ selector: action?.selector ?? getActionSelector(entryPoint.version),
82
78
  address: action?.address ?? zeroAddress
83
79
  }
84
80
  if (
85
- entryPointVersion === "v0.7" &&
81
+ entryPoint.version === "0.7" &&
86
82
  (action.address.toLowerCase() !== zeroAddress.toLowerCase() ||
87
83
  action.selector.toLowerCase() !==
88
- getActionSelector(entryPointVersion).toLowerCase()) &&
84
+ getActionSelector(entryPoint.version).toLowerCase()) &&
89
85
  kernelVersion === "0.3.0"
90
86
  ) {
91
87
  action.hook = {
@@ -105,7 +101,7 @@ export async function toKernelPluginManager<
105
101
  if (!action) {
106
102
  throw new Error("Action data must be set")
107
103
  }
108
- if (entryPointVersion === "v0.6") {
104
+ if (entryPoint.version === "0.6") {
109
105
  if (regular) {
110
106
  if (pluginEnabled) {
111
107
  return ValidatorMode.plugin
@@ -163,7 +159,7 @@ export async function toKernelPluginManager<
163
159
  throw new Error("Action data must be set")
164
160
  }
165
161
  if (!regular) throw new Error("regular validator not set")
166
- if (entryPointVersion === "v0.6") {
162
+ if (entryPoint.version === "0.6") {
167
163
  return regular.isEnabled(accountAddress, selector)
168
164
  }
169
165
  const isEnabled =
@@ -195,7 +191,7 @@ export async function toKernelPluginManager<
195
191
  chainId = client.chain?.id ?? (await getChainId(client))
196
192
  }
197
193
  let ownerSig: Hex
198
- if (entryPointVersion === "v0.6") {
194
+ if (entryPoint.version === "0.6") {
199
195
  const typeData = await getPluginsEnableTypedDataV1({
200
196
  accountAddress,
201
197
  chainId,
@@ -276,7 +272,7 @@ export async function toKernelPluginManager<
276
272
  throw new Error("Action data must be set")
277
273
  }
278
274
  if (!regular) throw new Error("regular validator not set")
279
- if (entryPointVersion === "v0.6") {
275
+ if (entryPoint.version === "0.6") {
280
276
  return await encodeModuleInstallCallDataEpV06({
281
277
  accountAddress,
282
278
  selector: action.selector,
@@ -292,7 +288,7 @@ export async function toKernelPluginManager<
292
288
  signUserOperation: async (userOperation) => {
293
289
  const userOpSig =
294
290
  await activeValidator.signUserOperation(userOperation)
295
- if (entryPointVersion === "v0.6") {
291
+ if (entryPoint.version === "0.6") {
296
292
  return concatHex([
297
293
  await getSignatureData(
298
294
  userOperation.sender,
@@ -317,10 +313,10 @@ export async function toKernelPluginManager<
317
313
  validAfter,
318
314
  validUntil
319
315
  }),
320
- getDummySignature: async (userOperation) => {
316
+ getStubSignature: async (userOperation) => {
321
317
  const userOpSig =
322
- await activeValidator.getDummySignature(userOperation)
323
- if (entryPointVersion === "v0.6") {
318
+ await activeValidator.getStubSignature(userOperation)
319
+ if (entryPoint.version === "0.6") {
324
320
  return concatHex([
325
321
  await getSignatureData(
326
322
  userOperation.sender,
@@ -342,10 +338,10 @@ export async function toKernelPluginManager<
342
338
  if (!action) {
343
339
  throw new Error("Action data must be set")
344
340
  }
345
- if (entryPointVersion === "v0.6") {
341
+ if (entryPoint.version === "0.6") {
346
342
  if (customNonceKey > maxUint192) {
347
343
  throw new Error(
348
- "Custom nonce key must be equal or less than maxUint192 for v0.6"
344
+ "Custom nonce key must be equal or less than maxUint192 for 0.6"
349
345
  )
350
346
  }
351
347
 
@@ -1,22 +1,25 @@
1
- import {
2
- type SendUserOperationParameters,
3
- sendUserOperation
4
- } from "permissionless/actions/smartAccount"
5
- import type { EntryPoint, Prettify } from "permissionless/types"
6
- import {
7
- AccountOrClientNotFoundError,
8
- parseAccount
9
- } from "permissionless/utils"
10
1
  import {
11
2
  type Chain,
12
3
  type Client,
13
4
  type Hash,
14
5
  type Hex,
6
+ type Prettify,
15
7
  type Transport,
16
8
  zeroAddress
17
9
  } from "viem"
18
- import { concatHex, encodeFunctionData, getAction, pad } from "viem/utils"
19
- import type { KernelSmartAccount } from "../../accounts/index.js"
10
+ import {
11
+ type SendUserOperationParameters,
12
+ type SmartAccount,
13
+ sendUserOperation
14
+ } from "viem/account-abstraction"
15
+ import {
16
+ concatHex,
17
+ encodeFunctionData,
18
+ getAction,
19
+ pad,
20
+ parseAccount
21
+ } from "viem/utils"
22
+ import type { KernelSmartAccountImplementation } from "../../accounts/index.js"
20
23
  import { KernelV3_1AccountAbi } from "../../accounts/kernel/abi/kernel_v_3_1/KernelAccountAbi.js"
21
24
  import {
22
25
  KERNEL_V3_0,
@@ -28,68 +31,39 @@ import type {
28
31
  KernelValidator,
29
32
  KernelValidatorHook
30
33
  } from "../../types/kernel.js"
31
-
32
- type OptionalUserOperationParameters<
33
- entryPoint extends EntryPoint,
34
- TTransport extends Transport = Transport,
35
- TChain extends Chain | undefined = Chain | undefined,
36
- TAccount extends
37
- | KernelSmartAccount<entryPoint, TTransport, TChain>
38
- | undefined =
39
- | KernelSmartAccount<entryPoint, TTransport, TChain>
40
- | undefined
41
- > = Omit<
42
- SendUserOperationParameters<entryPoint, TTransport, TChain, TAccount>,
43
- "userOperation"
44
- > & {
45
- userOperation?: SendUserOperationParameters<
46
- entryPoint,
47
- TTransport,
48
- TChain,
49
- TAccount
50
- >["userOperation"]
51
- }
34
+ import { AccountNotFoundError } from "../../errors/index.js";
52
35
 
53
36
  export type ChangeSudoValidatorParameters<
54
- entryPoint extends EntryPoint,
55
- TTransport extends Transport = Transport,
56
- TChain extends Chain | undefined = Chain | undefined,
57
- TAccount extends
58
- | KernelSmartAccount<entryPoint, TTransport, TChain>
59
- | undefined =
60
- | KernelSmartAccount<entryPoint, TTransport, TChain>
61
- | undefined
37
+ account extends SmartAccount | undefined,
38
+ accountOverride extends SmartAccount | undefined = undefined,
39
+ calls extends readonly unknown[] = readonly unknown[]
62
40
  > = Prettify<
63
- OptionalUserOperationParameters<
64
- entryPoint,
65
- TTransport,
66
- TChain,
67
- TAccount
68
- > & {
69
- sudoValidator: KernelValidator<entryPoint, string>
41
+ Partial<SendUserOperationParameters<account, accountOverride, calls>> & {
42
+ sudoValidator: KernelValidator<string>
70
43
  hook?: KernelValidatorHook
71
44
  }
72
45
  >
73
46
 
74
47
  export async function changeSudoValidator<
75
- entryPoint extends EntryPoint,
76
- TTransport extends Transport = Transport,
77
- TChain extends Chain | undefined = Chain | undefined,
78
- TAccount extends
79
- | KernelSmartAccount<entryPoint, TTransport, TChain>
80
- | undefined =
81
- | KernelSmartAccount<entryPoint, TTransport, TChain>
82
- | undefined
48
+ account extends SmartAccount | undefined,
49
+ chain extends Chain | undefined,
50
+ accountOverride extends SmartAccount | undefined = undefined,
51
+ calls extends readonly unknown[] = readonly unknown[]
83
52
  >(
84
- client: Client<TTransport, TChain, TAccount>,
53
+ client: Client<Transport, chain, account>,
85
54
  args: Prettify<
86
- ChangeSudoValidatorParameters<entryPoint, TTransport, TChain, TAccount>
55
+ ChangeSudoValidatorParameters<account, accountOverride, calls>
87
56
  >
88
57
  ): Promise<Hash> {
89
58
  const { account: account_ = client.account, sudoValidator, hook } = args
90
- if (!account_) throw new AccountOrClientNotFoundError()
59
+ if (!account_)
60
+ throw new AccountNotFoundError({
61
+ docsPath: "/docs/actions/wallet/sendTransaction"
62
+ })
91
63
 
92
- const account = parseAccount(account_) as KernelSmartAccount<entryPoint>
64
+ const account = parseAccount(
65
+ account_
66
+ ) as SmartAccount<KernelSmartAccountImplementation>
93
67
 
94
68
  let rootValidatorId: Hex
95
69
  if (
@@ -122,29 +96,31 @@ export async function changeSudoValidator<
122
96
  if (account.kernelVersion === KERNEL_V3_0) {
123
97
  return await getAction(
124
98
  client,
125
- sendUserOperation<entryPoint, TTransport, TChain, TAccount>,
99
+ sendUserOperation,
126
100
  "sendUserOperation"
127
101
  )({
128
102
  ...args,
129
- userOperation: {
130
- callData: await account.encodeCallData({
131
- to: KernelVersionToAddressesMap[KERNEL_V3_1]
132
- .accountImplementationAddress,
133
- value: 0n,
134
- data: encodeFunctionData({
135
- abi: KernelV3_1AccountAbi,
136
- functionName: "changeRootValidator",
137
- args: [rootValidatorId, hookId, validatorData, hookData]
138
- }),
139
- callType: "delegatecall"
140
- })
141
- }
142
- } as SendUserOperationParameters<
143
- entryPoint,
144
- TTransport,
145
- TChain,
146
- TAccount
147
- >)
103
+ callData: await account.encodeCalls(
104
+ [
105
+ {
106
+ to: KernelVersionToAddressesMap[KERNEL_V3_1]
107
+ .accountImplementationAddress,
108
+ value: 0n,
109
+ data: encodeFunctionData({
110
+ abi: KernelV3_1AccountAbi,
111
+ functionName: "changeRootValidator",
112
+ args: [
113
+ rootValidatorId,
114
+ hookId,
115
+ validatorData,
116
+ hookData
117
+ ]
118
+ })
119
+ }
120
+ ],
121
+ "delegatecall"
122
+ )
123
+ } as SendUserOperationParameters)
148
124
  }
149
125
 
150
126
  /**
@@ -152,12 +128,12 @@ export async function changeSudoValidator<
152
128
  */
153
129
  return await getAction(
154
130
  client,
155
- sendUserOperation<entryPoint, TTransport, TChain, TAccount>,
131
+ sendUserOperation,
156
132
  "sendUserOperation"
157
133
  )({
158
134
  ...args,
159
- userOperation: {
160
- callData: await account.encodeCallData({
135
+ callData: await account.encodeCalls([
136
+ {
161
137
  to: account.address,
162
138
  value: 0n,
163
139
  data: encodeFunctionData({
@@ -165,7 +141,7 @@ export async function changeSudoValidator<
165
141
  functionName: "changeRootValidator",
166
142
  args: [rootValidatorId, hookId, validatorData, hookData]
167
143
  })
168
- })
169
- }
170
- } as SendUserOperationParameters<entryPoint, TTransport, TChain, TAccount>)
144
+ }
145
+ ])
146
+ } as SendUserOperationParameters)
171
147
  }
@@ -1,67 +1,28 @@
1
- import type { SendTransactionWithPaymasterParameters } from "permissionless/actions/smartAccount"
2
- import type { EntryPoint, Prettify } from "permissionless/types"
3
- import {
4
- AccountOrClientNotFoundError,
5
- parseAccount
6
- } from "permissionless/utils"
7
1
  import type { Chain, Client, Transport } from "viem"
2
+ import type { SmartAccount } from "viem/account-abstraction"
8
3
  import { readContract } from "viem/actions"
9
- import { getAction } from "viem/utils"
10
- import type { KernelSmartAccount } from "../../accounts/index.js"
4
+ import { getAction, parseAccount } from "viem/utils"
11
5
  import { KernelV3AccountAbi } from "../../accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js"
12
-
13
- export type GetKernelV3ModuleCurrentNonceParameters<
14
- entryPoint extends EntryPoint,
15
- TTransport extends Transport = Transport,
16
- TChain extends Chain | undefined = Chain | undefined,
17
- TAccount extends
18
- | KernelSmartAccount<entryPoint, TTransport, TChain>
19
- | undefined =
20
- | KernelSmartAccount<entryPoint, TTransport, TChain>
21
- | undefined,
22
- TChainOverride extends Chain | undefined = Chain | undefined
23
- > = Prettify<
24
- SendTransactionWithPaymasterParameters<
25
- entryPoint,
26
- TTransport,
27
- TChain,
28
- TAccount,
29
- TChainOverride
30
- >
31
- >
6
+ import { AccountNotFoundError } from "../../errors/index.js"
32
7
 
33
8
  export async function getKernelV3ModuleCurrentNonce<
34
- entryPoint extends EntryPoint,
35
9
  TTransport extends Transport = Transport,
36
10
  TChain extends Chain | undefined = Chain | undefined,
37
- TAccount extends
38
- | KernelSmartAccount<entryPoint, TTransport, TChain>
39
- | undefined =
40
- | KernelSmartAccount<entryPoint, TTransport, TChain>
41
- | undefined,
42
- TChainOverride extends Chain | undefined = Chain | undefined
43
- >(
44
- client: Client<TTransport, TChain, TAccount>,
45
- args: Prettify<
46
- GetKernelV3ModuleCurrentNonceParameters<
47
- entryPoint,
48
- TTransport,
49
- TChain,
50
- TAccount,
51
- TChainOverride
52
- >
53
- >
54
- ): Promise<number> {
55
- const { account: account_ = client.account } = args
56
- if (!account_) throw new AccountOrClientNotFoundError()
11
+ TAccount extends SmartAccount | undefined = SmartAccount | undefined
12
+ >(client: Client<TTransport, TChain, TAccount>): Promise<number> {
13
+ const account_ = client.account
14
+ if (!account_)
15
+ throw new AccountNotFoundError({
16
+ docsPath: "/docs/actions/wallet/sendTransaction"
17
+ })
57
18
 
58
- const account = parseAccount(account_) as KernelSmartAccount<entryPoint>
19
+ const account = parseAccount(account_) as SmartAccount
59
20
 
60
21
  try {
61
22
  const nonce = await getAction(
62
23
  client,
63
24
  readContract,
64
- "sendTransaction"
25
+ "readContract"
65
26
  )({
66
27
  abi: KernelV3AccountAbi,
67
28
  address: account.address,
@@ -1,86 +1,57 @@
1
+ import type { Chain, Client, Hash, Prettify, Transport } from "viem"
1
2
  import {
2
- type SendTransactionWithPaymasterParameters,
3
- sendTransaction
4
- } from "permissionless/actions/smartAccount"
5
- import type { EntryPoint, Prettify } from "permissionless/types"
6
- import {
7
- AccountOrClientNotFoundError,
8
- parseAccount
9
- } from "permissionless/utils"
10
- import type { Chain, Client, Hash, Transport } from "viem"
11
- import { encodeFunctionData, getAction } from "viem/utils"
12
- import type { KernelSmartAccount } from "../../accounts/index.js"
3
+ type SendUserOperationParameters,
4
+ type SmartAccount,
5
+ sendUserOperation
6
+ } from "viem/account-abstraction"
7
+ import { encodeFunctionData, getAction, parseAccount } from "viem/utils"
13
8
  import { KernelV3AccountAbi } from "../../accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js"
9
+ import { AccountNotFoundError } from "../../errors/index.js"
14
10
 
15
11
  export type InvalidateNonceParameters<
16
- entryPoint extends EntryPoint,
17
- TTransport extends Transport = Transport,
18
- TChain extends Chain | undefined = Chain | undefined,
19
- TAccount extends
20
- | KernelSmartAccount<entryPoint, TTransport, TChain>
21
- | undefined =
22
- | KernelSmartAccount<entryPoint, TTransport, TChain>
23
- | undefined,
24
- TChainOverride extends Chain | undefined = Chain | undefined
12
+ account extends SmartAccount | undefined,
13
+ accountOverride extends SmartAccount | undefined = undefined,
14
+ calls extends readonly unknown[] = readonly unknown[]
25
15
  > = Prettify<
26
- SendTransactionWithPaymasterParameters<
27
- entryPoint,
28
- TTransport,
29
- TChain,
30
- TAccount,
31
- TChainOverride
32
- > & {
16
+ Partial<SendUserOperationParameters<account, accountOverride, calls>> & {
33
17
  nonceToSet: number
34
18
  }
35
19
  >
36
20
 
37
21
  export async function invalidateNonce<
38
- entryPoint extends EntryPoint,
39
- TTransport extends Transport = Transport,
40
- TChain extends Chain | undefined = Chain | undefined,
41
- TAccount extends
42
- | KernelSmartAccount<entryPoint, TTransport, TChain>
43
- | undefined =
44
- | KernelSmartAccount<entryPoint, TTransport, TChain>
45
- | undefined,
46
- TChainOverride extends Chain | undefined = Chain | undefined
22
+ account extends SmartAccount | undefined,
23
+ chain extends Chain | undefined,
24
+ accountOverride extends SmartAccount | undefined = undefined,
25
+ calls extends readonly unknown[] = readonly unknown[]
47
26
  >(
48
- client: Client<TTransport, TChain, TAccount>,
49
- args: Prettify<
50
- InvalidateNonceParameters<
51
- entryPoint,
52
- TTransport,
53
- TChain,
54
- TAccount,
55
- TChainOverride
56
- >
57
- >
27
+ client: Client<Transport, chain, account>,
28
+ args: Prettify<InvalidateNonceParameters<account, accountOverride, calls>>
58
29
  ): Promise<Hash> {
59
- const { account: account_ = client.account, middleware, nonceToSet } = args
60
- if (!account_) throw new AccountOrClientNotFoundError()
30
+ const { account: account_ = client.account, nonceToSet } = args
31
+ if (!account_)
32
+ throw new AccountNotFoundError({
33
+ docsPath: "/docs/actions/wallet/sendTransaction"
34
+ })
61
35
 
62
- const account = parseAccount(account_) as KernelSmartAccount<entryPoint>
36
+ const account = parseAccount(account_) as SmartAccount
63
37
 
64
38
  return await getAction(
65
39
  client,
66
- sendTransaction<
67
- TTransport,
68
- TChain,
69
- TAccount,
70
- entryPoint,
71
- TChainOverride
72
- >,
73
- "sendTransaction"
40
+ sendUserOperation,
41
+ "sendUserOperation"
74
42
  )({
75
43
  ...args,
76
- to: account.address,
77
- data: encodeFunctionData({
78
- abi: KernelV3AccountAbi,
79
- functionName: "invalidateNonce",
80
- args: [nonceToSet]
81
- }),
82
- value: 0n,
83
- account,
84
- middleware
85
- })
44
+ calls: [
45
+ {
46
+ to: account.address,
47
+ data: encodeFunctionData({
48
+ abi: KernelV3AccountAbi,
49
+ functionName: "invalidateNonce",
50
+ args: [nonceToSet]
51
+ }),
52
+ value: 0n
53
+ }
54
+ ],
55
+ account
56
+ } as SendUserOperationParameters)
86
57
  }