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

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 (264) hide show
  1. package/dist/cjs/plugindefs/multi-owner/config.js +16 -17
  2. package/dist/cjs/plugindefs/multi-owner/config.js.map +1 -1
  3. package/dist/cjs/plugindefs/multisig/config.js +15 -15
  4. package/dist/cjs/plugindefs/multisig/config.js.map +1 -1
  5. package/dist/cjs/plugindefs/session-key/config.js +17 -17
  6. package/dist/cjs/plugindefs/session-key/config.js.map +1 -1
  7. package/dist/cjs/src/index.d.ts +3 -3
  8. package/dist/cjs/src/index.js +15 -15
  9. package/dist/cjs/src/index.js.map +1 -1
  10. package/dist/cjs/src/light-account/accounts/account.js +1 -1
  11. package/dist/cjs/src/light-account/accounts/account.js.map +1 -1
  12. package/dist/cjs/src/light-account/accounts/multiOwner.js +2 -4
  13. package/dist/cjs/src/light-account/accounts/multiOwner.js.map +1 -1
  14. package/dist/cjs/src/light-account/actions/transferOwnership.d.ts +1 -1
  15. package/dist/cjs/src/light-account/actions/transferOwnership.js +2 -1
  16. package/dist/cjs/src/light-account/actions/transferOwnership.js.map +1 -1
  17. package/dist/cjs/src/light-account/actions/updateOwners.js.map +1 -1
  18. package/dist/cjs/src/light-account/clients/alchemyClient.d.ts +1 -1
  19. package/dist/cjs/src/light-account/clients/alchemyClient.js.map +1 -1
  20. package/dist/cjs/src/light-account/clients/client.js +2 -1
  21. package/dist/cjs/src/light-account/clients/client.js.map +1 -1
  22. package/dist/cjs/src/light-account/clients/multiOwnerAlchemyClient.d.ts +1 -1
  23. package/dist/cjs/src/light-account/clients/multiOwnerAlchemyClient.js.map +1 -1
  24. package/dist/cjs/src/light-account/clients/multiOwnerLightAccount.js +2 -1
  25. package/dist/cjs/src/light-account/clients/multiOwnerLightAccount.js.map +1 -1
  26. package/dist/cjs/src/light-account/decorators/lightAccount.js.map +1 -1
  27. package/dist/cjs/src/light-account/decorators/multiOwnerLightAccount.js.map +1 -1
  28. package/dist/cjs/src/light-account/utils.d.ts +3 -2
  29. package/dist/cjs/src/light-account/utils.js +34 -24
  30. package/dist/cjs/src/light-account/utils.js.map +1 -1
  31. package/dist/cjs/src/msca/account/multiOwnerAccount.js +2 -1
  32. package/dist/cjs/src/msca/account/multiOwnerAccount.js.map +1 -1
  33. package/dist/cjs/src/msca/account/multisigAccount.js +4 -3
  34. package/dist/cjs/src/msca/account/multisigAccount.js.map +1 -1
  35. package/dist/cjs/src/msca/account-loupe/decorator.js.map +1 -1
  36. package/dist/cjs/src/msca/client/alchemyClient.d.ts +1 -1
  37. package/dist/cjs/src/msca/client/alchemyClient.js.map +1 -1
  38. package/dist/cjs/src/msca/client/client.js.map +1 -1
  39. package/dist/cjs/src/msca/client/multiSigAlchemyClient.d.ts +1 -1
  40. package/dist/cjs/src/msca/client/multiSigAlchemyClient.js +1 -1
  41. package/dist/cjs/src/msca/client/multiSigAlchemyClient.js.map +1 -1
  42. package/dist/cjs/src/msca/errors.js.map +1 -1
  43. package/dist/cjs/src/msca/plugin-manager/decorator.d.ts +1 -1
  44. package/dist/cjs/src/msca/plugin-manager/decorator.js +6 -4
  45. package/dist/cjs/src/msca/plugin-manager/decorator.js.map +1 -1
  46. package/dist/cjs/src/msca/plugin-manager/installPlugin.js.map +1 -1
  47. package/dist/cjs/src/msca/plugins/multi-owner/extension.js.map +1 -1
  48. package/dist/cjs/src/msca/plugins/multi-owner/index.d.ts +1 -1
  49. package/dist/cjs/src/msca/plugins/multi-owner/index.js +2 -1
  50. package/dist/cjs/src/msca/plugins/multi-owner/index.js.map +1 -1
  51. package/dist/cjs/src/msca/plugins/multisig/actions/proposeUserOperation.js +2 -2
  52. package/dist/cjs/src/msca/plugins/multisig/actions/proposeUserOperation.js.map +1 -1
  53. package/dist/cjs/src/msca/plugins/multisig/actions/signMultisigUserOperation.js +1 -1
  54. package/dist/cjs/src/msca/plugins/multisig/actions/signMultisigUserOperation.js.map +1 -1
  55. package/dist/cjs/src/msca/plugins/multisig/extension.js.map +1 -1
  56. package/dist/cjs/src/msca/plugins/multisig/index.d.ts +1 -8
  57. package/dist/cjs/src/msca/plugins/multisig/index.js +1 -16
  58. package/dist/cjs/src/msca/plugins/multisig/index.js.map +1 -1
  59. package/dist/cjs/src/msca/plugins/multisig/middleware.d.ts +1 -1
  60. package/dist/cjs/src/msca/plugins/multisig/middleware.js +1 -1
  61. package/dist/cjs/src/msca/plugins/multisig/middleware.js.map +1 -1
  62. package/dist/cjs/src/msca/plugins/multisig/utils/combineSignatures.d.ts +3 -2
  63. package/dist/cjs/src/msca/plugins/multisig/utils/combineSignatures.js +2 -2
  64. package/dist/cjs/src/msca/plugins/multisig/utils/combineSignatures.js.map +1 -1
  65. package/dist/cjs/src/msca/plugins/multisig/utils/getSignerType.d.ts +2 -2
  66. package/dist/cjs/src/msca/plugins/multisig/utils/getSignerType.js.map +1 -1
  67. package/dist/cjs/src/msca/plugins/multisig/utils/index.d.ts +4 -0
  68. package/dist/cjs/src/msca/plugins/multisig/utils/index.js.map +1 -1
  69. package/dist/cjs/src/msca/plugins/session-key/extension.js.map +1 -1
  70. package/dist/cjs/src/msca/plugins/session-key/index.d.ts +1 -1
  71. package/dist/cjs/src/msca/plugins/session-key/index.js +3 -1
  72. package/dist/cjs/src/msca/plugins/session-key/index.js.map +1 -1
  73. package/dist/cjs/src/msca/plugins/session-key/permissions.js.map +1 -1
  74. package/dist/cjs/src/msca/plugins/session-key/signer.js.map +1 -1
  75. package/dist/cjs/src/msca/plugins/session-key/utils.d.ts +4 -2
  76. package/dist/cjs/src/msca/plugins/session-key/utils.js +3 -2
  77. package/dist/cjs/src/msca/plugins/session-key/utils.js.map +1 -1
  78. package/dist/cjs/src/msca/utils.d.ts +6 -4
  79. package/dist/cjs/src/msca/utils.js +11 -10
  80. package/dist/cjs/src/msca/utils.js.map +1 -1
  81. package/dist/esm/plugindefs/multi-owner/config.js +1 -2
  82. package/dist/esm/plugindefs/multi-owner/config.js.map +1 -1
  83. package/dist/esm/plugindefs/multisig/config.js +1 -1
  84. package/dist/esm/plugindefs/multisig/config.js.map +1 -1
  85. package/dist/esm/plugindefs/session-key/config.js +1 -1
  86. package/dist/esm/plugindefs/session-key/config.js.map +1 -1
  87. package/dist/esm/src/index.d.ts +3 -3
  88. package/dist/esm/src/index.js +2 -2
  89. package/dist/esm/src/index.js.map +1 -1
  90. package/dist/esm/src/light-account/accounts/account.js +2 -2
  91. package/dist/esm/src/light-account/accounts/account.js.map +1 -1
  92. package/dist/esm/src/light-account/accounts/multiOwner.js +3 -5
  93. package/dist/esm/src/light-account/accounts/multiOwner.js.map +1 -1
  94. package/dist/esm/src/light-account/actions/transferOwnership.d.ts +1 -1
  95. package/dist/esm/src/light-account/actions/transferOwnership.js +2 -1
  96. package/dist/esm/src/light-account/actions/transferOwnership.js.map +1 -1
  97. package/dist/esm/src/light-account/actions/updateOwners.js.map +1 -1
  98. package/dist/esm/src/light-account/clients/alchemyClient.d.ts +1 -1
  99. package/dist/esm/src/light-account/clients/alchemyClient.js.map +1 -1
  100. package/dist/esm/src/light-account/clients/client.js +2 -1
  101. package/dist/esm/src/light-account/clients/client.js.map +1 -1
  102. package/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.d.ts +1 -1
  103. package/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js.map +1 -1
  104. package/dist/esm/src/light-account/clients/multiOwnerLightAccount.js +2 -1
  105. package/dist/esm/src/light-account/clients/multiOwnerLightAccount.js.map +1 -1
  106. package/dist/esm/src/light-account/decorators/lightAccount.js.map +1 -1
  107. package/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js.map +1 -1
  108. package/dist/esm/src/light-account/utils.d.ts +3 -2
  109. package/dist/esm/src/light-account/utils.js +14 -5
  110. package/dist/esm/src/light-account/utils.js.map +1 -1
  111. package/dist/esm/src/msca/account/multiOwnerAccount.js +2 -1
  112. package/dist/esm/src/msca/account/multiOwnerAccount.js.map +1 -1
  113. package/dist/esm/src/msca/account/multisigAccount.js +4 -3
  114. package/dist/esm/src/msca/account/multisigAccount.js.map +1 -1
  115. package/dist/esm/src/msca/account-loupe/decorator.js.map +1 -1
  116. package/dist/esm/src/msca/client/alchemyClient.d.ts +1 -1
  117. package/dist/esm/src/msca/client/alchemyClient.js.map +1 -1
  118. package/dist/esm/src/msca/client/client.js.map +1 -1
  119. package/dist/esm/src/msca/client/multiSigAlchemyClient.d.ts +1 -1
  120. package/dist/esm/src/msca/client/multiSigAlchemyClient.js +1 -1
  121. package/dist/esm/src/msca/client/multiSigAlchemyClient.js.map +1 -1
  122. package/dist/esm/src/msca/errors.js.map +1 -1
  123. package/dist/esm/src/msca/plugin-manager/decorator.d.ts +1 -1
  124. package/dist/esm/src/msca/plugin-manager/decorator.js +6 -4
  125. package/dist/esm/src/msca/plugin-manager/decorator.js.map +1 -1
  126. package/dist/esm/src/msca/plugin-manager/installPlugin.js.map +1 -1
  127. package/dist/esm/src/msca/plugins/multi-owner/extension.js.map +1 -1
  128. package/dist/esm/src/msca/plugins/multi-owner/index.d.ts +1 -1
  129. package/dist/esm/src/msca/plugins/multi-owner/index.js +1 -1
  130. package/dist/esm/src/msca/plugins/multi-owner/index.js.map +1 -1
  131. package/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js +1 -1
  132. package/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js.map +1 -1
  133. package/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js +1 -1
  134. package/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js.map +1 -1
  135. package/dist/esm/src/msca/plugins/multisig/extension.js.map +1 -1
  136. package/dist/esm/src/msca/plugins/multisig/index.d.ts +1 -8
  137. package/dist/esm/src/msca/plugins/multisig/index.js +0 -7
  138. package/dist/esm/src/msca/plugins/multisig/index.js.map +1 -1
  139. package/dist/esm/src/msca/plugins/multisig/middleware.d.ts +1 -1
  140. package/dist/esm/src/msca/plugins/multisig/middleware.js +2 -1
  141. package/dist/esm/src/msca/plugins/multisig/middleware.js.map +1 -1
  142. package/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.d.ts +3 -2
  143. package/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js +2 -2
  144. package/dist/esm/src/msca/plugins/multisig/utils/combineSignatures.js.map +1 -1
  145. package/dist/esm/src/msca/plugins/multisig/utils/getSignerType.d.ts +2 -2
  146. package/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js.map +1 -1
  147. package/dist/esm/src/msca/plugins/multisig/utils/index.d.ts +4 -0
  148. package/dist/esm/src/msca/plugins/multisig/utils/index.js.map +1 -1
  149. package/dist/esm/src/msca/plugins/session-key/extension.js.map +1 -1
  150. package/dist/esm/src/msca/plugins/session-key/index.d.ts +1 -1
  151. package/dist/esm/src/msca/plugins/session-key/index.js +1 -1
  152. package/dist/esm/src/msca/plugins/session-key/index.js.map +1 -1
  153. package/dist/esm/src/msca/plugins/session-key/permissions.js.map +1 -1
  154. package/dist/esm/src/msca/plugins/session-key/signer.js.map +1 -1
  155. package/dist/esm/src/msca/plugins/session-key/utils.d.ts +4 -2
  156. package/dist/esm/src/msca/plugins/session-key/utils.js +3 -2
  157. package/dist/esm/src/msca/plugins/session-key/utils.js.map +1 -1
  158. package/dist/esm/src/msca/utils.d.ts +6 -4
  159. package/dist/esm/src/msca/utils.js +2 -1
  160. package/dist/esm/src/msca/utils.js.map +1 -1
  161. package/dist/types/plugindefs/multi-owner/config.d.ts.map +1 -1
  162. package/dist/types/src/index.d.ts +3 -3
  163. package/dist/types/src/index.d.ts.map +1 -1
  164. package/dist/types/src/light-account/accounts/account.d.ts.map +1 -1
  165. package/dist/types/src/light-account/accounts/multiOwner.d.ts.map +1 -1
  166. package/dist/types/src/light-account/actions/transferOwnership.d.ts +26 -1
  167. package/dist/types/src/light-account/actions/transferOwnership.d.ts.map +1 -1
  168. package/dist/types/src/light-account/actions/updateOwners.d.ts +24 -0
  169. package/dist/types/src/light-account/actions/updateOwners.d.ts.map +1 -1
  170. package/dist/types/src/light-account/clients/alchemyClient.d.ts +1 -1
  171. package/dist/types/src/light-account/clients/alchemyClient.d.ts.map +1 -1
  172. package/dist/types/src/light-account/clients/multiOwnerAlchemyClient.d.ts +1 -1
  173. package/dist/types/src/light-account/clients/multiOwnerAlchemyClient.d.ts.map +1 -1
  174. package/dist/types/src/light-account/decorators/lightAccount.d.ts +19 -0
  175. package/dist/types/src/light-account/decorators/lightAccount.d.ts.map +1 -1
  176. package/dist/types/src/light-account/decorators/multiOwnerLightAccount.d.ts +19 -0
  177. package/dist/types/src/light-account/decorators/multiOwnerLightAccount.d.ts.map +1 -1
  178. package/dist/types/src/light-account/utils.d.ts +11 -4
  179. package/dist/types/src/light-account/utils.d.ts.map +1 -1
  180. package/dist/types/src/msca/account/multisigAccount.d.ts.map +1 -1
  181. package/dist/types/src/msca/account-loupe/decorator.d.ts +15 -0
  182. package/dist/types/src/msca/account-loupe/decorator.d.ts.map +1 -1
  183. package/dist/types/src/msca/client/alchemyClient.d.ts +1 -1
  184. package/dist/types/src/msca/client/alchemyClient.d.ts.map +1 -1
  185. package/dist/types/src/msca/client/client.d.ts.map +1 -1
  186. package/dist/types/src/msca/client/multiSigAlchemyClient.d.ts +1 -1
  187. package/dist/types/src/msca/client/multiSigAlchemyClient.d.ts.map +1 -1
  188. package/dist/types/src/msca/errors.d.ts +12 -0
  189. package/dist/types/src/msca/errors.d.ts.map +1 -1
  190. package/dist/types/src/msca/plugin-manager/decorator.d.ts +16 -1
  191. package/dist/types/src/msca/plugin-manager/decorator.d.ts.map +1 -1
  192. package/dist/types/src/msca/plugin-manager/installPlugin.d.ts +21 -0
  193. package/dist/types/src/msca/plugin-manager/installPlugin.d.ts.map +1 -1
  194. package/dist/types/src/msca/plugins/multi-owner/extension.d.ts +15 -0
  195. package/dist/types/src/msca/plugins/multi-owner/extension.d.ts.map +1 -1
  196. package/dist/types/src/msca/plugins/multi-owner/index.d.ts +1 -1
  197. package/dist/types/src/msca/plugins/multi-owner/index.d.ts.map +1 -1
  198. package/dist/types/src/msca/plugins/multisig/actions/proposeUserOperation.d.ts.map +1 -1
  199. package/dist/types/src/msca/plugins/multisig/actions/signMultisigUserOperation.d.ts.map +1 -1
  200. package/dist/types/src/msca/plugins/multisig/extension.d.ts +13 -0
  201. package/dist/types/src/msca/plugins/multisig/extension.d.ts.map +1 -1
  202. package/dist/types/src/msca/plugins/multisig/index.d.ts +1 -8
  203. package/dist/types/src/msca/plugins/multisig/index.d.ts.map +1 -1
  204. package/dist/types/src/msca/plugins/multisig/middleware.d.ts +1 -1
  205. package/dist/types/src/msca/plugins/multisig/middleware.d.ts.map +1 -1
  206. package/dist/types/src/msca/plugins/multisig/utils/combineSignatures.d.ts +28 -2
  207. package/dist/types/src/msca/plugins/multisig/utils/combineSignatures.d.ts.map +1 -1
  208. package/dist/types/src/msca/plugins/multisig/utils/getSignerType.d.ts +21 -2
  209. package/dist/types/src/msca/plugins/multisig/utils/getSignerType.d.ts.map +1 -1
  210. package/dist/types/src/msca/plugins/multisig/utils/index.d.ts +4 -0
  211. package/dist/types/src/msca/plugins/multisig/utils/index.d.ts.map +1 -1
  212. package/dist/types/src/msca/plugins/session-key/extension.d.ts +13 -0
  213. package/dist/types/src/msca/plugins/session-key/extension.d.ts.map +1 -1
  214. package/dist/types/src/msca/plugins/session-key/index.d.ts +1 -1
  215. package/dist/types/src/msca/plugins/session-key/index.d.ts.map +1 -1
  216. package/dist/types/src/msca/plugins/session-key/permissions.d.ts +3 -0
  217. package/dist/types/src/msca/plugins/session-key/permissions.d.ts.map +1 -1
  218. package/dist/types/src/msca/plugins/session-key/signer.d.ts +1 -1
  219. package/dist/types/src/msca/plugins/session-key/signer.d.ts.map +1 -1
  220. package/dist/types/src/msca/plugins/session-key/utils.d.ts +22 -2
  221. package/dist/types/src/msca/plugins/session-key/utils.d.ts.map +1 -1
  222. package/dist/types/src/msca/utils.d.ts +43 -5
  223. package/dist/types/src/msca/utils.d.ts.map +1 -1
  224. package/package.json +5 -5
  225. package/plugindefs/multi-owner/config.ts +1 -2
  226. package/plugindefs/multisig/config.ts +1 -1
  227. package/plugindefs/session-key/config.ts +1 -1
  228. package/src/index.ts +2 -3
  229. package/src/light-account/accounts/account.ts +22 -3
  230. package/src/light-account/accounts/multiOwner.ts +26 -5
  231. package/src/light-account/actions/transferOwnership.ts +28 -5
  232. package/src/light-account/actions/updateOwners.ts +24 -0
  233. package/src/light-account/clients/alchemyClient.ts +21 -1
  234. package/src/light-account/clients/client.ts +27 -6
  235. package/src/light-account/clients/multiOwnerAlchemyClient.ts +21 -1
  236. package/src/light-account/clients/multiOwnerLightAccount.ts +27 -6
  237. package/src/light-account/decorators/lightAccount.ts +19 -0
  238. package/src/light-account/decorators/multiOwnerLightAccount.ts +19 -0
  239. package/src/light-account/utils.ts +31 -9
  240. package/src/msca/account/multiOwnerAccount.ts +36 -11
  241. package/src/msca/account/multisigAccount.ts +40 -14
  242. package/src/msca/account-loupe/decorator.ts +15 -0
  243. package/src/msca/client/alchemyClient.ts +21 -1
  244. package/src/msca/client/client.ts +46 -0
  245. package/src/msca/client/multiSigAlchemyClient.ts +26 -4
  246. package/src/msca/errors.ts +12 -0
  247. package/src/msca/plugin-manager/decorator.ts +22 -5
  248. package/src/msca/plugin-manager/installPlugin.ts +21 -0
  249. package/src/msca/plugins/multi-owner/extension.ts +15 -0
  250. package/src/msca/plugins/multi-owner/index.ts +3 -0
  251. package/src/msca/plugins/multisig/actions/proposeUserOperation.ts +1 -1
  252. package/src/msca/plugins/multisig/actions/signMultisigUserOperation.ts +1 -1
  253. package/src/msca/plugins/multisig/extension.ts +13 -0
  254. package/src/msca/plugins/multisig/index.ts +1 -12
  255. package/src/msca/plugins/multisig/middleware.ts +2 -2
  256. package/src/msca/plugins/multisig/utils/combineSignatures.ts +36 -9
  257. package/src/msca/plugins/multisig/utils/getSignerType.ts +23 -4
  258. package/src/msca/plugins/multisig/utils/index.ts +4 -0
  259. package/src/msca/plugins/session-key/extension.ts +13 -0
  260. package/src/msca/plugins/session-key/index.ts +7 -1
  261. package/src/msca/plugins/session-key/permissions.ts +3 -0
  262. package/src/msca/plugins/session-key/signer.ts +1 -2
  263. package/src/msca/plugins/session-key/utils.ts +33 -12
  264. package/src/msca/utils.ts +73 -16
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildSessionKeysToRemoveStruct = void 0;
4
4
  const core_1 = require("@aa-sdk/core");
