@startale-scs/aa-sdk 0.0.1

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 (671) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +20 -0
  3. package/dist/_cjs/account/decorators/getFactoryData.js +36 -0
  4. package/dist/_cjs/account/decorators/getFactoryData.js.map +1 -0
  5. package/dist/_cjs/account/decorators/getStartaleAccountAddress.js +18 -0
  6. package/dist/_cjs/account/decorators/getStartaleAccountAddress.js.map +1 -0
  7. package/dist/_cjs/account/decorators/index.js +6 -0
  8. package/dist/_cjs/account/decorators/index.js.map +1 -0
  9. package/dist/_cjs/account/index.js +6 -0
  10. package/dist/_cjs/account/index.js.map +1 -0
  11. package/dist/_cjs/account/toStartaleSmartAccount.js +251 -0
  12. package/dist/_cjs/account/toStartaleSmartAccount.js.map +1 -0
  13. package/dist/_cjs/account/utils/AccountNotFound.js +18 -0
  14. package/dist/_cjs/account/utils/AccountNotFound.js.map +1 -0
  15. package/dist/_cjs/account/utils/Constants.js +128 -0
  16. package/dist/_cjs/account/utils/Constants.js.map +1 -0
  17. package/dist/_cjs/account/utils/Helpers.js +39 -0
  18. package/dist/_cjs/account/utils/Helpers.js.map +1 -0
  19. package/dist/_cjs/account/utils/Logger.js +35 -0
  20. package/dist/_cjs/account/utils/Logger.js.map +1 -0
  21. package/dist/_cjs/account/utils/Types.js +3 -0
  22. package/dist/_cjs/account/utils/Types.js.map +1 -0
  23. package/dist/_cjs/account/utils/Utils.js +258 -0
  24. package/dist/_cjs/account/utils/Utils.js.map +1 -0
  25. package/dist/_cjs/account/utils/contractSimulation.js +27 -0
  26. package/dist/_cjs/account/utils/contractSimulation.js.map +1 -0
  27. package/dist/_cjs/account/utils/deepHexlify.js +26 -0
  28. package/dist/_cjs/account/utils/deepHexlify.js.map +1 -0
  29. package/dist/_cjs/account/utils/fromBundlerClient.js +45 -0
  30. package/dist/_cjs/account/utils/fromBundlerClient.js.map +1 -0
  31. package/dist/_cjs/account/utils/getAAError.js +37 -0
  32. package/dist/_cjs/account/utils/getAAError.js.map +1 -0
  33. package/dist/_cjs/account/utils/getChain.js +66 -0
  34. package/dist/_cjs/account/utils/getChain.js.map +1 -0
  35. package/dist/_cjs/account/utils/getVersion.js +46 -0
  36. package/dist/_cjs/account/utils/getVersion.js.map +1 -0
  37. package/dist/_cjs/account/utils/index.js +27 -0
  38. package/dist/_cjs/account/utils/index.js.map +1 -0
  39. package/dist/_cjs/account/utils/parseErrorMessage.js +79 -0
  40. package/dist/_cjs/account/utils/parseErrorMessage.js.map +1 -0
  41. package/dist/_cjs/account/utils/tenderlySimulation.js +52 -0
  42. package/dist/_cjs/account/utils/tenderlySimulation.js.map +1 -0
  43. package/dist/_cjs/account/utils/toInitData.js +13 -0
  44. package/dist/_cjs/account/utils/toInitData.js.map +1 -0
  45. package/dist/_cjs/account/utils/toInstallData.js +15 -0
  46. package/dist/_cjs/account/utils/toInstallData.js.map +1 -0
  47. package/dist/_cjs/account/utils/toSigner.js +81 -0
  48. package/dist/_cjs/account/utils/toSigner.js.map +1 -0
  49. package/dist/_cjs/clients/createHttpClient.js +42 -0
  50. package/dist/_cjs/clients/createHttpClient.js.map +1 -0
  51. package/dist/_cjs/clients/createSCSBundlerClient.js +45 -0
  52. package/dist/_cjs/clients/createSCSBundlerClient.js.map +1 -0
  53. package/dist/_cjs/clients/createSCSPaymasterClient.js +39 -0
  54. package/dist/_cjs/clients/createSCSPaymasterClient.js.map +1 -0
  55. package/dist/_cjs/clients/decorators/bundler/getGasFeeValues.js +34 -0
  56. package/dist/_cjs/clients/decorators/bundler/getGasFeeValues.js.map +1 -0
  57. package/dist/_cjs/clients/decorators/bundler/getUserOperationStatus.js +10 -0
  58. package/dist/_cjs/clients/decorators/bundler/getUserOperationStatus.js.map +1 -0
  59. package/dist/_cjs/clients/decorators/bundler/index.js +15 -0
  60. package/dist/_cjs/clients/decorators/bundler/index.js.map +1 -0
  61. package/dist/_cjs/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.js +27 -0
  62. package/dist/_cjs/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.js.map +1 -0
  63. package/dist/_cjs/clients/decorators/bundler/waitForUserOperationReceipt.js +13 -0
  64. package/dist/_cjs/clients/decorators/bundler/waitForUserOperationReceipt.js.map +1 -0
  65. package/dist/_cjs/clients/decorators/erc7579/accountId.js +65 -0
  66. package/dist/_cjs/clients/decorators/erc7579/accountId.js.map +1 -0
  67. package/dist/_cjs/clients/decorators/erc7579/getActiveHook.js +43 -0
  68. package/dist/_cjs/clients/decorators/erc7579/getActiveHook.js.map +1 -0
  69. package/dist/_cjs/clients/decorators/erc7579/getFallbackBySelector.js +56 -0
  70. package/dist/_cjs/clients/decorators/erc7579/getFallbackBySelector.js.map +1 -0
  71. package/dist/_cjs/clients/decorators/erc7579/getInstalledExecutors.js +63 -0
  72. package/dist/_cjs/clients/decorators/erc7579/getInstalledExecutors.js.map +1 -0
  73. package/dist/_cjs/clients/decorators/erc7579/getInstalledValidators.js +61 -0
  74. package/dist/_cjs/clients/decorators/erc7579/getInstalledValidators.js.map +1 -0
  75. package/dist/_cjs/clients/decorators/erc7579/getPreviousModule.js +37 -0
  76. package/dist/_cjs/clients/decorators/erc7579/getPreviousModule.js.map +1 -0
  77. package/dist/_cjs/clients/decorators/erc7579/index.js +64 -0
  78. package/dist/_cjs/clients/decorators/erc7579/index.js.map +1 -0
  79. package/dist/_cjs/clients/decorators/erc7579/installModule.js +94 -0
  80. package/dist/_cjs/clients/decorators/erc7579/installModule.js.map +1 -0
  81. package/dist/_cjs/clients/decorators/erc7579/installModules.js +25 -0
  82. package/dist/_cjs/clients/decorators/erc7579/installModules.js.map +1 -0
  83. package/dist/_cjs/clients/decorators/erc7579/isModuleInstalled.js +90 -0
  84. package/dist/_cjs/clients/decorators/erc7579/isModuleInstalled.js.map +1 -0
  85. package/dist/_cjs/clients/decorators/erc7579/supportsExecutionMode.js +102 -0
  86. package/dist/_cjs/clients/decorators/erc7579/supportsExecutionMode.js.map +1 -0
  87. package/dist/_cjs/clients/decorators/erc7579/supportsModule.js +90 -0
  88. package/dist/_cjs/clients/decorators/erc7579/supportsModule.js.map +1 -0
  89. package/dist/_cjs/clients/decorators/erc7579/uninstallFallback.js +61 -0
  90. package/dist/_cjs/clients/decorators/erc7579/uninstallFallback.js.map +1 -0
  91. package/dist/_cjs/clients/decorators/erc7579/uninstallModule.js +79 -0
  92. package/dist/_cjs/clients/decorators/erc7579/uninstallModule.js.map +1 -0
  93. package/dist/_cjs/clients/decorators/erc7579/uninstallModules.js +26 -0
  94. package/dist/_cjs/clients/decorators/erc7579/uninstallModules.js.map +1 -0
  95. package/dist/_cjs/clients/decorators/index.js +8 -0
  96. package/dist/_cjs/clients/decorators/index.js.map +1 -0
  97. package/dist/_cjs/clients/decorators/smartAccount/debugUserOperation.js +75 -0
  98. package/dist/_cjs/clients/decorators/smartAccount/debugUserOperation.js.map +1 -0
  99. package/dist/_cjs/clients/decorators/smartAccount/index.js +32 -0
  100. package/dist/_cjs/clients/decorators/smartAccount/index.js.map +1 -0
  101. package/dist/_cjs/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js +32 -0
  102. package/dist/_cjs/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js.map +1 -0
  103. package/dist/_cjs/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js +35 -0
  104. package/dist/_cjs/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js.map +1 -0
  105. package/dist/_cjs/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js +21 -0
  106. package/dist/_cjs/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js.map +1 -0
  107. package/dist/_cjs/clients/decorators/smartAccount/sendTransaction.js +41 -0
  108. package/dist/_cjs/clients/decorators/smartAccount/sendTransaction.js.map +1 -0
  109. package/dist/_cjs/clients/decorators/smartAccount/signMessage.js +14 -0
  110. package/dist/_cjs/clients/decorators/smartAccount/signMessage.js.map +1 -0
  111. package/dist/_cjs/clients/decorators/smartAccount/signTypedData.js +31 -0
  112. package/dist/_cjs/clients/decorators/smartAccount/signTypedData.js.map +1 -0
  113. package/dist/_cjs/clients/decorators/smartAccount/upgradeSmartAccount.js +61 -0
  114. package/dist/_cjs/clients/decorators/smartAccount/upgradeSmartAccount.js.map +1 -0
  115. package/dist/_cjs/clients/decorators/smartAccount/waitForTransactionReceipt.js +17 -0
  116. package/dist/_cjs/clients/decorators/smartAccount/waitForTransactionReceipt.js.map +1 -0
  117. package/dist/_cjs/clients/decorators/smartAccount/writeContract.js +20 -0
  118. package/dist/_cjs/clients/decorators/smartAccount/writeContract.js.map +1 -0
  119. package/dist/_cjs/clients/decorators/tokenPaymaster/getSupportedTokens.js +25 -0
  120. package/dist/_cjs/clients/decorators/tokenPaymaster/getSupportedTokens.js.map +1 -0
  121. package/dist/_cjs/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js +35 -0
  122. package/dist/_cjs/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js.map +1 -0
  123. package/dist/_cjs/clients/decorators/tokenPaymaster/index.js +11 -0
  124. package/dist/_cjs/clients/decorators/tokenPaymaster/index.js.map +1 -0
  125. package/dist/_cjs/clients/index.js +8 -0
  126. package/dist/_cjs/clients/index.js.map +1 -0
  127. package/dist/_cjs/constants/abi/AccountFactory.js +337 -0
  128. package/dist/_cjs/constants/abi/AccountFactory.js.map +1 -0
  129. package/dist/_cjs/constants/abi/AccountImplementationAbi.js +1179 -0
  130. package/dist/_cjs/constants/abi/AccountImplementationAbi.js.map +1 -0
  131. package/dist/_cjs/constants/abi/BootstrapAbi.js +730 -0
  132. package/dist/_cjs/constants/abi/BootstrapAbi.js.map +1 -0
  133. package/dist/_cjs/constants/abi/ComposabilityAbi.js +274 -0
  134. package/dist/_cjs/constants/abi/ComposabilityAbi.js.map +1 -0
  135. package/dist/_cjs/constants/abi/EIP1271Abi.js +31 -0
  136. package/dist/_cjs/constants/abi/EIP1271Abi.js.map +1 -0
  137. package/dist/_cjs/constants/abi/ERC7484RegistryAbi.js +17 -0
  138. package/dist/_cjs/constants/abi/ERC7484RegistryAbi.js.map +1 -0
  139. package/dist/_cjs/constants/abi/EntryPointABI.js +661 -0
  140. package/dist/_cjs/constants/abi/EntryPointABI.js.map +1 -0
  141. package/dist/_cjs/constants/abi/SmartSessionAbi.js +1472 -0
  142. package/dist/_cjs/constants/abi/SmartSessionAbi.js.map +1 -0
  143. package/dist/_cjs/constants/abi/TokenWithPermitAbi.js +622 -0
  144. package/dist/_cjs/constants/abi/TokenWithPermitAbi.js.map +1 -0
  145. package/dist/_cjs/constants/abi/UniActionPolicyAbi.js +62 -0
  146. package/dist/_cjs/constants/abi/UniActionPolicyAbi.js.map +1 -0
  147. package/dist/_cjs/constants/abi/UniswapSwapRouterAbi.js +486 -0
  148. package/dist/_cjs/constants/abi/UniswapSwapRouterAbi.js.map +1 -0
  149. package/dist/_cjs/constants/abi/index.js +14 -0
  150. package/dist/_cjs/constants/abi/index.js.map +1 -0
  151. package/dist/_cjs/constants/index.js +62 -0
  152. package/dist/_cjs/constants/index.js.map +1 -0
  153. package/dist/_cjs/index.js +13 -0
  154. package/dist/_cjs/index.js.map +1 -0
  155. package/dist/_cjs/modules/index.js +8 -0
  156. package/dist/_cjs/modules/index.js.map +1 -0
  157. package/dist/_cjs/modules/toEmptyExecutor.js +10 -0
  158. package/dist/_cjs/modules/toEmptyExecutor.js.map +1 -0
  159. package/dist/_cjs/modules/toEmptyHook.js +10 -0
  160. package/dist/_cjs/modules/toEmptyHook.js.map +1 -0
  161. package/dist/_cjs/modules/utils/Helpers.js +59 -0
  162. package/dist/_cjs/modules/utils/Helpers.js.map +1 -0
  163. package/dist/_cjs/modules/utils/Types.js +15 -0
  164. package/dist/_cjs/modules/utils/Types.js.map +1 -0
  165. package/dist/_cjs/modules/utils/Uid.js +14 -0
  166. package/dist/_cjs/modules/utils/Uid.js.map +1 -0
  167. package/dist/_cjs/modules/utils/composabilityCalls.js +117 -0
  168. package/dist/_cjs/modules/utils/composabilityCalls.js.map +1 -0
  169. package/dist/_cjs/modules/utils/index.js +9 -0
  170. package/dist/_cjs/modules/utils/index.js.map +1 -0
  171. package/dist/_cjs/modules/utils/runtimeAbiEncoding.js +276 -0
  172. package/dist/_cjs/modules/utils/runtimeAbiEncoding.js.map +1 -0
  173. package/dist/_cjs/modules/utils/toModule.js +39 -0
  174. package/dist/_cjs/modules/utils/toModule.js.map +1 -0
  175. package/dist/_cjs/modules/validators/default/index.js +5 -0
  176. package/dist/_cjs/modules/validators/default/index.js.map +1 -0
  177. package/dist/_cjs/modules/validators/default/toDefaultModule.js +18 -0
  178. package/dist/_cjs/modules/validators/default/toDefaultModule.js.map +1 -0
  179. package/dist/_cjs/modules/validators/index.js +9 -0
  180. package/dist/_cjs/modules/validators/index.js.map +1 -0
  181. package/dist/_cjs/modules/validators/ownable/decorators/addOwner.js +44 -0
  182. package/dist/_cjs/modules/validators/ownable/decorators/addOwner.js.map +1 -0
  183. package/dist/_cjs/modules/validators/ownable/decorators/getAddOwnerTx.js +42 -0
  184. package/dist/_cjs/modules/validators/ownable/decorators/getAddOwnerTx.js.map +1 -0
  185. package/dist/_cjs/modules/validators/ownable/decorators/getOwners.js +28 -0
  186. package/dist/_cjs/modules/validators/ownable/decorators/getOwners.js.map +1 -0
  187. package/dist/_cjs/modules/validators/ownable/decorators/getRemoveOwnerTx.js +38 -0
  188. package/dist/_cjs/modules/validators/ownable/decorators/getRemoveOwnerTx.js.map +1 -0
  189. package/dist/_cjs/modules/validators/ownable/decorators/getSetThresholdTx.js +32 -0
  190. package/dist/_cjs/modules/validators/ownable/decorators/getSetThresholdTx.js.map +1 -0
  191. package/dist/_cjs/modules/validators/ownable/decorators/getThreshold.js +28 -0
  192. package/dist/_cjs/modules/validators/ownable/decorators/getThreshold.js.map +1 -0
  193. package/dist/_cjs/modules/validators/ownable/decorators/index.js +70 -0
  194. package/dist/_cjs/modules/validators/ownable/decorators/index.js.map +1 -0
  195. package/dist/_cjs/modules/validators/ownable/decorators/multiSign.js +25 -0
  196. package/dist/_cjs/modules/validators/ownable/decorators/multiSign.js.map +1 -0
  197. package/dist/_cjs/modules/validators/ownable/decorators/prepareForMultiSign.js +22 -0
  198. package/dist/_cjs/modules/validators/ownable/decorators/prepareForMultiSign.js.map +1 -0
  199. package/dist/_cjs/modules/validators/ownable/decorators/removeOwner.js +44 -0
  200. package/dist/_cjs/modules/validators/ownable/decorators/removeOwner.js.map +1 -0
  201. package/dist/_cjs/modules/validators/ownable/decorators/setThreshold.js +39 -0
  202. package/dist/_cjs/modules/validators/ownable/decorators/setThreshold.js.map +1 -0
  203. package/dist/_cjs/modules/validators/ownable/index.js +6 -0
  204. package/dist/_cjs/modules/validators/ownable/index.js.map +1 -0
  205. package/dist/_cjs/modules/validators/ownable/toOwnableModule.js +16 -0
  206. package/dist/_cjs/modules/validators/ownable/toOwnableModule.js.map +1 -0
  207. package/dist/_cjs/modules/validators/smartSessionsValidator/Helpers.js +124 -0
  208. package/dist/_cjs/modules/validators/smartSessionsValidator/Helpers.js.map +1 -0
  209. package/dist/_cjs/modules/validators/smartSessionsValidator/Types.js +13 -0
  210. package/dist/_cjs/modules/validators/smartSessionsValidator/Types.js.map +1 -0
  211. package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/grantPermission.js +38 -0
  212. package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/grantPermission.js.map +1 -0
  213. package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/index.js +27 -0
  214. package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/index.js.map +1 -0
  215. package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/preparePermission.js +127 -0
  216. package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/preparePermission.js.map +1 -0
  217. package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/usePermission.js +16 -0
  218. package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/usePermission.js.map +1 -0
  219. package/dist/_cjs/modules/validators/smartSessionsValidator/index.js +8 -0
  220. package/dist/_cjs/modules/validators/smartSessionsValidator/index.js.map +1 -0
  221. package/dist/_cjs/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js +49 -0
  222. package/dist/_cjs/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js.map +1 -0
  223. package/dist/_cjs/modules/validators/toValidator.js +21 -0
  224. package/dist/_cjs/modules/validators/toValidator.js.map +1 -0
  225. package/dist/_cjs/package.json +1 -0
  226. package/dist/_esm/account/decorators/getFactoryData.js +31 -0
  227. package/dist/_esm/account/decorators/getFactoryData.js.map +1 -0
  228. package/dist/_esm/account/decorators/getStartaleAccountAddress.js +31 -0
  229. package/dist/_esm/account/decorators/getStartaleAccountAddress.js.map +1 -0
  230. package/dist/_esm/account/decorators/index.js +3 -0
  231. package/dist/_esm/account/decorators/index.js.map +1 -0
  232. package/dist/_esm/account/index.js +3 -0
  233. package/dist/_esm/account/index.js.map +1 -0
  234. package/dist/_esm/account/toStartaleSmartAccount.js +327 -0
  235. package/dist/_esm/account/toStartaleSmartAccount.js.map +1 -0
  236. package/dist/_esm/account/utils/AccountNotFound.js +17 -0
  237. package/dist/_esm/account/utils/AccountNotFound.js.map +1 -0
  238. package/dist/_esm/account/utils/Constants.js +129 -0
  239. package/dist/_esm/account/utils/Constants.js.map +1 -0
  240. package/dist/_esm/account/utils/Helpers.js +45 -0
  241. package/dist/_esm/account/utils/Helpers.js.map +1 -0
  242. package/dist/_esm/account/utils/Logger.js +50 -0
  243. package/dist/_esm/account/utils/Logger.js.map +1 -0
  244. package/dist/_esm/account/utils/Types.js +2 -0
  245. package/dist/_esm/account/utils/Types.js.map +1 -0
  246. package/dist/_esm/account/utils/Utils.js +319 -0
  247. package/dist/_esm/account/utils/Utils.js.map +1 -0
  248. package/dist/_esm/account/utils/contractSimulation.js +48 -0
  249. package/dist/_esm/account/utils/contractSimulation.js.map +1 -0
  250. package/dist/_esm/account/utils/deepHexlify.js +63 -0
  251. package/dist/_esm/account/utils/deepHexlify.js.map +1 -0
  252. package/dist/_esm/account/utils/fromBundlerClient.js +67 -0
  253. package/dist/_esm/account/utils/fromBundlerClient.js.map +1 -0
  254. package/dist/_esm/account/utils/getAAError.js +34 -0
  255. package/dist/_esm/account/utils/getAAError.js.map +1 -0
  256. package/dist/_esm/account/utils/getChain.js +117 -0
  257. package/dist/_esm/account/utils/getChain.js.map +1 -0
  258. package/dist/_esm/account/utils/getVersion.js +163 -0
  259. package/dist/_esm/account/utils/getVersion.js.map +1 -0
  260. package/dist/_esm/account/utils/index.js +19 -0
  261. package/dist/_esm/account/utils/index.js.map +1 -0
  262. package/dist/_esm/account/utils/parseErrorMessage.js +89 -0
  263. package/dist/_esm/account/utils/parseErrorMessage.js.map +1 -0
  264. package/dist/_esm/account/utils/tenderlySimulation.js +47 -0
  265. package/dist/_esm/account/utils/tenderlySimulation.js.map +1 -0
  266. package/dist/_esm/account/utils/toInitData.js +14 -0
  267. package/dist/_esm/account/utils/toInitData.js.map +1 -0
  268. package/dist/_esm/account/utils/toInstallData.js +16 -0
  269. package/dist/_esm/account/utils/toInstallData.js.map +1 -0
  270. package/dist/_esm/account/utils/toSigner.js +91 -0
  271. package/dist/_esm/account/utils/toSigner.js.map +1 -0
  272. package/dist/_esm/clients/createHttpClient.js +43 -0
  273. package/dist/_esm/clients/createHttpClient.js.map +1 -0
  274. package/dist/_esm/clients/createSCSBundlerClient.js +56 -0
  275. package/dist/_esm/clients/createSCSBundlerClient.js.map +1 -0
  276. package/dist/_esm/clients/createSCSPaymasterClient.js +74 -0
  277. package/dist/_esm/clients/createSCSPaymasterClient.js.map +1 -0
  278. package/dist/_esm/clients/decorators/bundler/getGasFeeValues.js +53 -0
  279. package/dist/_esm/clients/decorators/bundler/getGasFeeValues.js.map +1 -0
  280. package/dist/_esm/clients/decorators/bundler/getUserOperationStatus.js +8 -0
  281. package/dist/_esm/clients/decorators/bundler/getUserOperationStatus.js.map +1 -0
  282. package/dist/_esm/clients/decorators/bundler/index.js +11 -0
  283. package/dist/_esm/clients/decorators/bundler/index.js.map +1 -0
  284. package/dist/_esm/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.js +26 -0
  285. package/dist/_esm/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.js.map +1 -0
  286. package/dist/_esm/clients/decorators/bundler/waitForUserOperationReceipt.js +10 -0
  287. package/dist/_esm/clients/decorators/bundler/waitForUserOperationReceipt.js.map +1 -0
  288. package/dist/_esm/clients/decorators/erc7579/accountId.js +77 -0
  289. package/dist/_esm/clients/decorators/erc7579/accountId.js.map +1 -0
  290. package/dist/_esm/clients/decorators/erc7579/getActiveHook.js +52 -0
  291. package/dist/_esm/clients/decorators/erc7579/getActiveHook.js.map +1 -0
  292. package/dist/_esm/clients/decorators/erc7579/getFallbackBySelector.js +67 -0
  293. package/dist/_esm/clients/decorators/erc7579/getFallbackBySelector.js.map +1 -0
  294. package/dist/_esm/clients/decorators/erc7579/getInstalledExecutors.js +74 -0
  295. package/dist/_esm/clients/decorators/erc7579/getInstalledExecutors.js.map +1 -0
  296. package/dist/_esm/clients/decorators/erc7579/getInstalledValidators.js +72 -0
  297. package/dist/_esm/clients/decorators/erc7579/getInstalledValidators.js.map +1 -0
  298. package/dist/_esm/clients/decorators/erc7579/getPreviousModule.js +54 -0
  299. package/dist/_esm/clients/decorators/erc7579/getPreviousModule.js.map +1 -0
  300. package/dist/_esm/clients/decorators/erc7579/index.js +48 -0
  301. package/dist/_esm/clients/decorators/erc7579/index.js.map +1 -0
  302. package/dist/_esm/clients/decorators/erc7579/installModule.js +109 -0
  303. package/dist/_esm/clients/decorators/erc7579/installModule.js.map +1 -0
  304. package/dist/_esm/clients/decorators/erc7579/installModules.js +41 -0
  305. package/dist/_esm/clients/decorators/erc7579/installModules.js.map +1 -0
  306. package/dist/_esm/clients/decorators/erc7579/isModuleInstalled.js +106 -0
  307. package/dist/_esm/clients/decorators/erc7579/isModuleInstalled.js.map +1 -0
  308. package/dist/_esm/clients/decorators/erc7579/supportsExecutionMode.js +120 -0
  309. package/dist/_esm/clients/decorators/erc7579/supportsExecutionMode.js.map +1 -0
  310. package/dist/_esm/clients/decorators/erc7579/supportsModule.js +108 -0
  311. package/dist/_esm/clients/decorators/erc7579/supportsModule.js.map +1 -0
  312. package/dist/_esm/clients/decorators/erc7579/uninstallFallback.js +76 -0
  313. package/dist/_esm/clients/decorators/erc7579/uninstallFallback.js.map +1 -0
  314. package/dist/_esm/clients/decorators/erc7579/uninstallModule.js +94 -0
  315. package/dist/_esm/clients/decorators/erc7579/uninstallModule.js.map +1 -0
  316. package/dist/_esm/clients/decorators/erc7579/uninstallModules.js +42 -0
  317. package/dist/_esm/clients/decorators/erc7579/uninstallModules.js.map +1 -0
  318. package/dist/_esm/clients/decorators/index.js +5 -0
  319. package/dist/_esm/clients/decorators/index.js.map +1 -0
  320. package/dist/_esm/clients/decorators/smartAccount/debugUserOperation.js +105 -0
  321. package/dist/_esm/clients/decorators/smartAccount/debugUserOperation.js.map +1 -0
  322. package/dist/_esm/clients/decorators/smartAccount/index.js +28 -0
  323. package/dist/_esm/clients/decorators/smartAccount/index.js.map +1 -0
  324. package/dist/_esm/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js +60 -0
  325. package/dist/_esm/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js.map +1 -0
  326. package/dist/_esm/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js +36 -0
  327. package/dist/_esm/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js.map +1 -0
  328. package/dist/_esm/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js +44 -0
  329. package/dist/_esm/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js.map +1 -0
  330. package/dist/_esm/clients/decorators/smartAccount/sendTransaction.js +57 -0
  331. package/dist/_esm/clients/decorators/smartAccount/sendTransaction.js.map +1 -0
  332. package/dist/_esm/clients/decorators/smartAccount/signMessage.js +30 -0
  333. package/dist/_esm/clients/decorators/smartAccount/signMessage.js.map +1 -0
  334. package/dist/_esm/clients/decorators/smartAccount/signTypedData.js +82 -0
  335. package/dist/_esm/clients/decorators/smartAccount/signTypedData.js.map +1 -0
  336. package/dist/_esm/clients/decorators/smartAccount/upgradeSmartAccount.js +75 -0
  337. package/dist/_esm/clients/decorators/smartAccount/upgradeSmartAccount.js.map +1 -0
  338. package/dist/_esm/clients/decorators/smartAccount/waitForTransactionReceipt.js +14 -0
  339. package/dist/_esm/clients/decorators/smartAccount/waitForTransactionReceipt.js.map +1 -0
  340. package/dist/_esm/clients/decorators/smartAccount/writeContract.js +40 -0
  341. package/dist/_esm/clients/decorators/smartAccount/writeContract.js.map +1 -0
  342. package/dist/_esm/clients/decorators/tokenPaymaster/getSupportedTokens.js +35 -0
  343. package/dist/_esm/clients/decorators/tokenPaymaster/getSupportedTokens.js.map +1 -0
  344. package/dist/_esm/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js +70 -0
  345. package/dist/_esm/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js.map +1 -0
  346. package/dist/_esm/clients/decorators/tokenPaymaster/index.js +63 -0
  347. package/dist/_esm/clients/decorators/tokenPaymaster/index.js.map +1 -0
  348. package/dist/_esm/clients/index.js +5 -0
  349. package/dist/_esm/clients/index.js.map +1 -0
  350. package/dist/_esm/constants/abi/AccountFactory.js +334 -0
  351. package/dist/_esm/constants/abi/AccountFactory.js.map +1 -0
  352. package/dist/_esm/constants/abi/AccountImplementationAbi.js +1176 -0
  353. package/dist/_esm/constants/abi/AccountImplementationAbi.js.map +1 -0
  354. package/dist/_esm/constants/abi/BootstrapAbi.js +727 -0
  355. package/dist/_esm/constants/abi/BootstrapAbi.js.map +1 -0
  356. package/dist/_esm/constants/abi/ComposabilityAbi.js +271 -0
  357. package/dist/_esm/constants/abi/ComposabilityAbi.js.map +1 -0
  358. package/dist/_esm/constants/abi/EIP1271Abi.js +28 -0
  359. package/dist/_esm/constants/abi/EIP1271Abi.js.map +1 -0
  360. package/dist/_esm/constants/abi/ERC7484RegistryAbi.js +14 -0
  361. package/dist/_esm/constants/abi/ERC7484RegistryAbi.js.map +1 -0
  362. package/dist/_esm/constants/abi/EntryPointABI.js +658 -0
  363. package/dist/_esm/constants/abi/EntryPointABI.js.map +1 -0
  364. package/dist/_esm/constants/abi/SmartSessionAbi.js +1469 -0
  365. package/dist/_esm/constants/abi/SmartSessionAbi.js.map +1 -0
  366. package/dist/_esm/constants/abi/TokenWithPermitAbi.js +619 -0
  367. package/dist/_esm/constants/abi/TokenWithPermitAbi.js.map +1 -0
  368. package/dist/_esm/constants/abi/UniActionPolicyAbi.js +59 -0
  369. package/dist/_esm/constants/abi/UniActionPolicyAbi.js.map +1 -0
  370. package/dist/_esm/constants/abi/UniswapSwapRouterAbi.js +483 -0
  371. package/dist/_esm/constants/abi/UniswapSwapRouterAbi.js.map +1 -0
  372. package/dist/_esm/constants/abi/index.js +11 -0
  373. package/dist/_esm/constants/abi/index.js.map +1 -0
  374. package/dist/_esm/constants/index.js +29 -0
  375. package/dist/_esm/constants/index.js.map +1 -0
  376. package/dist/_esm/index.js +12 -0
  377. package/dist/_esm/index.js.map +1 -0
  378. package/dist/_esm/modules/index.js +6 -0
  379. package/dist/_esm/modules/index.js.map +1 -0
  380. package/dist/_esm/modules/toEmptyExecutor.js +6 -0
  381. package/dist/_esm/modules/toEmptyExecutor.js.map +1 -0
  382. package/dist/_esm/modules/toEmptyHook.js +6 -0
  383. package/dist/_esm/modules/toEmptyHook.js.map +1 -0
  384. package/dist/_esm/modules/utils/Helpers.js +81 -0
  385. package/dist/_esm/modules/utils/Helpers.js.map +1 -0
  386. package/dist/_esm/modules/utils/Types.js +12 -0
  387. package/dist/_esm/modules/utils/Types.js.map +1 -0
  388. package/dist/_esm/modules/utils/Uid.js +11 -0
  389. package/dist/_esm/modules/utils/Uid.js.map +1 -0
  390. package/dist/_esm/modules/utils/composabilityCalls.js +127 -0
  391. package/dist/_esm/modules/utils/composabilityCalls.js.map +1 -0
  392. package/dist/_esm/modules/utils/index.js +6 -0
  393. package/dist/_esm/modules/utils/index.js.map +1 -0
  394. package/dist/_esm/modules/utils/runtimeAbiEncoding.js +365 -0
  395. package/dist/_esm/modules/utils/runtimeAbiEncoding.js.map +1 -0
  396. package/dist/_esm/modules/utils/toModule.js +61 -0
  397. package/dist/_esm/modules/utils/toModule.js.map +1 -0
  398. package/dist/_esm/modules/validators/default/index.js +2 -0
  399. package/dist/_esm/modules/validators/default/index.js.map +1 -0
  400. package/dist/_esm/modules/validators/default/toDefaultModule.js +14 -0
  401. package/dist/_esm/modules/validators/default/toDefaultModule.js.map +1 -0
  402. package/dist/_esm/modules/validators/index.js +6 -0
  403. package/dist/_esm/modules/validators/index.js.map +1 -0
  404. package/dist/_esm/modules/validators/ownable/decorators/addOwner.js +52 -0
  405. package/dist/_esm/modules/validators/ownable/decorators/addOwner.js.map +1 -0
  406. package/dist/_esm/modules/validators/ownable/decorators/getAddOwnerTx.js +50 -0
  407. package/dist/_esm/modules/validators/ownable/decorators/getAddOwnerTx.js.map +1 -0
  408. package/dist/_esm/modules/validators/ownable/decorators/getOwners.js +38 -0
  409. package/dist/_esm/modules/validators/ownable/decorators/getOwners.js.map +1 -0
  410. package/dist/_esm/modules/validators/ownable/decorators/getRemoveOwnerTx.js +46 -0
  411. package/dist/_esm/modules/validators/ownable/decorators/getRemoveOwnerTx.js.map +1 -0
  412. package/dist/_esm/modules/validators/ownable/decorators/getSetThresholdTx.js +48 -0
  413. package/dist/_esm/modules/validators/ownable/decorators/getSetThresholdTx.js.map +1 -0
  414. package/dist/_esm/modules/validators/ownable/decorators/getThreshold.js +54 -0
  415. package/dist/_esm/modules/validators/ownable/decorators/getThreshold.js.map +1 -0
  416. package/dist/_esm/modules/validators/ownable/decorators/index.js +57 -0
  417. package/dist/_esm/modules/validators/ownable/decorators/index.js.map +1 -0
  418. package/dist/_esm/modules/validators/ownable/decorators/multiSign.js +22 -0
  419. package/dist/_esm/modules/validators/ownable/decorators/multiSign.js.map +1 -0
  420. package/dist/_esm/modules/validators/ownable/decorators/prepareForMultiSign.js +21 -0
  421. package/dist/_esm/modules/validators/ownable/decorators/prepareForMultiSign.js.map +1 -0
  422. package/dist/_esm/modules/validators/ownable/decorators/removeOwner.js +63 -0
  423. package/dist/_esm/modules/validators/ownable/decorators/removeOwner.js.map +1 -0
  424. package/dist/_esm/modules/validators/ownable/decorators/setThreshold.js +62 -0
  425. package/dist/_esm/modules/validators/ownable/decorators/setThreshold.js.map +1 -0
  426. package/dist/_esm/modules/validators/ownable/index.js +3 -0
  427. package/dist/_esm/modules/validators/ownable/index.js.map +1 -0
  428. package/dist/_esm/modules/validators/ownable/toOwnableModule.js +38 -0
  429. package/dist/_esm/modules/validators/ownable/toOwnableModule.js.map +1 -0
  430. package/dist/_esm/modules/validators/smartSessionsValidator/Helpers.js +173 -0
  431. package/dist/_esm/modules/validators/smartSessionsValidator/Helpers.js.map +1 -0
  432. package/dist/_esm/modules/validators/smartSessionsValidator/Types.js +13 -0
  433. package/dist/_esm/modules/validators/smartSessionsValidator/Types.js.map +1 -0
  434. package/dist/_esm/modules/validators/smartSessionsValidator/decorators/grantPermission.js +79 -0
  435. package/dist/_esm/modules/validators/smartSessionsValidator/decorators/grantPermission.js.map +1 -0
  436. package/dist/_esm/modules/validators/smartSessionsValidator/decorators/index.js +40 -0
  437. package/dist/_esm/modules/validators/smartSessionsValidator/decorators/index.js.map +1 -0
  438. package/dist/_esm/modules/validators/smartSessionsValidator/decorators/preparePermission.js +191 -0
  439. package/dist/_esm/modules/validators/smartSessionsValidator/decorators/preparePermission.js.map +1 -0
  440. package/dist/_esm/modules/validators/smartSessionsValidator/decorators/usePermission.js +47 -0
  441. package/dist/_esm/modules/validators/smartSessionsValidator/decorators/usePermission.js.map +1 -0
  442. package/dist/_esm/modules/validators/smartSessionsValidator/index.js +5 -0
  443. package/dist/_esm/modules/validators/smartSessionsValidator/index.js.map +1 -0
  444. package/dist/_esm/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js +82 -0
  445. package/dist/_esm/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js.map +1 -0
  446. package/dist/_esm/modules/validators/toValidator.js +17 -0
  447. package/dist/_esm/modules/validators/toValidator.js.map +1 -0
  448. package/dist/_esm/package.json +1 -0
  449. package/dist/_types/account/decorators/getFactoryData.d.ts +25 -0
  450. package/dist/_types/account/decorators/getFactoryData.d.ts.map +1 -0
  451. package/dist/_types/account/decorators/getStartaleAccountAddress.d.ts +33 -0
  452. package/dist/_types/account/decorators/getStartaleAccountAddress.d.ts.map +1 -0
  453. package/dist/_types/account/decorators/index.d.ts +3 -0
  454. package/dist/_types/account/decorators/index.d.ts.map +1 -0
  455. package/dist/_types/account/index.d.ts +3 -0
  456. package/dist/_types/account/index.d.ts.map +1 -0
  457. package/dist/_types/account/toStartaleSmartAccount.d.ts +110 -0
  458. package/dist/_types/account/toStartaleSmartAccount.d.ts.map +1 -0
  459. package/dist/_types/account/utils/AccountNotFound.d.ts +10 -0
  460. package/dist/_types/account/utils/AccountNotFound.d.ts.map +1 -0
  461. package/dist/_types/account/utils/Constants.d.ts +73 -0
  462. package/dist/_types/account/utils/Constants.d.ts.map +1 -0
  463. package/dist/_types/account/utils/Helpers.d.ts +21 -0
  464. package/dist/_types/account/utils/Helpers.d.ts.map +1 -0
  465. package/dist/_types/account/utils/Logger.d.ts +20 -0
  466. package/dist/_types/account/utils/Logger.d.ts.map +1 -0
  467. package/dist/_types/account/utils/Types.d.ts +94 -0
  468. package/dist/_types/account/utils/Types.d.ts.map +1 -0
  469. package/dist/_types/account/utils/Utils.d.ts +129 -0
  470. package/dist/_types/account/utils/Utils.d.ts.map +1 -0
  471. package/dist/_types/account/utils/contractSimulation.d.ts +801 -0
  472. package/dist/_types/account/utils/contractSimulation.d.ts.map +1 -0
  473. package/dist/_types/account/utils/deepHexlify.d.ts +41 -0
  474. package/dist/_types/account/utils/deepHexlify.d.ts.map +1 -0
  475. package/dist/_types/account/utils/fromBundlerClient.d.ts +50 -0
  476. package/dist/_types/account/utils/fromBundlerClient.d.ts.map +1 -0
  477. package/dist/_types/account/utils/getAAError.d.ts +17 -0
  478. package/dist/_types/account/utils/getAAError.d.ts.map +1 -0
  479. package/dist/_types/account/utils/getChain.d.ts +64 -0
  480. package/dist/_types/account/utils/getChain.d.ts.map +1 -0
  481. package/dist/_types/account/utils/getVersion.d.ts +135 -0
  482. package/dist/_types/account/utils/getVersion.d.ts.map +1 -0
  483. package/dist/_types/account/utils/index.d.ts +19 -0
  484. package/dist/_types/account/utils/index.d.ts.map +1 -0
  485. package/dist/_types/account/utils/parseErrorMessage.d.ts +2 -0
  486. package/dist/_types/account/utils/parseErrorMessage.d.ts.map +1 -0
  487. package/dist/_types/account/utils/tenderlySimulation.d.ts +13 -0
  488. package/dist/_types/account/utils/tenderlySimulation.d.ts.map +1 -0
  489. package/dist/_types/account/utils/toInitData.d.ts +12 -0
  490. package/dist/_types/account/utils/toInitData.d.ts.map +1 -0
  491. package/dist/_types/account/utils/toInstallData.d.ts +8 -0
  492. package/dist/_types/account/utils/toInstallData.d.ts.map +1 -0
  493. package/dist/_types/account/utils/toSigner.d.ts +26 -0
  494. package/dist/_types/account/utils/toSigner.d.ts.map +1 -0
  495. package/dist/_types/clients/createHttpClient.d.ts +44 -0
  496. package/dist/_types/clients/createHttpClient.d.ts.map +1 -0
  497. package/dist/_types/clients/createSCSBundlerClient.d.ts +66 -0
  498. package/dist/_types/clients/createSCSBundlerClient.d.ts.map +1 -0
  499. package/dist/_types/clients/createSCSPaymasterClient.d.ts +71 -0
  500. package/dist/_types/clients/createSCSPaymasterClient.d.ts.map +1 -0
  501. package/dist/_types/clients/decorators/bundler/getGasFeeValues.d.ts +51 -0
  502. package/dist/_types/clients/decorators/bundler/getGasFeeValues.d.ts.map +1 -0
  503. package/dist/_types/clients/decorators/bundler/getUserOperationStatus.d.ts +17 -0
  504. package/dist/_types/clients/decorators/bundler/getUserOperationStatus.d.ts.map +1 -0
  505. package/dist/_types/clients/decorators/bundler/index.d.ts +61 -0
  506. package/dist/_types/clients/decorators/bundler/index.d.ts.map +1 -0
  507. package/dist/_types/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.d.ts +8 -0
  508. package/dist/_types/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.d.ts.map +1 -0
  509. package/dist/_types/clients/decorators/bundler/waitForUserOperationReceipt.d.ts +5 -0
  510. package/dist/_types/clients/decorators/bundler/waitForUserOperationReceipt.d.ts.map +1 -0
  511. package/dist/_types/clients/decorators/erc7579/accountId.d.ts +21 -0
  512. package/dist/_types/clients/decorators/erc7579/accountId.d.ts.map +1 -0
  513. package/dist/_types/clients/decorators/erc7579/getActiveHook.d.ts +35 -0
  514. package/dist/_types/clients/decorators/erc7579/getActiveHook.d.ts.map +1 -0
  515. package/dist/_types/clients/decorators/erc7579/getFallbackBySelector.d.ts +43 -0
  516. package/dist/_types/clients/decorators/erc7579/getFallbackBySelector.d.ts.map +1 -0
  517. package/dist/_types/clients/decorators/erc7579/getInstalledExecutors.d.ts +52 -0
  518. package/dist/_types/clients/decorators/erc7579/getInstalledExecutors.d.ts.map +1 -0
  519. package/dist/_types/clients/decorators/erc7579/getInstalledValidators.d.ts +52 -0
  520. package/dist/_types/clients/decorators/erc7579/getInstalledValidators.d.ts.map +1 -0
  521. package/dist/_types/clients/decorators/erc7579/getPreviousModule.d.ts +32 -0
  522. package/dist/_types/clients/decorators/erc7579/getPreviousModule.d.ts.map +1 -0
  523. package/dist/_types/clients/decorators/erc7579/index.d.ts +165 -0
  524. package/dist/_types/clients/decorators/erc7579/index.d.ts.map +1 -0
  525. package/dist/_types/clients/decorators/erc7579/installModule.d.ts +36 -0
  526. package/dist/_types/clients/decorators/erc7579/installModule.d.ts.map +1 -0
  527. package/dist/_types/clients/decorators/erc7579/installModules.d.ts +36 -0
  528. package/dist/_types/clients/decorators/erc7579/installModules.d.ts.map +1 -0
  529. package/dist/_types/clients/decorators/erc7579/isModuleInstalled.d.ts +54 -0
  530. package/dist/_types/clients/decorators/erc7579/isModuleInstalled.d.ts.map +1 -0
  531. package/dist/_types/clients/decorators/erc7579/supportsExecutionMode.d.ts +54 -0
  532. package/dist/_types/clients/decorators/erc7579/supportsExecutionMode.d.ts.map +1 -0
  533. package/dist/_types/clients/decorators/erc7579/supportsModule.d.ts +48 -0
  534. package/dist/_types/clients/decorators/erc7579/supportsModule.d.ts.map +1 -0
  535. package/dist/_types/clients/decorators/erc7579/uninstallFallback.d.ts +35 -0
  536. package/dist/_types/clients/decorators/erc7579/uninstallFallback.d.ts.map +1 -0
  537. package/dist/_types/clients/decorators/erc7579/uninstallModule.d.ts +35 -0
  538. package/dist/_types/clients/decorators/erc7579/uninstallModule.d.ts.map +1 -0
  539. package/dist/_types/clients/decorators/erc7579/uninstallModules.d.ts +32 -0
  540. package/dist/_types/clients/decorators/erc7579/uninstallModules.d.ts.map +1 -0
  541. package/dist/_types/clients/decorators/index.d.ts +5 -0
  542. package/dist/_types/clients/decorators/index.d.ts.map +1 -0
  543. package/dist/_types/clients/decorators/smartAccount/debugUserOperation.d.ts +35 -0
  544. package/dist/_types/clients/decorators/smartAccount/debugUserOperation.d.ts.map +1 -0
  545. package/dist/_types/clients/decorators/smartAccount/index.d.ts +315 -0
  546. package/dist/_types/clients/decorators/smartAccount/index.d.ts.map +1 -0
  547. package/dist/_types/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.d.ts +51 -0
  548. package/dist/_types/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.d.ts.map +1 -0
  549. package/dist/_types/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.d.ts +16 -0
  550. package/dist/_types/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.d.ts.map +1 -0
  551. package/dist/_types/clients/decorators/smartAccount/sendTokenPaymasterUserOp.d.ts +36 -0
  552. package/dist/_types/clients/decorators/smartAccount/sendTokenPaymasterUserOp.d.ts.map +1 -0
  553. package/dist/_types/clients/decorators/smartAccount/sendTransaction.d.ts +23 -0
  554. package/dist/_types/clients/decorators/smartAccount/sendTransaction.d.ts.map +1 -0
  555. package/dist/_types/clients/decorators/smartAccount/signMessage.d.ts +23 -0
  556. package/dist/_types/clients/decorators/smartAccount/signMessage.d.ts.map +1 -0
  557. package/dist/_types/clients/decorators/smartAccount/signTypedData.d.ts +60 -0
  558. package/dist/_types/clients/decorators/smartAccount/signTypedData.d.ts.map +1 -0
  559. package/dist/_types/clients/decorators/smartAccount/upgradeSmartAccount.d.ts +40 -0
  560. package/dist/_types/clients/decorators/smartAccount/upgradeSmartAccount.d.ts.map +1 -0
  561. package/dist/_types/clients/decorators/smartAccount/waitForTransactionReceipt.d.ts +6 -0
  562. package/dist/_types/clients/decorators/smartAccount/waitForTransactionReceipt.d.ts.map +1 -0
  563. package/dist/_types/clients/decorators/smartAccount/writeContract.d.ts +27 -0
  564. package/dist/_types/clients/decorators/smartAccount/writeContract.d.ts.map +1 -0
  565. package/dist/_types/clients/decorators/tokenPaymaster/getSupportedTokens.d.ts +16 -0
  566. package/dist/_types/clients/decorators/tokenPaymaster/getSupportedTokens.d.ts.map +1 -0
  567. package/dist/_types/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.d.ts +88 -0
  568. package/dist/_types/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.d.ts.map +1 -0
  569. package/dist/_types/clients/decorators/tokenPaymaster/index.d.ts +65 -0
  570. package/dist/_types/clients/decorators/tokenPaymaster/index.d.ts.map +1 -0
  571. package/dist/_types/clients/index.d.ts +5 -0
  572. package/dist/_types/clients/index.d.ts.map +1 -0
  573. package/dist/_types/constants/abi/AccountFactory.d.ts +259 -0
  574. package/dist/_types/constants/abi/AccountFactory.d.ts.map +1 -0
  575. package/dist/_types/constants/abi/AccountImplementationAbi.d.ts +903 -0
  576. package/dist/_types/constants/abi/AccountImplementationAbi.d.ts.map +1 -0
  577. package/dist/_types/constants/abi/BootstrapAbi.d.ts +554 -0
  578. package/dist/_types/constants/abi/BootstrapAbi.d.ts.map +1 -0
  579. package/dist/_types/constants/abi/ComposabilityAbi.d.ts +67 -0
  580. package/dist/_types/constants/abi/ComposabilityAbi.d.ts.map +1 -0
  581. package/dist/_types/constants/abi/EIP1271Abi.d.ts +54 -0
  582. package/dist/_types/constants/abi/EIP1271Abi.d.ts.map +1 -0
  583. package/dist/_types/constants/abi/ERC7484RegistryAbi.d.ts +16 -0
  584. package/dist/_types/constants/abi/ERC7484RegistryAbi.d.ts.map +1 -0
  585. package/dist/_types/constants/abi/EntryPointABI.d.ts +776 -0
  586. package/dist/_types/constants/abi/EntryPointABI.d.ts.map +1 -0
  587. package/dist/_types/constants/abi/SmartSessionAbi.d.ts +90 -0
  588. package/dist/_types/constants/abi/SmartSessionAbi.d.ts.map +1 -0
  589. package/dist/_types/constants/abi/TokenWithPermitAbi.d.ts +477 -0
  590. package/dist/_types/constants/abi/TokenWithPermitAbi.d.ts.map +1 -0
  591. package/dist/_types/constants/abi/UniActionPolicyAbi.d.ts +33 -0
  592. package/dist/_types/constants/abi/UniActionPolicyAbi.d.ts.map +1 -0
  593. package/dist/_types/constants/abi/UniswapSwapRouterAbi.d.ts +821 -0
  594. package/dist/_types/constants/abi/UniswapSwapRouterAbi.d.ts.map +1 -0
  595. package/dist/_types/constants/abi/index.d.ts +11 -0
  596. package/dist/_types/constants/abi/index.d.ts.map +1 -0
  597. package/dist/_types/constants/index.d.ts +16 -0
  598. package/dist/_types/constants/index.d.ts.map +1 -0
  599. package/dist/_types/index.d.ts +7 -0
  600. package/dist/_types/index.d.ts.map +1 -0
  601. package/dist/_types/modules/index.d.ts +6 -0
  602. package/dist/_types/modules/index.d.ts.map +1 -0
  603. package/dist/_types/modules/toEmptyExecutor.d.ts +3 -0
  604. package/dist/_types/modules/toEmptyExecutor.d.ts.map +1 -0
  605. package/dist/_types/modules/toEmptyHook.d.ts +3 -0
  606. package/dist/_types/modules/toEmptyHook.d.ts.map +1 -0
  607. package/dist/_types/modules/utils/Helpers.d.ts +48 -0
  608. package/dist/_types/modules/utils/Helpers.d.ts.map +1 -0
  609. package/dist/_types/modules/utils/Types.d.ts +103 -0
  610. package/dist/_types/modules/utils/Types.d.ts.map +1 -0
  611. package/dist/_types/modules/utils/Uid.d.ts +2 -0
  612. package/dist/_types/modules/utils/Uid.d.ts.map +1 -0
  613. package/dist/_types/modules/utils/composabilityCalls.d.ts +63 -0
  614. package/dist/_types/modules/utils/composabilityCalls.d.ts.map +1 -0
  615. package/dist/_types/modules/utils/index.d.ts +6 -0
  616. package/dist/_types/modules/utils/index.d.ts.map +1 -0
  617. package/dist/_types/modules/utils/runtimeAbiEncoding.d.ts +18 -0
  618. package/dist/_types/modules/utils/runtimeAbiEncoding.d.ts.map +1 -0
  619. package/dist/_types/modules/utils/toModule.d.ts +28 -0
  620. package/dist/_types/modules/utils/toModule.d.ts.map +1 -0
  621. package/dist/_types/modules/validators/default/index.d.ts +2 -0
  622. package/dist/_types/modules/validators/default/index.d.ts.map +1 -0
  623. package/dist/_types/modules/validators/default/toDefaultModule.d.ts +3 -0
  624. package/dist/_types/modules/validators/default/toDefaultModule.d.ts.map +1 -0
  625. package/dist/_types/modules/validators/index.d.ts +6 -0
  626. package/dist/_types/modules/validators/index.d.ts.map +1 -0
  627. package/dist/_types/modules/validators/ownable/decorators/addOwner.d.ts +36 -0
  628. package/dist/_types/modules/validators/ownable/decorators/addOwner.d.ts.map +1 -0
  629. package/dist/_types/modules/validators/ownable/decorators/getAddOwnerTx.d.ts +30 -0
  630. package/dist/_types/modules/validators/ownable/decorators/getAddOwnerTx.d.ts.map +1 -0
  631. package/dist/_types/modules/validators/ownable/decorators/getOwners.d.ts +25 -0
  632. package/dist/_types/modules/validators/ownable/decorators/getOwners.d.ts.map +1 -0
  633. package/dist/_types/modules/validators/ownable/decorators/getRemoveOwnerTx.d.ts +30 -0
  634. package/dist/_types/modules/validators/ownable/decorators/getRemoveOwnerTx.d.ts.map +1 -0
  635. package/dist/_types/modules/validators/ownable/decorators/getSetThresholdTx.d.ts +39 -0
  636. package/dist/_types/modules/validators/ownable/decorators/getSetThresholdTx.d.ts.map +1 -0
  637. package/dist/_types/modules/validators/ownable/decorators/getThreshold.d.ts +40 -0
  638. package/dist/_types/modules/validators/ownable/decorators/getThreshold.d.ts.map +1 -0
  639. package/dist/_types/modules/validators/ownable/decorators/index.d.ts +37 -0
  640. package/dist/_types/modules/validators/ownable/decorators/index.d.ts.map +1 -0
  641. package/dist/_types/modules/validators/ownable/decorators/multiSign.d.ts +11 -0
  642. package/dist/_types/modules/validators/ownable/decorators/multiSign.d.ts.map +1 -0
  643. package/dist/_types/modules/validators/ownable/decorators/prepareForMultiSign.d.ts +25 -0
  644. package/dist/_types/modules/validators/ownable/decorators/prepareForMultiSign.d.ts.map +1 -0
  645. package/dist/_types/modules/validators/ownable/decorators/removeOwner.d.ts +47 -0
  646. package/dist/_types/modules/validators/ownable/decorators/removeOwner.d.ts.map +1 -0
  647. package/dist/_types/modules/validators/ownable/decorators/setThreshold.d.ts +51 -0
  648. package/dist/_types/modules/validators/ownable/decorators/setThreshold.d.ts.map +1 -0
  649. package/dist/_types/modules/validators/ownable/index.d.ts +3 -0
  650. package/dist/_types/modules/validators/ownable/index.d.ts.map +1 -0
  651. package/dist/_types/modules/validators/ownable/toOwnableModule.d.ts +44 -0
  652. package/dist/_types/modules/validators/ownable/toOwnableModule.d.ts.map +1 -0
  653. package/dist/_types/modules/validators/smartSessionsValidator/Helpers.d.ts +110 -0
  654. package/dist/_types/modules/validators/smartSessionsValidator/Helpers.d.ts.map +1 -0
  655. package/dist/_types/modules/validators/smartSessionsValidator/Types.d.ts +223 -0
  656. package/dist/_types/modules/validators/smartSessionsValidator/Types.d.ts.map +1 -0
  657. package/dist/_types/modules/validators/smartSessionsValidator/decorators/grantPermission.d.ts +73 -0
  658. package/dist/_types/modules/validators/smartSessionsValidator/decorators/grantPermission.d.ts.map +1 -0
  659. package/dist/_types/modules/validators/smartSessionsValidator/decorators/index.d.ts +70 -0
  660. package/dist/_types/modules/validators/smartSessionsValidator/decorators/index.d.ts.map +1 -0
  661. package/dist/_types/modules/validators/smartSessionsValidator/decorators/preparePermission.d.ts +81 -0
  662. package/dist/_types/modules/validators/smartSessionsValidator/decorators/preparePermission.d.ts.map +1 -0
  663. package/dist/_types/modules/validators/smartSessionsValidator/decorators/usePermission.d.ts +63 -0
  664. package/dist/_types/modules/validators/smartSessionsValidator/decorators/usePermission.d.ts.map +1 -0
  665. package/dist/_types/modules/validators/smartSessionsValidator/index.d.ts +5 -0
  666. package/dist/_types/modules/validators/smartSessionsValidator/index.d.ts.map +1 -0
  667. package/dist/_types/modules/validators/smartSessionsValidator/toSmartSessionsValidator.d.ts +65 -0
  668. package/dist/_types/modules/validators/smartSessionsValidator/toSmartSessionsValidator.d.ts.map +1 -0
  669. package/dist/_types/modules/validators/toValidator.d.ts +45 -0
  670. package/dist/_types/modules/validators/toValidator.d.ts.map +1 -0
  671. package/package.json +134 -0
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usePermission = usePermission;
4
+ const account_abstraction_1 = require("viem/account-abstraction");
5
+ const utils_1 = require("viem/utils");
6
+ const AccountNotFound_1 = require("../../../../account/utils/AccountNotFound.js");
7
+ async function usePermission(client, parameters) {
8
+ const { account: account_ = client.account } = parameters;
9
+ if (!account_) {
10
+ throw new AccountNotFound_1.AccountNotFoundError({
11
+ docsPath: "/startale-client/methods#sendtransaction"
12
+ });
13
+ }
14
+ return await (0, utils_1.getAction)(client, account_abstraction_1.sendUserOperation, "sendUserOperation")(parameters);
15
+ }
16
+ //# sourceMappingURL=usePermission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePermission.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/smartSessionsValidator/decorators/usePermission.ts"],"names":[],"mappings":";;AAoEA,sCAoBC;AAvFD,kEAA4D;AAC5D,sCAAsC;AACtC,+EAAgF;AAiEzE,KAAK,UAAU,aAAa,CAGjC,MAAkE,EAClE,UAAyD;IAEzD,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,UAAU,CAAA;IAEzD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,sCAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,MAAM,IAAA,iBAAS,EACpB,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CAEpB,CAAC,UAAU,CAAC,CAAA;AACf,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./decorators/index.js"), exports);
5
+ tslib_1.__exportStar(require("./toSmartSessionsValidator.js"), exports);
6
+ tslib_1.__exportStar(require("./Helpers.js"), exports);
7
+ tslib_1.__exportStar(require("./Types.js"), exports);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/smartSessionsValidator/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,qEAA0C;AAC1C,oDAAyB;AACzB,kDAAuB"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toSmartSessionsValidator = exports.getUsePermissionInitData = exports.getUsePermissionModuleInitData = exports.DUMMY_ECDSA_SIG = void 0;
4
+ const viem_1 = require("viem");
5
+ const constants_1 = require("../../../constants/index.js");
6
+ const toModule_1 = require("../../utils/toModule.js");
7
+ exports.DUMMY_ECDSA_SIG = "0xe8b94748580ca0b4993c9a1b86b5be851bfc076ff5ce3a1ff65bf16392acfcb800f9b4f1aef1555c7fce5599fffb17e7c635502154a0333ba21f3ae491839af51c";
8
+ const getUsePermissionModuleInitData = (_) => ({
9
+ address: constants_1.SMART_SESSIONS_ADDRESS,
10
+ type: "validator",
11
+ initData: "0x"
12
+ });
13
+ exports.getUsePermissionModuleInitData = getUsePermissionModuleInitData;
14
+ const getUsePermissionInitData = ({ signerAddress }) => (0, viem_1.encodePacked)(["address"], [signerAddress]);
15
+ exports.getUsePermissionInitData = getUsePermissionInitData;
16
+ const toSmartSessionsValidator = (parameters) => {
17
+ const { account, signer, moduleInitData: moduleInitData_, deInitData = "0x", initData: initData_, initArgs: initArgs_ = { signerAddress: signer.address }, moduleData: { permissionIdIndex = 0, permissionIds = [], mode = constants_1.SmartSessionMode.USE, enableSessionData } = {} } = parameters;
18
+ const initData = initData_ ?? (0, exports.getUsePermissionInitData)(initArgs_);
19
+ const moduleInitData = moduleInitData_ ?? (0, constants_1.getSmartSessionsValidator)({ useRegistry: false });
20
+ return (0, toModule_1.toModule)({
21
+ ...parameters,
22
+ signer,
23
+ accountAddress: account.address,
24
+ address: constants_1.SMART_SESSIONS_ADDRESS,
25
+ initData,
26
+ moduleInitData,
27
+ deInitData,
28
+ getStubSignature: async () => (0, constants_1.encodeSmartSessionSignature)({
29
+ mode,
30
+ permissionId: permissionIds[permissionIdIndex],
31
+ enableSessionData,
32
+ signature: (0, constants_1.getOwnableValidatorMockSignature)({
33
+ threshold: 1
34
+ })
35
+ }),
36
+ signUserOpHash: async (userOpHash) => {
37
+ return (0, constants_1.encodeSmartSessionSignature)({
38
+ mode,
39
+ permissionId: permissionIds[permissionIdIndex],
40
+ enableSessionData,
41
+ signature: await signer.signMessage({
42
+ message: { raw: userOpHash }
43
+ })
44
+ });
45
+ }
46
+ });
47
+ };
48
+ exports.toSmartSessionsValidator = toSmartSessionsValidator;
49
+ //# sourceMappingURL=toSmartSessionsValidator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toSmartSessionsValidator.js","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/smartSessionsValidator/toSmartSessionsValidator.ts"],"names":[],"mappings":";;;AAAA,+BAA2D;AAC3D,kDAM2B;AAI3B,mDAA+C;AAGlC,QAAA,eAAe,GAC1B,sIAAsI,CAAA;A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YACjB,SAAS,EAAE,IAAA,4CAAgC,EAAC;gBAC1C,SAAS,EAAE,CAAC;aACb,CAAC;SACH,CAAC;QACJ,cAAc,EAAE,KAAK,EAAE,UAAe,EAAE,EAAE;YACxC,OAAO,IAAA,uCAA2B,EAAC;gBACjC,IAAI;gBACJ,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAAC;gBAC9C,iBAAiB;gBACjB,SAAS,EAAE,MAAM,MAAM,CAAC,WAAW,CAAC;oBAClC,OAAO,EAAE,EAAE,GAAG,EAAE,UAAiB,EAAE;iBACpC,CAAC;aACH,CAAC,CAAA;QACJ,CAAC;KACF,CAAuB,CAAA;AAC1B,CAAC,CAAA;AAlDY,QAAA,wBAAwB,4BAkDpC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toValidator = void 0;
4
+ const __1 = require("../index.js");
5
+ const toValidator = (parameters) => {
6
+ const { deInitData = "0x", type = "validator", signer, data = "0x", module, ...rest } = parameters;
7
+ return {
8
+ deInitData,
9
+ data,
10
+ module,
11
+ address: module,
12
+ signer,
13
+ type,
14
+ getStubSignature: async () => __1.DUMMY_SIGNATURE,
15
+ signUserOpHash: async (userOpHash) => await signer.signMessage({ message: { raw: userOpHash } }),
16
+ signMessage: async (message) => await signer.signMessage({ message }),
17
+ ...rest
18
+ };
19
+ };
20
+ exports.toValidator = toValidator;
21
+ //# sourceMappingURL=toValidator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toValidator.js","sourceRoot":"","sources":["../../../../src/sdk/modules/validators/toValidator.ts"],"names":[],"mappings":";;;AACA,0BAAoC;AAuD7B,MAAM,WAAW,GAAG,CAAC,UAA+B,EAAa,EAAE;IACxE,MAAM,EACJ,UAAU,GAAG,IAAI,EACjB,IAAI,GAAG,WAAW,EAClB,MAAM,EACN,IAAI,GAAG,IAAI,EACX,MAAM,EACN,GAAG,IAAI,EACR,GAAG,UAAU,CAAA;IAEd,OAAO;QACL,UAAU;QACV,IAAI;QACJ,MAAM;QACN,OAAO,EAAE,MAAM;QACf,MAAM;QACN,IAAI;QACJ,gBAAgB,EAAE,KAAK,IAAI,EAAE,CAAC,mBAAe;QAC7C,cAAc,EAAE,KAAK,EAAE,UAAe,EAAE,EAAE,CACxC,MAAM,MAAM,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,CAAC;QAC5D,WAAW,EAAE,KAAK,EAAE,OAAwB,EAAE,EAAE,CAC9C,MAAM,MAAM,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC;QACvC,GAAG,IAAI;KACR,CAAA;AACH,CAAC,CAAA;AAxBY,QAAA,WAAW,eAwBvB"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,31 @@
1
+ import { encodeAbiParameters, encodeFunctionData, pad, parseAbi, toHex } from "viem";
2
+ import { BootstrapAbi } from "../../constants/abi/BootstrapAbi.js";
3
+ export const getFactoryData = ({ initData, index }) => {
4
+ const salt = pad(toHex(index), { size: 32 });
5
+ return encodeFunctionData({
6
+ abi: parseAbi([
7
+ "function createAccount(bytes initData, bytes32 salt) external returns (address)"
8
+ ]),
9
+ functionName: "createAccount",
10
+ args: [initData, salt]
11
+ });
12
+ };
13
+ export const getInitData = (params) => encodeAbiParameters([
14
+ { name: "bootstrap", type: "address" },
15
+ { name: "initData", type: "bytes" }
16
+ ], [
17
+ params.bootStrapAddress,
18
+ encodeFunctionData({
19
+ abi: BootstrapAbi,
20
+ functionName: "initWithDefaultValidatorAndOtherModules",
21
+ args: [
22
+ params.defaultValidator.data,
23
+ params.validators,
24
+ params.executors,
25
+ params.hook,
26
+ params.fallbacks,
27
+ params.prevalidationHooks
28
+ ]
29
+ })
30
+ ]);
31
+ //# sourceMappingURL=getFactoryData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFactoryData.js","sourceRoot":"","sources":["../../../../src/sdk/account/decorators/getFactoryData.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EACnB,kBAAkB,EAClB,GAAG,EACH,QAAQ,EACR,KAAK,EACN,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAa/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,KAAK,EACgB,EAAO,EAAE;IAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAA;IAE5C,OAAO,kBAAkB,CAAC;QACxB,GAAG,EAAE,QAAQ,CAAC;YACZ,iFAAiF;SAClF,CAAC;QACF,YAAY,EAAE,eAAe;QAC7B,IAAI,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;KACvB,CAAC,CAAA;AACJ,CAAC,CAAA;AAkBD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAyB,EAAO,EAAE,CAC5D,mBAAmB,CACjB;IACE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;IACtC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE;CACpC,EACD;IACE,MAAM,CAAC,gBAAgB;IACvB,kBAAkB,CAAC;QACjB,GAAG,EAAE,YAAY;QACjB,YAAY,EAAE,yCAAyC;QACvD,IAAI,EAAE;YACJ,MAAM,CAAC,gBAAgB,CAAC,IAAI;YAC5B,MAAM,CAAC,UAAU;YACjB,MAAM,CAAC,SAAS;YAChB,MAAM,CAAC,IAAI;YACX,MAAM,CAAC,SAAS;YAChB,MAAM,CAAC,kBAAkB;SAC1B;KACF,CAAC;CACH,CACF,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { pad, toHex } from "viem";
2
+ import { ACCOUNT_FACTORY_ADDRESS } from "../../constants/index.js";
3
+ import { AccountFactoryAbi } from "../../constants/abi/AccountFactory.js";
4
+ /**
5
+ * Gets the counterfactual address for the smart account
6
+ *
7
+ * @param params - {@link GetUniversalAddressParams} Configuration for address computation
8
+ * @param params.publicClient - The public client to use for the read contract
9
+ * @param params.signerAddress - The address of the EOA signer
10
+ * @param params.index - Optional account index (defaults to 0)
11
+ *
12
+ * @returns Promise resolving to the {@link Address} of the counterfactual account
13
+ *
14
+ * @example
15
+ * const accountAddress = await getSmartAccountAddress({
16
+ * publicClient: viemPublicClient,
17
+ * initData: "0x123...",
18
+ * index: BigInt(0)
19
+ * });
20
+ */
21
+ export const getStartaleAccountAddress = async (params) => {
22
+ const { publicClient, initData, factoryAddress = ACCOUNT_FACTORY_ADDRESS, index = 0n } = params;
23
+ const salt = pad(toHex(index), { size: 32 });
24
+ return await publicClient.readContract({
25
+ address: factoryAddress,
26
+ abi: AccountFactoryAbi,
27
+ functionName: "computeAccountAddress",
28
+ args: [initData, salt]
29
+ });
30
+ };
31
+ //# sourceMappingURL=getStartaleAccountAddress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStartaleAccountAddress.js","sourceRoot":"","sources":["../../../../src/sdk/account/decorators/getStartaleAccountAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,GAAG,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAE/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAiBtE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,EAC5C,MAA+C,EAC7B,EAAE;IACpB,MAAM,EACJ,YAAY,EACZ,QAAQ,EACR,cAAc,GAAG,uBAAuB,EACxC,KAAK,GAAG,EAAE,EACX,GAAG,MAAM,CAAA;IAEV,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAA;IAE5C,OAAO,MAAM,YAAY,CAAC,YAAY,CAAC;QACrC,OAAO,EAAE,cAAc;QACvB,GAAG,EAAE,iBAAiB;QACtB,YAAY,EAAE,uBAAuB;QACrC,IAAI,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;KACvB,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from "./getStartaleAccountAddress.js";
2
+ export * from "./getFactoryData.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/account/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA;AAC9C,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from "./utils/index.js";
2
+ export * from "./toStartaleSmartAccount.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sdk/account/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,327 @@
1
+ import { concat, concatHex, createPublicClient, createWalletClient, domainSeparator, encodeAbiParameters, encodeFunctionData, encodePacked, getContract, keccak256, parseAbi, parseAbiParameters, publicActions, toBytes, toHex, validateTypedData, zeroAddress } from "viem";
2
+ import { entryPoint07Address, getUserOperationHash, toSmartAccount } from "viem/account-abstraction";
3
+ import { ENTRY_POINT_ADDRESS, ACCOUNT_FACTORY_ADDRESS, BOOTSTRAP_ADDRESS } from "../constants/index.js";
4
+ // Constants
5
+ import { EntrypointAbi } from "../constants/abi/index.js";
6
+ import { COMPOSABILITY_MODULE_ABI } from "../constants/abi/ComposabilityAbi.js";
7
+ import { toEmptyHook } from "../modules/toEmptyHook.js";
8
+ import { toDefaultModule } from "../modules/validators/default/toDefaultModule.js";
9
+ import { getFactoryData, getInitData } from "./decorators/getFactoryData.js";
10
+ import { getStartaleAccountAddress } from "./decorators/getStartaleAccountAddress.js";
11
+ import { EXECUTE_BATCH, EXECUTE_SINGLE, PARENT_TYPEHASH } from "./utils/Constants.js";
12
+ import { addressEquals, eip712WrapHash, getAccountDomainStructFields, getTypesForEIP712Domain, isNullOrUndefined, typeToString } from "./utils/Utils.js";
13
+ import { toInitData } from "./utils/toInitData.js";
14
+ import { toSigner } from "./utils/toSigner.js";
15
+ /**
16
+ * @description Create a Startale Smart Account.
17
+ *
18
+ * @param parameters - {@link ToStartaleSmartAccountParameters}
19
+ * @returns Startale Smart Account. {@link StartaleSmartAccount}
20
+ *
21
+ * @example
22
+ * import { toStartaleAccount } from '@startale-scs/aa-sdk'
23
+ * import { createWalletClient, http } from 'viem'
24
+ * import { mainnet } from 'viem/chains'
25
+ *
26
+ * const account = await toStartaleAccount({
27
+ * chain: mainnet,
28
+ * transport: http(),
29
+ * signer: '0x...',
30
+ * })
31
+ */
32
+ export const toStartaleSmartAccount = async (parameters) => {
33
+ const { chain, transport, signer: _signer, index = 0n, key = "startale account", name = "Startale Account", registryAddress = zeroAddress, validators: customValidators, executors: customExecutors, hook: customHook, fallbacks: customFallbacks, prevalidationHooks: customPrevalidationHooks, accountAddress: accountAddress_, factoryAddress = ACCOUNT_FACTORY_ADDRESS, bootStrapAddress = BOOTSTRAP_ADDRESS } = parameters;
34
+ const signer = await toSigner({ signer: _signer });
35
+ const walletClient = createWalletClient({
36
+ account: signer,
37
+ chain,
38
+ transport,
39
+ key,
40
+ name
41
+ }).extend(publicActions);
42
+ const publicClient = createPublicClient({ chain, transport });
43
+ const entryPointContract = getContract({
44
+ address: ENTRY_POINT_ADDRESS,
45
+ abi: EntrypointAbi,
46
+ client: {
47
+ public: publicClient,
48
+ wallet: walletClient
49
+ }
50
+ });
51
+ // Prepare default validator module
52
+ const defaultValidator = toDefaultModule({ signer });
53
+ // Prepare validator modules
54
+ const validators = customValidators || [];
55
+ // The default validator should be the defaultValidator unless custom validators have been set
56
+ let module = customValidators?.[0] || defaultValidator;
57
+ // Prepare executor modules
58
+ const executors = customExecutors || [];
59
+ // Prepare hook module
60
+ const hook = customHook || toEmptyHook();
61
+ // Prepare fallback modules
62
+ const fallbacks = customFallbacks || [];
63
+ // Generate the initialization data for the account using the init function
64
+ const prevalidationHooks = customPrevalidationHooks || [];
65
+ const initData = getInitData({
66
+ defaultValidator: toInitData(defaultValidator),
67
+ validators: validators.map(toInitData),
68
+ executors: executors.map(toInitData),
69
+ hook: toInitData(hook),
70
+ fallbacks: fallbacks.map(toInitData),
71
+ registryAddress,
72
+ bootStrapAddress,
73
+ prevalidationHooks
74
+ });
75
+ // Generate the factory data with the bootstrap address and init data
76
+ const factoryData = getFactoryData({ initData, index });
77
+ /**
78
+ * @description Gets the init code for the account
79
+ * @returns The init code as a hexadecimal string
80
+ */
81
+ const getInitCode = () => concatHex([factoryAddress, factoryData]);
82
+ let _accountAddress = accountAddress_;
83
+ /**
84
+ * @description Gets the counterfactual address of the account
85
+ * @returns The counterfactual address
86
+ * @throws {Error} If unable to get the counterfactual address
87
+ */
88
+ const getAddress = async () => {
89
+ if (!isNullOrUndefined(_accountAddress))
90
+ return _accountAddress;
91
+ const addressFromFactory = await getStartaleAccountAddress({
92
+ factoryAddress,
93
+ index,
94
+ initData,
95
+ publicClient
96
+ });
97
+ if (!addressEquals(addressFromFactory, zeroAddress)) {
98
+ _accountAddress = addressFromFactory;
99
+ return addressFromFactory;
100
+ }
101
+ throw new Error("Failed to get account address");
102
+ };
103
+ /**
104
+ * @description Calculates the hash of a user operation
105
+ * @param userOp - The user operation
106
+ * @returns The hash of the user operation
107
+ */
108
+ const getUserOpHash = (userOp) => getUserOperationHash({
109
+ chainId: chain.id,
110
+ entryPointAddress: entryPoint07Address,
111
+ entryPointVersion: "0.7",
112
+ userOperation: userOp
113
+ });
114
+ /**
115
+ * @description Encodes a batch of calls for execution
116
+ * @param calls - An array of calls to encode
117
+ * @param mode - The execution mode
118
+ * @returns The encoded calls
119
+ */
120
+ const encodeExecuteBatch = async (calls, mode = EXECUTE_BATCH) => {
121
+ const executionAbiParams = {
122
+ type: "tuple[]",
123
+ components: [
124
+ { name: "target", type: "address" },
125
+ { name: "value", type: "uint256" },
126
+ { name: "callData", type: "bytes" }
127
+ ]
128
+ };
129
+ const executions = calls.map((tx) => ({
130
+ target: tx.to,
131
+ callData: tx.data ?? "0x",
132
+ value: BigInt(tx.value ?? 0n)
133
+ }));
134
+ const executionCalldataPrep = encodeAbiParameters([executionAbiParams], [executions]);
135
+ return encodeFunctionData({
136
+ abi: parseAbi([
137
+ "function execute(bytes32 mode, bytes calldata executionCalldata) external"
138
+ ]),
139
+ functionName: "execute",
140
+ args: [mode, executionCalldataPrep]
141
+ });
142
+ };
143
+ /**
144
+ * @description Encodes a single call for execution
145
+ * @param call - The call to encode
146
+ * @param mode - The execution mode
147
+ * @returns The encoded call
148
+ */
149
+ const encodeExecute = async (call, mode = EXECUTE_SINGLE) => {
150
+ const executionCalldata = encodePacked(["address", "uint256", "bytes"], [call.to, BigInt(call.value ?? 0n), (call.data ?? "0x")]);
151
+ return encodeFunctionData({
152
+ abi: parseAbi([
153
+ "function execute(bytes32 mode, bytes calldata executionCalldata) external"
154
+ ]),
155
+ functionName: "execute",
156
+ args: [mode, executionCalldata]
157
+ });
158
+ };
159
+ /**
160
+ * @description Encodes a composable calls for execution
161
+ * @param call - The calls to encode
162
+ * @returns The encoded composable compatible call
163
+ */
164
+ const encodeExecuteComposable = async (calls) => {
165
+ const composableCalls = calls.map((call) => {
166
+ return {
167
+ to: call.to,
168
+ value: call.value,
169
+ functionSig: call.functionSig,
170
+ inputParams: call.inputParams,
171
+ outputParams: call.outputParams
172
+ };
173
+ });
174
+ return encodeFunctionData({
175
+ abi: COMPOSABILITY_MODULE_ABI,
176
+ functionName: "executeComposable", // Function selector in Composability feature which executes the composable calls.
177
+ args: [composableCalls] // Multiple composable calls can be batched here.
178
+ });
179
+ };
180
+ /**
181
+ * @description Gets the nonce for the account
182
+ * @param parameters - Optional parameters for getting the nonce
183
+ * @returns The nonce
184
+ */
185
+ const getNonce = async (parameters) => {
186
+ const TIMESTAMP_ADJUSTMENT = 16777215n;
187
+ const { key: key_ = 0n, validationMode = "0x00", moduleAddress = module.module } = parameters ?? {};
188
+ try {
189
+ const adjustedKey = BigInt(key_) % TIMESTAMP_ADJUSTMENT;
190
+ const key = concat([
191
+ toHex(adjustedKey, { size: 3 }),
192
+ validationMode,
193
+ moduleAddress
194
+ ]);
195
+ const accountAddress = await getAddress();
196
+ return await entryPointContract.read.getNonce([
197
+ accountAddress,
198
+ BigInt(key)
199
+ ]);
200
+ }
201
+ catch (e) {
202
+ return 0n;
203
+ }
204
+ };
205
+ /**
206
+ * @description Signs typed data
207
+ * @param parameters - The typed data parameters
208
+ * @returns The signature
209
+ */
210
+ async function signTypedData(parameters) {
211
+ const { message, primaryType, types: _types, domain } = parameters;
212
+ if (!domain)
213
+ throw new Error("Missing domain");
214
+ if (!message)
215
+ throw new Error("Missing message");
216
+ const types = {
217
+ EIP712Domain: getTypesForEIP712Domain({ domain }),
218
+ ..._types
219
+ };
220
+ // @ts-ignore: Comes from startale parent typehash
221
+ const messageStuff = message.stuff;
222
+ // @ts-ignore
223
+ validateTypedData({
224
+ domain,
225
+ message,
226
+ primaryType,
227
+ types
228
+ });
229
+ const appDomainSeparator = domainSeparator({ domain });
230
+ const accountDomainStructFields = await getAccountDomainStructFields(publicClient, await getAddress());
231
+ const parentStructHash = keccak256(encodePacked(["bytes", "bytes"], [
232
+ encodeAbiParameters(parseAbiParameters(["bytes32, bytes32"]), [
233
+ keccak256(toBytes(PARENT_TYPEHASH)),
234
+ messageStuff
235
+ ]),
236
+ accountDomainStructFields
237
+ ]));
238
+ const wrappedTypedHash = eip712WrapHash(parentStructHash, appDomainSeparator);
239
+ let signature = await module.signMessage({ raw: toBytes(wrappedTypedHash) });
240
+ const contentsType = toBytes(typeToString(types)[1]);
241
+ const signatureData = concatHex([
242
+ signature,
243
+ appDomainSeparator,
244
+ messageStuff,
245
+ toHex(contentsType),
246
+ toHex(contentsType.length, { size: 2 })
247
+ ]);
248
+ signature = encodePacked(["address", "bytes"], [module.module, signatureData]);
249
+ return signature;
250
+ }
251
+ /**
252
+ * @description Changes the active module for the account
253
+ * @param module - The new module to set as active
254
+ * @returns void
255
+ */
256
+ const setModule = (validationModule) => {
257
+ if (validationModule.type !== "validator") {
258
+ throw new Error("Only validator modules are supported");
259
+ }
260
+ module = validationModule;
261
+ };
262
+ return toSmartAccount({
263
+ client: walletClient,
264
+ entryPoint: {
265
+ abi: EntrypointAbi,
266
+ address: ENTRY_POINT_ADDRESS,
267
+ version: "0.7"
268
+ },
269
+ getAddress,
270
+ encodeCalls: (calls) => {
271
+ return calls.length === 1
272
+ ? encodeExecute(calls[0])
273
+ : encodeExecuteBatch(calls);
274
+ },
275
+ getFactoryArgs: async () => ({
276
+ factory: factoryAddress,
277
+ factoryData
278
+ }),
279
+ getStubSignature: async () => module.getStubSignature(),
280
+ /**
281
+ * @description Signs a message
282
+ * @param params - The parameters for signing
283
+ * @param params.message - The message to sign
284
+ * @returns The signature
285
+ */
286
+ async signMessage({ message }) {
287
+ const tempSignature = await module.signMessage(message);
288
+ return encodePacked(["address", "bytes"], [module.module, tempSignature]);
289
+ },
290
+ signTypedData,
291
+ signUserOperation: async (parameters) => {
292
+ const { chainId = publicClient.chain.id, ...userOpWithoutSender } = parameters;
293
+ const address = await getAddress();
294
+ const userOperation = {
295
+ ...userOpWithoutSender,
296
+ sender: address
297
+ };
298
+ const hash = getUserOperationHash({
299
+ chainId,
300
+ entryPointAddress: entryPoint07Address,
301
+ entryPointVersion: "0.7",
302
+ userOperation
303
+ });
304
+ return await module.signUserOpHash(hash);
305
+ },
306
+ getNonce,
307
+ extend: {
308
+ entryPointAddress: entryPoint07Address,
309
+ getAddress,
310
+ getInitCode,
311
+ encodeExecute,
312
+ encodeExecuteBatch,
313
+ encodeExecuteComposable,
314
+ getUserOpHash,
315
+ factoryData,
316
+ factoryAddress,
317
+ registryAddress,
318
+ signer,
319
+ walletClient,
320
+ publicClient,
321
+ chain,
322
+ setModule,
323
+ getModule: () => module
324
+ }
325
+ });
326
+ };
327
+ //# sourceMappingURL=toStartaleSmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toStartaleSmartAccount.js","sourceRoot":"","sources":["../../../src/sdk/account/toStartaleSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAkBL,MAAM,EACN,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,OAAO,EACP,KAAK,EACL,iBAAiB,EACjB,WAAW,EACZ,MAAM,MAAM,CAAA;AACb,OAAO,EAIL,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACf,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,cAAc,CAAA;AACrB,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAA;AAE5E,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAA;AAG/E,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAGL,aAAa,EACb,cAAc,EACd,4BAA4B,EAC5B,uBAAuB,EACvB,iBAAiB,EACjB,YAAY,EACb,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAsC,QAAQ,EAAE,MAAM,kBA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AAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;QAC1C,CAAC;QACD,QAAQ;QACR,MAAM,EAAE;YACN,iBAAiB,EAAE,mBAAmB;YACtC,UAAU;YACV,WAAW;YACX,aAAa;YACb,kBAAkB;YAClB,uBAAuB;YACvB,aAAa;YACb,WAAW;YACX,cAAc;YACd,eAAe;YACf,MAAM;YACN,YAAY;YACZ,YAAY;YACZ,KAAK;YACL,SAAS;YACT,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM;SACxB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { BaseError } from "viem";
2
+ /**
3
+ * @ignore
4
+ */
5
+ export class AccountNotFoundError extends BaseError {
6
+ constructor({ docsPath } = {}) {
7
+ super([
8
+ "Could not find an Account to execute with this Action.",
9
+ "Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."
10
+ ].join("\n"), {
11
+ docsPath,
12
+ docsSlug: "account",
13
+ name: "AccountNotFoundError"
14
+ });
15
+ }
16
+ }
17
+ //# sourceMappingURL=AccountNotFound.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountNotFound.js","sourceRoot":"","sources":["../../../../src/sdk/account/utils/AccountNotFound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAEhC;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IACjD,YAAY,EAAE,QAAQ,KAAwC,EAAE;QAC9D,KAAK,CACH;YACE,wDAAwD;YACxD,kHAAkH;SACnH,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACE,QAAQ;YACR,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE,sBAAsB;SAC7B,CACF,CAAA;IACH,CAAC;CACF"}