@zerodev/sdk 5.3.25 → 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 -54
  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 +2 -3
  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,33 +1,34 @@
1
- import { type BundlerClient, type SmartAccountActions } from "permissionless";
2
- import type { Middleware } from "permissionless/actions/smartAccount";
3
- import type { EntryPoint, Prettify } from "permissionless/types";
4
- import type { StateOverrides } from "permissionless/types/bundler";
5
- import type { Chain, Client, Hash, Transport } from "viem";
6
- import type { KernelSmartAccount } from "../../accounts/index.js";
7
- import { type GetKernelV3ModuleCurrentNonceParameters } from "../../actions/account-client/getKernelV3ModuleCurrentNonce.js";
1
+ import type { Abi, Address, Chain, Client, ContractFunctionArgs, ContractFunctionName, Hash, Prettify, Transport, TypedData, WriteContractParameters } from "viem";
2
+ import type { EntryPointVersion, SmartAccount } from "viem/account-abstraction";
8
3
  import { type GetUserOperationGasPriceReturnType } from "../../actions/account-client/getUserOperationGasPrice.js";
9
4
  import { type InvalidateNonceParameters } from "../../actions/account-client/invalidateNonce.js";
10
- import type { ChangeSudoValidatorParameters, SignUserOperationReturnType, SponsorUserOperationEip7677Parameters, SponsorUserOperationEip7677ReturnType, UninstallPluginParameters } from "../../actions/index.js";
5
+ import { sendTransaction } from "../../actions/account-client/sendTransaction.js";
6
+ import { signMessage } from "../../actions/account-client/signMessage.js";
7
+ import { signTypedData } from "../../actions/account-client/signTypedData.js";
8
+ import { writeContract } from "../../actions/account-client/writeContract.js";
9
+ import type { ChangeSudoValidatorParameters, SignUserOperationReturnType, UninstallPluginParameters } from "../../actions/index.js";
11
10
  import { signUserOperation } from "../../actions/index.js";
12
11
  import { type EstimateGasInERC20Parameters, type EstimateGasInERC20ReturnType } from "../../actions/paymaster/estimateGasInERC20.js";
13
12
  import { type SponsorUserOperationParameters, type SponsorUserOperationReturnType } from "../../actions/paymaster/sponsorUserOperation.js";
