@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 @@
1
+ {"version":3,"file":"runtimeAbiEncoding.js","sourceRoot":"","sources":["../../../../src/sdk/modules/utils/runtimeAbiEncoding.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yEAAyE;AACzE,8BAA8B;AAC9B,8DAA8D;AAE9D,sBAAsB;AACtB,0DAA0D;AAC1D,mCAAmC;AACnC,kDAAkD;AAClD,yBAAyB;AAEzB,OAAO,EAEL,mCAAmC,EACnC,iCAAiC,EACjC,8BAA8B,EAI9B,SAAS,EAET,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,kBAAkB,EACnB,MAAM,MAAM,CAAA;AAEb,OAAO,EAGL,wBAAwB,EACzB,MAAM,sBAAsB,CAAA;AAoB7B,iFAAiF;AACjF,MAAM,YAAY,GAChB,gIAAgI,CAAA;AAElI,wEAAwE;AACxE,0CAA0C;AAC1C,MAAM,YAAY,GAAG,CAAC,KAAa,EAAiB,EAAE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e,CAAC,MAAM;QAC9B,MAAM,EAAE,IAAsB;KAC/B,CAAC,CAAA;IAEF,sEAAsE;IACtE,MAAM,IAAI,GAAG,YAAY,CAAC,cAAc,CAAC,CAAA;IAEzC,mEAAmE;IACnE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,IAAW,CAAC,CAAA;IAE3C,oHAAoH;IACpH,4FAA4F;IAC5F,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,WAAmB,EACnB,GAAQ,EACS,EAAE;IACnB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;IAChC,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC,MAAM,CAC/B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,CAChE,CAAA;IAED,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,GAAG,WAAW,uBAAuB,CAAC,CAAA;IACxD,CAAC;IAED,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,YAA2B,CAAA;IAE9E,OAAO;QACL,MAAM;QACN,IAAI;QACJ,OAAO;QACP,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;QAC3E,WAAW,EAAE,kBAAkB,CAAC,YAA2B,CAAC;KAC7D,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,61 @@
1
+ import { sanitizeSignature } from "./Helpers.js";
2
+ /**
3
+ * Creates a Module object from the given parameters parameters.
4
+ *
5
+ * This function takes the module parameters details and constructs a standardized
6
+ * Module object with methods for signing and generating stub signatures.
7
+ *
8
+ * @param parameters - The parameters defining the module parameters.
9
+ * @returns A Module object with standardized methods and properties.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * const myModule = toModule({
14
+ * accountAddress: '0x1234...',
15
+ * address: '0x5678...',
16
+ * signer: mySigner,
17
+ * initData: '0xabcd...',
18
+ * // ... other parameters
19
+ * });
20
+ * ```
21
+ *
22
+ * @remarks
23
+ * - The returned Module object includes methods for getting stub signatures, signing user operation hashes, and signing messages.
24
+ * - The `getStubSignature` method generates a dummy signature for testing or placeholder purposes.
25
+ * - The `signUserOpHash` and `signMessage` methods use the provided signer to create actual signatures.
26
+ */
27
+ export function toModule(parameters) {
28
+ const { account, extend, initArgs = {}, deInitData = "0x", initData = "0x", moduleInitArgs = "0x", accountAddress = account?.address ?? "0x", moduleInitData = {
29
+ address: "0x",
30
+ type: "validator"
31
+ }, ...rest } = parameters;
32
+ let data_ = parameters.data ?? {};
33
+ const setData = (d) => {
34
+ data_ = d;
35
+ };
36
+ const getData = () => data_;
37
+ return {
38
+ ...parameters,
39
+ initData,
40
+ moduleInitData,
41
+ moduleInitArgs,
42
+ deInitData,
43
+ accountAddress,
44
+ initArgs,
45
+ setData,
46
+ getData,
47
+ module: parameters.address,
48
+ type: "validator",
49
+ getStubSignature: async () => {
50
+ const dynamicPart = parameters.address.substring(2).padEnd(40, "0");
51
+ return `0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000${dynamicPart}000000000000000000000000000000000000000000000000000000000000004181d4b4981670cb18f99f0b4a66446df1bf5b204d24cfcb659bf38ba27a4359b5711649ec2423c5e1247245eba2964679b6a1dbb85c992ae40b9b00c6935b02ff1b00000000000000000000000000000000000000000000000000000000000000`;
52
+ },
53
+ signUserOpHash: async (userOpHash) => await parameters.signer.signMessage({
54
+ message: { raw: userOpHash }
55
+ }),
56
+ signMessage: async (message) => sanitizeSignature(await parameters.signer.signMessage({ message })),
57
+ ...extend,
58
+ ...rest
59
+ };
60
+ }
61
+ //# sourceMappingURL=toModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toModule.js","sourceRoot":"","sources":["../../../../src/sdk/modules/utils/toModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAGhD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,QAAQ,CAAC,UAA4B;IACnD,MAAM,EACJ,OAAO,EACP,MAAM,EACN,QAAQ,GAAG,EAAE,EACb,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,IAAI,EACf,cAAc,GAAG,IAAI,EACrB,cAAc,GAAG,OAAO,EAAE,OAAO,IAAI,IAAI,EACzC,cAAc,GAAG;QACf,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,WAAW;KAClB,EACD,GAAG,IAAI,EACR,GAAG,UAAU,CAAA;IAEd,IAAI,KAAK,GAAG,UAAU,CAAC,IAAI,IAAI,EAAE,CAAA;IACjC,MAAM,OAAO,GAAG,CAAC,CAA0B,EAAE,EAAE;QAC7C,KAAK,GAAG,CAAC,CAAA;IACX,CAAC,CAAA;IACD,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,KAAK,CAAA;IAE3B,OAAO;QACL,GAAG,UAAU;QACb,QAAQ;QACR,cAAc;QACd,cAAc;QACd,UAAU;QACV,cAAc;QACd,QAAQ;QACR,OAAO;QACP,OAAO;QACP,MAAM,EAAE,UAAU,CAAC,OAAO;QAC1B,IAAI,EAAE,WAAW;QACjB,gBAAgB,EAAE,KAAK,IAAI,EAAE;YAC3B,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;YACnE,OAAO,6FAA6F,WAAW,kQAAyQ,CAAA;QAC1X,CAAC;QACD,cAAc,EAAE,KAAK,EAAE,UAAe,EAAE,EAAE,CACxC,MAAM,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC;YAClC,OAAO,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE;SAC7B,CAAC;QACJ,WAAW,EAAE,KAAK,EAAE,OAAwB,EAAE,EAAE,CAC9C,iBAAiB,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QACrE,GAAG,MAAM;QACT,GAAG,IAAI;KACR,CAAA;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./toDefaultModule.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/default/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { zeroAddress } from "viem";
2
+ import { DUMMY_SIGNATURE } from "../smartSessionsValidator/index.js";
3
+ import { toValidator } from "../toValidator.js";
4
+ export const toDefaultModule = (parameters) => toValidator({
5
+ initData: parameters.signer.address,
6
+ data: parameters.signer.address,
7
+ deInitData: "0x",
8
+ ...parameters,
9
+ address: zeroAddress,
10
+ module: zeroAddress,
11
+ type: "validator",
12
+ getStubSignature: async () => DUMMY_SIGNATURE
13
+ });
14
+ //# sourceMappingURL=toDefaultModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toDefaultModule.js","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/default/toDefaultModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAGL,WAAW,EACZ,MAAM,gBAAgB,CAAA;AAEvB,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,UAA4D,EACjD,EAAE,CACb,WAAW,CAAC;IACV,QAAQ,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO;IACnC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO;IAC/B,UAAU,EAAE,IAAI;IAChB,GAAG,UAAU;IACb,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,WAAW;IACjB,gBAAgB,EAAE,KAAK,IAAI,EAAE,CAAC,eAAe;CAC9C,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from "./smartSessionsValidator/Types.js";
2
+ export * from "./ownable/index.js";
3
+ export * from "./default/index.js";
4
+ export * from "./toValidator.js";
5
+ export * from "./smartSessionsValidator/index.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/modules/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA;AAC9C,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,52 @@
1
+ import { sendUserOperation } from "viem/account-abstraction";
2
+ import { getAction, parseAccount } from "viem/utils";
3
+ import { AccountNotFoundError } from "../../../../account/utils/AccountNotFound.js";
4
+ import { getAddOwnableValidatorOwnerAction } from "../../../../constants/index.js";
5
+ /**
6
+ * Adds a new owner to a smart account.
7
+ *
8
+ * This function prepares and sends a user operation to add a new owner to the specified smart account.
9
+ * It handles the creation of the necessary action data and sends the user operation.
10
+ *
11
+ * @template TModularSmartAccount - The type of the smart account, which can be a ModularSmartAccount or undefined.
12
+ * @param client - The client used to interact with the blockchain.
13
+ * @param parameters - The parameters for adding the new owner.
14
+ * @returns A promise that resolves to the hash of the sent user operation.
15
+ * @throws {AccountNotFoundError} If no account is provided and the client doesn't have an associated account.
16
+ * @throws {Error} If there's an error getting the add owner action.
17
+ */
18
+ export async function addOwner(client, parameters) {
19
+ const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce } = parameters;
20
+ if (!account_) {
21
+ throw new AccountNotFoundError({
22
+ docsPath: "/startale-client/methods#sendtransaction"
23
+ });
24
+ }
25
+ const account = parseAccount(account_);
26
+ const calls = await toAddOwnerCalls(account, parameters);
27
+ return getAction(client, sendUserOperation, "sendUserOperation")({
28
+ calls,
29
+ maxFeePerGas,
30
+ maxPriorityFeePerGas,
31
+ nonce,
32
+ account
33
+ });
34
+ }
35
+ export const toAddOwnerCalls = async (account, parameters) => {
36
+ const action = await getAddOwnableValidatorOwnerAction({
37
+ account: { address: account.address, deployedOnChains: [], type: "erc7579-implementation" },
38
+ client: account.client,
39
+ owner: parameters.owner
40
+ });
41
+ if (!("callData" in action)) {
42
+ throw new Error("Error getting add owner action");
43
+ }
44
+ return [
45
+ {
46
+ to: action.target,
47
+ value: BigInt(action.value.toString()),
48
+ data: action.callData
49
+ }
50
+ ];
51
+ };
52
+ //# sourceMappingURL=addOwner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addOwner.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/addOwner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAEhF,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAA;AAuBzE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAG5B,MAAkE,EAClE,UAAoD;IAEpD,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACN,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAwB,CAAA;IAC7D,MAAM,KAAK,GAAG,MAAM,eAAe,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAExD,OAAO,SAAS,CACd,MAAM,EACN,iBAAiB,EACjB,mBAAmB,CACpB,CAAC;QACA,KAAK;QACL,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAClC,OAA4B,EAC5B,UAA+D,EAC9C,EAAE;IACnB,MAAM,MAAM,GAAG,MAAM,iCAAiC,CAAC;QACrD,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;QAC3F,MAAM,EAAE,OAAO,CAAC,MAAa;QAC7B,KAAK,EAAE,UAAU,CAAC,KAAK;KACxB,CAAC,CAAA;IAEF,IAAI,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;IACnD,CAAC;IAED,OAAO;QACL;YACE,EAAE,EAAE,MAAM,CAAC,MAAM;YACjB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACtC,IAAI,EAAE,MAAM,CAAC,QAAQ;SACtB;KACF,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,50 @@
1
+ import { parseAccount } from "viem/utils";
2
+ import { AccountNotFoundError } from "../../../../account/utils/AccountNotFound.js";
3
+ import { getAccount, getAddOwnableValidatorOwnerAction } from "../../../../constants/index.js";
4
+ /**
5
+ * Generates the transaction data for adding a new owner to a smart account.
6
+ *
7
+ * This function prepares the necessary transaction data to add a new owner to the specified smart account.
8
+ * It doesn't send the transaction, but returns the data needed to do so.
9
+ *
10
+ * @template TModularSmartAccount - The type of the smart account, which can be a ModularSmartAccount or undefined.
11
+ * @param client - The client used to interact with the blockchain.
12
+ * @param parameters - The parameters for adding the new owner.
13
+ * @returns A promise that resolves to a Call object containing the transaction data.
14
+ * @throws {AccountNotFoundError} If no account is provided and the client doesn't have an associated account.
15
+ * @throws {Error} If there's an error getting the add owner action or if the public client is not found.
16
+ */
17
+ export async function getAddOwnerTx(client, parameters) {
18
+ const { account: account_ = client.account, owner } = parameters;
19
+ if (!account_) {
20
+ throw new AccountNotFoundError({
21
+ docsPath: "/startale-client/methods#sendtransaction"
22
+ });
23
+ }
24
+ const account = parseAccount(account_);
25
+ const publicClient = account.client;
26
+ if (!publicClient) {
27
+ throw new Error("Public client not found");
28
+ }
29
+ const startaleAccount = getAccount({
30
+ address: account.address,
31
+ type: "erc7579-implementation"
32
+ });
33
+ const action = await getAddOwnableValidatorOwnerAction({
34
+ account: startaleAccount,
35
+ client: publicClient,
36
+ owner
37
+ });
38
+ if (!("callData" in action)) {
39
+ throw new Error("Error getting set threshold actions");
40
+ }
41
+ return {
42
+ to: action.target,
43
+ value: BigInt(action.value.toString()),
44
+ data: action.callData
45
+ };
46
+ }
47
+ export const toAddOwnerCalls = async (account, parameters) => {
48
+ return [await getAddOwnerTx({}, { ...parameters, account })];
49
+ };
50
+ //# sourceMappingURL=getAddOwnerTx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAddOwnerTx.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/getAddOwnerTx.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAEhF,OAAO,EACL,UAAU,EACV,iCAAiC,EAClC,MAAM,uBAAuB,CAAA;AAiB9B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAGjC,MAAkE,EAClE,UAAyD;IAEzD,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,UAAU,CAAA;IAEhE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAwB,CAAA;IAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,MAAsB,CAAA;IAEnD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAED,MAAM,eAAe,GAAG,UAAU,CAAC;QACjC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,wBAAwB;KAC/B,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,MAAM,iCAAiC,CAAC;QACrD,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,YAAmB;QAC3B,KAAK;KACN,CAAC,CAAA;IAEF,IAAI,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAA;IACxD,CAAC;IAED,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,MAAM;QACjB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACtC,IAAI,EAAE,MAAM,CAAC,QAAQ;KACtB,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAClC,OAA4B,EAC5B,UAAoE,EACnD,EAAE;IACnB,OAAO,CAAC,MAAM,aAAa,CAAC,EAAa,EAAE,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;AACzE,CAAC,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { parseAccount } from "viem/utils";
2
+ import { AccountNotFoundError } from "../../../../account/utils/AccountNotFound.js";
3
+ import { getAccount, getOwnableValidatorOwners } from "../../../../constants/index.js";
4
+ /**
5
+ * Retrieves the list of owners for a smart account.
6
+ *
7
+ * This function fetches the current owners of the specified smart account.
8
+ *
9
+ * @template TModularSmartAccount - The type of the smart account, which can be a ModularSmartAccount or undefined.
10
+ * @param client - The client used to interact with the blockchain.
11
+ * @param parameters - The parameters for retrieving the owners. If not provided, defaults will be used.
12
+ * @returns A promise that resolves to an array of addresses representing the owners of the account.
13
+ * @throws {AccountNotFoundError} If no account is provided and the client doesn't have an associated account.
14
+ * @throws {Error} If the public client is not found.
15
+ */
16
+ export async function getOwners(client, parameters) {
17
+ const { account: account_ = client.account } = parameters ?? {};
18
+ // Review docspath below.
19
+ if (!account_) {
20
+ throw new AccountNotFoundError({
21
+ docsPath: "/startale-client/methods#sendtransaction"
22
+ });
23
+ }
24
+ const account = parseAccount(account_);
25
+ const publicClient = account?.client;
26
+ if (!publicClient) {
27
+ throw new Error("Public client not found");
28
+ }
29
+ const startaleAccount = getAccount({
30
+ address: account.address,
31
+ type: "erc7579-implementation"
32
+ });
33
+ return getOwnableValidatorOwners({
34
+ account: startaleAccount,
35
+ client: publicClient
36
+ });
37
+ }
38
+ //# sourceMappingURL=getOwners.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOwners.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/getOwners.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAe7E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAG7B,MAAkE,EAClE,UAAsD;IAEtD,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,UAAU,IAAI,EAAE,CAAA;IAE/D,yBAAyB;IACzB,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAwB,CAAA;IAC7D,MAAM,YAAY,GAAG,OAAO,EAAE,MAAsB,CAAA;IAEpD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAED,MAAM,eAAe,GAAG,UAAU,CAAC;QACjC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,wBAAwB;KAC/B,CAAC,CAAA;IAEF,OAAO,yBAAyB,CAAC;QAC/B,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,YAAmB;KAC5B,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { parseAccount } from "viem/utils";
2
+ import { AccountNotFoundError } from "../../../../account/utils/AccountNotFound.js";
3
+ import { getRemoveOwnableValidatorOwnerAction } from "../../../../constants/index.js";
4
+ /**
5
+ * Generates the transaction data for removing an owner from a smart account.
6
+ *
7
+ * This function prepares the necessary transaction data to remove an owner from the specified smart account.
8
+ * It doesn't send the transaction, but returns the data needed to do so.
9
+ *
10
+ * @template TModularSmartAccount - The type of the smart account, which can be a ModularSmartAccount or undefined.
11
+ * @param client - The client used to interact with the blockchain.
12
+ * @param parameters - The parameters for removing the owner.
13
+ * @returns A promise that resolves to a Call object containing the transaction data.
14
+ * @throws {AccountNotFoundError} If no account is provided and the client doesn't have an associated account.
15
+ * @throws {Error} If there's an error getting the remove owner action or if the public client is not found.
16
+ */
17
+ export async function getRemoveOwnerTx(client, parameters) {
18
+ const { account: account_ = client.account, owner } = parameters;
19
+ if (!account_) {
20
+ throw new AccountNotFoundError({
21
+ docsPath: "/startale-client/methods#sendtransaction"
22
+ });
23
+ }
24
+ const account = parseAccount(account_);
25
+ const publicClient = account.client;
26
+ if (!publicClient) {
27
+ throw new Error("Public client not found");
28
+ }
29
+ const action = await getRemoveOwnableValidatorOwnerAction({
30
+ account: { address: account.address, deployedOnChains: [], type: "erc7579-implementation" },
31
+ client: publicClient,
32
+ owner
33
+ });
34
+ if (!("callData" in action)) {
35
+ throw new Error("Error getting remove owner action");
36
+ }
37
+ return {
38
+ to: action.target,
39
+ value: BigInt(action.value.toString()),
40
+ data: action.callData
41
+ };
42
+ }
43
+ export const toRemoveOwnerCalls = async (account, parameters) => {
44
+ return [await getRemoveOwnerTx({}, { ...parameters, account })];
45
+ };
46
+ //# sourceMappingURL=getRemoveOwnerTx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRemoveOwnerTx.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/getRemoveOwnerTx.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAEhF,OAAO,EAAE,oCAAoC,EAAE,MAAM,uBAAuB,CAAA;AAc5E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAGpC,MAAkE,EAClE,UAA4D;IAE5D,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,UAAU,CAAA;IAEhE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAwB,CAAA;IAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAA;IAEnC,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,oCAAoC,CAAC;QACxD,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;QAC3F,MAAM,EAAE,YAAmB;QAC3B,KAAK;KACN,CAAC,CAAA;IAEF,IAAI,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IACtD,CAAC;IAED,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,MAAM;QACjB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACtC,IAAI,EAAE,MAAM,CAAC,QAAQ;KACtB,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,OAA4B,EAC5B,UAAuE,EACtD,EAAE;IACnB,OAAO,CAAC,MAAM,gBAAgB,CAAC,EAAa,EAAE,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;AAC5E,CAAC,CAAA"}
@@ -0,0 +1,48 @@
1
+ import { parseAccount } from "viem/utils";
2
+ import { AccountNotFoundError } from "../../../../account/utils/AccountNotFound.js";
3
+ import { getSetOwnableValidatorThresholdAction } from "../../../../constants/index.js";
4
+ /**
5
+ * Generates transaction data for setting a new threshold on a smart account.
6
+ *
7
+ * The threshold in a multi-signature wallet determines how many owners need to approve
8
+ * a transaction before it can be executed. This function prepares the transaction data
9
+ * needed to change this threshold, but does not actually send the transaction.
10
+ *
11
+ * @template TSmartAccount - Type of the smart account, extending SmartAccount or undefined.
12
+ * @param client - The client instance used for blockchain interactions.
13
+ * @param parameters - Object containing the account and new threshold value.
14
+ * @returns A Promise resolving to a Call object with the transaction data.
15
+ *
16
+ * @throws {AccountNotFoundError} When no account is provided and the client lacks an associated account.
17
+ * @throws {Error} If the account parsing fails or if there's an issue generating the action data.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * const txData = await getSetThresholdTx(client, { threshold: 2 });
22
+ * console.log(txData); // { to: '0x...', value: 0n, data: '0x...' }
23
+ * ```
24
+ */
25
+ export async function getSetThresholdTx(client, parameters) {
26
+ const { account: account_ = client.account, threshold } = parameters;
27
+ if (!account_) {
28
+ throw new AccountNotFoundError({
29
+ docsPath: "/startale-client/methods#sendtransaction"
30
+ });
31
+ }
32
+ const account = parseAccount(account_);
33
+ if (!account)
34
+ throw new Error("Account not found");
35
+ const action = getSetOwnableValidatorThresholdAction({ threshold });
36
+ if (!("callData" in action)) {
37
+ throw new Error("Error getting set threshold actions");
38
+ }
39
+ return {
40
+ to: action.target,
41
+ value: BigInt(action.value.toString()),
42
+ data: action.callData
43
+ };
44
+ }
45
+ export const toSetThresholdCalls = async (account, parameters) => {
46
+ return [await getSetThresholdTx({}, { ...parameters, account })];
47
+ };
48
+ //# sourceMappingURL=getSetThresholdTx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSetThresholdTx.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/getSetThresholdTx.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAEhF,OAAO,EAAE,qCAAqC,EAAE,MAAM,uBAAuB,CAAA;AAiB7E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAGrC,MAA2D,EAC3D,UAAsD;IAEtD,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,UAAU,CAAA;IAEpE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAiB,CAAA;IAEtD,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;IAElD,MAAM,MAAM,GAAG,qCAAqC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAA;IAEnE,IAAI,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAA;IACxD,CAAC;IAED,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,MAAM;QACjB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACtC,IAAI,EAAE,MAAM,CAAC,QAAQ;KACtB,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EACtC,OAA4B,EAC5B,UAAwE,EACvD,EAAE;IACnB,OAAO,CAAC,MAAM,iBAAiB,CAAC,EAAa,EAAE,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;AAC7E,CAAC,CAAA"}
@@ -0,0 +1,54 @@
1
+ import { parseAccount } from "viem/utils";
2
+ import { AccountNotFoundError } from "../../../../account/utils/AccountNotFound.js";
3
+ import { getAccount, getOwnableValidatorThreshold } from "../../../../constants/index.js";
4
+ /**
5
+ * Retrieves the current approval threshold for a modular smart account.
6
+ *
7
+ * In the context of multi-signature wallets or modular smart accounts, the threshold
8
+ * represents the minimum number of approvals required to execute a transaction.
9
+ * This function queries the blockchain to fetch the current threshold value.
10
+ *
11
+ * @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
12
+ *
13
+ * @param client - The client instance used for blockchain interactions.
14
+ * @param parameters - Optional. Specifies the account to query. If omitted, the client's default account is used.
15
+ *
16
+ * @returns A Promise that resolves to the current threshold value as a number.
17
+ *
18
+ * @throws {AccountNotFoundError} If no account is specified and the client has no default account.
19
+ * @throws {Error} If the public client is not available or if there's an issue fetching the threshold.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const startaleClient = createSmartAccountClient({ ... });
24
+ * const threshold = await getThreshold(startaleClient);
25
+ * console.log(`Current approval threshold: ${threshold}`);
26
+ * ```
27
+ *
28
+ * @remarks
29
+ * - Ensure the client is properly initialized and connected to the correct network.
30
+ * - The threshold value is specific to the queried account and may vary between different accounts.
31
+ * - This function is read-only and does not modify the blockchain state.
32
+ */
33
+ export async function getThreshold(client, parameters) {
34
+ const { account: account_ = client.account } = parameters ?? {};
35
+ if (!account_) {
36
+ throw new AccountNotFoundError({
37
+ docsPath: "/startale-client/methods#sendtransaction"
38
+ });
39
+ }
40
+ const account = parseAccount(account_);
41
+ const publicClient = account?.client;
42
+ if (!publicClient) {
43
+ throw new Error("Public client not found");
44
+ }
45
+ const startaleAccount = getAccount({
46
+ address: account.address,
47
+ type: "erc7579-implementation"
48
+ });
49
+ return await getOwnableValidatorThreshold({
50
+ account: startaleAccount,
51
+ client: publicClient
52
+ });
53
+ }
54
+ //# sourceMappingURL=getThreshold.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getThreshold.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/getThreshold.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,UAAU,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AAYhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAGhC,MAAkE,EAClE,UAAyD;IAEzD,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,UAAU,IAAI,EAAE,CAAA;IAE/D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAwB,CAAA;IAC7D,MAAM,YAAY,GAAG,OAAO,EAAE,MAAsB,CAAA;IAEpD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAED,MAAM,eAAe,GAAG,UAAU,CAAC;QACjC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,IAAI,EAAE,wBAAwB;KAC/B,CAAC,CAAA;IAEF,OAAO,MAAM,4BAA4B,CAAC;QACxC,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,YAAmB;KAC5B,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { addOwner } from "./addOwner.js";
2
+ import { getAddOwnerTx, toAddOwnerCalls } from "./getAddOwnerTx.js";
3
+ import { getOwners } from "./getOwners.js";
4
+ import { getRemoveOwnerTx, toRemoveOwnerCalls } from "./getRemoveOwnerTx.js";
5
+ import { getSetThresholdTx, toSetThresholdCalls } from "./getSetThresholdTx.js";
6
+ import { getThreshold } from "./getThreshold.js";
7
+ import { multiSign } from "./multiSign.js";
8
+ import { prepareForMultiSign } from "./prepareForMultiSign.js";
9
+ import { removeOwner } from "./removeOwner.js";
10
+ import { setThreshold } from "./setThreshold.js";
11
+ export function ownableActions() {
12
+ return (client) => {
13
+ return {
14
+ prepareForMultiSign: async (args) => {
15
+ return await prepareForMultiSign(client, args);
16
+ },
17
+ multiSign: async (args) => {
18
+ return await multiSign(client, args);
19
+ },
20
+ getThreshold: (args) => {
21
+ return getThreshold(client, args);
22
+ },
23
+ getAddOwnerTx: (args) => {
24
+ return getAddOwnerTx(client, args);
25
+ },
26
+ getOwners: (args) => {
27
+ return getOwners(client, args);
28
+ },
29
+ getSetThresholdTx: (args) => {
30
+ return getSetThresholdTx(client, args);
31
+ },
32
+ getRemoveOwnerTx: (args) => {
33
+ return getRemoveOwnerTx(client, args);
34
+ },
35
+ addOwner: (args) => {
36
+ return addOwner(client, args);
37
+ },
38
+ removeOwner: (args) => {
39
+ return removeOwner(client, args);
40
+ },
41
+ setThreshold: (args) => {
42
+ return setThreshold(client, args);
43
+ }
44
+ };
45
+ };
46
+ }
47
+ export const ownableCalls = {
48
+ toAddOwnerCalls,
49
+ toSetThresholdCalls,
50
+ toRemoveOwnerCalls
51
+ };
52
+ export const ownableReads = {
53
+ toGetOwnersReads: getOwners,
54
+ toGetThresholdReads: getThreshold
55
+ };
56
+ export { prepareForMultiSign, multiSign, addOwner, removeOwner, setThreshold, getOwners, getThreshold, getAddOwnerTx, getRemoveOwnerTx, getSetThresholdTx };
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2B,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAA4B,SAAS,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EAEL,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAEL,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAA+B,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC1E,OAAO,EAA4B,SAAS,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EAGL,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAA8B,WAAW,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,EAA+B,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAiC1E,MAAM,UAAU,cAAc;IAC5B,OAAO,CACL,MAAkE,EAC5B,EAAE;QACxC,OAAO;YACL,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kB;CACV,CAAA;AAEV,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,gBAAgB,EAAE,SAAS;IAC3B,mBAAmB,EAAE,YAAY;CACzB,CAAA;AAEV,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { sendUserOperation } from "viem/account-abstraction";
2
+ import { parseAccount } from "viem/utils";
3
+ import { AccountNotFoundError } from "../../../../account/utils/AccountNotFound.js";
4
+ import { getOwnableValidatorSignature } from "../../../../constants/index.js";
5
+ export async function multiSign(client, parameters) {
6
+ const { account: account_ = client.account, signatures, ...rest } = parameters;
7
+ if (!account_) {
8
+ throw new AccountNotFoundError({
9
+ docsPath: "/startale-client/methods#sendtransaction"
10
+ });
11
+ }
12
+ const account = parseAccount(account_);
13
+ const publicClient = account?.client;
14
+ if (!publicClient) {
15
+ throw new Error("Public client not found");
16
+ }
17
+ return sendUserOperation(client, {
18
+ ...rest,
19
+ signature: getOwnableValidatorSignature({ signatures })
20
+ });
21
+ }
22
+ //# sourceMappingURL=multiSign.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiSign.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/multiSign.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AAUpE,MAAM,CAAC,KAAK,UAAU,SAAS,CAG7B,MAAkE,EAClE,UAAqD;IAErD,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAA;IAE9E,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAwB,CAAA;IAC7D,MAAM,YAAY,GAAG,OAAO,EAAE,MAAsB,CAAA;IAEpD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAED,OAAO,iBAAiB,CAAC,MAAM,EAAE;QAC/B,GAAG,IAAI;QACP,SAAS,EAAE,4BAA4B,CAAC,EAAE,UAAU,EAAE,CAAC;KAC7C,CAAC,CAAA;AACf,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { parseAccount } from "viem/utils";
2
+ import { AccountNotFoundError } from "../../../../account/utils/AccountNotFound.js";
3
+ export async function prepareForMultiSign(startaleAccountClient, parameters) {
4
+ const { account: account_ = startaleAccountClient.account, ...rest } = parameters;
5
+ if (!account_) {
6
+ throw new AccountNotFoundError({
7
+ docsPath: "/startale-client/methods#sendtransaction"
8
+ });
9
+ }
10
+ const startaleAccount = parseAccount(account_);
11
+ const publicClient = startaleAccount?.client;
12
+ if (!publicClient) {
13
+ throw new Error("Public client not found");
14
+ }
15
+ // @ts-ignore
16
+ const userOp = await startaleAccountClient.prepareUserOperation(rest);
17
+ // @ts-ignore
18
+ const userOpHash = startaleAccount.getUserOpHash(userOp);
19
+ return { userOpHash, userOp };
20
+ }
21
+ //# sourceMappingURL=prepareForMultiSign.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareForMultiSign.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/prepareForMultiSign.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AA0BhF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAGvC,qBAAiF,EACjF,UAA+D;IAE/D,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,qBAAqB,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAA;IAEjF,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,eAAe,GAAG,YAAY,CAAC,QAAQ,CAAwB,CAAA;IACrE,MAAM,YAAY,GAAG,eAAe,EAAE,MAAsB,CAAA;IAE5D,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAED,aAAa;IACb,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;IAErE,aAAa;IACb,MAAM,UAAU,GAAG,eAAe,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;IAExD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;AAC/B,CAAC"}