@account-kit/smart-contracts 4.0.0-alpha.8 → 4.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/dist/esm/plugindefs/multi-owner/config.js +2 -2
  2. package/dist/esm/plugindefs/multi-owner/config.js.map +1 -1
  3. package/dist/esm/plugindefs/multisig/config.js +2 -2
  4. package/dist/esm/plugindefs/multisig/config.js.map +1 -1
  5. package/dist/esm/plugindefs/session-key/config.js +2 -3
  6. package/dist/esm/plugindefs/session-key/config.js.map +1 -1
  7. package/dist/esm/src/index.d.ts +1 -1
  8. package/dist/esm/src/index.js +4 -1
  9. package/dist/esm/src/index.js.map +1 -1
  10. package/dist/esm/src/light-account/accounts/account.js +20 -0
  11. package/dist/esm/src/light-account/accounts/account.js.map +1 -1
  12. package/dist/esm/src/light-account/accounts/base.js +8 -0
  13. package/dist/esm/src/light-account/accounts/base.js.map +1 -1
  14. package/dist/esm/src/light-account/accounts/multiOwner.js +22 -0
  15. package/dist/esm/src/light-account/accounts/multiOwner.js.map +1 -1
  16. package/dist/esm/src/light-account/actions/transferOwnership.d.ts +25 -0
  17. package/dist/esm/src/light-account/actions/transferOwnership.js +25 -0
  18. package/dist/esm/src/light-account/actions/transferOwnership.js.map +1 -1
  19. package/dist/esm/src/light-account/actions/updateOwners.d.ts +24 -0
  20. package/dist/esm/src/light-account/actions/updateOwners.js +24 -0
  21. package/dist/esm/src/light-account/actions/updateOwners.js.map +1 -1
  22. package/dist/esm/src/light-account/clients/alchemyClient.js +20 -0
  23. package/dist/esm/src/light-account/clients/alchemyClient.js.map +1 -1
  24. package/dist/esm/src/light-account/clients/client.d.ts +1 -2
  25. package/dist/esm/src/light-account/clients/client.js +23 -3
  26. package/dist/esm/src/light-account/clients/client.js.map +1 -1
  27. package/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js +20 -0
  28. package/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js.map +1 -1
  29. package/dist/esm/src/light-account/clients/multiOwnerLightAccount.d.ts +1 -2
  30. package/dist/esm/src/light-account/clients/multiOwnerLightAccount.js +23 -3
  31. package/dist/esm/src/light-account/clients/multiOwnerLightAccount.js.map +1 -1
  32. package/dist/esm/src/light-account/decorators/lightAccount.d.ts +19 -0
  33. package/dist/esm/src/light-account/decorators/lightAccount.js +19 -0
  34. package/dist/esm/src/light-account/decorators/lightAccount.js.map +1 -1
  35. package/dist/esm/src/light-account/decorators/multiOwnerLightAccount.d.ts +19 -0
  36. package/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js +19 -0
  37. package/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js.map +1 -1
  38. package/dist/esm/src/light-account/types.d.ts +4 -0
  39. package/dist/esm/src/light-account/utils.d.ts +46 -0
  40. package/dist/esm/src/light-account/utils.js +46 -0
  41. package/dist/esm/src/light-account/utils.js.map +1 -1
  42. package/dist/esm/src/msca/account/multiOwnerAccount.js +23 -0
  43. package/dist/esm/src/msca/account/multiOwnerAccount.js.map +1 -1
  44. package/dist/esm/src/msca/account/multisigAccount.js +24 -0
  45. package/dist/esm/src/msca/account/multisigAccount.js.map +1 -1
  46. package/dist/esm/src/msca/account-loupe/decorator.d.ts +15 -0
  47. package/dist/esm/src/msca/account-loupe/decorator.js +15 -0
  48. package/dist/esm/src/msca/account-loupe/decorator.js.map +1 -1
  49. package/dist/esm/src/msca/client/alchemyClient.js +20 -0
  50. package/dist/esm/src/msca/client/alchemyClient.js.map +1 -1
  51. package/dist/esm/src/msca/client/client.d.ts +2 -6
  52. package/dist/esm/src/msca/client/client.js +50 -6
  53. package/dist/esm/src/msca/client/client.js.map +1 -1
  54. package/dist/esm/src/msca/client/multiSigAlchemyClient.js +22 -0
  55. package/dist/esm/src/msca/client/multiSigAlchemyClient.js.map +1 -1
  56. package/dist/esm/src/msca/errors.d.ts +12 -0
  57. package/dist/esm/src/msca/errors.js +12 -0
  58. package/dist/esm/src/msca/errors.js.map +1 -1
  59. package/dist/esm/src/msca/plugin-manager/decorator.d.ts +15 -0
  60. package/dist/esm/src/msca/plugin-manager/decorator.js +15 -0
  61. package/dist/esm/src/msca/plugin-manager/decorator.js.map +1 -1
  62. package/dist/esm/src/msca/plugin-manager/installPlugin.d.ts +21 -0
  63. package/dist/esm/src/msca/plugin-manager/installPlugin.js +22 -0
  64. package/dist/esm/src/msca/plugin-manager/installPlugin.js.map +1 -1
  65. package/dist/esm/src/msca/plugins/multi-owner/extension.d.ts +15 -0
  66. package/dist/esm/src/msca/plugins/multi-owner/extension.js +19 -0
  67. package/dist/esm/src/msca/plugins/multi-owner/extension.js.map +1 -1
  68. package/dist/esm/src/msca/plugins/multi-owner/plugin.js.map +1 -1
  69. package/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js +2 -0
  70. package/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js.map +1 -1
  71. package/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js +2 -0
  72. package/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js.map +1 -1
  73. package/dist/esm/src/msca/plugins/multisig/actions/readOwners.js +2 -0
  74. package/dist/esm/src/msca/plugins/multisig/actions/readOwners.js.map +1 -1
  75. package/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js +3 -0
  76. package/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js.map +1 -1
  77. package/dist/esm/src/msca/plugins/multisig/extension.d.ts +13 -0
  78. package/dist/esm/src/msca/plugins/multisig/extension.js +13 -0
  79. package/dist/esm/src/msca/plugins/multisig/extension.js.map +1 -1
  80. package/dist/esm/src/msca/plugins/multisig/middleware.d.ts +12 -0
  81. package/dist/esm/src/msca/plugins/multisig/middleware.js +15 -0
  82. package/dist/esm/src/msca/plugins/multisig/middleware.js.map +1 -1
  83. package/dist/esm/src/msca/plugins/multisig/plugin.js.map +1 -1
  84. package/dist/esm/src/msca/plugins/multisig/signer.js +2 -0
  85. package/dist/esm/src/msca/plugins/multisig/signer.js.map +1 -1
  86. package/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.d.ts +25 -0
  87. package/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js +25 -0
  88. package/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js.map +1 -1
  89. package/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.d.ts +10 -0
  90. package/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js +11 -0
  91. package/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js.map +1 -1
  92. package/dist/esm/src/msca/plugins/multisig/utils/getSignerType.d.ts +19 -0
  93. package/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js +19 -0
  94. package/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js.map +1 -1
  95. package/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.d.ts +10 -0
  96. package/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js +20 -0
  97. package/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js.map +1 -1
  98. package/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.d.ts +7 -0
  99. package/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js +7 -0
  100. package/dist/esm/src/msca/plugins/session-key/debug-session-key-bytecode.js.map +1 -1
  101. package/dist/esm/src/msca/plugins/session-key/extension.d.ts +13 -0
  102. package/dist/esm/src/msca/plugins/session-key/extension.js +23 -0
  103. package/dist/esm/src/msca/plugins/session-key/extension.js.map +1 -1
  104. package/dist/esm/src/msca/plugins/session-key/permissions.d.ts +150 -1
  105. package/dist/esm/src/msca/plugins/session-key/permissions.js +150 -1
  106. package/dist/esm/src/msca/plugins/session-key/permissions.js.map +1 -1
  107. package/dist/esm/src/msca/plugins/session-key/plugin.js.map +1 -1
  108. package/dist/esm/src/msca/plugins/session-key/signer.d.ts +80 -0
  109. package/dist/esm/src/msca/plugins/session-key/signer.js +80 -0
  110. package/dist/esm/src/msca/plugins/session-key/signer.js.map +1 -1
  111. package/dist/esm/src/msca/plugins/session-key/utils.d.ts +18 -0
  112. package/dist/esm/src/msca/plugins/session-key/utils.js +18 -0
  113. package/dist/esm/src/msca/plugins/session-key/utils.js.map +1 -1
  114. package/dist/esm/src/msca/utils.d.ts +50 -0
  115. package/dist/esm/src/msca/utils.js +50 -0
  116. package/dist/esm/src/msca/utils.js.map +1 -1
  117. package/dist/types/plugindefs/multi-owner/config.d.ts.map +1 -1
  118. package/dist/types/plugindefs/multisig/config.d.ts.map +1 -1
  119. package/dist/types/plugindefs/session-key/config.d.ts.map +1 -1
  120. package/dist/types/src/index.d.ts +1 -1
  121. package/dist/types/src/index.d.ts.map +1 -1
  122. package/dist/types/src/light-account/clients/client.d.ts +1 -2
  123. package/dist/types/src/light-account/clients/client.d.ts.map +1 -1
  124. package/dist/types/src/light-account/clients/multiOwnerLightAccount.d.ts +1 -2
  125. package/dist/types/src/light-account/clients/multiOwnerLightAccount.d.ts.map +1 -1
  126. package/dist/types/src/msca/client/client.d.ts +2 -6
  127. package/dist/types/src/msca/client/client.d.ts.map +1 -1
  128. package/dist/types/src/msca/plugins/multi-owner/plugin.d.ts.map +1 -1
  129. package/dist/types/src/msca/plugins/multisig/plugin.d.ts.map +1 -1
  130. package/dist/types/src/msca/plugins/session-key/plugin.d.ts.map +1 -1
  131. package/package.json +14 -15
  132. package/plugindefs/multi-owner/config.ts +4 -5
  133. package/plugindefs/multisig/config.ts +4 -5
  134. package/plugindefs/session-key/config.ts +4 -6
  135. package/src/index.ts +1 -0
  136. package/src/light-account/clients/client.ts +8 -13
  137. package/src/light-account/clients/multiOwnerLightAccount.ts +11 -13
  138. package/src/msca/client/client.ts +24 -36
  139. package/src/msca/plugins/multi-owner/plugin.ts +5 -1
  140. package/src/msca/plugins/multisig/plugin.ts +5 -1
  141. package/src/msca/plugins/session-key/plugin.ts +5 -1
  142. package/dist/cjs/package.json +0 -1
  143. package/dist/cjs/plugindefs/index.d.ts +0 -3
  144. package/dist/cjs/plugindefs/index.js +0 -10
  145. package/dist/cjs/plugindefs/index.js.map +0 -1
  146. package/dist/cjs/plugindefs/multi-owner/abi.d.ts +0 -698
  147. package/dist/cjs/plugindefs/multi-owner/abi.js +0 -612
  148. package/dist/cjs/plugindefs/multi-owner/abi.js.map +0 -1
  149. package/dist/cjs/plugindefs/multi-owner/config.d.ts +0 -2
  150. package/dist/cjs/plugindefs/multi-owner/config.js +0 -31
  151. package/dist/cjs/plugindefs/multi-owner/config.js.map +0 -1
  152. package/dist/cjs/plugindefs/multisig/abi.d.ts +0 -791
  153. package/dist/cjs/plugindefs/multisig/abi.js +0 -1031
  154. package/dist/cjs/plugindefs/multisig/abi.js.map +0 -1
  155. package/dist/cjs/plugindefs/multisig/config.d.ts +0 -2
  156. package/dist/cjs/plugindefs/multisig/config.js +0 -30
  157. package/dist/cjs/plugindefs/multisig/config.js.map +0 -1
  158. package/dist/cjs/plugindefs/session-key/abi.d.ts +0 -1061
  159. package/dist/cjs/plugindefs/session-key/abi.js +0 -916
  160. package/dist/cjs/plugindefs/session-key/abi.js.map +0 -1
  161. package/dist/cjs/plugindefs/session-key/config.d.ts +0 -2
  162. package/dist/cjs/plugindefs/session-key/config.js +0 -43
  163. package/dist/cjs/plugindefs/session-key/config.js.map +0 -1
  164. package/dist/cjs/plugindefs/types.d.ts +0 -15
  165. package/dist/cjs/plugindefs/types.js +0 -3
  166. package/dist/cjs/plugindefs/types.js.map +0 -1
  167. package/dist/cjs/src/index.d.ts +0 -53
  168. package/dist/cjs/src/index.js +0 -105
  169. package/dist/cjs/src/index.js.map +0 -1
  170. package/dist/cjs/src/light-account/abis/LightAccountAbi_v1.d.ts +0 -532
  171. package/dist/cjs/src/light-account/abis/LightAccountAbi_v1.js +0 -382
  172. package/dist/cjs/src/light-account/abis/LightAccountAbi_v1.js.map +0 -1
  173. package/dist/cjs/src/light-account/abis/LightAccountAbi_v2.d.ts +0 -491
  174. package/dist/cjs/src/light-account/abis/LightAccountAbi_v2.js +0 -358
  175. package/dist/cjs/src/light-account/abis/LightAccountAbi_v2.js.map +0 -1
  176. package/dist/cjs/src/light-account/abis/LightAccountFactoryAbi_v1.d.ts +0 -55
  177. package/dist/cjs/src/light-account/abis/LightAccountFactoryAbi_v1.js +0 -78
  178. package/dist/cjs/src/light-account/abis/LightAccountFactoryAbi_v1.js.map +0 -1
  179. package/dist/cjs/src/light-account/abis/LightAccountFactoryAbi_v2.d.ts +0 -256
  180. package/dist/cjs/src/light-account/abis/LightAccountFactoryAbi_v2.js +0 -213
  181. package/dist/cjs/src/light-account/abis/LightAccountFactoryAbi_v2.js.map +0 -1
  182. package/dist/cjs/src/light-account/abis/MultiOwnerLightAccountAbi.d.ts +0 -507
  183. package/dist/cjs/src/light-account/abis/MultiOwnerLightAccountAbi.js +0 -375
  184. package/dist/cjs/src/light-account/abis/MultiOwnerLightAccountAbi.js.map +0 -1
  185. package/dist/cjs/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.d.ts +0 -286
  186. package/dist/cjs/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js +0 -232
  187. package/dist/cjs/src/light-account/abis/MultiOwnerLightAccountFactoryAbi.js.map +0 -1
  188. package/dist/cjs/src/light-account/accounts/account.d.ts +0 -17
  189. package/dist/cjs/src/light-account/accounts/account.js +0 -79
  190. package/dist/cjs/src/light-account/accounts/account.js.map +0 -1
  191. package/dist/cjs/src/light-account/accounts/base.d.ts +0 -15
  192. package/dist/cjs/src/light-account/accounts/base.js +0 -143
  193. package/dist/cjs/src/light-account/accounts/base.js.map +0 -1
  194. package/dist/cjs/src/light-account/accounts/multiOwner.d.ts +0 -18
  195. package/dist/cjs/src/light-account/accounts/multiOwner.js +0 -80
  196. package/dist/cjs/src/light-account/accounts/multiOwner.js.map +0 -1
  197. package/dist/cjs/src/light-account/actions/transferOwnership.d.ts +0 -8
  198. package/dist/cjs/src/light-account/actions/transferOwnership.js +0 -28
  199. package/dist/cjs/src/light-account/actions/transferOwnership.js.map +0 -1
  200. package/dist/cjs/src/light-account/actions/updateOwners.d.ts +0 -9
  201. package/dist/cjs/src/light-account/actions/updateOwners.js +0 -27
  202. package/dist/cjs/src/light-account/actions/updateOwners.js.map +0 -1
  203. package/dist/cjs/src/light-account/clients/alchemyClient.d.ts +0 -6
  204. package/dist/cjs/src/light-account/clients/alchemyClient.js +0 -25
  205. package/dist/cjs/src/light-account/clients/alchemyClient.js.map +0 -1
  206. package/dist/cjs/src/light-account/clients/client.d.ts +0 -10
  207. package/dist/cjs/src/light-account/clients/client.js +0 -22
  208. package/dist/cjs/src/light-account/clients/client.js.map +0 -1
  209. package/dist/cjs/src/light-account/clients/multiOwnerAlchemyClient.d.ts +0 -6
  210. package/dist/cjs/src/light-account/clients/multiOwnerAlchemyClient.js +0 -25
  211. package/dist/cjs/src/light-account/clients/multiOwnerAlchemyClient.js.map +0 -1
  212. package/dist/cjs/src/light-account/clients/multiOwnerLightAccount.d.ts +0 -10
  213. package/dist/cjs/src/light-account/clients/multiOwnerLightAccount.js +0 -22
  214. package/dist/cjs/src/light-account/clients/multiOwnerLightAccount.js.map +0 -1
  215. package/dist/cjs/src/light-account/decorators/lightAccount.d.ts +0 -8
  216. package/dist/cjs/src/light-account/decorators/lightAccount.js +0 -9
  217. package/dist/cjs/src/light-account/decorators/lightAccount.js.map +0 -1
  218. package/dist/cjs/src/light-account/decorators/multiOwnerLightAccount.d.ts +0 -8
  219. package/dist/cjs/src/light-account/decorators/multiOwnerLightAccount.js +0 -9
  220. package/dist/cjs/src/light-account/decorators/multiOwnerLightAccount.js.map +0 -1
  221. package/dist/cjs/src/light-account/e2e-tests/constants.d.ts +0 -6
  222. package/dist/cjs/src/light-account/e2e-tests/constants.js +0 -10
  223. package/dist/cjs/src/light-account/e2e-tests/constants.js.map +0 -1
  224. package/dist/cjs/src/light-account/types.d.ts +0 -31
  225. package/dist/cjs/src/light-account/types.js +0 -3
  226. package/dist/cjs/src/light-account/types.js.map +0 -1
  227. package/dist/cjs/src/light-account/utils.d.ts +0 -10
  228. package/dist/cjs/src/light-account/utils.js +0 -108
  229. package/dist/cjs/src/light-account/utils.js.map +0 -1
  230. package/dist/cjs/src/msca/abis/IAccountLoupe.d.ts +0 -79
  231. package/dist/cjs/src/msca/abis/IAccountLoupe.js +0 -82
  232. package/dist/cjs/src/msca/abis/IAccountLoupe.js.map +0 -1
  233. package/dist/cjs/src/msca/abis/IPlugin.d.ts +0 -474
  234. package/dist/cjs/src/msca/abis/IPlugin.js +0 -400
  235. package/dist/cjs/src/msca/abis/IPlugin.js.map +0 -1
  236. package/dist/cjs/src/msca/abis/IPluginManager.d.ts +0 -101
  237. package/dist/cjs/src/msca/abis/IPluginManager.js +0 -109
  238. package/dist/cjs/src/msca/abis/IPluginManager.js.map +0 -1
  239. package/dist/cjs/src/msca/abis/IStandardExecutor.d.ts +0 -50
  240. package/dist/cjs/src/msca/abis/IStandardExecutor.js +0 -35
  241. package/dist/cjs/src/msca/abis/IStandardExecutor.js.map +0 -1
  242. package/dist/cjs/src/msca/abis/MultiOwnerModularAccountFactory.d.ts +0 -234
  243. package/dist/cjs/src/msca/abis/MultiOwnerModularAccountFactory.js +0 -194
  244. package/dist/cjs/src/msca/abis/MultiOwnerModularAccountFactory.js.map +0 -1
  245. package/dist/cjs/src/msca/abis/MultisigModularAccountFactory.d.ts +0 -246
  246. package/dist/cjs/src/msca/abis/MultisigModularAccountFactory.js +0 -320
  247. package/dist/cjs/src/msca/abis/MultisigModularAccountFactory.js.map +0 -1
  248. package/dist/cjs/src/msca/abis/UpgradeableModularAccount.d.ts +0 -880
  249. package/dist/cjs/src/msca/abis/UpgradeableModularAccount.js +0 -649
  250. package/dist/cjs/src/msca/abis/UpgradeableModularAccount.js.map +0 -1
  251. package/dist/cjs/src/msca/account/multiOwnerAccount.d.ts +0 -12
  252. package/dist/cjs/src/msca/account/multiOwnerAccount.js +0 -60
  253. package/dist/cjs/src/msca/account/multiOwnerAccount.js.map +0 -1
  254. package/dist/cjs/src/msca/account/multisigAccount.d.ts +0 -17
  255. package/dist/cjs/src/msca/account/multisigAccount.js +0 -71
  256. package/dist/cjs/src/msca/account/multisigAccount.js.map +0 -1
  257. package/dist/cjs/src/msca/account/standardExecutor.d.ts +0 -2
  258. package/dist/cjs/src/msca/account/standardExecutor.js +0 -28
  259. package/dist/cjs/src/msca/account/standardExecutor.js.map +0 -1
  260. package/dist/cjs/src/msca/account-loupe/decorator.d.ts +0 -16
  261. package/dist/cjs/src/msca/account-loupe/decorator.js +0 -66
  262. package/dist/cjs/src/msca/account-loupe/decorator.js.map +0 -1
  263. package/dist/cjs/src/msca/account-loupe/types.d.ts +0 -16
  264. package/dist/cjs/src/msca/account-loupe/types.js +0 -3
  265. package/dist/cjs/src/msca/account-loupe/types.js.map +0 -1
  266. package/dist/cjs/src/msca/client/alchemyClient.d.ts +0 -6
  267. package/dist/cjs/src/msca/client/alchemyClient.js +0 -28
  268. package/dist/cjs/src/msca/client/alchemyClient.js.map +0 -1
  269. package/dist/cjs/src/msca/client/client.d.ts +0 -17
  270. package/dist/cjs/src/msca/client/client.js +0 -49
  271. package/dist/cjs/src/msca/client/client.js.map +0 -1
  272. package/dist/cjs/src/msca/client/multiSigAlchemyClient.d.ts +0 -6
  273. package/dist/cjs/src/msca/client/multiSigAlchemyClient.js +0 -31
  274. package/dist/cjs/src/msca/client/multiSigAlchemyClient.js.map +0 -1
  275. package/dist/cjs/src/msca/e2e-tests/constants.d.ts +0 -3
  276. package/dist/cjs/src/msca/e2e-tests/constants.js +0 -7
  277. package/dist/cjs/src/msca/e2e-tests/constants.js.map +0 -1
  278. package/dist/cjs/src/msca/errors.d.ts +0 -17
  279. package/dist/cjs/src/msca/errors.js +0 -53
  280. package/dist/cjs/src/msca/errors.js.map +0 -1
  281. package/dist/cjs/src/msca/plugin-manager/decorator.d.ts +0 -11
  282. package/dist/cjs/src/msca/plugin-manager/decorator.js +0 -13
  283. package/dist/cjs/src/msca/plugin-manager/decorator.js.map +0 -1
  284. package/dist/cjs/src/msca/plugin-manager/installPlugin.d.ts +0 -11
  285. package/dist/cjs/src/msca/plugin-manager/installPlugin.js +0 -48
  286. package/dist/cjs/src/msca/plugin-manager/installPlugin.js.map +0 -1
  287. package/dist/cjs/src/msca/plugin-manager/uninstallPlugin.d.ts +0 -9
  288. package/dist/cjs/src/msca/plugin-manager/uninstallPlugin.js +0 -35
  289. package/dist/cjs/src/msca/plugin-manager/uninstallPlugin.js.map +0 -1
  290. package/dist/cjs/src/msca/plugins/multi-owner/extension.d.ts +0 -13
  291. package/dist/cjs/src/msca/plugins/multi-owner/extension.js +0 -26
  292. package/dist/cjs/src/msca/plugins/multi-owner/extension.js.map +0 -1
  293. package/dist/cjs/src/msca/plugins/multi-owner/index.d.ts +0 -3
  294. package/dist/cjs/src/msca/plugins/multi-owner/index.js +0 -10
  295. package/dist/cjs/src/msca/plugins/multi-owner/index.js.map +0 -1
  296. package/dist/cjs/src/msca/plugins/multi-owner/plugin.d.ts +0 -793
  297. package/dist/cjs/src/msca/plugins/multi-owner/plugin.js +0 -695
  298. package/dist/cjs/src/msca/plugins/multi-owner/plugin.js.map +0 -1
  299. package/dist/cjs/src/msca/plugins/multi-owner/signer.d.ts +0 -215
  300. package/dist/cjs/src/msca/plugins/multi-owner/signer.js +0 -47
  301. package/dist/cjs/src/msca/plugins/multi-owner/signer.js.map +0 -1
  302. package/dist/cjs/src/msca/plugins/multisig/actions/getThreshold.d.ts +0 -4
  303. package/dist/cjs/src/msca/plugins/multisig/actions/getThreshold.js +0 -20
  304. package/dist/cjs/src/msca/plugins/multisig/actions/getThreshold.js.map +0 -1
  305. package/dist/cjs/src/msca/plugins/multisig/actions/isOwnerOf.d.ts +0 -6
  306. package/dist/cjs/src/msca/plugins/multisig/actions/isOwnerOf.js +0 -15
  307. package/dist/cjs/src/msca/plugins/multisig/actions/isOwnerOf.js.map +0 -1
  308. package/dist/cjs/src/msca/plugins/multisig/actions/proposeUserOperation.d.ts +0 -4
  309. package/dist/cjs/src/msca/plugins/multisig/actions/proposeUserOperation.js +0 -47
  310. package/dist/cjs/src/msca/plugins/multisig/actions/proposeUserOperation.js.map +0 -1
  311. package/dist/cjs/src/msca/plugins/multisig/actions/readOwners.d.ts +0 -4
  312. package/dist/cjs/src/msca/plugins/multisig/actions/readOwners.js +0 -15
  313. package/dist/cjs/src/msca/plugins/multisig/actions/readOwners.js.map +0 -1
  314. package/dist/cjs/src/msca/plugins/multisig/actions/signMultisigUserOperation.d.ts +0 -4
  315. package/dist/cjs/src/msca/plugins/multisig/actions/signMultisigUserOperation.js +0 -54
  316. package/dist/cjs/src/msca/plugins/multisig/actions/signMultisigUserOperation.js.map +0 -1
  317. package/dist/cjs/src/msca/plugins/multisig/extension.d.ts +0 -17
  318. package/dist/cjs/src/msca/plugins/multisig/extension.js +0 -19
  319. package/dist/cjs/src/msca/plugins/multisig/extension.js.map +0 -1
  320. package/dist/cjs/src/msca/plugins/multisig/index.d.ts +0 -5
  321. package/dist/cjs/src/msca/plugins/multisig/index.js +0 -12
  322. package/dist/cjs/src/msca/plugins/multisig/index.js.map +0 -1
  323. package/dist/cjs/src/msca/plugins/multisig/middleware.d.ts +0 -3
  324. package/dist/cjs/src/msca/plugins/multisig/middleware.js +0 -97
  325. package/dist/cjs/src/msca/plugins/multisig/middleware.js.map +0 -1
  326. package/dist/cjs/src/msca/plugins/multisig/plugin.d.ts +0 -892
  327. package/dist/cjs/src/msca/plugins/multisig/plugin.js +0 -740
  328. package/dist/cjs/src/msca/plugins/multisig/plugin.js.map +0 -1
  329. package/dist/cjs/src/msca/plugins/multisig/signer.d.ts +0 -223
  330. package/dist/cjs/src/msca/plugins/multisig/signer.js +0 -57
  331. package/dist/cjs/src/msca/plugins/multisig/signer.js.map +0 -1
  332. package/dist/cjs/src/msca/plugins/multisig/types.d.ts +0 -34
  333. package/dist/cjs/src/msca/plugins/multisig/types.js +0 -3
  334. package/dist/cjs/src/msca/plugins/multisig/types.js.map +0 -1
  335. package/dist/cjs/src/msca/plugins/multisig/utils/combineSignatures.d.ts +0 -10
  336. package/dist/cjs/src/msca/plugins/multisig/utils/combineSignatures.js +0 -15
  337. package/dist/cjs/src/msca/plugins/multisig/utils/combineSignatures.js.map +0 -1
  338. package/dist/cjs/src/msca/plugins/multisig/utils/formatSignatures.d.ts +0 -2
  339. package/dist/cjs/src/msca/plugins/multisig/utils/formatSignatures.js +0 -42
  340. package/dist/cjs/src/msca/plugins/multisig/utils/formatSignatures.js.map +0 -1
  341. package/dist/cjs/src/msca/plugins/multisig/utils/getSignerType.d.ts +0 -10
  342. package/dist/cjs/src/msca/plugins/multisig/utils/getSignerType.js +0 -13
  343. package/dist/cjs/src/msca/plugins/multisig/utils/getSignerType.js.map +0 -1
  344. package/dist/cjs/src/msca/plugins/multisig/utils/index.d.ts +0 -8
  345. package/dist/cjs/src/msca/plugins/multisig/utils/index.js +0 -12
  346. package/dist/cjs/src/msca/plugins/multisig/utils/index.js.map +0 -1
  347. package/dist/cjs/src/msca/plugins/multisig/utils/splitAggregatedSignature.d.ts +0 -16
  348. package/dist/cjs/src/msca/plugins/multisig/utils/splitAggregatedSignature.js +0 -74
  349. package/dist/cjs/src/msca/plugins/multisig/utils/splitAggregatedSignature.js.map +0 -1
  350. package/dist/cjs/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.d.ts +0 -117
  351. package/dist/cjs/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js +0 -115
  352. package/dist/cjs/src/msca/plugins/session-key/SessionKeyPermissionsUpdatesAbi.js.map +0 -1
  353. package/dist/cjs/src/msca/plugins/session-key/debug-session-key-bytecode.d.ts +0 -1
  354. package/dist/cjs/src/msca/plugins/session-key/debug-session-key-bytecode.js +0 -5
  355. package/dist/cjs/src/msca/plugins/session-key/debug-session-key-bytecode.js.map +0 -1
  356. package/dist/cjs/src/msca/plugins/session-key/extension.d.ts +0 -30
  357. package/dist/cjs/src/msca/plugins/session-key/extension.js +0 -156
  358. package/dist/cjs/src/msca/plugins/session-key/extension.js.map +0 -1
  359. package/dist/cjs/src/msca/plugins/session-key/index.d.ts +0 -3
  360. package/dist/cjs/src/msca/plugins/session-key/index.js +0 -10
  361. package/dist/cjs/src/msca/plugins/session-key/index.js.map +0 -1
  362. package/dist/cjs/src/msca/plugins/session-key/permissions.d.ts +0 -53
  363. package/dist/cjs/src/msca/plugins/session-key/permissions.js +0 -153
  364. package/dist/cjs/src/msca/plugins/session-key/permissions.js.map +0 -1
  365. package/dist/cjs/src/msca/plugins/session-key/plugin.d.ts +0 -1200
  366. package/dist/cjs/src/msca/plugins/session-key/plugin.js +0 -1044
  367. package/dist/cjs/src/msca/plugins/session-key/plugin.js.map +0 -1
  368. package/dist/cjs/src/msca/plugins/session-key/signer.d.ts +0 -233
  369. package/dist/cjs/src/msca/plugins/session-key/signer.js +0 -101
  370. package/dist/cjs/src/msca/plugins/session-key/signer.js.map +0 -1
  371. package/dist/cjs/src/msca/plugins/session-key/utils.d.ts +0 -11
  372. package/dist/cjs/src/msca/plugins/session-key/utils.js +0 -22
  373. package/dist/cjs/src/msca/plugins/session-key/utils.js.map +0 -1
  374. package/dist/cjs/src/msca/plugins/types.d.ts +0 -12
  375. package/dist/cjs/src/msca/plugins/types.js +0 -3
  376. package/dist/cjs/src/msca/plugins/types.js.map +0 -1
  377. package/dist/cjs/src/msca/utils.d.ts +0 -17
  378. package/dist/cjs/src/msca/utils.js +0 -99
  379. package/dist/cjs/src/msca/utils.js.map +0 -1
  380. package/dist/esm/package.json +0 -1
  381. package/dist/esm/src/light-account/e2e-tests/constants.d.ts +0 -6
  382. package/dist/esm/src/light-account/e2e-tests/constants.js +0 -7
  383. package/dist/esm/src/light-account/e2e-tests/constants.js.map +0 -1
  384. package/dist/types/src/light-account/e2e-tests/constants.d.ts +0 -7
  385. package/dist/types/src/light-account/e2e-tests/constants.d.ts.map +0 -1
  386. package/src/light-account/e2e-tests/constants.ts +0 -8