5
5
  const plugin_js_1 = require("./plugin.js");
6
- const buildSessionKeysToRemoveStruct = async (client, { keys, pluginAddress, account = client.account }) => {
6
+ async function buildSessionKeysToRemoveStruct(client, args) {
7
+ const { keys, pluginAddress, account = client.account } = args;
7
8
  if (!account)
8
9
  throw new core_1.AccountNotFoundError();
9
10
  const contract = plugin_js_1.SessionKeyPlugin.getContract(client, pluginAddress);
@@ -16,6 +17,6 @@ const buildSessionKeysToRemoveStruct = async (client, { keys, pluginAddress, acc
16
17
  sessionKey: key,
17
18
  predecessor,
18
19
  }));
19
- };
20
+ }
20
21
  exports.buildSessionKeysToRemoveStruct = buildSessionKeysToRemoveStruct;
21
22
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/session-key/utils.ts"],"names":[],"mappings":";;;AACA,uCAAoD;AAEpD,2CAA+C;AAIxC,MAAM,8BAA8B,GAYqB,KAAK,EACnE,MAAM,EACN,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,EACjD,EAAE;IACF,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,2BAAoB,EAAE,CAAC;IAE/C,MAAM,QAAQ,GAAG,4BAAgB,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrE,OAAO,CACL,MAAM,OAAO,CAAC,GAAG,CACf,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACrB,OAAO;YACL,GAAG;YACH,MAAM,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;SAC5D,CAAC;IACJ,CAAC,CAAC,CACH,CACF,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7B,UAAU,EAAE,GAAG;QACf,WAAW;KACZ,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AAhCW,QAAA,8BAA8B,kCAgCzC","sourcesContent":["import type { GetAccountParameter, SmartContractAccount } from \"@aa-sdk/core\";\nimport { AccountNotFoundError } from \"@aa-sdk/core\";\nimport type { Address, Chain, Client, Transport } from \"viem\";\nimport { SessionKeyPlugin } from \"./plugin.js\";\n\n// find predecessors for each keys and returned the struct `ISessionKeyPlugin.SessionKeyToRemove[]`\n// where SessionKeyToRemove = { sessionKey: Address, predecessor: Hex }\nexport const buildSessionKeysToRemoveStruct: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>,\n args: {\n keys: ReadonlyArray<Address>;\n pluginAddress?: Address;\n } & GetAccountParameter<TAccount>\n) => Promise<{ sessionKey: Address; predecessor: Address }[]> = async (\n client,\n { keys, pluginAddress, account = client.account }\n) => {\n if (!account) throw new AccountNotFoundError();\n\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return (\n await Promise.all(\n keys.map(async (key) => {\n return [\n key,\n await contract.read.findPredecessor([account.address, key]),\n ];\n })\n )\n ).map(([key, predecessor]) => ({\n sessionKey: key,\n predecessor,\n }));\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/session-key/utils.ts"],"names":[],"mappings":";;;AACA,uCAAoD;AAEpD,2CAA+C;AA6BxC,KAAK,UAAU,8BAA8B,CAOlD,MAA4C,EAC5C,IAA0C;IAE1C,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;IAE/D,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,2BAAoB,EAAE,CAAC;IAE/C,MAAM,QAAQ,GAAG,4BAAgB,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrE,OAAO,CACL,MAAM,OAAO,CAAC,GAAG,CACf,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACrB,OAAO;YACL,GAAG;YACH,MAAM,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;SAC5D,CAAC;IACJ,CAAC,CAAC,CACH,CACF,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7B,UAAU,EAAE,GAAG;QACf,WAAW;KACZ,CAAC,CAAC,CAAC;AACN,CAAC;AA5BD,wEA4BC","sourcesContent":["import type { GetAccountParameter, SmartContractAccount } from \"@aa-sdk/core\";\nimport { AccountNotFoundError } from \"@aa-sdk/core\";\nimport type { Address, Chain, Client, Transport } from \"viem\";\nimport { SessionKeyPlugin } from \"./plugin.js\";\n\ntype BuildSessionKeysToRemoveStructParams<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n> = {\n keys: ReadonlyArray<Address>;\n pluginAddress?: Address;\n} & GetAccountParameter<TAccount>;\n\n/**\n * Finds predecessors for each provided key and returns them in the struct `ISessionKeyPlugin.SessionKeyToRemove[]`.\n *\n * @example\n * ```ts\n * import { buildSessionKeysToRemoveStruct } from \"@account-kit/smart-contracts\";\n *\n * const client = createSmartAccountClient(...);\n *\n * const keysToRemove = await buildSessionKeysToRemoveStruct(client, {\n * keys: [\"0x...\", \"0x...\"],\n * });\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client The client instance used to interact with the smart account\n * @param {BuildSessionKeysToRemoveStructParams<TAccount>} args Arguments to configure the session key removal process\n * @returns {Promise<{ sessionKey: Address; predecessor: Address }[]>} A promise that resolves to an array of objects each containing a session key and its predecessor\n */\nexport async function buildSessionKeysToRemoveStruct<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>,\n args: BuildSessionKeysToRemoveStructParams\n): Promise<{ sessionKey: Address; predecessor: Address }[]> {\n const { keys, pluginAddress, account = client.account } = args;\n\n if (!account) throw new AccountNotFoundError();\n\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n return (\n await Promise.all(\n keys.map(async (key) => {\n return [\n key,\n await contract.read.findPredecessor([account.address, key]),\n ];\n })\n )\n ).map(([key, predecessor]) => ({\n sessionKey: key,\n predecessor,\n }));\n}\n"]}
@@ -3,13 +3,15 @@ import type { Address, Chain, Transport } from "viem";
3
3
  import { type MultiOwnerModularAccount } from "./account/multiOwnerAccount.js";
4
4
  export declare const getDefaultMultisigModularAccountFactoryAddress: (chain: Chain) => Address;
5
5
  export declare const getDefaultMultiOwnerModularAccountFactoryAddress: (chain: Chain) => Address;