14
- export type ZeroDevPaymasterClientActions<entryPoint extends EntryPoint> = {
13
+ export type ZeroDevPaymasterClientActions<entryPointVersion extends EntryPointVersion> = {
15
14
  /**
16
15
  * Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
17
16
  */
18
- sponsorUserOperation: (args: SponsorUserOperationParameters<entryPoint>) => Promise<SponsorUserOperationReturnType<entryPoint>>;
17
+ sponsorUserOperation: (args: SponsorUserOperationParameters<entryPointVersion>) => Promise<SponsorUserOperationReturnType<entryPointVersion>>;
19
18
  estimateGasInERC20: (args: EstimateGasInERC20Parameters) => Promise<EstimateGasInERC20ReturnType>;
20
- sponsorUserOperationEip7677: (args: SponsorUserOperationEip7677Parameters<entryPoint>, bundlerClient: BundlerClient<entryPoint>, stateOverrides?: StateOverrides) => Promise<SponsorUserOperationEip7677ReturnType<entryPoint>>;
21
19
  };
22
- export declare const zerodevPaymasterActions: <entryPoint extends EntryPoint>(entryPointAddress: entryPoint) => (client: Client) => ZeroDevPaymasterClientActions<entryPoint>;
23
- export type KernelAccountClientActions<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends KernelSmartAccount<entryPoint, TTransport, TChain> | undefined = KernelSmartAccount<entryPoint, TTransport, TChain> | undefined> = SmartAccountActions<entryPoint, TTransport, TChain, TSmartAccount> & {
20
+ export declare const zerodevPaymasterActions: <entryPointVersion extends EntryPointVersion>(entryPoint: {
21
+ address: Address;
22
+ version: entryPointVersion;
23
+ }) => (client: Client) => ZeroDevPaymasterClientActions<entryPointVersion>;
24
+ export type KernelAccountClientActions<TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount | undefined = SmartAccount | undefined> = {
24
25
  /**
25
26
  * Signs a user operation with the given transport, chain, and smart account.
26
27
  *
27
28
  * @param args - Parameters for the signUserOperation function
28
29
  * @returns A promise that resolves to the result of the signUserOperation function
29
30
  */
30
- signUserOperation: <TTransport extends Transport>(args: Parameters<typeof signUserOperation<entryPoint, TTransport, TChain, TSmartAccount>>[1]) => Promise<SignUserOperationReturnType<entryPoint>>;
31
+ signUserOperation: <accountOverride extends SmartAccount | undefined = undefined, calls extends readonly unknown[] = readonly unknown[]>(args: Parameters<typeof signUserOperation<TSmartAccount, TChain, accountOverride, calls>>[1]) => Promise<SignUserOperationReturnType>;
31
32
  /**
32
33
  * Returns the live gas prices that you can use to send a user operation.
33
34
  *
@@ -42,12 +43,12 @@ export type KernelAccountClientActions<entryPoint extends EntryPoint, TTransport
42
43
  * @param args - {@link UninstallPermissionParameters}
43
44
  * @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link SendTransactionReturnType}
44
45
  */
45
- uninstallPlugin: (args: UninstallPluginParameters<entryPoint, TTransport, TChain, TSmartAccount>) => Promise<Hash>;
46
+ uninstallPlugin: <accountOverride extends SmartAccount | undefined = undefined, calls extends readonly unknown[] = readonly unknown[]>(args: UninstallPluginParameters<TSmartAccount, accountOverride, calls>) => Promise<Hash>;
46
47
  /**
47
48
  * Creates, signs, and sends a user operation to change sudo validator to the network.
48
49
  * This function also allows you to sponsor this transaction if sender is a smartAccount
49
50
  */
50
- changeSudoValidator: (args: ChangeSudoValidatorParameters<entryPoint, TTransport, TChain, TSmartAccount>) => Promise<Hash>;
51
+ changeSudoValidator: <accountOverride extends SmartAccount | undefined = undefined, calls extends readonly unknown[] = readonly unknown[]>(args: ChangeSudoValidatorParameters<TSmartAccount, accountOverride, calls>) => Promise<Hash>;
51
52
  /**
52
53
  * Creates, signs, and sends a kernel v3 module nonce invalidation transaction to the network.
53
54
  * This function also allows you to sponsor this transaction if sender is a smartAccount
@@ -56,16 +57,769 @@ export type KernelAccountClientActions<entryPoint extends EntryPoint, TTransport
56
57
  * @param args - {@link InvalidateNonceParameters}
57
58
  * @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link SendTransactionReturnType}
58
59
  */
59
- invalidateNonce: <TChainOverride extends Chain | undefined = Chain | undefined>(args: InvalidateNonceParameters<entryPoint, TTransport, TChain, TSmartAccount, TChainOverride>) => Promise<Hash>;
60
+ invalidateNonce: <accountOverride extends SmartAccount | undefined = undefined, calls extends readonly unknown[] = readonly unknown[]>(args: InvalidateNonceParameters<TSmartAccount, accountOverride, calls>) => Promise<Hash>;
60
61
  /**
61
62
  * Creates, signs, and sends a transaction to fetch KernelV3 module nonce to the network.
62
63
  * This function also allows you to sponsor this transaction if sender is a smartAccount
63
64
  *
64
65
  *
65
- * @param args - {@link GetKernelV3ModuleCurrentNonceParameters}
66
66
  * @returns nonce
67
67
  */
68
- getKernelV3ModuleCurrentNonce: <TChainOverride extends Chain | undefined = Chain | undefined>(args: GetKernelV3ModuleCurrentNonceParameters<entryPoint, TTransport, TChain, TSmartAccount, TChainOverride>) => Promise<number>;
68
+ getKernelV3ModuleCurrentNonce: () => Promise<number>;
69
+ /**
70
+ * Creates, signs, and sends a new transaction to the network.
71
+ * This function also allows you to sponsor this transaction if sender is a smartAccount
72
+ *
73
+ * - Docs: https://viem.sh/docs/actions/wallet/sendTransaction.html
74
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions
75
+ * - JSON-RPC Methods:
76
+ * - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction)
77
+ * - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction)
78
+ *
79
+ * @param args - {@link SendTransactionParameters}
80
+ * @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link SendTransactionReturnType}
81
+ *
82
+ * @example
83
+ * import { createWalletClient, custom } from 'viem'
84
+ * import { mainnet } from 'viem/chains'
85
+ *
86
+ * const client = createWalletClient({
87
+ * chain: mainnet,
88
+ * transport: custom(window.ethereum),
89
+ * })
90
+ * const hash = await client.sendTransaction({
91
+ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
92
+ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
93
+ * value: 1000000000000000000n,
94
+ * })
95
+ *
96
+ * @example
97
+ * // Account Hoisting
98
+ * import { createWalletClient, http } from 'viem'
99
+ * import { privateKeyToAccount } from 'viem/accounts'
100
+ * import { mainnet } from 'viem/chains'
101
+ *
102
+ * const client = createWalletClient({
103
+ * account: privateKeyToAccount('0x…'),
104
+ * chain: mainnet,
105
+ * transport: http(),
106
+ * })
107
+ * const hash = await client.sendTransaction({
108
+ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
109
+ * value: 1000000000000000000n,
110
+ * })
111
+ */
112
+ sendTransaction: <TChainOverride extends Chain | undefined = undefined, accountOverride extends SmartAccount | undefined = undefined, calls extends readonly unknown[] = readonly unknown[]>(args: Parameters<typeof sendTransaction<TSmartAccount, TChain, accountOverride, TChainOverride, calls>>[1]) => Promise<Hash>;
113
+ /**
114
+ * Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
115
+ *
116
+ * - Docs: https://viem.sh/docs/actions/wallet/signMessage.html
117
+ * - JSON-RPC Methods:
118
+ * - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data.html#personal-sign)
119
+ * - Local Accounts: Signs locally. No JSON-RPC request.
120
+ *
121
+ * With the calculated signature, you can:
122
+ * - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage.html) to verify the signature,
123
+ * - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress.html) to recover the signing address from a signature.
124
+ *
125
+ * @param args - {@link SignMessageParameters}
126
+ * @returns The signed message. {@link SignMessageReturnType}
127
+ *
128
+ * @example
129
+ * import { createWalletClient, custom } from 'viem'
130
+ * import { mainnet } from 'viem/chains'
131
+ *
132
+ * const client = createWalletClient({
133
+ * chain: mainnet,
134
+ * transport: custom(window.ethereum),
135
+ * })
136
+ * const signature = await client.signMessage({
137
+ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
138
+ * message: 'hello world',
139
+ * })
140
+ *
141
+ * @example
142
+ * // Account Hoisting
143
+ * import { createWalletClient, http } from 'viem'
144
+ * import { privateKeyToAccount } from 'viem/accounts'
145
+ * import { mainnet } from 'viem/chains'
146
+ *
147
+ * const client = createWalletClient({
148
+ * account: privateKeyToAccount('0x…'),
149
+ * chain: mainnet,
150
+ * transport: http(),
151
+ * })
152
+ * const signature = await client.signMessage({
153
+ * message: 'hello world',
154
+ * })
155
+ */
156
+ signMessage: (args: Parameters<typeof signMessage<TSmartAccount>>[1]) => ReturnType<typeof signMessage<TSmartAccount>>;
157
+ /**
158
+ * Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
159
+ *
160
+ * - Docs: https://viem.sh/docs/actions/wallet/signTypedData.html
161
+ * - JSON-RPC Methods:
162
+ * - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data.html#signtypeddata-v4)
163
+ * - Local Accounts: Signs locally. No JSON-RPC request.
164
+ *
165
+ * @param client - Client to use
166
+ * @param args - {@link SignTypedDataParameters}
167
+ * @returns The signed data. {@link SignTypedDataReturnType}
168
+ *
169
+ * @example
170
+ * import { createWalletClient, custom } from 'viem'
171
+ * import { mainnet } from 'viem/chains'
172
+ *
173
+ * const client = createWalletClient({
174
+ * chain: mainnet,
175
+ * transport: custom(window.ethereum),
176
+ * })
177
+ * const signature = await client.signTypedData({
178
+ * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
179
+ * domain: {
180
+ * name: 'Ether Mail',
181
+ * version: '1',
182
+ * chainId: 1,
183
+ * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
184
+ * },
185
+ * types: {
186
+ * Person: [
187
+ * { name: 'name', type: 'string' },
188
+ * { name: 'wallet', type: 'address' },
189
+ * ],
190
+ * Mail: [
191
+ * { name: 'from', type: 'Person' },
192
+ * { name: 'to', type: 'Person' },
193
+ * { name: 'contents', type: 'string' },
194
+ * ],
195
+ * },
196
+ * primaryType: 'Mail',
197
+ * message: {
198
+ * from: {
199
+ * name: 'Cow',
200
+ * wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
201
+ * },
202
+ * to: {
203
+ * name: 'Bob',
204
+ * wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
205
+ * },
206
+ * contents: 'Hello, Bob!',
207
+ * },
208
+ * })
209
+ *
210
+ * @example
211
+ * // Account Hoisting
212
+ * import { createWalletClient, http } from 'viem'
213
+ * import { privateKeyToAccount } from 'viem/accounts'
214
+ * import { mainnet } from 'viem/chains'
215
+ *
216
+ * const client = createWalletClient({
217
+ * account: privateKeyToAccount('0x…'),
218
+ * chain: mainnet,
219
+ * transport: http(),
220
+ * })
221
+ * const signature = await client.signTypedData({
222
+ * domain: {
223
+ * name: 'Ether Mail',
224
+ * version: '1',
225
+ * chainId: 1,
226
+ * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
227
+ * },
228
+ * types: {
229
+ * Person: [
230
+ * { name: 'name', type: 'string' },
231
+ * { name: 'wallet', type: 'address' },
232
+ * ],
233
+ * Mail: [
234
+ * { name: 'from', type: 'Person' },
235
+ * { name: 'to', type: 'Person' },
236
+ * { name: 'contents', type: 'string' },
237
+ * ],
238
+ * },
239
+ * primaryType: 'Mail',
240
+ * message: {
241
+ * from: {
242
+ * name: 'Cow',
243
+ * wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
244
+ * },
245
+ * to: {
246
+ * name: 'Bob',
247
+ * wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
248
+ * },
249
+ * contents: 'Hello, Bob!',
250
+ * },
251
+ * })
252
+ */
253
+ signTypedData: <const TTypedData extends TypedData | {
254
+ [key: string]: unknown;
255
+ }, TPrimaryType extends string>(args: Parameters<typeof signTypedData<TTypedData, TPrimaryType, TSmartAccount>>[1]) => ReturnType<typeof signTypedData<TTypedData, TPrimaryType, TSmartAccount>>;
256
+ /**
257
+ * Executes a write function on a contract.
258
+ * This function also allows you to sponsor this transaction if sender is a smartAccount
259
+ *
260
+ * - Docs: https://viem.sh/docs/contract/writeContract.html
261
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts
262
+ *
263
+ * A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.
264
+ *
265
+ * Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet.html) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
266
+ *
267
+ * __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract.html#usage) before you execute it.__
268
+ *
269
+ * @param args - {@link WriteContractParameters}
270
+ * @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms.html#hash). {@link WriteContractReturnType}
271
+ *
272
+ * @example
273
+ * import { createWalletClient, custom, parseAbi } from 'viem'
274
+ * import { mainnet } from 'viem/chains'
275
+ *
276
+ * const client = createWalletClient({
277
+ * chain: mainnet,
278
+ * transport: custom(window.ethereum),
279
+ * })
280
+ * const hash = await client.writeContract({
281
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
282
+ * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
283
+ * functionName: 'mint',
284
+ * args: [69420],
285
+ * })
286
+ *
287
+ * @example
288
+ * // With Validation
289
+ * import { createWalletClient, custom, parseAbi } from 'viem'
290
+ * import { mainnet } from 'viem/chains'
291
+ *
292
+ * const client = createWalletClient({
293
+ * chain: mainnet,
294
+ * transport: custom(window.ethereum),
295
+ * })
296
+ * const { request } = await client.simulateContract({
297
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
298
+ * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
299
+ * functionName: 'mint',
300
+ * args: [69420],
301
+ * }
302
+ * const hash = await client.writeContract(request)
303
+ */
304
+ writeContract: <const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>, TChainOverride extends Chain | undefined = undefined>(args: WriteContractParameters<TAbi, TFunctionName, TArgs, TChain, TSmartAccount, TChainOverride>) => ReturnType<typeof writeContract<TChain, TSmartAccount, TAbi, TFunctionName, TArgs, TChainOverride>>;
69
305
  };
70
- export declare function kernelAccountClientActions<entryPoint extends EntryPoint>({ middleware }: Middleware<entryPoint>): <TTransport extends Transport, TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends KernelSmartAccount<entryPoint, TTransport, TChain> | undefined = KernelSmartAccount<entryPoint, TTransport, TChain> | undefined>(client: Client<TTransport, TChain, TSmartAccount>) => KernelAccountClientActions<entryPoint, TTransport, TChain, TSmartAccount>;
306
+ export declare function kernelAccountClientActions(): <TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends (object & {
307
+ client: Client;
308
+ entryPoint: {
309
+ abi: Abi;
310
+ address: `0x${string}`;
311
+ version: EntryPointVersion;
312
+ };
313
+ extend?: object | undefined;
314
+ getAddress: () => Promise<`0x${string}`>;
315
+ decodeCalls?: ((data: `0x${string}`) => Promise<readonly {
316
+ to: `0x${string}`;
317
+ data?: `0x${string}` | undefined;
318
+ value?: bigint | undefined;
319
+ }[]>) | undefined;
320
+ encodeCalls: (calls: readonly {
321
+ to: `0x${string}`;
322
+ data?: `0x${string}` | undefined;
323
+ value?: bigint | undefined;
324
+ }[]) => Promise<`0x${string}`>;
325
+ getFactoryArgs: () => Promise<{
326
+ factory?: `0x${string}` | undefined;
327
+ factoryData?: `0x${string}` | undefined;
328
+ }>;
329
+ getNonce?: ((parameters?: {
330
+ key?: bigint | undefined;
331
+ } | undefined) => Promise<bigint>) | undefined;
332
+ getStubSignature: (parameters?: import("viem/account-abstraction").UserOperationRequest | undefined) => Promise<`0x${string}`>;
333
+ nonceKeyManager?: import("viem").NonceManager | undefined;
334
+ sign?: ((parameters: {
335
+ hash: `0x${string}`;
336
+ }) => Promise<`0x${string}`>) | undefined;
337
+ signMessage: (parameters: {
338
+ message: import("viem").SignableMessage;
339
+ }) => Promise<`0x${string}`>;
340
+ signTypedData: <const typedData extends {
341
+ [x: string]: readonly import("viem").TypedDataParameter[];
342
+ [x: `string[${string}]`]: undefined;
343
+ [x: `function[${string}]`]: undefined;
344
+ [x: `address[${string}]`]: undefined;
345
+ [x: `bool[${string}]`]: undefined;
346
+ [x: `bytes[${string}]`]: undefined;
347
+ [x: `bytes1[${string}]`]: undefined;
348
+ [x: `bytes3[${string}]`]: undefined;
349
+ [x: `bytes2[${string}]`]: undefined;
350
+ [x: `bytes4[${string}]`]: undefined;
351
+ [x: `bytes5[${string}]`]: undefined;
352
+ [x: `bytes6[${string}]`]: undefined;
353
+ [x: `bytes7[${string}]`]: undefined;
354
+ [x: `bytes8[${string}]`]: undefined;
355
+ [x: `bytes9[${string}]`]: undefined;
356
+ [x: `bytes10[${string}]`]: undefined;
357
+ [x: `bytes11[${string}]`]: undefined;
358
+ [x: `bytes12[${string}]`]: undefined;
359
+ [x: `bytes13[${string}]`]: undefined;
360
+ [x: `bytes14[${string}]`]: undefined;
361
+ [x: `bytes15[${string}]`]: undefined;
362
+ [x: `bytes16[${string}]`]: undefined;
363
+ [x: `bytes17[${string}]`]: undefined;
364
+ [x: `bytes18[${string}]`]: undefined;
365
+ [x: `bytes19[${string}]`]: undefined;
366
+ [x: `bytes20[${string}]`]: undefined;
367
+ [x: `bytes21[${string}]`]: undefined;
368
+ [x: `bytes22[${string}]`]: undefined;
369
+ [x: `bytes23[${string}]`]: undefined;
370
+ [x: `bytes24[${string}]`]: undefined;
371
+ [x: `bytes25[${string}]`]: undefined;
372
+ [x: `bytes26[${string}]`]: undefined;
373
+ [x: `bytes27[${string}]`]: undefined;
374
+ [x: `bytes28[${string}]`]: undefined;
375
+ [x: `bytes29[${string}]`]: undefined;
376
+ [x: `bytes30[${string}]`]: undefined;
377
+ [x: `bytes31[${string}]`]: undefined;
378
+ [x: `bytes32[${string}]`]: undefined;
379
+ [x: `int[${string}]`]: undefined;
380
+ [x: `int8[${string}]`]: undefined;
381
+ [x: `int16[${string}]`]: undefined;
382
+ [x: `int24[${string}]`]: undefined;
383
+ [x: `int32[${string}]`]: undefined;
384
+ [x: `int40[${string}]`]: undefined;
385
+ [x: `int48[${string}]`]: undefined;
386
+ [x: `int56[${string}]`]: undefined;
387
+ [x: `int64[${string}]`]: undefined;
388
+ [x: `int72[${string}]`]: undefined;
389
+ [x: `int80[${string}]`]: undefined;
390
+ [x: `int88[${string}]`]: undefined;
391
+ [x: `int96[${string}]`]: undefined;
392
+ [x: `int104[${string}]`]: undefined;
393
+ [x: `int112[${string}]`]: undefined;
394
+ [x: `int120[${string}]`]: undefined;
395
+ [x: `int128[${string}]`]: undefined;
396
+ [x: `int136[${string}]`]: undefined;
397
+ [x: `int144[${string}]`]: undefined;
398
+ [x: `int152[${string}]`]: undefined;
399
+ [x: `int160[${string}]`]: undefined;
400
+ [x: `int168[${string}]`]: undefined;
401
+ [x: `int176[${string}]`]: undefined;
402
+ [x: `int184[${string}]`]: undefined;
403
+ [x: `int192[${string}]`]: undefined;
404
+ [x: `int200[${string}]`]: undefined;
405
+ [x: `int208[${string}]`]: undefined;
406
+ [x: `int216[${string}]`]: undefined;
407
+ [x: `int224[${string}]`]: undefined;
408
+ [x: `int232[${string}]`]: undefined;
409
+ [x: `int240[${string}]`]: undefined;
410
+ [x: `int248[${string}]`]: undefined;
411
+ [x: `int256[${string}]`]: undefined;
412
+ [x: `uint[${string}]`]: undefined;
413
+ [x: `uint8[${string}]`]: undefined;
414
+ [x: `uint16[${string}]`]: undefined;
415
+ [x: `uint24[${string}]`]: undefined;
416
+ [x: `uint32[${string}]`]: undefined;
417
+ [x: `uint40[${string}]`]: undefined;
418
+ [x: `uint48[${string}]`]: undefined;
419
+ [x: `uint56[${string}]`]: undefined;
420
+ [x: `uint64[${string}]`]: undefined;
421
+ [x: `uint72[${string}]`]: undefined;
422
+ [x: `uint80[${string}]`]: undefined;
423
+ [x: `uint88[${string}]`]: undefined;
424
+ [x: `uint96[${string}]`]: undefined;
425
+ [x: `uint104[${string}]`]: undefined;
426
+ [x: `uint112[${string}]`]: undefined;
427
+ [x: `uint120[${string}]`]: undefined;
428
+ [x: `uint128[${string}]`]: undefined;
429
+ [x: `uint136[${string}]`]: undefined;
430
+ [x: `uint144[${string}]`]: undefined;
431
+ [x: `uint152[${string}]`]: undefined;
432
+ [x: `uint160[${string}]`]: undefined;
433
+ [x: `uint168[${string}]`]: undefined;
434
+ [x: `uint176[${string}]`]: undefined;
435
+ [x: `uint184[${string}]`]: undefined;
436
+ [x: `uint192[${string}]`]: undefined;
437
+ [x: `uint200[${string}]`]: undefined;
438
+ [x: `uint208[${string}]`]: undefined;
439
+ [x: `uint216[${string}]`]: undefined;
440
+ [x: `uint224[${string}]`]: undefined;
441
+ [x: `uint232[${string}]`]: undefined;
442
+ [x: `uint240[${string}]`]: undefined;
443
+ [x: `uint248[${string}]`]: undefined;
444
+ [x: `uint256[${string}]`]: undefined;
445
+ string?: undefined;
446
+ address?: undefined;
447
+ bool?: undefined;
448
+ bytes?: undefined;
449
+ bytes1?: undefined;
450
+ bytes3?: undefined;
451
+ bytes2?: undefined;
452
+ bytes4?: undefined;
453
+ bytes5?: undefined;
454
+ bytes6?: undefined;
455
+ bytes7?: undefined;
456
+ bytes8?: undefined;
457
+ bytes9?: undefined;
458
+ bytes10?: undefined;
459
+ bytes11?: undefined;
460
+ bytes12?: undefined;
461
+ bytes13?: undefined;
462
+ bytes14?: undefined;
463
+ bytes15?: undefined;
464
+ bytes16?: undefined;
465
+ bytes17?: undefined;
466
+ bytes18?: undefined;
467
+ bytes19?: undefined;
468
+ bytes20?: undefined;
469
+ bytes21?: undefined;
470
+ bytes22?: undefined;
471
+ bytes23?: undefined;
472
+ bytes24?: undefined;
473
+ bytes25?: undefined;
474
+ bytes26?: undefined;
475
+ bytes27?: undefined;
476
+ bytes28?: undefined;
477
+ bytes29?: undefined;
478
+ bytes30?: undefined;
479
+ bytes31?: undefined;
480
+ bytes32?: undefined;
481
+ int8?: undefined;
482
+ int16?: undefined;
483
+ int24?: undefined;
484
+ int32?: undefined;
485
+ int40?: undefined;
486
+ int48?: undefined;
487
+ int56?: undefined;
488
+ int64?: undefined;
489
+ int72?: undefined;
490
+ int80?: undefined;
491
+ int88?: undefined;
492
+ int96?: undefined;
493
+ int104?: undefined;
494
+ int112?: undefined;
495
+ int120?: undefined;
496
+ int128?: undefined;
497
+ int136?: undefined;
498
+ int144?: undefined;
499
+ int152?: undefined;
500
+ int160?: undefined;
501
+ int168?: undefined;
502
+ int176?: undefined;
503
+ int184?: undefined;
504
+ int192?: undefined;
505
+ int200?: undefined;
506
+ int208?: undefined;
507
+ int216?: undefined;
508
+ int224?: undefined;
509
+ int232?: undefined;
510
+ int240?: undefined;
511
+ int248?: undefined;
512
+ int256?: undefined;
513
+ uint8?: undefined;
514
+ uint16?: undefined;
515
+ uint24?: undefined;
516
+ uint32?: undefined;
517
+ uint40?: undefined;
518
+ uint48?: undefined;
519
+ uint56?: undefined;
520
+ uint64?: undefined;
521
+ uint72?: undefined;
522
+ uint80?: undefined;
523
+ uint88?: undefined;
524
+ uint96?: undefined;
525
+ uint104?: undefined;
526
+ uint112?: undefined;
527
+ uint120?: undefined;
528
+ uint128?: undefined;
529
+ uint136?: undefined;
530
+ uint144?: undefined;
531
+ uint152?: undefined;
532
+ uint160?: undefined;
533
+ uint168?: undefined;
534
+ uint176?: undefined;
535
+ uint184?: undefined;
536
+ uint192?: undefined;
537
+ uint200?: undefined;
538
+ uint208?: undefined;
539
+ uint216?: undefined;
540
+ uint224?: undefined;
541
+ uint232?: undefined;
542
+ uint240?: undefined;
543
+ uint248?: undefined;
544
+ uint256?: undefined;
545
+ } | Record<string, unknown>, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<`0x${string}`>;
546
+ signUserOperation: (parameters: import("viem").UnionPartialBy<import("viem/account-abstraction").UserOperation, "sender"> & {
547
+ chainId?: number | undefined;
548
+ }) => Promise<`0x${string}`>;
549
+ userOperation?: {
550
+ estimateGas?: ((userOperation: import("viem/account-abstraction").UserOperationRequest) => Promise<import("viem").ExactPartial<import("viem/_types/account-abstraction/types/userOperation.js").EstimateUserOperationGasReturnType> | undefined>) | undefined;
551
+ } | undefined;
552
+ } & {
553
+ address: `0x${string}`;
554
+ getNonce: (parameters?: {
555
+ key?: bigint | undefined;
556
+ } | undefined) => Promise<bigint>; /**
557
+ * Creates, signs, and sends a transaction to fetch KernelV3 module nonce to the network.
558
+ * This function also allows you to sponsor this transaction if sender is a smartAccount
559
+ *
560
+ *
561
+ * @returns nonce
562
+ */
563
+ isDeployed: () => Promise<boolean>;
564
+ type: "smart";
565
+ }) | undefined = (object & {
566
+ client: Client;
567
+ entryPoint: {
568
+ abi: Abi;
569
+ address: `0x${string}`;
570
+ version: EntryPointVersion;
571
+ };
572
+ extend?: object | undefined;
573
+ getAddress: () => Promise<`0x${string}`>;
574
+ decodeCalls?: ((data: `0x${string}`) => Promise<readonly {
575
+ to: `0x${string}`;
576
+ data?: `0x${string}` | undefined;
577
+ value?: bigint | undefined;
578
+ }[]>) | undefined;
579
+ encodeCalls: (calls: readonly {
580
+ to: `0x${string}`;
581
+ data?: `0x${string}` | undefined;
582
+ value?: bigint | undefined;
583
+ }[]) => Promise<`0x${string}`>;
584
+ getFactoryArgs: () => Promise<{
585
+ factory?: `0x${string}` | undefined;
586
+ factoryData?: `0x${string}` | undefined;
587
+ }>;
588
+ getNonce?: ((parameters?: {
589
+ key?: bigint | undefined;
590
+ } | undefined) => Promise<bigint>) | undefined;
591
+ getStubSignature: (parameters?: import("viem/account-abstraction").UserOperationRequest | undefined) => Promise<`0x${string}`>;
592
+ nonceKeyManager?: import("viem").NonceManager | undefined;
593
+ sign?: ((parameters: {
594
+ hash: `0x${string}`;
595
+ }) => Promise<`0x${string}`>) | undefined;
596
+ signMessage: (parameters: {
597
+ message: import("viem").SignableMessage;
598
+ }) => Promise<`0x${string}`>;
599
+ signTypedData: <const typedData extends {
600
+ [x: string]: readonly import("viem").TypedDataParameter[];
601
+ [x: `string[${string}]`]: undefined;
602
+ [x: `function[${string}]`]: undefined;
603
+ [x: `address[${string}]`]: undefined;
604
+ [x: `bool[${string}]`]: undefined;
605
+ [x: `bytes[${string}]`]: undefined;
606
+ [x: `bytes1[${string}]`]: undefined;
607
+ [x: `bytes3[${string}]`]: undefined;
608
+ [x: `bytes2[${string}]`]: undefined;
609
+ [x: `bytes4[${string}]`]: undefined;
610
+ [x: `bytes5[${string}]`]: undefined;
611
+ [x: `bytes6[${string}]`]: undefined;
612
+ [x: `bytes7[${string}]`]: undefined;
613
+ [x: `bytes8[${string}]`]: undefined;
614
+ [x: `bytes9[${string}]`]: undefined;
615
+ [x: `bytes10[${string}]`]: undefined;
616
+ [x: `bytes11[${string}]`]: undefined;
617
+ [x: `bytes12[${string}]`]: undefined;
618
+ [x: `bytes13[${string}]`]: undefined;
619
+ [x: `bytes14[${string}]`]: undefined;
620
+ [x: `bytes15[${string}]`]: undefined;
621
+ [x: `bytes16[${string}]`]: undefined;
622
+ [x: `bytes17[${string}]`]: undefined;
623
+ [x: `bytes18[${string}]`]: undefined;
624
+ [x: `bytes19[${string}]`]: undefined;
625
+ [x: `bytes20[${string}]`]: undefined;
626
+ [x: `bytes21[${string}]`]: undefined;
627
+ [x: `bytes22[${string}]`]: undefined;
628
+ [x: `bytes23[${string}]`]: undefined;
629
+ [x: `bytes24[${string}]`]: undefined;
630
+ [x: `bytes25[${string}]`]: undefined;
631
+ [x: `bytes26[${string}]`]: undefined;
632
+ [x: `bytes27[${string}]`]: undefined;
633
+ [x: `bytes28[${string}]`]: undefined;
634
+ [x: `bytes29[${string}]`]: undefined;
635
+ [x: `bytes30[${string}]`]: undefined;
636
+ [x: `bytes31[${string}]`]: undefined;
637
+ [x: `bytes32[${string}]`]: undefined;
638
+ [x: `int[${string}]`]: undefined;
639
+ [x: `int8[${string}]`]: undefined;
640
+ [x: `int16[${string}]`]: undefined;
641
+ [x: `int24[${string}]`]: undefined;
642
+ [x: `int32[${string}]`]: undefined;
643
+ [x: `int40[${string}]`]: undefined;
644
+ [x: `int48[${string}]`]: undefined;
645
+ [x: `int56[${string}]`]: undefined;
646
+ [x: `int64[${string}]`]: undefined;
647
+ [x: `int72[${string}]`]: undefined;
648
+ [x: `int80[${string}]`]: undefined;
649
+ [x: `int88[${string}]`]: undefined;
650
+ [x: `int96[${string}]`]: undefined;
651
+ [x: `int104[${string}]`]: undefined;
652
+ [x: `int112[${string}]`]: undefined;
653
+ [x: `int120[${string}]`]: undefined;
654
+ [x: `int128[${string}]`]: undefined;
655
+ [x: `int136[${string}]`]: undefined;
656
+ [x: `int144[${string}]`]: undefined;
657
+ [x: `int152[${string}]`]: undefined;
658
+ [x: `int160[${string}]`]: undefined;
659
+ [x: `int168[${string}]`]: undefined;
660
+ [x: `int176[${string}]`]: undefined;
661
+ [x: `int184[${string}]`]: undefined;
662
+ [x: `int192[${string}]`]: undefined;
663
+ [x: `int200[${string}]`]: undefined;
664
+ [x: `int208[${string}]`]: undefined;
665
+ [x: `int216[${string}]`]: undefined;
666
+ [x: `int224[${string}]`]: undefined;
667
+ [x: `int232[${string}]`]: undefined;
668
+ [x: `int240[${string}]`]: undefined;
669
+ [x: `int248[${string}]`]: undefined;
670
+ [x: `int256[${string}]`]: undefined;
671
+ [x: `uint[${string}]`]: undefined;
672
+ [x: `uint8[${string}]`]: undefined;
673
+ [x: `uint16[${string}]`]: undefined;
674
+ [x: `uint24[${string}]`]: undefined;
675
+ [x: `uint32[${string}]`]: undefined;
676
+ [x: `uint40[${string}]`]: undefined;
677
+ [x: `uint48[${string}]`]: undefined;
678
+ [x: `uint56[${string}]`]: undefined;
679
+ [x: `uint64[${string}]`]: undefined;
680
+ [x: `uint72[${string}]`]: undefined;
681
+ [x: `uint80[${string}]`]: undefined;
682
+ [x: `uint88[${string}]`]: undefined;
683
+ [x: `uint96[${string}]`]: undefined;
684
+ [x: `uint104[${string}]`]: undefined;
685
+ [x: `uint112[${string}]`]: undefined;
686
+ [x: `uint120[${string}]`]: undefined;
687
+ [x: `uint128[${string}]`]: undefined;
688
+ [x: `uint136[${string}]`]: undefined;
689
+ [x: `uint144[${string}]`]: undefined;
690
+ [x: `uint152[${string}]`]: undefined;
691
+ [x: `uint160[${string}]`]: undefined;
692
+ [x: `uint168[${string}]`]: undefined;
693
+ [x: `uint176[${string}]`]: undefined;
694
+ [x: `uint184[${string}]`]: undefined;
695
+ [x: `uint192[${string}]`]: undefined;
696
+ [x: `uint200[${string}]`]: undefined;
697
+ [x: `uint208[${string}]`]: undefined;
698
+ [x: `uint216[${string}]`]: undefined;
699
+ [x: `uint224[${string}]`]: undefined;
700
+ [x: `uint232[${string}]`]: undefined;
701
+ [x: `uint240[${string}]`]: undefined;
702
+ [x: `uint248[${string}]`]: undefined;
703
+ [x: `uint256[${string}]`]: undefined;
704
+ string?: undefined;
705
+ address?: undefined;
706
+ bool?: undefined;
707
+ bytes?: undefined;
708
+ bytes1?: undefined;
709
+ bytes3?: undefined;
710
+ bytes2?: undefined;
711
+ bytes4?: undefined;
712
+ bytes5?: undefined;
713
+ bytes6?: undefined;
714
+ bytes7?: undefined;
715
+ bytes8?: undefined;
716
+ bytes9?: undefined;
717
+ bytes10?: undefined;
718
+ bytes11?: undefined;
719
+ bytes12?: undefined;
720
+ bytes13?: undefined;
721
+ bytes14?: undefined;
722
+ bytes15?: undefined;
723
+ bytes16?: undefined;
724
+ bytes17?: undefined;
725
+ bytes18?: undefined;
726
+ bytes19?: undefined;
727
+ bytes20?: undefined;
728
+ bytes21?: undefined;
729
+ bytes22?: undefined;
730
+ bytes23?: undefined;
731
+ bytes24?: undefined;
732
+ bytes25?: undefined;
733
+ bytes26?: undefined;
734
+ bytes27?: undefined;
735
+ bytes28?: undefined;
736
+ bytes29?: undefined;
737
+ bytes30?: undefined;
738
+ bytes31?: undefined;
739
+ bytes32?: undefined;
740
+ int8?: undefined;
741
+ int16?: undefined;
742
+ int24?: undefined;
743
+ int32?: undefined;
744
+ int40?: undefined;
745
+ int48?: undefined;
746
+ int56?: undefined;
747
+ int64?: undefined;
748
+ int72?: undefined;
749
+ int80?: undefined;
750
+ int88?: undefined;
751
+ int96?: undefined;
752
+ int104?: undefined;
753
+ int112?: undefined;
754
+ int120?: undefined;
755
+ int128?: undefined;
756
+ int136?: undefined;
757
+ int144?: undefined;
758
+ int152?: undefined;
759
+ int160?: undefined;
760
+ int168?: undefined;
761
+ int176?: undefined;
762
+ int184?: undefined;
763
+ int192?: undefined;
764
+ int200?: undefined;
765
+ int208?: undefined;
766
+ int216?: undefined;
767
+ int224?: undefined;
768
+ int232?: undefined;
769
+ int240?: undefined;
770
+ int248?: undefined;
771
+ int256?: undefined;
772
+ uint8?: undefined;
773
+ uint16?: undefined;
774
+ uint24?: undefined;
775
+ uint32?: undefined;
776
+ uint40?: undefined;
777
+ uint48?: undefined;
778
+ uint56?: undefined;
779
+ uint64?: undefined;
780
+ uint72?: undefined;
781
+ uint80?: undefined;
782
+ uint88?: undefined;
783
+ uint96?: undefined;
784
+ uint104?: undefined;
785
+ uint112?: undefined;
786
+ uint120?: undefined;
787
+ uint128?: undefined;
788
+ uint136?: undefined;
789
+ uint144?: undefined;
790
+ uint152?: undefined;
791
+ uint160?: undefined;
792
+ uint168?: undefined;
793
+ uint176?: undefined;
794
+ uint184?: undefined;
795
+ uint192?: undefined;
796
+ uint200?: undefined;
797
+ uint208?: undefined;
798
+ uint216?: undefined;
799
+ uint224?: undefined;
800
+ uint232?: undefined;
801
+ uint240?: undefined;
802
+ uint248?: undefined;
803
+ uint256?: undefined;
804
+ } | Record<string, unknown>, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(parameters: import("viem").TypedDataDefinition<typedData, primaryType>) => Promise<`0x${string}`>;
805
+ signUserOperation: (parameters: import("viem").UnionPartialBy<import("viem/account-abstraction").UserOperation, "sender"> & {
806
+ chainId?: number | undefined;
807
+ }) => Promise<`0x${string}`>;
808
+ userOperation?: {
809
+ estimateGas?: ((userOperation: import("viem/account-abstraction").UserOperationRequest) => Promise<import("viem").ExactPartial<import("viem/_types/account-abstraction/types/userOperation.js").EstimateUserOperationGasReturnType> | undefined>) | undefined;
810
+ } | undefined;
811
+ } & {
812
+ address: `0x${string}`;
813
+ getNonce: (parameters?: {
814
+ key?: bigint | undefined;
815
+ } | undefined) => Promise<bigint>; /**
816
+ * Creates, signs, and sends a transaction to fetch KernelV3 module nonce to the network.
817
+ * This function also allows you to sponsor this transaction if sender is a smartAccount
818
+ *
819
+ *
820
+ * @returns nonce
821
+ */
822
+ isDeployed: () => Promise<boolean>;
823
+ type: "smart";
824
+ }) | undefined>(client: Client<Transport, TChain, TSmartAccount>) => KernelAccountClientActions<TChain, TSmartAccount>;
71
825
  //# sourceMappingURL=kernel.d.ts.map