@@ -1,4 +1,28 @@
1
1
  import { AccountNotFoundError, IncompatibleClientError, isSmartAccountClient, } from "@aa-sdk/core";
2
+ /**
3
+ * Updates the owners of a multi-owner light account. This includes adding new owners and removing existing ones.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { updateOwners, createLightAccountClient } from "@account-kit/smart-contracts";
8
+ *
9
+ * const lightAccountClient = createLightAccountClient({
10
+ * signer,
11
+ * transport,
12
+ * chain,
13
+ * });
14
+ *
15
+ * const txHash = await updateOwners(lightAccountClient, {
16
+ * ownerstoAdd: [newOwnerAddress], // or empty if you just want to remove owners
17
+ * ownersToRemove: [oldOwnerAddress], // or empty if you just want to add owners
18
+ * waitForTxn: true, // set to false to return a uoHash instead
19
+ * });
20
+ * ```
21
+ *
22
+ * @param {Client<TTransport, TChain, TAccount>} client The client instance used to interact with the account
23
+ * @param {UpdateMultiOwnerLightAccountOwnersParams<TSigner, TAccount>} args The parameters for updating the account owners
24
+ * @returns {Promise<Hex>} A promise that resolves to the transaction hash or the full transaction result if `waitForTxn` is `true`
25
+ */
2
26
  export const updateOwners = async (client, { ownersToAdd, ownersToRemove, waitForTxn, overrides, account = client.account, }) => {
3
27
  if (!account) {
4
28
  throw new AccountNotFoundError();
@@ -1 +1 @@
1
- {"version":3,"file":"updateOwners.js","sourceRoot":"","sources":["../../../../../src/light-account/actions/updateOwners.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GAKrB,MAAM,cAAc,CAAC;AAyCtB,MAAM,CAAC,MAAM,YAAY,GAUL,KAAK,EACvB,MAAM,EACN,EACE,WAAW,EACX,cAAc,EACd,UAAU,EACV,SAAS,EACT,OAAO,GAAG,MAAM,CAAC,OAAO,GACzB,EACD,EAAE;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,uBAAuB,CAC/B,oBAAoB,EACpB,cAAc,EACd,MAAM,CACP,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,kBAAkB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC;QAC5C,EAAE,EAAE;YACF,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,IAAI;SACL;QACD,OAAO;QACP,SAAS;KACV,CAAC,CAAC;IAEH,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,MAAM,CAAC,+BAA+B,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC,CAAC","sourcesContent":["import {\n AccountNotFoundError,\n IncompatibleClientError,\n isSmartAccountClient,\n type GetAccountParameter,\n type GetEntryPointFromAccount,\n type SmartAccountSigner,\n type UserOperationOverridesParameter,\n} from \"@aa-sdk/core\";\nimport type { Address, Chain, Client, Hex, Transport } from \"viem\";\nimport type { MultiOwnerLightAccount } from \"../accounts/multiOwner\";\n\nexport type UpdateMultiOwnerLightAccountOwnersParams<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends MultiOwnerLightAccount<TSigner> | undefined =\n | MultiOwnerLightAccount<TSigner>\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n> = {\n ownersToAdd: Address[];\n ownersToRemove: Address[];\n waitForTxn?: boolean;\n} & GetAccountParameter<TAccount, MultiOwnerLightAccount<TSigner>> &\n UserOperationOverridesParameter<TEntryPointVersion>;\n\n/**\n * Updates the owners of a multi-owner light account. This includes adding new owners and removing existing ones.\n *\n * @example\n * ```ts\n * import { updateOwners, createLightAccountClient } from \"@account-kit/smart-contracts\";\n *\n * const lightAccountClient = createLightAccountClient({\n * signer,\n * transport,\n * chain,\n * });\n *\n * const txHash = await updateOwners(lightAccountClient, {\n * ownerstoAdd: [newOwnerAddress], // or empty if you just want to remove owners\n * ownersToRemove: [oldOwnerAddress], // or empty if you just want to add owners\n * waitForTxn: true, // set to false to return a uoHash instead\n * });\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client The client instance used to interact with the account\n * @param {UpdateMultiOwnerLightAccountOwnersParams<TSigner, TAccount>} args The parameters for updating the account owners\n * @returns {Promise<Hex>} A promise that resolves to the transaction hash or the full transaction result if `waitForTxn` is `true`\n */\nexport const updateOwners: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends MultiOwnerLightAccount<TSigner> | undefined =\n | MultiOwnerLightAccount<TSigner>\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>,\n args: UpdateMultiOwnerLightAccountOwnersParams<TSigner, TAccount>\n) => Promise<Hex> = async (\n client,\n {\n ownersToAdd,\n ownersToRemove,\n waitForTxn,\n overrides,\n account = client.account,\n }\n) => {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"updateOwners\",\n client\n );\n }\n\n const data = account.encodeUpdateOwners(ownersToAdd, ownersToRemove);\n\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data,\n },\n account,\n overrides,\n });\n\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n\n return result.hash;\n};\n"]}
1
+ {"version":3,"file":"updateOwners.js","sourceRoot":"","sources":["../../../../../src/light-account/actions/updateOwners.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GAKrB,MAAM,cAAc,CAAC;AAiBtB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,YAAY,GAUL,KAAK,EACvB,MAAM,EACN,EACE,WAAW,EACX,cAAc,EACd,UAAU,EACV,SAAS,EACT,OAAO,GAAG,MAAM,CAAC,OAAO,GACzB,EACD,EAAE;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,uBAAuB,CAC/B,oBAAoB,EACpB,cAAc,EACd,MAAM,CACP,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,kBAAkB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC;QAC5C,EAAE,EAAE;YACF,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,IAAI;SACL;QACD,OAAO;QACP,SAAS;KACV,CAAC,CAAC;IAEH,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,MAAM,CAAC,+BAA+B,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC,CAAC","sourcesContent":["import {\n AccountNotFoundError,\n IncompatibleClientError,\n isSmartAccountClient,\n type GetAccountParameter,\n type GetEntryPointFromAccount,\n type SmartAccountSigner,\n type UserOperationOverridesParameter,\n} from \"@aa-sdk/core\";\nimport type { Address, Chain, Client, Hex, Transport } from \"viem\";\nimport type { MultiOwnerLightAccount } from \"../accounts/multiOwner\";\n\nexport type UpdateMultiOwnerLightAccountOwnersParams<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends MultiOwnerLightAccount<TSigner> | undefined =\n | MultiOwnerLightAccount<TSigner>\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n> = {\n ownersToAdd: Address[];\n ownersToRemove: Address[];\n waitForTxn?: boolean;\n} & GetAccountParameter<TAccount, MultiOwnerLightAccount<TSigner>> &\n UserOperationOverridesParameter<TEntryPointVersion>;\n\n/**\n * Updates the owners of a multi-owner light account. This includes adding new owners and removing existing ones.\n *\n * @example\n * ```ts\n * import { updateOwners, createLightAccountClient } from \"@account-kit/smart-contracts\";\n *\n * const lightAccountClient = createLightAccountClient({\n * signer,\n * transport,\n * chain,\n * });\n *\n * const txHash = await updateOwners(lightAccountClient, {\n * ownerstoAdd: [newOwnerAddress], // or empty if you just want to remove owners\n * ownersToRemove: [oldOwnerAddress], // or empty if you just want to add owners\n * waitForTxn: true, // set to false to return a uoHash instead\n * });\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client The client instance used to interact with the account\n * @param {UpdateMultiOwnerLightAccountOwnersParams<TSigner, TAccount>} args The parameters for updating the account owners\n * @returns {Promise<Hex>} A promise that resolves to the transaction hash or the full transaction result if `waitForTxn` is `true`\n */\nexport const updateOwners: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends MultiOwnerLightAccount<TSigner> | undefined =\n | MultiOwnerLightAccount<TSigner>\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>,\n args: UpdateMultiOwnerLightAccountOwnersParams<TSigner, TAccount>\n) => Promise<Hex> = async (\n client,\n {\n ownersToAdd,\n ownersToRemove,\n waitForTxn,\n overrides,\n account = client.account,\n }\n) => {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"updateOwners\",\n client\n );\n }\n\n const data = account.encodeUpdateOwners(ownersToAdd, ownersToRemove);\n\n const result = await client.sendUserOperation({\n uo: {\n target: account.address,\n data,\n },\n account,\n overrides,\n });\n\n if (waitForTxn) {\n return client.waitForUserOperationTransaction(result);\n }\n\n return result.hash;\n};\n"]}
@@ -1,6 +1,26 @@
1
1
  import { AlchemyProviderConfigSchema, createAlchemyPublicRpcClient, createAlchemySmartAccountClientFromExisting, } from "@account-kit/infra";
2
2
  import { createLightAccount, lightAccountClientActions, } from "@account-kit/smart-contracts";
3
3
  import { custom } from "viem";
4
+ /**
5
+ * Creates an Alchemy smart account client connected to a Light Account instance.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { createLightAccountAlchemyClient } from "@account-kit/smart-contracts";
10
+ * import { sepolia } from "@account-kit/infra";
11
+ * import { LocalAccountSigner } from "@aa-sdk/core";
12
+ * import { generatePrivateKey } from "viem"
13
+ *
14
+ * const lightAccountClient = await createLightAccountAlchemyClient({
15
+ * apiKey: "your-api-key",
16
+ * chain: sepolia,
17
+ * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())
18
+ * });
19
+ * ```
20
+ *
21
+ * @param {AlchemyLightAccountClientConfig} config The configuration for setting up the Alchemy Light Account Client
22
+ * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created client
23
+ */
4
24
  export async function createLightAccountAlchemyClient(config) {
5
25
  const { chain, opts, ...connectionConfig } = AlchemyProviderConfigSchema.parse(config);
6
26
  const client = createAlchemyPublicRpcClient({
@@ -1 +1 @@
1
- {"version":3,"file":"alchemyClient.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/alchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2CAA2C,GAG5C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAI1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAoD,MAAM,MAAM,CAAC;AA8ChF,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,MAAuC;IAEvC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,gBAAgB,EAAE,GACxC,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,4BAA4B,CAAC;QAC1C,KAAK;QACL,gBAAgB;KACjB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC;QACvC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,GAAG,MAAM;KACV,CAAC,CAAC;IAEH,OAAO,2CAA2C,CAAC;QACjD,GAAG,MAAM;QACT,MAAM;QACN,OAAO;QACP,IAAI;KACL,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import type { HttpTransport, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n AlchemyProviderConfigSchema,\n createAlchemyPublicRpcClient,\n createAlchemySmartAccountClientFromExisting,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n createLightAccount,\n lightAccountClientActions,\n type CreateLightAccountParams,\n type LightAccount,\n type LightAccountClientActions,\n} from \"@account-kit/smart-contracts\";\nimport { custom, type Chain, type CustomTransport, type Transport } from \"viem\";\n\nexport type AlchemyLightAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateLightAccountParams<HttpTransport, TSigner>,\n \"transport\" | \"chain\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>,\n \"account\"\n >;\n\nexport async function createLightAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyLightAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n CustomTransport,\n Chain | undefined,\n LightAccount<TSigner>,\n LightAccountClientActions<TSigner>\n >\n>;\n\n/**\n * Creates an Alchemy smart account client connected to a Light Account instance.\n *\n * @example\n * ```ts\n * import { createLightAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const lightAccountClient = await createLightAccountAlchemyClient({\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyLightAccountClientConfig} config The configuration for setting up the Alchemy Light Account Client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created client\n */\nexport async function createLightAccountAlchemyClient(\n config: AlchemyLightAccountClientConfig\n): Promise<AlchemySmartAccountClient> {\n const { chain, opts, ...connectionConfig } =\n AlchemyProviderConfigSchema.parse(config);\n\n const client = createAlchemyPublicRpcClient({\n chain,\n connectionConfig,\n });\n\n const account = await createLightAccount({\n transport: custom(client),\n ...config,\n });\n\n return createAlchemySmartAccountClientFromExisting({\n ...config,\n client,\n account,\n opts,\n }).extend(lightAccountClientActions);\n}\n"]}
1
+ {"version":3,"file":"alchemyClient.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/alchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2CAA2C,GAG5C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAI1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAoD,MAAM,MAAM,CAAC;AA0BhF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,MAAuC;IAEvC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,gBAAgB,EAAE,GACxC,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,4BAA4B,CAAC;QAC1C,KAAK;QACL,gBAAgB;KACjB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC;QACvC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,GAAG,MAAM;KACV,CAAC,CAAC;IAEH,OAAO,2CAA2C,CAAC;QACjD,GAAG,MAAM;QACT,MAAM;QACN,OAAO;QACP,IAAI;KACL,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import type { HttpTransport, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n AlchemyProviderConfigSchema,\n createAlchemyPublicRpcClient,\n createAlchemySmartAccountClientFromExisting,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n createLightAccount,\n lightAccountClientActions,\n type CreateLightAccountParams,\n type LightAccount,\n type LightAccountClientActions,\n} from \"@account-kit/smart-contracts\";\nimport { custom, type Chain, type CustomTransport, type Transport } from \"viem\";\n\nexport type AlchemyLightAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateLightAccountParams<HttpTransport, TSigner>,\n \"transport\" | \"chain\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>,\n \"account\"\n >;\n\nexport async function createLightAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyLightAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n CustomTransport,\n Chain | undefined,\n LightAccount<TSigner>,\n LightAccountClientActions<TSigner>\n >\n>;\n\n/**\n * Creates an Alchemy smart account client connected to a Light Account instance.\n *\n * @example\n * ```ts\n * import { createLightAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const lightAccountClient = await createLightAccountAlchemyClient({\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyLightAccountClientConfig} config The configuration for setting up the Alchemy Light Account Client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created client\n */\nexport async function createLightAccountAlchemyClient(\n config: AlchemyLightAccountClientConfig\n): Promise<AlchemySmartAccountClient> {\n const { chain, opts, ...connectionConfig } =\n AlchemyProviderConfigSchema.parse(config);\n\n const client = createAlchemyPublicRpcClient({\n chain,\n connectionConfig,\n });\n\n const account = await createLightAccount({\n transport: custom(client),\n ...config,\n });\n\n return createAlchemySmartAccountClientFromExisting({\n ...config,\n client,\n account,\n opts,\n }).extend(lightAccountClientActions);\n}\n"]}
@@ -5,6 +5,5 @@ import { type LightAccountClientActions } from "../decorators/lightAccount.js";
5
5
  export type CreateLightAccountClientParams<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner = SmartAccountSigner> = {
6
6
  transport: CreateLightAccountParams<TTransport, TSigner>["transport"];
7
7
  chain: CreateLightAccountParams<TTransport, TSigner>["chain"];
8
- account: Omit<CreateLightAccountParams<TTransport, TSigner>, "transport" | "chain">;
9
- } & Omit<SmartAccountClientConfig<TTransport, TChain>, "transport" | "account" | "chain">;
8
+ } & Omit<CreateLightAccountParams<TTransport, TSigner>, "transport" | "chain"> & Omit<SmartAccountClientConfig<TTransport, TChain>, "transport" | "account" | "chain">;
10
9
  export declare function createLightAccountClient<TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner = SmartAccountSigner>(args: CreateLightAccountClientParams<Transport, TChain, TSigner>): Promise<SmartAccountClient<CustomTransport, Chain, LightAccount<TSigner>, SmartAccountClientActions<Chain, SmartContractAccount> & LightAccountClientActions<TSigner, LightAccount<TSigner>>>>;
@@ -2,15 +2,35 @@ import { createSmartAccountClient, } from "@aa-sdk/core";
2
2
  import {} from "viem";
3
3
  import { createLightAccount, } from "../accounts/account.js";
4
4
  import { lightAccountClientActions, } from "../decorators/lightAccount.js";
5
+ /**
6
+ * Creates a light account client using the provided parameters, including account information, transport mechanism, blockchain chain, and additional client configurations. This function first creates a light account and then uses it to create a smart account client, extending it with light account client actions.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { createLightAccountClient } from "@account-kit/smart-contracts";
11
+ * import { LocalAccountSigner } from "@aa-sdk/core";
12
+ * import { sepolia } from "viem/chains";
13
+ * import { http, generatePrivateKey } from "viem"
14
+ *
15
+ * const account = await createLightAccountClient({
16
+ * chain: sepolia,
17
+ * transport: http("RPC_URL"),
18
+ * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())
19
+ * });
20
+ * ```
21
+ *
22
+ * @param {CreateLightAccountClientParams} params The parameters for creating a light account client
23
+ * @returns {Promise<SmartAccountClient>} A promise that resolves to a `SmartAccountClient` object containing the created account information and methods
24
+ */
5
25
  export async function createLightAccountClient(params) {
6
- const { account, transport, chain, ...clientConfig } = params;
26
+ const { transport, chain } = params;
7
27
  const lightAccount = await createLightAccount({
8
- ...account,
28
+ ...params,
9
29
  transport,
10
30
  chain,
11
31
  });
12
32
  return createSmartAccountClient({
13
- ...clientConfig,
33
+ ...params,
14
34
  transport,
15
35
  chain: chain,
16
36
  account: lightAccount,
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAMzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAoD,MAAM,MAAM,CAAC;AACxE,OAAO,EACL,kBAAkB,GAGnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,yBAAyB,GAE1B,MAAM,+BAA+B,CAAC;AAuDvC,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,MAAsC;IAEtC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IAE9D,MAAM,YAAY,GAAG,MAAM,kBAAkB,CAAC;QAC5C,GAAG,OAAO;QACV,SAAS;QACT,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,wBAAwB,CAAC;QAC9B,GAAG,YAAY;QACf,SAAS;QACT,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,YAAY;KACtB,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import {\n createSmartAccountClient,\n type SmartAccountClient,\n type SmartAccountClientActions,\n type SmartAccountClientConfig,\n type SmartAccountSigner,\n type SmartContractAccount,\n} from \"@aa-sdk/core\";\nimport { type Chain, type CustomTransport, type Transport } from \"viem\";\nimport {\n createLightAccount,\n type CreateLightAccountParams,\n type LightAccount,\n} from \"../accounts/account.js\";\nimport {\n lightAccountClientActions,\n type LightAccountClientActions,\n} from \"../decorators/lightAccount.js\";\n\nexport type CreateLightAccountClientParams<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = {\n transport: CreateLightAccountParams<TTransport, TSigner>[\"transport\"];\n chain: CreateLightAccountParams<TTransport, TSigner>[\"chain\"];\n account: Omit<\n CreateLightAccountParams<TTransport, TSigner>,\n \"transport\" | \"chain\"\n >;\n} & Omit<\n SmartAccountClientConfig<TTransport, TChain>,\n \"transport\" | \"account\" | \"chain\"\n>;\n\nexport function createLightAccountClient<\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n args: CreateLightAccountClientParams<Transport, TChain, TSigner>\n): Promise<\n SmartAccountClient<\n CustomTransport,\n Chain,\n LightAccount<TSigner>,\n SmartAccountClientActions<Chain, SmartContractAccount> &\n LightAccountClientActions<TSigner, LightAccount<TSigner>>\n >\n>;\n\n/**\n * Creates a light account client using the provided parameters, including account information, transport mechanism, blockchain chain, and additional client configurations. This function first creates a light account and then uses it to create a smart account client, extending it with light account client actions.\n *\n * @example\n * ```ts\n * import { createLightAccountClient } from \"@account-kit/smart-contracts\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { sepolia } from \"viem/chains\";\n * import { http, generatePrivateKey } from \"viem\"\n *\n * const account = await createLightAccountClient({\n * chain: sepolia,\n * transport: http(\"RPC_URL\"),\n * account: {\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * }\n * });\n * ```\n *\n * @param {CreateLightAccountClientParams} params The parameters for creating a light account client\n * @returns {Promise<SmartAccountClient>} A promise that resolves to a `SmartAccountClient` object containing the created account information and methods\n */\nexport async function createLightAccountClient(\n params: CreateLightAccountClientParams\n): Promise<SmartAccountClient> {\n const { account, transport, chain, ...clientConfig } = params;\n\n const lightAccount = await createLightAccount({\n ...account,\n transport,\n chain,\n });\n\n return createSmartAccountClient({\n ...clientConfig,\n transport,\n chain: chain,\n account: lightAccount,\n }).extend(lightAccountClientActions);\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAMzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAoD,MAAM,MAAM,CAAC;AACxE,OAAO,EACL,kBAAkB,GAGnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,yBAAyB,GAE1B,MAAM,+BAA+B,CAAC;AA8BvC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,MAAsC;IAEtC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAEpC,MAAM,YAAY,GAAG,MAAM,kBAAkB,CAAC;QAC5C,GAAG,MAAM;QACT,SAAS;QACT,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,wBAAwB,CAAC;QAC9B,GAAG,MAAM;QACT,SAAS;QACT,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,YAAY;KACtB,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import {\n createSmartAccountClient,\n type SmartAccountClient,\n type SmartAccountClientActions,\n type SmartAccountClientConfig,\n type SmartAccountSigner,\n type SmartContractAccount,\n} from \"@aa-sdk/core\";\nimport { type Chain, type CustomTransport, type Transport } from \"viem\";\nimport {\n createLightAccount,\n type CreateLightAccountParams,\n type LightAccount,\n} from \"../accounts/account.js\";\nimport {\n lightAccountClientActions,\n type LightAccountClientActions,\n} from \"../decorators/lightAccount.js\";\n\nexport type CreateLightAccountClientParams<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = {\n transport: CreateLightAccountParams<TTransport, TSigner>[\"transport\"];\n chain: CreateLightAccountParams<TTransport, TSigner>[\"chain\"];\n} & Omit<CreateLightAccountParams<TTransport, TSigner>, \"transport\" | \"chain\"> &\n Omit<\n SmartAccountClientConfig<TTransport, TChain>,\n \"transport\" | \"account\" | \"chain\"\n >;\n\nexport function createLightAccountClient<\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n args: CreateLightAccountClientParams<Transport, TChain, TSigner>\n): Promise<\n SmartAccountClient<\n CustomTransport,\n Chain,\n LightAccount<TSigner>,\n SmartAccountClientActions<Chain, SmartContractAccount> &\n LightAccountClientActions<TSigner, LightAccount<TSigner>>\n >\n>;\n\n/**\n * Creates a light account client using the provided parameters, including account information, transport mechanism, blockchain chain, and additional client configurations. This function first creates a light account and then uses it to create a smart account client, extending it with light account client actions.\n *\n * @example\n * ```ts\n * import { createLightAccountClient } from \"@account-kit/smart-contracts\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { sepolia } from \"viem/chains\";\n * import { http, generatePrivateKey } from \"viem\"\n *\n * const account = await createLightAccountClient({\n * chain: sepolia,\n * transport: http(\"RPC_URL\"),\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {CreateLightAccountClientParams} params The parameters for creating a light account client\n * @returns {Promise<SmartAccountClient>} A promise that resolves to a `SmartAccountClient` object containing the created account information and methods\n */\nexport async function createLightAccountClient(\n params: CreateLightAccountClientParams\n): Promise<SmartAccountClient> {\n const { transport, chain } = params;\n\n const lightAccount = await createLightAccount({\n ...params,\n transport,\n chain,\n });\n\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain,\n account: lightAccount,\n }).extend(lightAccountClientActions);\n}\n"]}
@@ -1,6 +1,26 @@
1
1
  import { AlchemyProviderConfigSchema, createAlchemyPublicRpcClient, createAlchemySmartAccountClientFromExisting, } from "@account-kit/infra";
2
2
  import { createMultiOwnerLightAccount, multiOwnerLightAccountClientActions, } from "@account-kit/smart-contracts";
3
3
  import { custom } from "viem";
4
+ /**
5
+ * Creates a multi-owner light account Alchemy client using the provided configuration.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { createMultiOwnerLightAccountAlchemyClient } from "@account-kit/smart-contracts";
10
+ * import { sepolia } from "@account-kit/infra";
11
+ * import { LocalAccountSigner } from "@aa-sdk/core";
12
+ * import { generatePrivateKey } from "viem"
13
+ *
14
+ * const lightAccountClient = await createMultiOwnerLightAccountAlchemyClient({
15
+ * apiKey: "your-api-key",
16
+ * chain: sepolia,
17
+ * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())
18
+ * });
19
+ * ```
20
+ *
21
+ * @param {AlchemyMultiOwnerLightAccountClientConfig} config The configuration for creating the Alchemy client
22
+ * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created account information and methods
23
+ */
4
24
  export async function createMultiOwnerLightAccountAlchemyClient(config) {
5
25
  const { chain, opts, ...connectionConfig } = AlchemyProviderConfigSchema.parse(config);
6
26
  const client = createAlchemyPublicRpcClient({
@@ -1 +1 @@
1
- {"version":3,"file":"multiOwnerAlchemyClient.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/multiOwnerAlchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2CAA2C,GAG5C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,4BAA4B,EAC5B,mCAAmC,GAIpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAoD,MAAM,MAAM,CAAC;AAkDhF,MAAM,CAAC,KAAK,UAAU,yCAAyC,CAC7D,MAAiD;IAEjD,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,gBAAgB,EAAE,GACxC,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,4BAA4B,CAAC;QAC1C,KAAK;QACL,gBAAgB;KACjB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,4BAA4B,CAAC;QACjD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,GAAG,MAAM;KACV,CAAC,CAAC;IAEH,OAAO,2CAA2C,CAAC;QACjD,GAAG,MAAM;QACT,MAAM;QACN,OAAO;QACP,IAAI;KACL,CAAC,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import type { HttpTransport, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n AlchemyProviderConfigSchema,\n createAlchemyPublicRpcClient,\n createAlchemySmartAccountClientFromExisting,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n createMultiOwnerLightAccount,\n multiOwnerLightAccountClientActions,\n type CreateMultiOwnerLightAccountParams,\n type MultiOwnerLightAccount,\n type MultiOwnerLightAccountClientActions,\n} from \"@account-kit/smart-contracts\";\nimport { custom, type Chain, type CustomTransport, type Transport } from \"viem\";\n\nexport type AlchemyMultiOwnerLightAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateMultiOwnerLightAccountParams<HttpTransport, TSigner>,\n \"transport\" | \"chain\" | \"type\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<\n Transport,\n Chain,\n MultiOwnerLightAccount<TSigner>\n >,\n \"account\"\n >;\n\nexport async function createMultiOwnerLightAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyMultiOwnerLightAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n CustomTransport,\n Chain | undefined,\n MultiOwnerLightAccount<TSigner>,\n MultiOwnerLightAccountClientActions<TSigner>\n >\n>;\n\n/**\n * Creates a multi-owner light account Alchemy client using the provided configuration.\n *\n * @example\n * ```ts\n * import { createMultiOwnerLightAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const lightAccountClient = await createMultiOwnerLightAccountAlchemyClient({\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyMultiOwnerLightAccountClientConfig} config The configuration for creating the Alchemy client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created account information and methods\n */\nexport async function createMultiOwnerLightAccountAlchemyClient(\n config: AlchemyMultiOwnerLightAccountClientConfig\n): Promise<AlchemySmartAccountClient> {\n const { chain, opts, ...connectionConfig } =\n AlchemyProviderConfigSchema.parse(config);\n\n const client = createAlchemyPublicRpcClient({\n chain,\n connectionConfig,\n });\n\n const account = await createMultiOwnerLightAccount({\n transport: custom(client),\n ...config,\n });\n\n return createAlchemySmartAccountClientFromExisting({\n ...config,\n client,\n account,\n opts,\n }).extend(multiOwnerLightAccountClientActions);\n}\n"]}
1
+ {"version":3,"file":"multiOwnerAlchemyClient.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/multiOwnerAlchemyClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2CAA2C,GAG5C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,4BAA4B,EAC5B,mCAAmC,GAIpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAoD,MAAM,MAAM,CAAC;AA8BhF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,yCAAyC,CAC7D,MAAiD;IAEjD,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,gBAAgB,EAAE,GACxC,2BAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,4BAA4B,CAAC;QAC1C,KAAK;QACL,gBAAgB;KACjB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,4BAA4B,CAAC;QACjD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,GAAG,MAAM;KACV,CAAC,CAAC;IAEH,OAAO,2CAA2C,CAAC;QACjD,GAAG,MAAM;QACT,MAAM;QACN,OAAO;QACP,IAAI;KACL,CAAC,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import type { HttpTransport, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n AlchemyProviderConfigSchema,\n createAlchemyPublicRpcClient,\n createAlchemySmartAccountClientFromExisting,\n type AlchemySmartAccountClient,\n type AlchemySmartAccountClientConfig,\n} from \"@account-kit/infra\";\nimport {\n createMultiOwnerLightAccount,\n multiOwnerLightAccountClientActions,\n type CreateMultiOwnerLightAccountParams,\n type MultiOwnerLightAccount,\n type MultiOwnerLightAccountClientActions,\n} from \"@account-kit/smart-contracts\";\nimport { custom, type Chain, type CustomTransport, type Transport } from \"viem\";\n\nexport type AlchemyMultiOwnerLightAccountClientConfig<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = Omit<\n CreateMultiOwnerLightAccountParams<HttpTransport, TSigner>,\n \"transport\" | \"chain\" | \"type\"\n> &\n Omit<\n AlchemySmartAccountClientConfig<\n Transport,\n Chain,\n MultiOwnerLightAccount<TSigner>\n >,\n \"account\"\n >;\n\nexport async function createMultiOwnerLightAccountAlchemyClient<\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n params: AlchemyMultiOwnerLightAccountClientConfig<TSigner>\n): Promise<\n AlchemySmartAccountClient<\n CustomTransport,\n Chain | undefined,\n MultiOwnerLightAccount<TSigner>,\n MultiOwnerLightAccountClientActions<TSigner>\n >\n>;\n\n/**\n * Creates a multi-owner light account Alchemy client using the provided configuration.\n *\n * @example\n * ```ts\n * import { createMultiOwnerLightAccountAlchemyClient } from \"@account-kit/smart-contracts\";\n * import { sepolia } from \"@account-kit/infra\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\"\n *\n * const lightAccountClient = await createMultiOwnerLightAccountAlchemyClient({\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {AlchemyMultiOwnerLightAccountClientConfig} config The configuration for creating the Alchemy client\n * @returns {Promise<AlchemySmartAccountClient>} A promise that resolves to an `AlchemySmartAccountClient` object containing the created account information and methods\n */\nexport async function createMultiOwnerLightAccountAlchemyClient(\n config: AlchemyMultiOwnerLightAccountClientConfig\n): Promise<AlchemySmartAccountClient> {\n const { chain, opts, ...connectionConfig } =\n AlchemyProviderConfigSchema.parse(config);\n\n const client = createAlchemyPublicRpcClient({\n chain,\n connectionConfig,\n });\n\n const account = await createMultiOwnerLightAccount({\n transport: custom(client),\n ...config,\n });\n\n return createAlchemySmartAccountClientFromExisting({\n ...config,\n client,\n account,\n opts,\n }).extend(multiOwnerLightAccountClientActions);\n}\n"]}
@@ -5,6 +5,5 @@ import { type MultiOwnerLightAccountClientActions } from "../decorators/multiOwn
5
5
  export type CreateMultiOwnerLightAccountClientParams<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner = SmartAccountSigner> = {
6
6
  transport: CreateMultiOwnerLightAccountParams<TTransport, TSigner>["transport"];
7
7
  chain: CreateMultiOwnerLightAccountParams<TTransport, TSigner>["chain"];
8
- account: Omit<CreateMultiOwnerLightAccountParams<TTransport, TSigner>, "transport" | "chain">;
9
- } & Omit<SmartAccountClientConfig<TTransport, TChain>, "transport" | "account" | "chain">;
8
+ } & Omit<CreateMultiOwnerLightAccountParams<TTransport, TSigner>, "transport" | "chain"> & Omit<SmartAccountClientConfig<TTransport, TChain>, "transport" | "account" | "chain">;
10
9
  export declare function createMultiOwnerLightAccountClient<TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner = SmartAccountSigner>(args: CreateMultiOwnerLightAccountClientParams<Transport, TChain, TSigner>): Promise<SmartAccountClient<CustomTransport, Chain, MultiOwnerLightAccount<TSigner>, SmartAccountClientActions<Chain, SmartContractAccount> & MultiOwnerLightAccountClientActions<TSigner, MultiOwnerLightAccount<TSigner>>>>;
@@ -2,15 +2,35 @@ import { createSmartAccountClient, } from "@aa-sdk/core";
2
2
  import {} from "viem";
3
3
  import { createMultiOwnerLightAccount, } from "../accounts/multiOwner.js";
4
4
  import { multiOwnerLightAccountClientActions, } from "../decorators/multiOwnerLightAccount.js";
5
+ /**
6
+ * Creates a multi-owner light account client using the provided parameters. It first creates a multi-owner light account and then creates a smart account client with the provided configurations.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { createMultiOwnerLightAccountClient } from "@account-kit/smart-contracts";
11
+ * import { LocalAccountSigner } from "@aa-sdk/core";
12
+ * import { sepolia } from "viem/chains";
13
+ * import { http, generatePrivateKey } from "viem"
14
+ *
15
+ * const account = await createMultiOwnerLightAccountClient({
16
+ * chain: sepolia,
17
+ * transport: http("RPC_URL"),
18
+ * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())
19
+ * });
20
+ * ```
21
+ *
22
+ * @param {CreateMultiOwnerLightAccountClientParams} params the configuration for creating the multi-owner light account client
23
+ * @returns {Promise<SmartAccountClient>} a promise that resolves to a `SmartAccountClient` containing the created account client and relevant methods
24
+ */
5
25
  export async function createMultiOwnerLightAccountClient(params) {
6
- const { account, transport, chain, ...clientConfig } = params;
26
+ const { transport, chain } = params;
7
27
  const lightAccount = await createMultiOwnerLightAccount({
8
- ...account,
28
+ ...params,
9
29
  transport,
10
30
  chain,
11
31
  });
12
32
  return createSmartAccountClient({
13
- ...clientConfig,
33
+ ...params,
14
34
  transport,
15
35
  chain: chain,
16
36
  account: lightAccount,
@@ -1 +1 @@
1
- {"version":3,"file":"multiOwnerLightAccount.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/multiOwnerLightAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAMzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAoD,MAAM,MAAM,CAAC;AACxE,OAAO,EACL,4BAA4B,GAG7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,mCAAmC,GAEpC,MAAM,yCAAyC,CAAC;AA6DjD,MAAM,CAAC,KAAK,UAAU,kCAAkC,CACtD,MAAgD;IAEhD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IAE9D,MAAM,YAAY,GAAG,MAAM,4BAA4B,CAAC;QACtD,GAAG,OAAO;QACV,SAAS;QACT,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,wBAAwB,CAAC;QAC9B,GAAG,YAAY;QACf,SAAS;QACT,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,YAAY;KACtB,CAAC,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import {\n createSmartAccountClient,\n type SmartAccountClient,\n type SmartAccountClientActions,\n type SmartAccountClientConfig,\n type SmartAccountSigner,\n type SmartContractAccount,\n} from \"@aa-sdk/core\";\nimport { type Chain, type CustomTransport, type Transport } from \"viem\";\nimport {\n createMultiOwnerLightAccount,\n type CreateMultiOwnerLightAccountParams,\n type MultiOwnerLightAccount,\n} from \"../accounts/multiOwner.js\";\nimport {\n multiOwnerLightAccountClientActions,\n type MultiOwnerLightAccountClientActions,\n} from \"../decorators/multiOwnerLightAccount.js\";\n\nexport type CreateMultiOwnerLightAccountClientParams<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = {\n transport: CreateMultiOwnerLightAccountParams<\n TTransport,\n TSigner\n >[\"transport\"];\n chain: CreateMultiOwnerLightAccountParams<TTransport, TSigner>[\"chain\"];\n account: Omit<\n CreateMultiOwnerLightAccountParams<TTransport, TSigner>,\n \"transport\" | \"chain\"\n >;\n} & Omit<\n SmartAccountClientConfig<TTransport, TChain>,\n \"transport\" | \"account\" | \"chain\"\n>;\n\nexport function createMultiOwnerLightAccountClient<\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n args: CreateMultiOwnerLightAccountClientParams<Transport, TChain, TSigner>\n): Promise<\n SmartAccountClient<\n CustomTransport,\n Chain,\n MultiOwnerLightAccount<TSigner>,\n SmartAccountClientActions<Chain, SmartContractAccount> &\n MultiOwnerLightAccountClientActions<\n TSigner,\n MultiOwnerLightAccount<TSigner>\n >\n >\n>;\n\n/**\n * Creates a multi-owner light account client using the provided parameters. It first creates a multi-owner light account and then creates a smart account client with the provided configurations.\n *\n * @example\n * ```ts\n * import { createMultiOwnerLightAccountClient } from \"@account-kit/smart-contracts\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { sepolia } from \"viem/chains\";\n * import { http, generatePrivateKey } from \"viem\"\n *\n * const account = await createMultiOwnerLightAccountClient({\n * chain: sepolia,\n * transport: http(\"RPC_URL\"),\n * account: {\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * }\n * });\n * ```\n *\n * @param {CreateMultiOwnerLightAccountClientParams} params the configuration for creating the multi-owner light account client\n * @returns {Promise<SmartAccountClient>} a promise that resolves to a `SmartAccountClient` containing the created account client and relevant methods\n */\nexport async function createMultiOwnerLightAccountClient(\n params: CreateMultiOwnerLightAccountClientParams\n): Promise<SmartAccountClient> {\n const { account, transport, chain, ...clientConfig } = params;\n\n const lightAccount = await createMultiOwnerLightAccount({\n ...account,\n transport,\n chain,\n });\n\n return createSmartAccountClient({\n ...clientConfig,\n transport,\n chain: chain,\n account: lightAccount,\n }).extend(multiOwnerLightAccountClientActions);\n}\n"]}
1
+ {"version":3,"file":"multiOwnerLightAccount.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/multiOwnerLightAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAMzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAoD,MAAM,MAAM,CAAC;AACxE,OAAO,EACL,4BAA4B,GAG7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,mCAAmC,GAEpC,MAAM,yCAAyC,CAAC;AAuCjD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,kCAAkC,CACtD,MAAgD;IAEhD,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAEpC,MAAM,YAAY,GAAG,MAAM,4BAA4B,CAAC;QACtD,GAAG,MAAM;QACT,SAAS;QACT,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,wBAAwB,CAAC;QAC9B,GAAG,MAAM;QACT,SAAS;QACT,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,YAAY;KACtB,CAAC,CAAC,MAAM,CAAC,mCAAmC,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import {\n createSmartAccountClient,\n type SmartAccountClient,\n type SmartAccountClientActions,\n type SmartAccountClientConfig,\n type SmartAccountSigner,\n type SmartContractAccount,\n} from \"@aa-sdk/core\";\nimport { type Chain, type CustomTransport, type Transport } from \"viem\";\nimport {\n createMultiOwnerLightAccount,\n type CreateMultiOwnerLightAccountParams,\n type MultiOwnerLightAccount,\n} from \"../accounts/multiOwner.js\";\nimport {\n multiOwnerLightAccountClientActions,\n type MultiOwnerLightAccountClientActions,\n} from \"../decorators/multiOwnerLightAccount.js\";\n\nexport type CreateMultiOwnerLightAccountClientParams<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n> = {\n transport: CreateMultiOwnerLightAccountParams<\n TTransport,\n TSigner\n >[\"transport\"];\n chain: CreateMultiOwnerLightAccountParams<TTransport, TSigner>[\"chain\"];\n} & Omit<\n CreateMultiOwnerLightAccountParams<TTransport, TSigner>,\n \"transport\" | \"chain\"\n> &\n Omit<\n SmartAccountClientConfig<TTransport, TChain>,\n \"transport\" | \"account\" | \"chain\"\n >;\n\nexport function createMultiOwnerLightAccountClient<\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner\n>(\n args: CreateMultiOwnerLightAccountClientParams<Transport, TChain, TSigner>\n): Promise<\n SmartAccountClient<\n CustomTransport,\n Chain,\n MultiOwnerLightAccount<TSigner>,\n SmartAccountClientActions<Chain, SmartContractAccount> &\n MultiOwnerLightAccountClientActions<\n TSigner,\n MultiOwnerLightAccount<TSigner>\n >\n >\n>;\n\n/**\n * Creates a multi-owner light account client using the provided parameters. It first creates a multi-owner light account and then creates a smart account client with the provided configurations.\n *\n * @example\n * ```ts\n * import { createMultiOwnerLightAccountClient } from \"@account-kit/smart-contracts\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { sepolia } from \"viem/chains\";\n * import { http, generatePrivateKey } from \"viem\"\n *\n * const account = await createMultiOwnerLightAccountClient({\n * chain: sepolia,\n * transport: http(\"RPC_URL\"),\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {CreateMultiOwnerLightAccountClientParams} params the configuration for creating the multi-owner light account client\n * @returns {Promise<SmartAccountClient>} a promise that resolves to a `SmartAccountClient` containing the created account client and relevant methods\n */\nexport async function createMultiOwnerLightAccountClient(\n params: CreateMultiOwnerLightAccountClientParams\n): Promise<SmartAccountClient> {\n const { transport, chain } = params;\n\n const lightAccount = await createMultiOwnerLightAccount({\n ...params,\n transport,\n chain,\n });\n\n return createSmartAccountClient({\n ...params,\n transport,\n chain: chain,\n account: lightAccount,\n }).extend(multiOwnerLightAccountClientActions);\n}\n"]}
@@ -5,4 +5,23 @@ import { type TransferLightAccountOwnershipParams } from "../actions/transferOwn
5
5
  export type LightAccountClientActions<TSigner extends SmartAccountSigner = SmartAccountSigner, TAccount extends LightAccount<TSigner> | undefined = LightAccount<TSigner> | undefined> = {
6
6
  transferOwnership: (args: TransferLightAccountOwnershipParams<TSigner, TAccount>) => Promise<Hex>;
7
7
  };
8
+ /**
9
+ * Provides a set of actions for managing a light account client, including transferring ownership.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * import { lightAccountClientActions, createLightAccount } from "@account-kit/smart-contracts";
14
+ * import { createAlchemySmartAccountClient } from "@account-kit/infra";
15
+ * import { sepolia } from "@account-kit/infra";
16
+ *
17
+ * const smartAccountClient = createAlchemySmartAccountClient({
18
+ * account: await createLightAccount(...),
19
+ * apiKey: "your-api-key",
20
+ * chain: sepolia,
21
+ * }).extend(lightAccountClientActions);
22
+ * ```
23
+ *
24
+ * @param {Client<TTransport, TChain, TAccount>} client The client instance for which to provide the light account actions
25
+ * @returns {LightAccountClientActions<TSigner, TAccount>} An object containing the available light account client actions
26
+ */
8
27
  export declare const lightAccountClientActions: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner = SmartAccountSigner, TAccount extends LightAccount<TSigner> | undefined = LightAccount<TSigner> | undefined>(client: Client<TTransport, TChain, TAccount>) => LightAccountClientActions<TSigner, TAccount>;
@@ -1,4 +1,23 @@
1
1
  import { transferOwnership, } from "../actions/transferOwnership.js";
2
+ /**
3
+ * Provides a set of actions for managing a light account client, including transferring ownership.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { lightAccountClientActions, createLightAccount } from "@account-kit/smart-contracts";
8
+ * import { createAlchemySmartAccountClient } from "@account-kit/infra";
9
+ * import { sepolia } from "@account-kit/infra";
10
+ *
11
+ * const smartAccountClient = createAlchemySmartAccountClient({
12
+ * account: await createLightAccount(...),
13
+ * apiKey: "your-api-key",
14
+ * chain: sepolia,
15
+ * }).extend(lightAccountClientActions);
16
+ * ```
17
+ *
18
+ * @param {Client<TTransport, TChain, TAccount>} client The client instance for which to provide the light account actions
19
+ * @returns {LightAccountClientActions<TSigner, TAccount>} An object containing the available light account client actions
20
+ */
2
21
  export const lightAccountClientActions = (client) => ({
3
22
  transferOwnership: async (args) => transferOwnership(client, args),
4
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"lightAccount.js","sourceRoot":"","sources":["../../../../../src/light-account/decorators/lightAccount.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,GAElB,MAAM,iCAAiC,CAAC;AAgCzC,MAAM,CAAC,MAAM,yBAAyB,GASc,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/D,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC;CACnE,CAAC,CAAC","sourcesContent":["import type { SmartAccountSigner } from \"@aa-sdk/core\";\nimport type { Chain, Client, Hex, Transport } from \"viem\";\nimport type { LightAccount } from \"../accounts/account\";\nimport {\n transferOwnership,\n type TransferLightAccountOwnershipParams,\n} from \"../actions/transferOwnership.js\";\n\nexport type LightAccountClientActions<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends LightAccount<TSigner> | undefined =\n | LightAccount<TSigner>\n | undefined\n> = {\n transferOwnership: (\n args: TransferLightAccountOwnershipParams<TSigner, TAccount>\n ) => Promise<Hex>;\n};\n\n/**\n * Provides a set of actions for managing a light account client, including transferring ownership.\n *\n * @example\n * ```ts\n * import { lightAccountClientActions, createLightAccount } from \"@account-kit/smart-contracts\";\n * import { createAlchemySmartAccountClient } from \"@account-kit/infra\";\n * import { sepolia } from \"@account-kit/infra\";\n *\n * const smartAccountClient = createAlchemySmartAccountClient({\n * account: await createLightAccount(...),\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * }).extend(lightAccountClientActions);\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client The client instance for which to provide the light account actions\n * @returns {LightAccountClientActions<TSigner, TAccount>} An object containing the available light account client actions\n */\nexport const lightAccountClientActions: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends LightAccount<TSigner> | undefined =\n | LightAccount<TSigner>\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>\n) => LightAccountClientActions<TSigner, TAccount> = (client) => ({\n transferOwnership: async (args) => transferOwnership(client, args),\n});\n"]}
1
+ {"version":3,"file":"lightAccount.js","sourceRoot":"","sources":["../../../../../src/light-account/decorators/lightAccount.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,GAElB,MAAM,iCAAiC,CAAC;AAazC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,yBAAyB,GASc,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/D,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC;CACnE,CAAC,CAAC","sourcesContent":["import type { SmartAccountSigner } from \"@aa-sdk/core\";\nimport type { Chain, Client, Hex, Transport } from \"viem\";\nimport type { LightAccount } from \"../accounts/account\";\nimport {\n transferOwnership,\n type TransferLightAccountOwnershipParams,\n} from \"../actions/transferOwnership.js\";\n\nexport type LightAccountClientActions<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends LightAccount<TSigner> | undefined =\n | LightAccount<TSigner>\n | undefined\n> = {\n transferOwnership: (\n args: TransferLightAccountOwnershipParams<TSigner, TAccount>\n ) => Promise<Hex>;\n};\n\n/**\n * Provides a set of actions for managing a light account client, including transferring ownership.\n *\n * @example\n * ```ts\n * import { lightAccountClientActions, createLightAccount } from \"@account-kit/smart-contracts\";\n * import { createAlchemySmartAccountClient } from \"@account-kit/infra\";\n * import { sepolia } from \"@account-kit/infra\";\n *\n * const smartAccountClient = createAlchemySmartAccountClient({\n * account: await createLightAccount(...),\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * }).extend(lightAccountClientActions);\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client The client instance for which to provide the light account actions\n * @returns {LightAccountClientActions<TSigner, TAccount>} An object containing the available light account client actions\n */\nexport const lightAccountClientActions: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends LightAccount<TSigner> | undefined =\n | LightAccount<TSigner>\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>\n) => LightAccountClientActions<TSigner, TAccount> = (client) => ({\n transferOwnership: async (args) => transferOwnership(client, args),\n});\n"]}
@@ -5,4 +5,23 @@ import { type UpdateMultiOwnerLightAccountOwnersParams } from "../actions/update
5
5
  export type MultiOwnerLightAccountClientActions<TSigner extends SmartAccountSigner = SmartAccountSigner, TAccount extends MultiOwnerLightAccount<TSigner> | undefined = MultiOwnerLightAccount<TSigner> | undefined> = {
6
6
  updateOwners: (args: UpdateMultiOwnerLightAccountOwnersParams<TSigner, TAccount>) => Promise<Hex>;
7
7
  };
8
+ /**
9
+ * Generates client actions for a multi-owner light account, including the ability to update owners.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * import { multiOwnerLightAccountClientActions, createMultiOwnerLightAccount } from "@account-kit/smart-contracts";
14
+ * import { createAlchemySmartAccountClient } from "@account-kit/infra";
15
+ * import { sepolia } from "@account-kit/infra";
16
+ *
17
+ * const smartAccountClient = createAlchemySmartAccountClient({
18
+ * account: await createMultiOwnerLightAccount(...),
19
+ * apiKey: "your-api-key",
20
+ * chain: sepolia,
21
+ * }).extend(multiOwnerLightAccountClientActions);
22
+ * ```
23
+ *
24
+ * @param {Client<TTransport, TChain, TAccount>} client the client for interacting with the multi-owner light account
25
+ * @returns {MultiOwnerLightAccountClientActions<TSigner, TAccount>} an object containing the client actions specifically for a multi-owner light account
26
+ */
8
27
  export declare const multiOwnerLightAccountClientActions: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner = SmartAccountSigner, TAccount extends MultiOwnerLightAccount<TSigner> | undefined = MultiOwnerLightAccount<TSigner> | undefined>(client: Client<TTransport, TChain, TAccount>) => MultiOwnerLightAccountClientActions<TSigner, TAccount>;
@@ -1,4 +1,23 @@
1
1
  import { updateOwners, } from "../actions/updateOwners.js";
2
+ /**
3
+ * Generates client actions for a multi-owner light account, including the ability to update owners.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { multiOwnerLightAccountClientActions, createMultiOwnerLightAccount } from "@account-kit/smart-contracts";
8
+ * import { createAlchemySmartAccountClient } from "@account-kit/infra";
9
+ * import { sepolia } from "@account-kit/infra";
10
+ *
11
+ * const smartAccountClient = createAlchemySmartAccountClient({
12
+ * account: await createMultiOwnerLightAccount(...),
13
+ * apiKey: "your-api-key",
14
+ * chain: sepolia,
15
+ * }).extend(multiOwnerLightAccountClientActions);
16
+ * ```
17
+ *
18
+ * @param {Client<TTransport, TChain, TAccount>} client the client for interacting with the multi-owner light account
19
+ * @returns {MultiOwnerLightAccountClientActions<TSigner, TAccount>} an object containing the client actions specifically for a multi-owner light account
20
+ */
2
21
  export const multiOwnerLightAccountClientActions = (client) => ({
3
22
  updateOwners: async (args) => updateOwners(client, args),
4
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"multiOwnerLightAccount.js","sourceRoot":"","sources":["../../../../../src/light-account/decorators/multiOwnerLightAccount.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,YAAY,GAEb,MAAM,4BAA4B,CAAC;AAgCpC,MAAM,CAAC,MAAM,mCAAmC,GASc,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACzE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC;CACzD,CAAC,CAAC","sourcesContent":["import type { SmartAccountSigner } from \"@aa-sdk/core\";\nimport type { Chain, Client, Hex, Transport } from \"viem\";\nimport type { MultiOwnerLightAccount } from \"../accounts/multiOwner\";\nimport {\n updateOwners,\n type UpdateMultiOwnerLightAccountOwnersParams,\n} from \"../actions/updateOwners.js\";\n\nexport type MultiOwnerLightAccountClientActions<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends MultiOwnerLightAccount<TSigner> | undefined =\n | MultiOwnerLightAccount<TSigner>\n | undefined\n> = {\n updateOwners: (\n args: UpdateMultiOwnerLightAccountOwnersParams<TSigner, TAccount>\n ) => Promise<Hex>;\n};\n\n/**\n * Generates client actions for a multi-owner light account, including the ability to update owners.\n *\n * @example\n * ```ts\n * import { multiOwnerLightAccountClientActions, createMultiOwnerLightAccount } from \"@account-kit/smart-contracts\";\n * import { createAlchemySmartAccountClient } from \"@account-kit/infra\";\n * import { sepolia } from \"@account-kit/infra\";\n *\n * const smartAccountClient = createAlchemySmartAccountClient({\n * account: await createMultiOwnerLightAccount(...),\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * }).extend(multiOwnerLightAccountClientActions);\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client the client for interacting with the multi-owner light account\n * @returns {MultiOwnerLightAccountClientActions<TSigner, TAccount>} an object containing the client actions specifically for a multi-owner light account\n */\nexport const multiOwnerLightAccountClientActions: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends MultiOwnerLightAccount<TSigner> | undefined =\n | MultiOwnerLightAccount<TSigner>\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>\n) => MultiOwnerLightAccountClientActions<TSigner, TAccount> = (client) => ({\n updateOwners: async (args) => updateOwners(client, args),\n});\n"]}
1
+ {"version":3,"file":"multiOwnerLightAccount.js","sourceRoot":"","sources":["../../../../../src/light-account/decorators/multiOwnerLightAccount.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,YAAY,GAEb,MAAM,4BAA4B,CAAC;AAapC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,mCAAmC,GASc,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACzE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC;CACzD,CAAC,CAAC","sourcesContent":["import type { SmartAccountSigner } from \"@aa-sdk/core\";\nimport type { Chain, Client, Hex, Transport } from \"viem\";\nimport type { MultiOwnerLightAccount } from \"../accounts/multiOwner\";\nimport {\n updateOwners,\n type UpdateMultiOwnerLightAccountOwnersParams,\n} from \"../actions/updateOwners.js\";\n\nexport type MultiOwnerLightAccountClientActions<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends MultiOwnerLightAccount<TSigner> | undefined =\n | MultiOwnerLightAccount<TSigner>\n | undefined\n> = {\n updateOwners: (\n args: UpdateMultiOwnerLightAccountOwnersParams<TSigner, TAccount>\n ) => Promise<Hex>;\n};\n\n/**\n * Generates client actions for a multi-owner light account, including the ability to update owners.\n *\n * @example\n * ```ts\n * import { multiOwnerLightAccountClientActions, createMultiOwnerLightAccount } from \"@account-kit/smart-contracts\";\n * import { createAlchemySmartAccountClient } from \"@account-kit/infra\";\n * import { sepolia } from \"@account-kit/infra\";\n *\n * const smartAccountClient = createAlchemySmartAccountClient({\n * account: await createMultiOwnerLightAccount(...),\n * apiKey: \"your-api-key\",\n * chain: sepolia,\n * }).extend(multiOwnerLightAccountClientActions);\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client the client for interacting with the multi-owner light account\n * @returns {MultiOwnerLightAccountClientActions<TSigner, TAccount>} an object containing the client actions specifically for a multi-owner light account\n */\nexport const multiOwnerLightAccountClientActions: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends MultiOwnerLightAccount<TSigner> | undefined =\n | MultiOwnerLightAccount<TSigner>\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>\n) => MultiOwnerLightAccountClientActions<TSigner, TAccount> = (client) => ({\n updateOwners: async (args) => updateOwners(client, args),\n});\n"]}
@@ -1,6 +1,10 @@
1
1
  import { type EntryPointVersion } from "@aa-sdk/core";
2
2
  import { type Address, type Chain } from "viem";
3
3
  import type { LightAccountBase } from "./accounts/base";
4
+ /**
5
+ * Light account types supported: LightAccount, MultiOwnerLightAccount
6
+ *
7
+ */
4
8
  export type LightAccountType = "LightAccount" | "MultiOwnerLightAccount";
5
9
  export type LightAccountVersionConfig<TEntryPointVersion extends EntryPointVersion = EntryPointVersion> = {
6
10
  entryPointVersion: TEntryPointVersion;
@@ -1,10 +1,56 @@
1
1
  import { type Address, type Chain } from "viem";
2
2
  import type { LightAccountBase } from "./accounts/base";
3
3
  import type { LightAccountType, LightAccountVersion, LightAccountVersionConfig, LightAccountVersionConfigs } from "./types";
4
+ /**
5
+ * Account version registry interface that defines the light account versions
6
+ * and the version definition for each light account type
7
+ *
8
+ */
4
9
  export declare const AccountVersionRegistry: LightAccountVersionConfigs;
10
+ /**
11
+ * Get the default light account version for the given light account type
12
+ *
13
+ * @template {LightAccountType} TLightAccountType
14
+ * @returns {LightAccountVersion<TLightAccountType>} the default version for the given light account type
15
+ */
5
16
  export declare const defaultLightAccountVersion: <TLightAccountType extends LightAccountType>() => keyof LightAccountVersionConfigs[TLightAccountType];
17
+ /**
18
+ * Utility method returning the default light account factory address given a Chain object
19
+ *
20
+ * @param {Chain} chain - a Chain object
21
+ * @param {LightAccountVersion} version - the version of the light account to get the factory address for
22
+ * @returns {Address} an for the given chain
23
+ * @throws if the chain doesn't have an address currently deployed
24
+ */
6
25
  export declare const getDefaultLightAccountFactoryAddress: (chain: Chain, version: LightAccountVersion<"LightAccount">) => Address;
26
+ /**
27
+ * Utility method returning the default multi owner light account factory address given a Chain object
28
+ *
29
+ * @param {Chain} chain - a Chain object
30
+ * @param {string} version - the version of the light account to get the factory address for
31
+ * @returns {Address} an Address for the given chain
32
+ */
7
33
  export declare const getDefaultMultiOwnerLightAccountFactoryAddress: (chain: Chain, version: LightAccountVersion<"MultiOwnerLightAccount">) => `0x${string}`;
34
+ /**
35
+ * Can be used to check if the account with one of the following implementation addresses
36
+ * to not support 1271 signing.
37
+ *
38
+ * Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing.
39
+ */
8
40
  export declare const LightAccountUnsupported1271Impls: LightAccountVersionConfig<"0.6.0">[];
41
+ /**
42
+ * Can be used to check if the account with one of the following factory addresses
43
+ * to not support 1271 signing.
44
+ *
45
+ * Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing.
46
+ */
9
47
  export declare const LightAccountUnsupported1271Factories: Set<`0x${string}`>;
48
+ /**
49
+ * Get the light account version definition for the given light account and chain
50
+ *
51
+ * @template {LightAccountBase} TAccount
52
+ * @param {LightAccountBase} account the light account to get the version for
53
+ * @param {Chain} chain - the chain to get the version for
54
+ * @returns {Promise<LightAccountVersionConfig>} the light account version definition for the given light account and chain
55
+ */
10
56
  export declare function getLightAccountVersionForAccount<TAccount extends LightAccountBase>(account: TAccount, chain: Chain): Promise<LightAccountVersionConfig>;
@@ -1,4 +1,9 @@
1
1
  import { fromHex } from "viem";
2
+ /**
3
+ * Account version registry interface that defines the light account versions
4
+ * and the version definition for each light account type
5
+ *
6
+ */
2
7
  export const AccountVersionRegistry = {
3
8
  LightAccount: {
4
9
  "v1.0.1": {
@@ -50,26 +55,67 @@ export const AccountVersionRegistry = {
50
55
  },
51
56
  },
52
57
  };
58
+ /**
59
+ * Get the default light account version for the given light account type
60
+ *
61
+ * @template {LightAccountType} TLightAccountType
62
+ * @returns {LightAccountVersion<TLightAccountType>} the default version for the given light account type
63
+ */
53
64
  export const defaultLightAccountVersion = () => "v2.0.0";
65
+ /**
66
+ * Utility method returning the default light account factory address given a Chain object
67
+ *
68
+ * @param {Chain} chain - a Chain object
69
+ * @param {LightAccountVersion} version - the version of the light account to get the factory address for
70
+ * @returns {Address} an for the given chain
71
+ * @throws if the chain doesn't have an address currently deployed
72
+ */
54
73
  export const getDefaultLightAccountFactoryAddress = (chain, version) => {
55
74
  return (AccountVersionRegistry.LightAccount[version].addresses.overrides?.[chain.id]
56
75
  ?.factory ??
57
76
  AccountVersionRegistry.LightAccount[version].addresses.default.factory);
58
77
  };
78
+ /**
79
+ * Utility method returning the default multi owner light account factory address given a Chain object
80
+ *
81
+ * @param {Chain} chain - a Chain object
82
+ * @param {string} version - the version of the light account to get the factory address for
83
+ * @returns {Address} an Address for the given chain
84
+ */
59
85
  export const getDefaultMultiOwnerLightAccountFactoryAddress = (chain, version) => {
60
86
  return (AccountVersionRegistry.MultiOwnerLightAccount[version].addresses
61
87
  .overrides?.[chain.id]?.factory ??
62
88
  AccountVersionRegistry.MultiOwnerLightAccount[version].addresses.default
63
89
  .factory);
64
90
  };
91
+ /**
92
+ * Can be used to check if the account with one of the following implementation addresses
93
+ * to not support 1271 signing.
94
+ *
95
+ * Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing.
96
+ */
65
97
  export const LightAccountUnsupported1271Impls = [
66
98
  AccountVersionRegistry.LightAccount["v1.0.1"],
67
99
  AccountVersionRegistry.LightAccount["v1.0.2"],
68
100
  ];
101
+ /**
102
+ * Can be used to check if the account with one of the following factory addresses
103
+ * to not support 1271 signing.
104
+ *
105
+ * Light accounts with versions v1.0.1 and v1.0.2 do not support 1271 signing.
106
+ */
69
107
  export const LightAccountUnsupported1271Factories = new Set(LightAccountUnsupported1271Impls.map((x) => [
70
108
  x.addresses.default.factory,
71
109
  ...Object.values(x.addresses.overrides ?? {}).map((z) => z.factory),
72
110
  ]).flat());
111
+ /**
112
+ * Get the light account version definition for the given light account and chain
113
+ *
114
+ * @template {LightAccountBase} TAccount
115
+ * @param {LightAccountBase} account the light account to get the version for
116
+ * @param {Chain} chain - the chain to get the version for
117
+ * @returns {Promise<LightAccountVersionConfig>} the light account version definition for the given light account and chain
118
+ */
73
119
  export async function getLightAccountVersionForAccount(account, chain) {
74
120
  const accountType = account.source;
75
121
  const factoryAddress = await account.getFactoryAddress();