6
- export declare function getMSCAUpgradeToData<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner = SmartAccountSigner, TAccount extends SmartContractAccountWithSigner<string, TSigner> | undefined = SmartContractAccountWithSigner<string, TSigner> | undefined>(client: SmartAccountClient<TTransport, TChain, TAccount>, args: {
6
+ export type GetMSCAUpgradeToData<TSigner extends SmartAccountSigner = SmartAccountSigner, TAccount extends SmartContractAccountWithSigner<string, TSigner> | undefined = SmartContractAccountWithSigner<string, TSigner> | undefined> = {
7
7
  multiOwnerPluginAddress?: Address;
8
- } & GetAccountParameter<TAccount>): Promise<UpgradeToData & {
8
+ } & GetAccountParameter<TAccount>;
9
+ export declare function getMSCAUpgradeToData<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner = SmartAccountSigner, TAccount extends SmartContractAccountWithSigner<string, TSigner> | undefined = SmartContractAccountWithSigner<string, TSigner> | undefined>(client: SmartAccountClient<TTransport, TChain, TAccount>, args: GetMSCAUpgradeToData<TSigner, TAccount>): Promise<UpgradeToData & {
9
10
  createMAAccount: () => Promise<MultiOwnerModularAccount<TSigner>>;
10
11
  }>;
11
- export declare function getMAInitializationData<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>({ client, multiOwnerPluginAddress, signerAddress, }: {
12
+ export type GetMAInitializationDataParams<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined> = {
12
13
  multiOwnerPluginAddress?: Address;
13
14
  client: SmartAccountClient<TTransport, TChain, TAccount>;
14
15
  signerAddress: Address | Address[];
15
- }): Promise<UpgradeToData>;
16
+ };
17
+ export declare function getMAInitializationData<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>({ client, multiOwnerPluginAddress, signerAddress, }: GetMAInitializationDataParams<TTransport, TChain, TAccount>): Promise<UpgradeToData>;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getMAInitializationData = exports.getMSCAUpgradeToData = exports.getDefaultMultiOwnerModularAccountFactoryAddress = exports.getDefaultMultisigModularAccountFactoryAddress = void 0;
4
4
  const core_1 = require("@aa-sdk/core");
5
+ const infra_1 = require("@account-kit/infra");
5
6
  const viem_1 = require("viem");
6
7
  const IPlugin_js_1 = require("./abis/IPlugin.js");
7
8
  const MultiOwnerModularAccountFactory_js_1 = require("./abis/MultiOwnerModularAccountFactory.js");
@@ -10,16 +11,16 @@ const multiOwnerAccount_js_1 = require("./account/multiOwnerAccount.js");
10
11
  const plugin_js_1 = require("./plugins/multi-owner/plugin.js");
11
12
  const getDefaultMultisigModularAccountFactoryAddress = (chain) => {
12
13
  switch (chain.id) {
13
- case core_1.sepolia.id:
14
- case core_1.baseSepolia.id:
15
- case core_1.polygon.id:
16
- case core_1.mainnet.id:
17
- case core_1.polygonAmoy.id:
18
- case core_1.optimism.id:
19
- case core_1.optimismSepolia.id:
20
- case core_1.arbitrum.id:
21
- case core_1.arbitrumSepolia.id:
22
- case core_1.base.id:
14
+ case infra_1.sepolia.id:
15
+ case infra_1.baseSepolia.id:
16
+ case infra_1.polygon.id:
17
+ case infra_1.mainnet.id:
18
+ case infra_1.polygonAmoy.id:
19
+ case infra_1.optimism.id:
20
+ case infra_1.optimismSepolia.id:
21
+ case infra_1.arbitrum.id:
22
+ case infra_1.arbitrumSepolia.id:
23
+ case infra_1.base.id:
23
24
  default:
24
25
  return "0x000000000000204327E6669f00901a57CE15aE15";
25
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/msca/utils.ts"],"names":[],"mappings":";;;AAAA,uCAmBsB;AAEtB,+BAOc;AACd,kDAA+C;AAC/C,kGAA+F;AAC/F,sFAAmF;AACnF,yEAGwC;AACxC,+DAAmE;AAS5D,MAAM,8CAA8C,GAAG,CAC5D,KAAY,EACH,EAAE;IACX,QAAQ,KAAK,CAAC,EAAE,EAAE,CAAC;QACjB,KAAK,cAAO,CAAC,EAAE,CAAC;QAChB,KAAK,kBAAW,CAAC,EAAE,CAAC;QACpB,KAAK,cAAO,CAAC,EAAE,CAAC;QAChB,KAAK,cAAO,CAAC,EAAE,CAAC;QAChB,KAAK,kBAAW,CAAC,EAAE,CAAC;QACpB,KAAK,eAAQ,CAAC,EAAE,CAAC;QACjB,KAAK,sBAAe,CAAC,EAAE,CAAC;QACxB,KAAK,eAAQ,CAAC,EAAE,CAAC;QACjB,KAAK,sBAAe,CAAC,EAAE,CAAC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CAAC,YAAY,CAAC,CAAC,CACnD,CAAC;IAEF,MAAM,yBAAyB,GAAG,IAAA,yBAAkB,EAAC;QACnD,GAAG,EAAE,2DAA4B;QACjC,YAAY,EAAE,YAAY;QAC1B,IAAI,EAAE,CAAC,CAAC,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;KACnD,CAAC,CAAC;IAEH,OAAO;QACL,WAAW;QACX,kBAAkB,EAAE,yBAAyB;KAC9C,CAAC;AACJ,CAAC;AAtED,0DAsEC","sourcesContent":["import {\n AccountNotFoundError,\n ChainNotFoundError,\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n sepolia,\n type GetAccountParameter,\n type SmartAccountClient,\n type SmartAccountSigner,\n type SmartContractAccount,\n type SmartContractAccountWithSigner,\n type UpgradeToData,\n} from \"@aa-sdk/core\";\nimport type { Address, Chain, Transport } from \"viem\";\nimport {\n custom,\n encodeAbiParameters,\n encodeFunctionData,\n encodeFunctionResult,\n keccak256,\n parseAbiParameters,\n} from \"viem\";\nimport { IPluginAbi } from \"./abis/IPlugin.js\";\nimport { MultiOwnerModularAccountFactoryAbi } from \"./abis/MultiOwnerModularAccountFactory.js\";\nimport { UpgradeableModularAccountAbi } from \"./abis/UpgradeableModularAccount.js\";\nimport {\n createMultiOwnerModularAccount,\n type MultiOwnerModularAccount,\n} from \"./account/multiOwnerAccount.js\";\nimport { MultiOwnerPlugin } from \"./plugins/multi-owner/plugin.js\";\n\n/**\n * Utility method returning the default multi sig msca factory address given a {@link Chain} object\n *\n * @param chain - a {@link Chain} object\n * @returns a {@link Address} for the given chain\n * @throws if the chain doesn't have an address currently deployed\n */\nexport const getDefaultMultisigModularAccountFactoryAddress = (\n chain: Chain\n): Address => {\n switch (chain.id) {\n case sepolia.id:\n case baseSepolia.id:\n case polygon.id:\n case mainnet.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n default:\n return \"0x000000000000204327E6669f00901a57CE15aE15\";\n }\n};\n\n/**\n * Utility method returning the default multi owner msca factory address given a {@link Chain} object\n *\n * @param chain - a {@link Chain} object\n * @returns a {@link Address} for the given chain\n * @throws if the chain doesn't have an address currently deployed\n */\nexport const getDefaultMultiOwnerModularAccountFactoryAddress = (\n chain: Chain\n): Address => {\n switch (chain.id) {\n default:\n return \"0x000000e92D78D90000007F0082006FDA09BD5f11\";\n }\n};\n\nexport async function getMSCAUpgradeToData<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends\n | SmartContractAccountWithSigner<string, TSigner>\n | undefined = SmartContractAccountWithSigner<string, TSigner> | undefined\n>(\n client: SmartAccountClient<TTransport, TChain, TAccount>,\n args: {\n multiOwnerPluginAddress?: Address;\n } & GetAccountParameter<TAccount>\n): Promise<\n UpgradeToData & {\n createMAAccount: () => Promise<MultiOwnerModularAccount<TSigner>>;\n }\n> {\n const { account: account_ = client.account, multiOwnerPluginAddress } = args;\n\n if (!account_) {\n throw new AccountNotFoundError();\n }\n const account = account_ as SmartContractAccountWithSigner<string, TSigner>;\n\n const chain = client.chain;\n if (!chain) {\n throw new ChainNotFoundError();\n }\n\n const initData = await getMAInitializationData({\n client,\n multiOwnerPluginAddress,\n signerAddress: await account.getSigner().getAddress(),\n });\n\n return {\n ...initData,\n createMAAccount: async () =>\n createMultiOwnerModularAccount({\n transport: custom(client.transport),\n chain: chain as Chain,\n signer: account.getSigner(),\n accountAddress: account.address,\n }),\n };\n}\n\nexport async function getMAInitializationData<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n>({\n client,\n multiOwnerPluginAddress,\n signerAddress,\n}: {\n multiOwnerPluginAddress?: Address;\n client: SmartAccountClient<TTransport, TChain, TAccount>;\n signerAddress: Address | Address[];\n}): Promise<UpgradeToData> {\n if (!client.chain) {\n throw new ChainNotFoundError();\n }\n\n const factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(\n client.chain\n );\n\n const implAddress = await client.readContract({\n abi: MultiOwnerModularAccountFactoryAbi,\n address: factoryAddress,\n functionName: \"IMPL\",\n });\n\n const multiOwnerAddress =\n multiOwnerPluginAddress ?? MultiOwnerPlugin.meta.addresses[client.chain.id];\n\n if (!multiOwnerAddress) {\n throw new Error(\"could not get multi owner plugin address\");\n }\n\n const moPluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: multiOwnerAddress,\n functionName: \"pluginManifest\",\n });\n\n const hashedMultiOwnerPluginManifest = keccak256(\n encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: moPluginManifest,\n })\n );\n\n const encodedOwner = encodeAbiParameters(\n parseAbiParameters(\"address[]\"),\n Array.isArray(signerAddress) ? [signerAddress] : [[signerAddress]]\n );\n\n const encodedPluginInitData = encodeAbiParameters(\n parseAbiParameters(\"bytes32[], bytes[]\"),\n [[hashedMultiOwnerPluginManifest], [encodedOwner]]\n );\n\n const encodedMSCAInitializeData = encodeFunctionData({\n abi: UpgradeableModularAccountAbi,\n functionName: \"initialize\",\n args: [[multiOwnerAddress], encodedPluginInitData],\n });\n\n return {\n implAddress,\n initializationData: encodedMSCAInitializeData,\n };\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/msca/utils.ts"],"names":[],"mappings":";;;AAAA,uCASsB;AACtB,8CAW4B;AAE5B,+BAOc;AACd,kDAA+C;AAC/C,kGAA+F;AAC/F,sFAAmF;AACnF,yEAGwC;AACxC,+DAAmE;AAS5D,MAAM,8CAA8C,GAAG,CAC5D,KAAY,EACH,EAAE;IACX,QAAQ,KAAK,CAAC,EAAE,EAAE,CAAC;QACjB,KAAK,eAAO,CAAC,EAAE,CAAC;QAChB,KAAK,mBAAW,CAAC,EAAE,CAAC;QACpB,KAAK,eAA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AAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CACnE,CAAC;IAEF,MAAM,qBAAqB,GAAG,IAAA,0BAAmB,EAC/C,IAAA,yBAAkB,EAAC,oBAAoB,CAAC,EACxC,CAAC,CAAC,8BAA8B,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CACnD,CAAC;IAEF,MAAM,yBAAyB,GAAG,IAAA,yBAAkB,EAAC;QACnD,GAAG,EAAE,2DAA4B;QACjC,YAAY,EAAE,YAAY;QAC1B,IAAI,EAAE,CAAC,CAAC,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;KACnD,CAAC,CAAC;IAEH,OAAO;QACL,WAAW;QACX,kBAAkB,EAAE,yBAAyB;KAC9C,CAAC;AACJ,CAAC;AAtED,0DAsEC","sourcesContent":["import {\n AccountNotFoundError,\n ChainNotFoundError,\n type GetAccountParameter,\n type SmartAccountClient,\n type SmartAccountSigner,\n type SmartContractAccount,\n type SmartContractAccountWithSigner,\n type UpgradeToData,\n} from \"@aa-sdk/core\";\nimport {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n sepolia,\n} from \"@account-kit/infra\";\nimport type { Address, Chain, Transport } from \"viem\";\nimport {\n custom,\n encodeAbiParameters,\n encodeFunctionData,\n encodeFunctionResult,\n keccak256,\n parseAbiParameters,\n} from \"viem\";\nimport { IPluginAbi } from \"./abis/IPlugin.js\";\nimport { MultiOwnerModularAccountFactoryAbi } from \"./abis/MultiOwnerModularAccountFactory.js\";\nimport { UpgradeableModularAccountAbi } from \"./abis/UpgradeableModularAccount.js\";\nimport {\n createMultiOwnerModularAccount,\n type MultiOwnerModularAccount,\n} from \"./account/multiOwnerAccount.js\";\nimport { MultiOwnerPlugin } from \"./plugins/multi-owner/plugin.js\";\n\n/**\n * Utility method returning the default multi sig msca factory address given a {@link Chain} object\n *\n * @param chain a {@link Chain} object\n * @returns a {@link Address} for the given chain\n * @throws if the chain doesn't have an address currently deployed\n */\nexport const getDefaultMultisigModularAccountFactoryAddress = (\n chain: Chain\n): Address => {\n switch (chain.id) {\n case sepolia.id:\n case baseSepolia.id:\n case polygon.id:\n case mainnet.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n default:\n return \"0x000000000000204327E6669f00901a57CE15aE15\";\n }\n};\n\n/**\n * Utility method returning the default multi owner msca factory address given a {@link Chain} object\n *\n * @param chain - a {@link Chain} object\n * @returns a {@link Address} for the given chain\n * @throws if the chain doesn't have an address currently deployed\n */\nexport const getDefaultMultiOwnerModularAccountFactoryAddress = (\n chain: Chain\n): Address => {\n switch (chain.id) {\n default:\n return \"0x000000e92D78D90000007F0082006FDA09BD5f11\";\n }\n};\n\nexport type GetMSCAUpgradeToData<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends\n | SmartContractAccountWithSigner<string, TSigner>\n | undefined = SmartContractAccountWithSigner<string, TSigner> | undefined\n> = {\n multiOwnerPluginAddress?: Address;\n} & GetAccountParameter<TAccount>;\n\n/**\n * Retrieves the data necessary to upgrade to a Multi-Signature Contract Account (MSCA) and provides a method to create a Multi-Owner Modular Account.\n *\n * @example\n * ```ts\n * import { createLightAccountClient, getMSCAUpgradeToData } from \"@account-kit/smart-contracts\";\n *\n * const client = createLightAccountClient(...);\n * const upgradeData = await getMSCAUpgradeToData(client, {});\n * ```\n *\n * @param {SmartAccountClient<TTransport, TChain, TAccount>} client The smart account client\n * @param {GetMSCAUpgradeToData<TSigner, TAccount>} args The arguments required for the upgrade\n * @returns {Promise<UpgradeToData & { createMAAccount: () => Promise<MultiOwnerModularAccount<TSigner>>}>} A promise that resolves to upgrade data augmented with a function to create a Multi-Owner Modular Account\n */\nexport async function getMSCAUpgradeToData<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends\n | SmartContractAccountWithSigner<string, TSigner>\n | undefined = SmartContractAccountWithSigner<string, TSigner> | undefined\n>(\n client: SmartAccountClient<TTransport, TChain, TAccount>,\n args: GetMSCAUpgradeToData<TSigner, TAccount>\n): Promise<\n UpgradeToData & {\n createMAAccount: () => Promise<MultiOwnerModularAccount<TSigner>>;\n }\n> {\n const { account: account_ = client.account, multiOwnerPluginAddress } = args;\n\n if (!account_) {\n throw new AccountNotFoundError();\n }\n const account = account_ as SmartContractAccountWithSigner<string, TSigner>;\n\n const chain = client.chain;\n if (!chain) {\n throw new ChainNotFoundError();\n }\n\n const initData = await getMAInitializationData({\n client,\n multiOwnerPluginAddress,\n signerAddress: await account.getSigner().getAddress(),\n });\n\n return {\n ...initData,\n createMAAccount: async () =>\n createMultiOwnerModularAccount({\n transport: custom(client.transport),\n chain: chain as Chain,\n signer: account.getSigner(),\n accountAddress: account.address,\n }),\n };\n}\n\nexport type GetMAInitializationDataParams<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n> = {\n multiOwnerPluginAddress?: Address;\n client: SmartAccountClient<TTransport, TChain, TAccount>;\n signerAddress: Address | Address[];\n};\n\n/**\n * Retrieves the initialization data for a multi-owner modular account. Throws an error if the client's chain is not found or if the multi-owner plugin address is not retrievable.\n *\n * @example\n * ```ts\n * import { getMAInitializationData } from \"@account-kit/smart-contracts\";\n * import { createSmartAccountClient } from \"@aa-sdk/core\";\n *\n * const client = createSmartAccountClient(...);\n * const initializationData = await getMAInitializationData({\n * client,\n * signerAddress: \"0x...\", // or array of signers\n * });\n * ```\n *\n * @param {GetMAInitializationDataParams<TTransport, TChain, TAccount>} params the parameters for getting initialization data\n * @param {SmartAccountClient<TTransport, TChain, TAccount>} params.client the smart account client\n * @param {Address | Address[]} params.signerAddress the address of the signer or an array of signer addresses\n * @param {Address} [params.multiOwnerPluginAddress] optional address of the multi-owner plugin\n * @returns {Promise<UpgradeToData>} a promise that resolves to the initialization data required for upgrading to a multi-owner modular account\n */\nexport async function getMAInitializationData<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n>({\n client,\n multiOwnerPluginAddress,\n signerAddress,\n}: GetMAInitializationDataParams<\n TTransport,\n TChain,\n TAccount\n>): Promise<UpgradeToData> {\n if (!client.chain) {\n throw new ChainNotFoundError();\n }\n\n const factoryAddress = getDefaultMultiOwnerModularAccountFactoryAddress(\n client.chain\n );\n\n const implAddress = await client.readContract({\n abi: MultiOwnerModularAccountFactoryAbi,\n address: factoryAddress,\n functionName: \"IMPL\",\n });\n\n const multiOwnerAddress =\n multiOwnerPluginAddress ?? MultiOwnerPlugin.meta.addresses[client.chain.id];\n\n if (!multiOwnerAddress) {\n throw new Error(\"could not get multi owner plugin address\");\n }\n\n const moPluginManifest = await client.readContract({\n abi: IPluginAbi,\n address: multiOwnerAddress,\n functionName: \"pluginManifest\",\n });\n\n const hashedMultiOwnerPluginManifest = keccak256(\n encodeFunctionResult({\n abi: IPluginAbi,\n functionName: \"pluginManifest\",\n result: moPluginManifest,\n })\n );\n\n const encodedOwner = encodeAbiParameters(\n parseAbiParameters(\"address[]\"),\n Array.isArray(signerAddress) ? [signerAddress] : [[signerAddress]]\n );\n\n const encodedPluginInitData = encodeAbiParameters(\n parseAbiParameters(\"bytes32[], bytes[]\"),\n [[hashedMultiOwnerPluginManifest], [encodedOwner]]\n );\n\n const encodedMSCAInitializeData = encodeFunctionData({\n abi: UpgradeableModularAccountAbi,\n functionName: \"initialize\",\n args: [[multiOwnerAddress], encodedPluginInitData],\n });\n\n return {\n implAddress,\n initializationData: encodedMSCAInitializeData,\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { arbitrum, arbitrumSepolia, base, baseSepolia, fraxtal, fraxtalSepolia, mainnet, optimism, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "@aa-sdk/core";
1
+ import { arbitrum, arbitrumSepolia, base, baseSepolia, fraxtal, fraxtalSepolia, mainnet, optimism, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "@account-kit/infra";
2
2
  import { parseAbiParameters } from "viem";
3
3
  import { MultiOwnerPluginAbi } from "./abi.js";
4
4
  export const MultiOwnerPluginGenConfig = {
@@ -15,7 +15,6 @@ export const MultiOwnerPluginGenConfig = {
15
15
  [arbitrum.id]: "0xcE0000007B008F50d762D155002600004cD6c647",
16
16
  [arbitrumSepolia.id]: "0xcE0000007B008F50d762D155002600004cD6c647",
17
17
  [base.id]: "0xcE0000007B008F50d762D155002600004cD6c647",
18
- [baseSepolia.id]: "0xcE0000007B008F50d762D155002600004cD6c647",
19
18
  [fraxtal.id]: "0xcE0000007B008F50d762D155002600004cD6c647",
20
19
  [fraxtalSepolia.id]: "0xcE0000007B008F50d762D155002600004cD6c647",
21
20
  [zora.id]: "0xcE0000007B008F50d762D155002600004cD6c647",
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../plugindefs/multi-owner/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,WAAW,EACX,OAAO,EACP,cAAc,EACd,OAAO,EACP,QAAQ,EACR,eAAe,EACf,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,IAAI,EACJ,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,CAAC,MAAM,yBAAyB,GAAiB;IACrD,IAAI,EAAE,kBAAkB;IACxB,GAAG,EAAE,mBAAmB;IACxB,SAAS,EAAE;QACT,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC1D,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC1D,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAChE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC3D,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAClE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC3D,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAClE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,4CAA4C;QACvD,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC1D,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,4CAA4C;QACjE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,4CAA4C;QACvD,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;KAC3D;IACD,aAAa,EAAE;QACb,aAAa,EAAE,kBAAkB,CAAC,WAAW,CAAC;KAC/C;CACF,CAAC","sourcesContent":["import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n zora,\n zoraSepolia,\n} from \"@aa-sdk/core\";\nimport type { PluginConfig } from \"@account-kit/plugingen\";\nimport { parseAbiParameters } from \"viem\";\nimport { MultiOwnerPluginAbi } from \"./abi.js\";\n\nexport const MultiOwnerPluginGenConfig: PluginConfig = {\n name: \"MultiOwnerPlugin\",\n abi: MultiOwnerPluginAbi,\n addresses: {\n [sepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [baseSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [polygon.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [polygonAmoy.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [polygonMumbai.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [optimism.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [optimismSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [arbitrum.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [arbitrumSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [base.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [baseSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [fraxtal.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [fraxtalSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [zora.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [zoraSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [mainnet.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n },\n installConfig: {\n initAbiParams: parseAbiParameters(\"address[]\"),\n },\n};\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../plugindefs/multi-owner/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,WAAW,EACX,OAAO,EACP,cAAc,EACd,OAAO,EACP,QAAQ,EACR,eAAe,EACf,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,IAAI,EACJ,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,CAAC,MAAM,yBAAyB,GAAiB;IACrD,IAAI,EAAE,kBAAkB;IACxB,GAAG,EAAE,mBAAmB;IACxB,SAAS,EAAE;QACT,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC1D,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC1D,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAChE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC3D,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAClE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC3D,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAClE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,4CAA4C;QACvD,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC1D,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,4CAA4C;QACjE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,4CAA4C;QACvD,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;KAC3D;IACD,aAAa,EAAE;QACb,aAAa,EAAE,kBAAkB,CAAC,WAAW,CAAC;KAC/C;CACF,CAAC","sourcesContent":["import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n zora,\n zoraSepolia,\n} from \"@account-kit/infra\";\nimport type { PluginConfig } from \"@account-kit/plugingen\";\nimport { parseAbiParameters } from \"viem\";\nimport { MultiOwnerPluginAbi } from \"./abi.js\";\n\nexport const MultiOwnerPluginGenConfig: PluginConfig = {\n name: \"MultiOwnerPlugin\",\n abi: MultiOwnerPluginAbi,\n addresses: {\n [sepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [baseSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [polygon.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [polygonAmoy.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [polygonMumbai.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [optimism.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [optimismSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [arbitrum.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [arbitrumSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [base.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [fraxtal.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [fraxtalSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [zora.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [zoraSepolia.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n [mainnet.id]: \"0xcE0000007B008F50d762D155002600004cD6c647\",\n },\n installConfig: {\n initAbiParams: parseAbiParameters(\"address[]\"),\n },\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { arbitrum, arbitrumSepolia, base, baseSepolia, fraxtal, fraxtalSepolia, mainnet, optimism, optimismSepolia, polygon, polygonAmoy, sepolia, zora, zoraSepolia, } from "@aa-sdk/core";
1
+ import { arbitrum, arbitrumSepolia, base, baseSepolia, fraxtal, fraxtalSepolia, mainnet, optimism, optimismSepolia, polygon, polygonAmoy, sepolia, zora, zoraSepolia, } from "@account-kit/infra";
2
2
  import { parseAbiParameters } from "viem";
3
3
  import { MultisigPluginAbi } from "./abi.js";
4
4
  export const MultisigPluginGenConfig = {
@@ -1 +1 @@
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a,EAAE,kBAAkB,CAAC,iBAAiB,CAAC;KACrD;CACF,CAAC","sourcesContent":["import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n sepolia,\n zora,\n zoraSepolia,\n} from \"@aa-sdk/core\";\nimport type { PluginConfig } from \"@account-kit/plugingen\";\nimport { parseAbiParameters } from \"viem\";\nimport { MultisigPluginAbi } from \"./abi.js\";\n\nexport const MultisigPluginGenConfig: PluginConfig = {\n name: \"MultisigPlugin\",\n abi: MultisigPluginAbi,\n addresses: {\n [sepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [baseSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [polygon.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [mainnet.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [polygonAmoy.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [optimism.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [optimismSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [arbitrum.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [arbitrumSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [base.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [fraxtal.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [fraxtalSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [zora.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [zoraSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n },\n installConfig: {\n initAbiParams: parseAbiParameters(\"address[], uint\"),\n },\n};\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","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B,CAAC;KACrD;CACF,CAAC","sourcesContent":["import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n sepolia,\n zora,\n zoraSepolia,\n} from \"@account-kit/infra\";\nimport type { PluginConfig } from \"@account-kit/plugingen\";\nimport { parseAbiParameters } from \"viem\";\nimport { MultisigPluginAbi } from \"./abi.js\";\n\nexport const MultisigPluginGenConfig: PluginConfig = {\n name: \"MultisigPlugin\",\n abi: MultisigPluginAbi,\n addresses: {\n [sepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [baseSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [polygon.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [mainnet.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [polygonAmoy.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [optimism.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [optimismSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [arbitrum.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [arbitrumSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [base.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [fraxtal.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [fraxtalSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [zora.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n [zoraSepolia.id]: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\",\n },\n installConfig: {\n initAbiParams: parseAbiParameters(\"address[], uint\"),\n },\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { arbitrum, arbitrumSepolia, base, baseSepolia, fraxtal, fraxtalSepolia, mainnet, optimism, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "@aa-sdk/core";
1
+ import { arbitrum, arbitrumSepolia, base, baseSepolia, fraxtal, fraxtalSepolia, mainnet, optimism, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "@account-kit/infra";
2
2
  import { parseAbiParameters } from "viem";
3
3
  import { MultiOwnerPluginGenConfig } from "../multi-owner/config.js";
4
4
  import { SessionKeyPluginAbi } from "./abi.js";
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../plugindefs/session-key/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,WAAW,EACX,OAAO,EACP,cAAc,EACd,OAAO,EACP,QAAQ,EACR,eAAe,EACf,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,IAAI,EACJ,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,CAAC,MAAM,yBAAyB,GAAiB;IACrD,IAAI,EAAE,kBAAkB;IACxB,GAAG,EAAE,mBAAmB;IACxB,SAAS,EAAE;QACT,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC1D,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC1D,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAChE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC3D,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAClE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC3D,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAClE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,4CAA4C;QACvD,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC1D,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,4CAA4C;QACjE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,4CAA4C;QACvD,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,4CAA4C;QAC9D,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,4CAA4C;KAC3D;IACD,aAAa,EAAE;QACb,aAAa,EAAE,kBAAkB,CAC/B,qEAAqE,CACtE;QACD,YAAY,EAAE;YACZ;gBACE,MAAM,EAAE,yBAAyB;gBACjC,UAAU,EAAE,KAAK;aAClB;YACD;gBACE,MAAM,EAAE,yBAAyB;gBACjC,UAAU,EAAE,KAAK;aAClB;SACF;KACF;CACF,CAAC","sourcesContent":["import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n zora,\n zoraSepolia,\n} from \"@aa-sdk/core\";\nimport type { PluginConfig } from \"@account-kit/plugingen\";\nimport { parseAbiParameters } from \"viem\";\nimport { MultiOwnerPluginGenConfig } from \"../multi-owner/config.js\";\nimport { SessionKeyPluginAbi } from \"./abi.js\";\n\nexport const SessionKeyPluginGenConfig: PluginConfig = {\n name: \"SessionKeyPlugin\",\n abi: SessionKeyPluginAbi,\n addresses: {\n [sepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [baseSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [polygon.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [polygonAmoy.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [polygonMumbai.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [optimism.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [optimismSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [arbitrum.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [arbitrumSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [base.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [baseSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [fraxtal.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [fraxtalSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [zora.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [zoraSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [mainnet.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n },\n installConfig: {\n initAbiParams: parseAbiParameters(\n \"address[] initialKeys, bytes32[] tags, bytes[][] initialPermissions\"\n ),\n dependencies: [\n {\n plugin: MultiOwnerPluginGenConfig,\n functionId: \"0x0\",\n },\n {\n plugin: MultiOwnerPluginGenConfig,\n functionId: \"0x1\",\n },\n ],\n },\n};\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../plugindefs/session-key/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,WAAW,EACX,OAAO,EACP,cAAc,EACd,OAAO,EACP,QAAQ,EACR,eAAe,EACf,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,IAAI,EACJ,WAAW,GACZ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BACjC,UAAU,EAAE,KAAK;aAClB;YACD;gBACE,MAAM,EAAE,yBAAyB;gBACjC,UAAU,EAAE,KAAK;aAClB;SACF;KACF;CACF,CAAC","sourcesContent":["import {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n zora,\n zoraSepolia,\n} from \"@account-kit/infra\";\nimport type { PluginConfig } from \"@account-kit/plugingen\";\nimport { parseAbiParameters } from \"viem\";\nimport { MultiOwnerPluginGenConfig } from \"../multi-owner/config.js\";\nimport { SessionKeyPluginAbi } from \"./abi.js\";\n\nexport const SessionKeyPluginGenConfig: PluginConfig = {\n name: \"SessionKeyPlugin\",\n abi: SessionKeyPluginAbi,\n addresses: {\n [sepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [baseSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [polygon.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [polygonAmoy.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [polygonMumbai.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [optimism.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [optimismSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [arbitrum.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [arbitrumSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [base.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [baseSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [fraxtal.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [fraxtalSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [zora.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [zoraSepolia.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n [mainnet.id]: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\",\n },\n installConfig: {\n initAbiParams: parseAbiParameters(\n \"address[] initialKeys, bytes32[] tags, bytes[][] initialPermissions\"\n ),\n dependencies: [\n {\n plugin: MultiOwnerPluginGenConfig,\n functionId: \"0x0\",\n },\n {\n plugin: MultiOwnerPluginGenConfig,\n functionId: \"0x1\",\n },\n ],\n },\n};\n"]}
@@ -36,14 +36,14 @@ export { InvalidAggregatedSignatureError, InvalidContextSignatureError, Multisig
36
36
  export type * from "./msca/plugin-manager/decorator.js";
37
37
  export { pluginManagerActions } from "./msca/plugin-manager/decorator.js";
38
38
  export { installPlugin } from "./msca/plugin-manager/installPlugin.js";
39
+ export { multiOwnerPluginActions } from "./msca/plugins/multi-owner/extension.js";
39
40
  export type * from "./msca/plugins/multi-owner/index.js";
40
- export { multiOwnerPluginActions } from "./msca/plugins/multi-owner/index.js";
41
41
  export { MultiOwnerPlugin, MultiOwnerPluginAbi, MultiOwnerPluginExecutionFunctionAbi, } from "./msca/plugins/multi-owner/plugin.js";
42
42
  export type * from "./msca/plugins/multisig/index.js";
43
- export { MultisigPlugin, MultisigPluginAbi, MultisigPluginExecutionFunctionAbi, multisigPluginActions, multisigSignatureMiddleware, type SignerType, } from "./msca/plugins/multisig/index.js";
43
+ export { MultisigPlugin, MultisigPluginAbi, MultisigPluginExecutionFunctionAbi, multisigPluginActions, multisigSignatureMiddleware, } from "./msca/plugins/multisig/index.js";
44
44
  export { combineSignatures, formatSignatures, getSignerType, splitAggregatedSignature, } from "./msca/plugins/multisig/utils/index.js";
45
+ export { sessionKeyPluginActions } from "./msca/plugins/session-key/extension.js";
45
46
  export type * from "./msca/plugins/session-key/index.js";
46
- export { sessionKeyPluginActions } from "./msca/plugins/session-key/index.js";
47
47
  export type * from "./msca/plugins/session-key/permissions.js";
48
48
  export { SessionKeyAccessListType, SessionKeyPermissionsBuilder, } from "./msca/plugins/session-key/permissions.js";
49
49
  export { SessionKeyPlugin, SessionKeyPluginAbi, SessionKeyPluginExecutionFunctionAbi, } from "./msca/plugins/session-key/plugin.js";
@@ -26,11 +26,11 @@ export { createMultisigAccountAlchemyClient, } from "./msca/client/multiSigAlche
26
26
  export { InvalidAggregatedSignatureError, InvalidContextSignatureError, MultisigAccountExpectedError, MultisigMissingSignatureError, } from "./msca/errors.js";
27
27
  export { pluginManagerActions } from "./msca/plugin-manager/decorator.js";
28
28
  export { installPlugin } from "./msca/plugin-manager/installPlugin.js";
29
- export { multiOwnerPluginActions } from "./msca/plugins/multi-owner/index.js";
29
+ export { multiOwnerPluginActions } from "./msca/plugins/multi-owner/extension.js";
30
30
  export { MultiOwnerPlugin, MultiOwnerPluginAbi, MultiOwnerPluginExecutionFunctionAbi, } from "./msca/plugins/multi-owner/plugin.js";
31
31
  export { MultisigPlugin, MultisigPluginAbi, MultisigPluginExecutionFunctionAbi, multisigPluginActions, multisigSignatureMiddleware, } from "./msca/plugins/multisig/index.js";
32
32
  export { combineSignatures, formatSignatures, getSignerType, splitAggregatedSignature, } from "./msca/plugins/multisig/utils/index.js";
33
- export { sessionKeyPluginActions } from "./msca/plugins/session-key/index.js";
33
+ export { sessionKeyPluginActions } from "./msca/plugins/session-key/extension.js";
34
34
  export { SessionKeyAccessListType, SessionKeyPermissionsBuilder, } from "./msca/plugins/session-key/permissions.js";
35
35
  export { SessionKeyPlugin, SessionKeyPluginAbi, SessionKeyPluginExecutionFunctionAbi, } from "./msca/plugins/session-key/plugin.js";
36
36
  export { SessionKeySigner } from "./msca/plugins/session-key/signer.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,iBAAiB,IAAI,6B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AC;AACxC,OAAO,EACL,oCAAoC,EACpC,kCAAkC,GACnC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kCAAkC,GAEnC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oCAAoC,GACrC,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,kCAAkC,EAClC,qBAAqB,EACrB,2BAA2B,GAE5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,wBAAwB,GACzB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,OAAO,EACL,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oCAAoC,GACrC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,OAAO,EACL,gDAAgD,EAChD,8CAA8C,EAC9C,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC","sourcesContent":["// Add you exports here, make sure to export types separately from impls and use the `type` keyword when exporting them\n// Don't use wildcard exports, instead use named exports\n\n//light-account exports\nexport type * from \"./light-account/accounts/account.js\";\nexport { createLightAccount } from \"./light-account/accounts/account.js\";\nexport { transferOwnership as transferLightAccountOwnership } from \"./light-account/actions/transferOwnership.js\";\nexport {\n createLightAccountAlchemyClient,\n type AlchemyLightAccountClientConfig,\n} from \"./light-account/clients/alchemyClient.js\";\nexport { createLightAccountClient } from \"./light-account/clients/client.js\";\nexport {\n createMultiOwnerLightAccountAlchemyClient,\n type AlchemyMultiOwnerLightAccountClientConfig,\n} from \"./light-account/clients/multiOwnerAlchemyClient.js\";\nexport type * from \"./light-account/decorators/lightAccount.js\";\nexport { lightAccountClientActions } from \"./light-account/decorators/lightAccount.js\";\nexport type * from \"./light-account/types.js\";\n\nexport {\n AccountVersionRegistry,\n LightAccountUnsupported1271Factories,\n LightAccountUnsupported1271Impls,\n defaultLightAccountVersion,\n getDefaultLightAccountFactoryAddress,\n getLightAccountVersionDef,\n} from \"./light-account/utils.js\";\n\n//multi-owner-light-account exports\nexport type * from \"./light-account/accounts/multiOwner.js\";\nexport { createMultiOwnerLightAccount } from \"./light-account/accounts/multiOwner.js\";\nexport { updateOwners as updateMultiOwnerLightAccountOwners } from \"./light-account/actions/updateOwners.js\";\nexport { createMultiOwnerLightAccountClient } from \"./light-account/clients/multiOwnerLightAccount.js\";\nexport type * from \"./light-account/decorators/multiOwnerLightAccount.js\";\nexport { multiOwnerLightAccountClientActions } from \"./light-account/decorators/multiOwnerLightAccount.js\";\n\n// msca exports\nexport { IAccountLoupeAbi } from \"./msca/abis/IAccountLoupe.js\";\nexport { IPluginAbi } from \"./msca/abis/IPlugin.js\";\nexport { IPluginManagerAbi } from \"./msca/abis/IPluginManager.js\";\nexport { IStandardExecutorAbi } from \"./msca/abis/IStandardExecutor.js\";\nexport { MultiOwnerModularAccountFactoryAbi } from \"./msca/abis/MultiOwnerModularAccountFactory.js\";\nexport { MultisigModularAccountFactoryAbi } from \"./msca/abis/MultisigModularAccountFactory.js\";\nexport { UpgradeableModularAccountAbi } from \"./msca/abis/UpgradeableModularAccount.js\";\nexport type * from \"./msca/account-loupe/decorator.js\";\nexport { accountLoupeActions } from \"./msca/account-loupe/decorator.js\";\nexport type * from \"./msca/account-loupe/types.js\";\nexport type * from \"./msca/account/multiOwnerAccount.js\";\nexport { createMultiOwnerModularAccount } from \"./msca/account/multiOwnerAccount.js\";\nexport type * from \"./msca/account/multisigAccount.js\";\nexport { createMultisigModularAccount } from \"./msca/account/multisigAccount.js\";\nexport { standardExecutor } from \"./msca/account/standardExecutor.js\";\nexport {\n createModularAccountAlchemyClient,\n type AlchemyModularAccountClientConfig,\n} from \"./msca/client/alchemyClient.js\";\nexport {\n createMultiOwnerModularAccountClient,\n createMultisigModularAccountClient,\n} from \"./msca/client/client.js\";\nexport {\n createMultisigAccountAlchemyClient,\n type AlchemyMultisigAccountClientConfig,\n} from \"./msca/client/multiSigAlchemyClient.js\";\nexport {\n InvalidAggregatedSignatureError,\n InvalidContextSignatureError,\n MultisigAccountExpectedError,\n MultisigMissingSignatureError,\n} from \"./msca/errors.js\";\nexport type * from \"./msca/plugin-manager/decorator.js\";\nexport { pluginManagerActions } from \"./msca/plugin-manager/decorator.js\";\nexport { installPlugin } from \"./msca/plugin-manager/installPlugin.js\";\nexport type * from \"./msca/plugins/multi-owner/index.js\";\nexport { multiOwnerPluginActions } from \"./msca/plugins/multi-owner/index.js\";\nexport {\n MultiOwnerPlugin,\n MultiOwnerPluginAbi,\n MultiOwnerPluginExecutionFunctionAbi,\n} from \"./msca/plugins/multi-owner/plugin.js\";\nexport type * from \"./msca/plugins/multisig/index.js\";\nexport {\n MultisigPlugin,\n MultisigPluginAbi,\n MultisigPluginExecutionFunctionAbi,\n multisigPluginActions,\n multisigSignatureMiddleware,\n type SignerType,\n} from \"./msca/plugins/multisig/index.js\";\nexport {\n combineSignatures,\n formatSignatures,\n getSignerType,\n splitAggregatedSignature,\n} from \"./msca/plugins/multisig/utils/index.js\";\nexport type * from \"./msca/plugins/session-key/index.js\";\nexport { sessionKeyPluginActions } from \"./msca/plugins/session-key/index.js\";\nexport type * from \"./msca/plugins/session-key/permissions.js\";\nexport {\n SessionKeyAccessListType,\n SessionKeyPermissionsBuilder,\n} from \"./msca/plugins/session-key/permissions.js\";\nexport {\n SessionKeyPlugin,\n SessionKeyPluginAbi,\n SessionKeyPluginExecutionFunctionAbi,\n} from \"./msca/plugins/session-key/plugin.js\";\nexport { SessionKeySigner } from \"./msca/plugins/session-key/signer.js\";\nexport { buildSessionKeysToRemoveStruct } from \"./msca/plugins/session-key/utils.js\";\nexport type * from \"./msca/plugins/types.js\";\nexport {\n getDefaultMultiOwnerModularAccountFactoryAddress,\n getDefaultMultisigModularAccountFactoryAddress,\n getMAInitializationData,\n getMSCAUpgradeToData,\n} from \"./msca/utils.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,iBAAiB,IAAI,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAClH,OAAO,EACL,+BAA+B,GAEhC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EACL,yCAAyC,GAE1C,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAGvF,OAAO,EACL,sBAAsB,EACtB,oCAAoC,EACpC,gCAAgC,EAChC,0BAA0B,EAC1B,oCAAoC,EACpC,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,YAAY,IAAI,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7G,OAAO,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAEvG,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAG3G,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,UAA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AE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAGlF,OAAO,EACL,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oCAAoC,GACrC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAErF,OAAO,EACL,gDAAgD,EAChD,8CAA8C,EAC9C,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC","sourcesContent":["// Add you exports here, make sure to export types separately from impls and use the `type` keyword when exporting them\n// Don't use wildcard exports, instead use named exports\n\n//light-account exports\nexport type * from \"./light-account/accounts/account.js\";\nexport { createLightAccount } from \"./light-account/accounts/account.js\";\nexport { transferOwnership as transferLightAccountOwnership } from \"./light-account/actions/transferOwnership.js\";\nexport {\n createLightAccountAlchemyClient,\n type AlchemyLightAccountClientConfig,\n} from \"./light-account/clients/alchemyClient.js\";\nexport { createLightAccountClient } from \"./light-account/clients/client.js\";\nexport {\n createMultiOwnerLightAccountAlchemyClient,\n type AlchemyMultiOwnerLightAccountClientConfig,\n} from \"./light-account/clients/multiOwnerAlchemyClient.js\";\nexport type * from \"./light-account/decorators/lightAccount.js\";\nexport { lightAccountClientActions } from \"./light-account/decorators/lightAccount.js\";\nexport type * from \"./light-account/types.js\";\n\nexport {\n AccountVersionRegistry,\n LightAccountUnsupported1271Factories,\n LightAccountUnsupported1271Impls,\n defaultLightAccountVersion,\n getDefaultLightAccountFactoryAddress,\n getLightAccountVersionDef,\n} from \"./light-account/utils.js\";\n\n//multi-owner-light-account exports\nexport type * from \"./light-account/accounts/multiOwner.js\";\nexport { createMultiOwnerLightAccount } from \"./light-account/accounts/multiOwner.js\";\nexport { updateOwners as updateMultiOwnerLightAccountOwners } from \"./light-account/actions/updateOwners.js\";\nexport { createMultiOwnerLightAccountClient } from \"./light-account/clients/multiOwnerLightAccount.js\";\nexport type * from \"./light-account/decorators/multiOwnerLightAccount.js\";\nexport { multiOwnerLightAccountClientActions } from \"./light-account/decorators/multiOwnerLightAccount.js\";\n\n// msca exports\nexport { IAccountLoupeAbi } from \"./msca/abis/IAccountLoupe.js\";\nexport { IPluginAbi } from \"./msca/abis/IPlugin.js\";\nexport { IPluginManagerAbi } from \"./msca/abis/IPluginManager.js\";\nexport { IStandardExecutorAbi } from \"./msca/abis/IStandardExecutor.js\";\nexport { MultiOwnerModularAccountFactoryAbi } from \"./msca/abis/MultiOwnerModularAccountFactory.js\";\nexport { MultisigModularAccountFactoryAbi } from \"./msca/abis/MultisigModularAccountFactory.js\";\nexport { UpgradeableModularAccountAbi } from \"./msca/abis/UpgradeableModularAccount.js\";\nexport type * from \"./msca/account-loupe/decorator.js\";\nexport { accountLoupeActions } from \"./msca/account-loupe/decorator.js\";\nexport type * from \"./msca/account-loupe/types.js\";\nexport type * from \"./msca/account/multiOwnerAccount.js\";\nexport { createMultiOwnerModularAccount } from \"./msca/account/multiOwnerAccount.js\";\nexport type * from \"./msca/account/multisigAccount.js\";\nexport { createMultisigModularAccount } from \"./msca/account/multisigAccount.js\";\nexport { standardExecutor } from \"./msca/account/standardExecutor.js\";\nexport {\n createModularAccountAlchemyClient,\n type AlchemyModularAccountClientConfig,\n} from \"./msca/client/alchemyClient.js\";\nexport {\n createMultiOwnerModularAccountClient,\n createMultisigModularAccountClient,\n} from \"./msca/client/client.js\";\nexport {\n createMultisigAccountAlchemyClient,\n type AlchemyMultisigAccountClientConfig,\n} from \"./msca/client/multiSigAlchemyClient.js\";\nexport {\n InvalidAggregatedSignatureError,\n InvalidContextSignatureError,\n MultisigAccountExpectedError,\n MultisigMissingSignatureError,\n} from \"./msca/errors.js\";\nexport type * from \"./msca/plugin-manager/decorator.js\";\nexport { pluginManagerActions } from \"./msca/plugin-manager/decorator.js\";\nexport { installPlugin } from \"./msca/plugin-manager/installPlugin.js\";\nexport { multiOwnerPluginActions } from \"./msca/plugins/multi-owner/extension.js\";\nexport type * from \"./msca/plugins/multi-owner/index.js\";\nexport {\n MultiOwnerPlugin,\n MultiOwnerPluginAbi,\n MultiOwnerPluginExecutionFunctionAbi,\n} from \"./msca/plugins/multi-owner/plugin.js\";\nexport type * from \"./msca/plugins/multisig/index.js\";\nexport {\n MultisigPlugin,\n MultisigPluginAbi,\n MultisigPluginExecutionFunctionAbi,\n multisigPluginActions,\n multisigSignatureMiddleware,\n} from \"./msca/plugins/multisig/index.js\";\nexport {\n combineSignatures,\n formatSignatures,\n getSignerType,\n splitAggregatedSignature,\n} from \"./msca/plugins/multisig/utils/index.js\";\nexport { sessionKeyPluginActions } from \"./msca/plugins/session-key/extension.js\";\nexport type * from \"./msca/plugins/session-key/index.js\";\nexport type * from \"./msca/plugins/session-key/permissions.js\";\nexport {\n SessionKeyAccessListType,\n SessionKeyPermissionsBuilder,\n} from \"./msca/plugins/session-key/permissions.js\";\nexport {\n SessionKeyPlugin,\n SessionKeyPluginAbi,\n SessionKeyPluginExecutionFunctionAbi,\n} from \"./msca/plugins/session-key/plugin.js\";\nexport { SessionKeySigner } from \"./msca/plugins/session-key/signer.js\";\nexport { buildSessionKeysToRemoveStruct } from \"./msca/plugins/session-key/utils.js\";\nexport type * from \"./msca/plugins/types.js\";\nexport {\n getDefaultMultiOwnerModularAccountFactoryAddress,\n getDefaultMultisigModularAccountFactoryAddress,\n getMAInitializationData,\n getMSCAUpgradeToData,\n} from \"./msca/utils.js\";\n"]}
@@ -4,12 +4,12 @@ import { LightAccountAbi_v1 } from "../abis/LightAccountAbi_v1.js";
4
4
  import { LightAccountAbi_v2 } from "../abis/LightAccountAbi_v2.js";
5
5
  import { LightAccountFactoryAbi_v1 } from "../abis/LightAccountFactoryAbi_v1.js";
6
6
  import { LightAccountFactoryAbi_v2 } from "../abis/LightAccountFactoryAbi_v2.js";
7
- import { AccountVersionRegistry, LightAccountUnsupported1271Factories, defaultLightAccountVersion, } from "../utils.js";
7
+ import { AccountVersionRegistry, LightAccountUnsupported1271Factories, defaultLightAccountVersion, getDefaultLightAccountFactoryAddress, } from "../utils.js";
8
8
  import { createLightAccountBase, } from "./base.js";
9
9
  export async function createLightAccount({ transport, chain, signer, initCode, version = defaultLightAccountVersion("LightAccount"), entryPoint = getEntryPoint(chain, {
10
10
  version: AccountVersionRegistry["LightAccount"][version]
11
11
  .entryPointVersion,
12
- }), accountAddress, factoryAddress = AccountVersionRegistry["LightAccount"][version].address[chain.id].factory, salt: salt_ = 0n, }) {
12
+ }), accountAddress, factoryAddress = getDefaultLightAccountFactoryAddress(chain, version), salt: salt_ = 0n, }) {
13
13
  const client = createBundlerClient({
14
14
  transport,
15
15
  chain,
@@ -1 +1 @@
1
- {"version":3,"file":"account.js","sourceRoot":"","sources":["../../../../../src/light-account/accounts/account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,GAId,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,EACT,kBAAkB,GAInB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAKjF,OAAO,EACL,sBAAsB,EACtB,oCAAoC,EACpC,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,GAGvB,MAAM,WAAW,CAAC;AAwEnB,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EACvC,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,OAAO,GAAG,0BAA0B,CAAC,cAAc,CAAC,EACpD,UAAU,GAAG,aAAa,CAAC,KAAK,EAAE;IAChC,OAAO,EAAE,sBAAsB,CAAC,cAAc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QACV,cAAc,EAAE,OAAO;QACvB,kBAAkB;KACnB,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,OAAO;QAEV,uBAAuB,EAAE,CAAC,QAAiB,EAAE,EAAE;YAC7C,OAAO,kBAAkB,CAAC;gBACxB,GAAG,EAAE,UAAU;gBACf,YAAY,EAAE,mBAAmB;gBACjC,IAAI,EAAE,CAAC,QAAQ,CAAC;aACjB,CAAC,CAAC;QACL,CAAC;QACD,KAAK,CAAC,eAAe;YACnB,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC;gBAC3C,OAAO;gBACP,GAAG,EAAE,UAAU;gBACf,YAAY,EAAE,OAAO;aACtB,CAAC,CAAC;YAEH,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;YAClD,CAAC;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import {\n createBundlerClient,\n getAccountAddress,\n getEntryPoint,\n type Address,\n type EntryPointDef,\n type SmartAccountSigner,\n} from \"@aa-sdk/core\";\nimport {\n concatHex,\n encodeFunctionData,\n type Chain,\n type Hex,\n type Transport,\n} from \"viem\";\nimport { LightAccountAbi_v1 } from \"../abis/LightAccountAbi_v1.js\";\nimport { LightAccountAbi_v2 } from \"../abis/LightAccountAbi_v2.js\";\nimport { LightAccountFactoryAbi_v1 } from \"../abis/LightAccountFactoryAbi_v1.js\";\nimport { LightAccountFactoryAbi_v2 } from \"../abis/LightAccountFactoryAbi_v2.js\";\nimport type {\n GetEntryPointForLightAccountVersion,\n GetLightAccountVersion,\n} from \"../types.js\";\nimport {\n AccountVersionRegistry,\n LightAccountUnsupported1271Factories,\n defaultLightAccountVersion,\n} from \"../utils.js\";\nimport {\n createLightAccountBase,\n type CreateLightAccountBaseParams,\n type LightAccountBase,\n} from \"./base.js\";\n\nexport type LightAccount<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"LightAccount\"> = GetLightAccountVersion<\"LightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"LightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\"LightAccount\", TLightAccountVersion>\n> = LightAccountBase<\n TSigner,\n \"LightAccount\",\n TLightAccountVersion,\n TEntryPointVersion\n> & {\n encodeTransferOwnership: (newOwner: Address) => Hex;\n getOwnerAddress: () => Promise<Address>;\n};\n\n// [!region CreateLightAccountParams]\nexport type CreateLightAccountParams<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"LightAccount\"> = GetLightAccountVersion<\"LightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"LightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\"LightAccount\", TLightAccountVersion>\n> = Omit<\n CreateLightAccountBaseParams<\n TTransport,\n TSigner,\n \"LightAccount\",\n TLightAccountVersion,\n TEntryPointVersion\n >,\n \"getAccountInitCode\" | \"entryPoint\" | \"version\" | \"abi\" | \"accountAddress\"\n> & {\n salt?: bigint;\n initCode?: Hex;\n accountAddress?: Address;\n factoryAddress?: Address;\n version?: TLightAccountVersion;\n entryPoint?: EntryPointDef<TEntryPointVersion, Chain>;\n};\n// [!endregion CreateLightAccountParams]\n\nexport async function createLightAccount<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"LightAccount\"> = \"v1.1.0\"\n>(\n config: CreateLightAccountParams<TTransport, TSigner, TLightAccountVersion>\n): Promise<LightAccount<TSigner, TLightAccountVersion>>;\n\nexport async function createLightAccount<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"LightAccount\"> = GetLightAccountVersion<\"LightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"LightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\"LightAccount\", TLightAccountVersion>\n>(\n config: CreateLightAccountParams<\n TTransport,\n TSigner,\n TLightAccountVersion,\n TEntryPointVersion\n >\n): Promise<LightAccount<TSigner, TLightAccountVersion, TEntryPointVersion>>;\n\nexport async function createLightAccount({\n transport,\n chain,\n signer,\n initCode,\n version = defaultLightAccountVersion(\"LightAccount\"),\n entryPoint = getEntryPoint(chain, {\n version: AccountVersionRegistry[\"LightAccount\"][version]\n .entryPointVersion as any,\n }),\n accountAddress,\n factoryAddress = AccountVersionRegistry[\"LightAccount\"][version].address[\n chain.id\n ].factory,\n salt: salt_ = 0n,\n}: CreateLightAccountParams): Promise<LightAccount> {\n const client = createBundlerClient({\n transport,\n chain,\n });\n\n const accountAbi =\n version === \"v2.0.0\" ? LightAccountAbi_v2 : LightAccountAbi_v1;\n const factoryAbi =\n version === \"v2.0.0\"\n ? LightAccountFactoryAbi_v1\n : LightAccountFactoryAbi_v2;\n\n const getAccountInitCode = async () => {\n if (initCode) return initCode;\n\n const salt = LightAccountUnsupported1271Factories.has(\n factoryAddress.toLowerCase() as Address\n )\n ? 0n\n : salt_;\n\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: factoryAbi,\n functionName: \"createAccount\",\n args: [await signer.getAddress(), salt],\n }),\n ]);\n };\n\n const address = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode,\n });\n\n const account = await createLightAccountBase<\n Transport,\n SmartAccountSigner,\n \"LightAccount\"\n >({\n transport,\n chain,\n signer,\n abi: accountAbi,\n version: AccountVersionRegistry[\"LightAccount\"][version],\n entryPoint,\n accountAddress: address,\n getAccountInitCode,\n });\n\n return {\n ...account,\n\n encodeTransferOwnership: (newOwner: Address) => {\n return encodeFunctionData({\n abi: accountAbi,\n functionName: \"transferOwnership\",\n args: [newOwner],\n });\n },\n async getOwnerAddress(): Promise<Address> {\n const callResult = await client.readContract({\n address,\n abi: accountAbi,\n functionName: \"owner\",\n });\n\n if (callResult == null) {\n throw new Error(\"could not get on-chain owner\");\n }\n\n return callResult;\n },\n };\n}\n"]}
1
+ {"version":3,"file":"account.js","sourceRoot":"","sources":["../../../../../src/light-account/accounts/account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,GAId,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,EACT,kBAAkB,GAInB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAKjF,OAAO,EACL,sBAAsB,EACtB,oCAAoC,EACpC,0BAA0B,EAC1B,oCAAoC,GACrC,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,GAGvB,MAAM,WAAW,CAAC;AA4FnB,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EACvC,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,OAAO,GAAG,0BAA0B,CAAC,cAAc,CAAC,EACpD,UAAU,GAAG,aAAa,CAAC,KAAK,EAAE;IAChC,OAAO,EAAE,sBAAsB,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC;SACrD,iBAAwB;CAC5B,CAAC,EACF,cAAc,EACd,cAAc,GAAG,oCAAoC,CAAC,KAAK,EAAE,OAAO,CAAC,EACrE,IAAI,EAAE,KAAK,GAAG,EAAE,GACS;IACzB,MAAM,MAAM,GAAG,mBAAmB,CAAC;QACjC,SAAS;QACT,KAAK;KACN,CAAC,CAAC;IAEH,MAAM,UAAU,GACd,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,kB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,UAAU;gBACf,YAAY,EAAE,OAAO;aACtB,CAAC,CAAC;YAEH,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;YAClD,CAAC;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import {\n createBundlerClient,\n getAccountAddress,\n getEntryPoint,\n type Address,\n type EntryPointDef,\n type SmartAccountSigner,\n} from \"@aa-sdk/core\";\nimport {\n concatHex,\n encodeFunctionData,\n type Chain,\n type Hex,\n type Transport,\n} from \"viem\";\nimport { LightAccountAbi_v1 } from \"../abis/LightAccountAbi_v1.js\";\nimport { LightAccountAbi_v2 } from \"../abis/LightAccountAbi_v2.js\";\nimport { LightAccountFactoryAbi_v1 } from \"../abis/LightAccountFactoryAbi_v1.js\";\nimport { LightAccountFactoryAbi_v2 } from \"../abis/LightAccountFactoryAbi_v2.js\";\nimport type {\n GetEntryPointForLightAccountVersion,\n GetLightAccountVersion,\n} from \"../types.js\";\nimport {\n AccountVersionRegistry,\n LightAccountUnsupported1271Factories,\n defaultLightAccountVersion,\n getDefaultLightAccountFactoryAddress,\n} from \"../utils.js\";\nimport {\n createLightAccountBase,\n type CreateLightAccountBaseParams,\n type LightAccountBase,\n} from \"./base.js\";\n\nexport type LightAccount<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"LightAccount\"> = GetLightAccountVersion<\"LightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"LightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\"LightAccount\", TLightAccountVersion>\n> = LightAccountBase<\n TSigner,\n \"LightAccount\",\n TLightAccountVersion,\n TEntryPointVersion\n> & {\n encodeTransferOwnership: (newOwner: Address) => Hex;\n getOwnerAddress: () => Promise<Address>;\n};\n\n// [!region CreateLightAccountParams]\nexport type CreateLightAccountParams<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"LightAccount\"> = GetLightAccountVersion<\"LightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"LightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\"LightAccount\", TLightAccountVersion>\n> = Omit<\n CreateLightAccountBaseParams<\n TTransport,\n TSigner,\n \"LightAccount\",\n TLightAccountVersion,\n TEntryPointVersion\n >,\n \"getAccountInitCode\" | \"entryPoint\" | \"version\" | \"abi\" | \"accountAddress\"\n> & {\n salt?: bigint;\n initCode?: Hex;\n accountAddress?: Address;\n factoryAddress?: Address;\n version?: TLightAccountVersion;\n entryPoint?: EntryPointDef<TEntryPointVersion, Chain>;\n};\n// [!endregion CreateLightAccountParams]\n\nexport async function createLightAccount<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"LightAccount\"> = \"v1.1.0\"\n>(\n config: CreateLightAccountParams<TTransport, TSigner, TLightAccountVersion>\n): Promise<LightAccount<TSigner, TLightAccountVersion>>;\n\nexport async function createLightAccount<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"LightAccount\"> = GetLightAccountVersion<\"LightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"LightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\"LightAccount\", TLightAccountVersion>\n>(\n config: CreateLightAccountParams<\n TTransport,\n TSigner,\n TLightAccountVersion,\n TEntryPointVersion\n >\n): Promise<LightAccount<TSigner, TLightAccountVersion, TEntryPointVersion>>;\n\n/**\n * Creates a light account based on the provided parameters such as transport, chain, signer, init code, and more. Ensures that an account is configured and returned with various capabilities, such as transferring ownership and retrieving the owner's address.\n *\n * @example\n * ```ts\n * import { createLightAccount } 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 createLightAccount({\n * chain: sepolia,\n * transport: http(\"RPC_URL\"),\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {CreateLightAccountParams} config The parameters for creating a light account\n * @returns {Promise<LightAccount>} A promise that resolves to a `LightAccount` object containing the created account information and methods\n */\nexport async function createLightAccount({\n transport,\n chain,\n signer,\n initCode,\n version = defaultLightAccountVersion(\"LightAccount\"),\n entryPoint = getEntryPoint(chain, {\n version: AccountVersionRegistry[\"LightAccount\"][version]\n .entryPointVersion as any,\n }),\n accountAddress,\n factoryAddress = getDefaultLightAccountFactoryAddress(chain, version),\n salt: salt_ = 0n,\n}: CreateLightAccountParams): Promise<LightAccount> {\n const client = createBundlerClient({\n transport,\n chain,\n });\n\n const accountAbi =\n version === \"v2.0.0\" ? LightAccountAbi_v2 : LightAccountAbi_v1;\n const factoryAbi =\n version === \"v2.0.0\"\n ? LightAccountFactoryAbi_v1\n : LightAccountFactoryAbi_v2;\n\n const getAccountInitCode = async () => {\n if (initCode) return initCode;\n\n const salt = LightAccountUnsupported1271Factories.has(\n factoryAddress.toLowerCase() as Address\n )\n ? 0n\n : salt_;\n\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: factoryAbi,\n functionName: \"createAccount\",\n args: [await signer.getAddress(), salt],\n }),\n ]);\n };\n\n const address = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode,\n });\n\n const account = await createLightAccountBase<\n Transport,\n SmartAccountSigner,\n \"LightAccount\"\n >({\n transport,\n chain,\n signer,\n abi: accountAbi,\n version: AccountVersionRegistry[\"LightAccount\"][version],\n entryPoint,\n accountAddress: address,\n getAccountInitCode,\n });\n\n return {\n ...account,\n\n encodeTransferOwnership: (newOwner: Address) => {\n return encodeFunctionData({\n abi: accountAbi,\n functionName: \"transferOwnership\",\n args: [newOwner],\n });\n },\n async getOwnerAddress(): Promise<Address> {\n const callResult = await client.readContract({\n address,\n abi: accountAbi,\n functionName: \"owner\",\n });\n\n if (callResult == null) {\n throw new Error(\"could not get on-chain owner\");\n }\n\n return callResult;\n },\n };\n}\n"]}
@@ -2,13 +2,11 @@ import { createBundlerClient, getAccountAddress, getEntryPoint, } from "@aa-sdk/
2
2
  import { concatHex, encodeFunctionData, hexToBigInt, } from "viem";
3
3
  import { MultiOwnerLightAccountAbi } from "../abis/MultiOwnerLightAccountAbi.js";
4
4
  import { MultiOwnerLightAccountFactoryAbi } from "../abis/MultiOwnerLightAccountFactoryAbi.js";
5
- import { AccountVersionRegistry, defaultLightAccountVersion, } from "../utils.js";
5
+ import { AccountVersionRegistry, defaultLightAccountVersion, getDefaultMultiOwnerLightAccountFactoryAddress, } from "../utils.js";
6
6
  import { createLightAccountBase, } from "./base.js";
7
7
  export async function createMultiOwnerLightAccount({ transport, chain, signer, initCode, version = defaultLightAccountVersion("MultiOwnerLightAccount"), entryPoint = getEntryPoint(chain, {
8
- version: AccountVersionRegistry["MultiOwnerLightAccount"][version]
9
- .entryPointVersion,
10
- }), accountAddress, factoryAddress = AccountVersionRegistry["MultiOwnerLightAccount"][version]
11
- .address[chain.id].factory, salt: salt_ = 0n, owners = [], }) {
8
+ version: "0.7.0",
9
+ }), accountAddress, factoryAddress = getDefaultMultiOwnerLightAccountFactoryAddress(chain, version), salt: salt_ = 0n, owners = [], }) {
12
10
  const client = createBundlerClient({
13
11
  transport,
14
12
  chain,
@@ -1 +1 @@
1
- {"version":3,"file":"multiOwner.js","sourceRoot":"","sources":["../../../../../src/light-account/accounts/multiOwner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,GAGd,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,WAAW,GAKZ,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,yB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AAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;YACnD,CAAC;YAED,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;gBACpD,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;YACzE,CAAC;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import {\n createBundlerClient,\n getAccountAddress,\n getEntryPoint,\n type EntryPointDef,\n type SmartAccountSigner,\n} from \"@aa-sdk/core\";\nimport {\n concatHex,\n encodeFunctionData,\n hexToBigInt,\n type Address,\n type Chain,\n type Hex,\n type Transport,\n} from \"viem\";\nimport { MultiOwnerLightAccountAbi } from \"../abis/MultiOwnerLightAccountAbi.js\";\nimport { MultiOwnerLightAccountFactoryAbi } from \"../abis/MultiOwnerLightAccountFactoryAbi.js\";\nimport type {\n GetEntryPointForLightAccountVersion,\n GetLightAccountVersion,\n} from \"../types.js\";\nimport {\n AccountVersionRegistry,\n defaultLightAccountVersion,\n} from \"../utils.js\";\nimport {\n createLightAccountBase,\n type CreateLightAccountBaseParams,\n type LightAccountBase,\n} from \"./base.js\";\n\nexport type MultiOwnerLightAccount<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"MultiOwnerLightAccount\"> = GetLightAccountVersion<\"MultiOwnerLightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n >\n> = LightAccountBase<\n TSigner,\n \"MultiOwnerLightAccount\",\n TLightAccountVersion,\n TEntryPointVersion\n> & {\n encodeUpdateOwners: (\n ownersToAdd: Address[],\n ownersToRemove: Address[]\n ) => Hex;\n getOwnerAddresses: () => Promise<readonly Address[]>;\n};\n\nexport type CreateMultiOwnerLightAccountParams<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"MultiOwnerLightAccount\"> = GetLightAccountVersion<\"MultiOwnerLightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n >\n> = Omit<\n CreateLightAccountBaseParams<\n TTransport,\n TSigner,\n \"MultiOwnerLightAccount\",\n TLightAccountVersion,\n TEntryPointVersion\n >,\n \"getAccountInitCode\" | \"entryPoint\" | \"version\" | \"abi\" | \"accountAddress\"\n> & {\n salt?: bigint;\n initCode?: Hex;\n accountAddress?: Address;\n factoryAddress?: Address;\n version?: TLightAccountVersion;\n entryPoint?: EntryPointDef<TEntryPointVersion, Chain>;\n owners?: Address[];\n};\n\nexport async function createMultiOwnerLightAccount<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"MultiOwnerLightAccount\"> = GetLightAccountVersion<\"MultiOwnerLightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n >\n>(\n config: CreateMultiOwnerLightAccountParams<\n TTransport,\n TSigner,\n TLightAccountVersion,\n TEntryPointVersion\n >\n): Promise<\n MultiOwnerLightAccount<TSigner, TLightAccountVersion, TEntryPointVersion>\n>;\n\nexport async function createMultiOwnerLightAccount({\n transport,\n chain,\n signer,\n initCode,\n version = defaultLightAccountVersion(\"MultiOwnerLightAccount\"),\n entryPoint = getEntryPoint(chain, {\n version:\n AccountVersionRegistry[\"MultiOwnerLightAccount\"][version]\n .entryPointVersion,\n }),\n accountAddress,\n factoryAddress = AccountVersionRegistry[\"MultiOwnerLightAccount\"][version]\n .address[chain.id].factory,\n salt: salt_ = 0n,\n owners = [],\n}: CreateMultiOwnerLightAccountParams): Promise<MultiOwnerLightAccount> {\n const client = createBundlerClient({\n transport,\n chain,\n });\n\n const getAccountInitCode = async () => {\n if (initCode) return initCode;\n\n // NOTE: the current signer connected will be one of the owners as well\n const ownerAddress = await signer.getAddress();\n // owners need to be dedupe + ordered in ascending order and not == to zero address\n const owners_ = Array.from(new Set([...owners, ownerAddress]))\n .filter((x) => hexToBigInt(x) !== 0n)\n .sort((a, b) => {\n const bigintA = hexToBigInt(a);\n const bigintB = hexToBigInt(b);\n\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerLightAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [owners_, salt_],\n }),\n ]);\n };\n\n const address = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode,\n });\n\n const account = await createLightAccountBase<\n Transport,\n SmartAccountSigner,\n \"MultiOwnerLightAccount\"\n >({\n transport,\n chain,\n signer,\n abi: MultiOwnerLightAccountAbi,\n version: AccountVersionRegistry[\"MultiOwnerLightAccount\"][version],\n entryPoint,\n accountAddress: address,\n getAccountInitCode,\n });\n\n return {\n ...account,\n encodeUpdateOwners: (ownersToAdd: Address[], ownersToRemove: Address[]) => {\n return encodeFunctionData({\n abi: MultiOwnerLightAccountAbi,\n functionName: \"updateOwners\",\n args: [ownersToAdd, ownersToRemove],\n });\n },\n async getOwnerAddresses(): Promise<readonly Address[]> {\n const callResult = await client.readContract({\n address,\n abi: MultiOwnerLightAccountAbi,\n functionName: \"owners\",\n });\n\n if (callResult == null) {\n throw new Error(\"could not get on-chain owners\");\n }\n\n if (!callResult.includes(await signer.getAddress())) {\n throw new Error(\"on-chain owners does not include the current signer\");\n }\n\n return callResult;\n },\n };\n}\n"]}
1
+ {"version":3,"file":"multiOwner.js","sourceRoot":"","sources":["../../../../../src/light-account/accounts/multi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AAE,QAAQ;aACvB,CAAC,CAAC;YAEH,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;YACnD,CAAC;YAED,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;gBACpD,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;YACzE,CAAC;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import {\n createBundlerClient,\n getAccountAddress,\n getEntryPoint,\n type EntryPointDef,\n type SmartAccountSigner,\n} from \"@aa-sdk/core\";\nimport {\n concatHex,\n encodeFunctionData,\n hexToBigInt,\n type Address,\n type Chain,\n type Hex,\n type Transport,\n} from \"viem\";\nimport { MultiOwnerLightAccountAbi } from \"../abis/MultiOwnerLightAccountAbi.js\";\nimport { MultiOwnerLightAccountFactoryAbi } from \"../abis/MultiOwnerLightAccountFactoryAbi.js\";\nimport type {\n GetEntryPointForLightAccountVersion,\n GetLightAccountVersion,\n} from \"../types.js\";\nimport {\n AccountVersionRegistry,\n defaultLightAccountVersion,\n getDefaultMultiOwnerLightAccountFactoryAddress,\n} from \"../utils.js\";\nimport {\n createLightAccountBase,\n type CreateLightAccountBaseParams,\n type LightAccountBase,\n} from \"./base.js\";\n\nexport type MultiOwnerLightAccount<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"MultiOwnerLightAccount\"> = GetLightAccountVersion<\"MultiOwnerLightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n >\n> = LightAccountBase<\n TSigner,\n \"MultiOwnerLightAccount\",\n TLightAccountVersion,\n TEntryPointVersion\n> & {\n encodeUpdateOwners: (\n ownersToAdd: Address[],\n ownersToRemove: Address[]\n ) => Hex;\n getOwnerAddresses: () => Promise<readonly Address[]>;\n};\n\nexport type CreateMultiOwnerLightAccountParams<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"MultiOwnerLightAccount\"> = GetLightAccountVersion<\"MultiOwnerLightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n >\n> = Omit<\n CreateLightAccountBaseParams<\n TTransport,\n TSigner,\n \"MultiOwnerLightAccount\",\n TLightAccountVersion,\n TEntryPointVersion\n >,\n \"getAccountInitCode\" | \"entryPoint\" | \"version\" | \"abi\" | \"accountAddress\"\n> & {\n salt?: bigint;\n initCode?: Hex;\n accountAddress?: Address;\n factoryAddress?: Address;\n version?: TLightAccountVersion;\n entryPoint?: EntryPointDef<TEntryPointVersion, Chain>;\n owners?: Address[];\n};\n\nexport async function createMultiOwnerLightAccount<\n TTransport extends Transport = Transport,\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TLightAccountVersion extends GetLightAccountVersion<\"MultiOwnerLightAccount\"> = GetLightAccountVersion<\"MultiOwnerLightAccount\">,\n TEntryPointVersion extends GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n > = GetEntryPointForLightAccountVersion<\n \"MultiOwnerLightAccount\",\n TLightAccountVersion\n >\n>(\n config: CreateMultiOwnerLightAccountParams<\n TTransport,\n TSigner,\n TLightAccountVersion,\n TEntryPointVersion\n >\n): Promise<\n MultiOwnerLightAccount<TSigner, TLightAccountVersion, TEntryPointVersion>\n>;\n\n/**\n * Creates a multi-owner light account using the provided parameters, including transport, chain, signer, initialization code, version, account address, factory address, salt, and owners. Ensures the owners list is deduplicated, ordered, and valid.\n *\n * @example\n * ```ts\n * import { createMultiOwnerLightAccount } 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 createMultiOwnerLightAccount({\n * chain: sepolia,\n * transport: http(\"RPC_URL\"),\n * signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey())\n * });\n * ```\n *\n * @param {CreateMultiOwnerLightAccountParams} config The parameters for creating a multi-owner light account\n * @returns {Promise<MultiOwnerLightAccount>} A promise that resolves to a `MultiOwnerLightAccount` object containing the created account information and methods\n */\nexport async function createMultiOwnerLightAccount({\n transport,\n chain,\n signer,\n initCode,\n version = defaultLightAccountVersion(\"MultiOwnerLightAccount\"),\n entryPoint = getEntryPoint(chain, {\n version: \"0.7.0\",\n }),\n accountAddress,\n factoryAddress = getDefaultMultiOwnerLightAccountFactoryAddress(\n chain,\n version\n ),\n salt: salt_ = 0n,\n owners = [],\n}: CreateMultiOwnerLightAccountParams): Promise<MultiOwnerLightAccount> {\n const client = createBundlerClient({\n transport,\n chain,\n });\n\n const getAccountInitCode = async () => {\n if (initCode) return initCode;\n\n // NOTE: the current signer connected will be one of the owners as well\n const ownerAddress = await signer.getAddress();\n // owners need to be dedupe + ordered in ascending order and not == to zero address\n const owners_ = Array.from(new Set([...owners, ownerAddress]))\n .filter((x) => hexToBigInt(x) !== 0n)\n .sort((a, b) => {\n const bigintA = hexToBigInt(a);\n const bigintB = hexToBigInt(b);\n\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n });\n\n return concatHex([\n factoryAddress,\n encodeFunctionData({\n abi: MultiOwnerLightAccountFactoryAbi,\n functionName: \"createAccount\",\n args: [owners_, salt_],\n }),\n ]);\n };\n\n const address = await getAccountAddress({\n client,\n entryPoint,\n accountAddress,\n getAccountInitCode,\n });\n\n const account = await createLightAccountBase<\n Transport,\n SmartAccountSigner,\n \"MultiOwnerLightAccount\"\n >({\n transport,\n chain,\n signer,\n abi: MultiOwnerLightAccountAbi,\n version: AccountVersionRegistry[\"MultiOwnerLightAccount\"][version],\n entryPoint,\n accountAddress: address,\n getAccountInitCode,\n });\n\n return {\n ...account,\n encodeUpdateOwners: (ownersToAdd: Address[], ownersToRemove: Address[]) => {\n return encodeFunctionData({\n abi: MultiOwnerLightAccountAbi,\n functionName: \"updateOwners\",\n args: [ownersToAdd, ownersToRemove],\n });\n },\n async getOwnerAddresses(): Promise<readonly Address[]> {\n const callResult = await client.readContract({\n address,\n abi: MultiOwnerLightAccountAbi,\n functionName: \"owners\",\n });\n\n if (callResult == null) {\n throw new Error(\"could not get on-chain owners\");\n }\n\n if (!callResult.includes(await signer.getAddress())) {\n throw new Error(\"on-chain owners does not include the current signer\");\n }\n\n return callResult;\n },\n };\n}\n"]}
@@ -5,4 +5,4 @@ export type TransferLightAccountOwnershipParams<TSigner extends SmartAccountSign
5
5
  newOwner: TSigner;
6
6
  waitForTxn?: boolean;
7
7
  } & GetAccountParameter<TAccount, LightAccount<TSigner>> & UserOperationOverridesParameter<TEntryPointVersion>;
8
- export declare const transferOwnership: <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>, args: TransferLightAccountOwnershipParams<TSigner, TAccount>) => Promise<Hex>;
8
+ export declare const transferOwnership: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner<any> = SmartAccountSigner<any>, TAccount extends LightAccount<TSigner> | undefined = LightAccount<TSigner> | undefined>(client: Client<TTransport, TChain, TAccount>, args: TransferLightAccountOwnershipParams<TSigner, TAccount, GetEntryPointFromAccount<TAccount, import("@aa-sdk/core").SmartContractAccount<string, keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>>) => Promise<Hex>;
@@ -1,5 +1,6 @@
1
1
  import { AccountNotFoundError, IncompatibleClientError, isSmartAccountClient, } from "@aa-sdk/core";
2
- export const transferOwnership = async (client, { newOwner, waitForTxn, overrides, account = client.account }) => {
2
+ export const transferOwnership = async (client, args) => {
3
+ const { newOwner, waitForTxn, overrides, account = client.account } = args;
3
4
  if (!account) {
4
5
  throw new AccountNotFoundError();
5
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"transferOwnership.js","sourceRoot":"","sources":["../../../../../src/light-account/actions/transferOwnership.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GAKrB,MAAM,cAAc,CAAC;AAgBtB,MAAM,CAAC,MAAM,iBAAiB,GAUV,KAAK,EACvB,MAAM,EACN,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,EAC7D,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,mBAAmB,EACnB,MAAM,CACP,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,uBAAuB,CAAC,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IAE1E,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 { Chain, Client, Hex, Transport } from \"viem\";\nimport type { LightAccount } from \"../accounts/account\";\n\nexport type TransferLightAccountOwnershipParams<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends LightAccount<TSigner> | undefined =\n | LightAccount<TSigner>\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n> = {\n newOwner: TSigner;\n waitForTxn?: boolean;\n} & GetAccountParameter<TAccount, LightAccount<TSigner>> &\n UserOperationOverridesParameter<TEntryPointVersion>;\n\nexport const transferOwnership: <\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 args: TransferLightAccountOwnershipParams<TSigner, TAccount>\n) => Promise<Hex> = async (\n client,\n { newOwner, waitForTxn, overrides, account = client.account }\n) => {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"transferOwnership\",\n client\n );\n }\n\n const data = account.encodeTransferOwnership(await newOwner.getAddress());\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":"transferOwnership.js","sourceRoot":"","sources":["../../../../../src/light-account/actions/transferOwnership.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GAKrB,MAAM,cAAc,CAAC;AAyCtB,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAQpC,MAA4C,EAC5C,IAA4D,EAC9C,EAAE;IAChB,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;IAC3E,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,mBAAmB,EACnB,MAAM,CACP,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,uBAAuB,CAAC,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IAE1E,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 { Chain, Client, Hex, Transport } from \"viem\";\nimport type { LightAccount } from \"../accounts/account\";\n\nexport type TransferLightAccountOwnershipParams<\n TSigner extends SmartAccountSigner = SmartAccountSigner,\n TAccount extends LightAccount<TSigner> | undefined =\n | LightAccount<TSigner>\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n> = {\n newOwner: TSigner;\n waitForTxn?: boolean;\n} & GetAccountParameter<TAccount, LightAccount<TSigner>> &\n UserOperationOverridesParameter<TEntryPointVersion>;\n\n/**\n * Transfers the ownership of a light account to a new owner.\n * This function ensures that the client is a compatible smart acccount client and that a Light Account is provided.\n * If the waitForTxn parameter is true, it will wait for the transaction to be completed before returning.\n *\n * @example\n * ```ts\n * import { transferOwnership, createLightAccountClient } from \"@account-kit/smart-contracts\";\n *\n * const lightAccountClient = createLightAccountClient({\n * signer,\n * transport,\n * chain,\n * });\n *\n * const txHash = await transferOwnership(lightAccountClient, {\n * newOwner: newOwnerSigner,\n * waitForTxn: true, // set to false to return a uoHash instead\n * });\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client The smart account client instance used to execute the transfer\n * @param {TransferLightAccountOwnershipParams<TSigner, TAccount>} args The parameters for transferring ownership\n * @returns {Promise<Hex>} The transaction or UO hash as a Hex string\n */\nexport const transferOwnership = async <\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 args: TransferLightAccountOwnershipParams<TSigner, TAccount>\n): Promise<Hex> => {\n const { newOwner, waitForTxn, overrides, account = client.account } = args;\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"transferOwnership\",\n client\n );\n }\n\n const data = account.encodeTransferOwnership(await newOwner.getAddress());\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 +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;AAiBtB,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\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;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,6 +1,6 @@
1
+ import type { HttpTransport, SmartAccountSigner } from "@aa-sdk/core";
1
2
  import { type AlchemySmartAccountClient, type AlchemySmartAccountClientConfig } from "@account-kit/infra";
2
3
  import { type CreateLightAccountParams, type LightAccount, type LightAccountClientActions } from "@account-kit/smart-contracts";
3
- import type { HttpTransport, SmartAccountSigner } from "@aa-sdk/core";
4
4
  import { type Chain, type CustomTransport, type Transport } from "viem";
5
5
  export type AlchemyLightAccountClientConfig<TSigner extends SmartAccountSigner = SmartAccountSigner> = Omit<CreateLightAccountParams<HttpTransport, TSigner>, "transport" | "chain"> & Omit<AlchemySmartAccountClientConfig<Transport, Chain, LightAccount<TSigner>>, "account">;
6
6
  export declare function createLightAccountAlchemyClient<TSigner extends SmartAccountSigner = SmartAccountSigner>(params: AlchemyLightAccountClientConfig<TSigner>): Promise<AlchemySmartAccountClient<CustomTransport, Chain | undefined, LightAccount<TSigner>, LightAccountClientActions<TSigner>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"alchemyClient.js","sourceRoot":"","sources":["../../../../../src/light-account/clients/alchemyClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2CAA2C,GAG5C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,GAI1B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAoD,MAAM,MAAM,CAAC;AA0BhF,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 {\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 type { HttpTransport, SmartAccountSigner } from \"@aa-sdk/core\";\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\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;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"]}
@@ -2,7 +2,8 @@ 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
- export async function createLightAccountClient({ account, transport, chain, ...clientConfig }) {
5
+ export async function createLightAccountClient(params) {
6
+ const { account, transport, chain, ...clientConfig } = params;
6
7
  const lightAccount = await createLightAccount({
7
8
  ...account,
8
9
  transport,
@@ -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;AAiCvC,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAC7C,OAAO,EACP,SAAS,EACT,KAAK,EACL,GAAG,YAAY,EACgB;IAC/B,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\nexport async function createLightAccountClient({\n account,\n transport,\n chain,\n ...clientConfig\n}: CreateLightAccountClientParams): Promise<SmartAccountClient> {\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;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"]}