@aa-sdk/core 4.0.0-alpha.1 → 4.0.0-alpha.11

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 (275) hide show
  1. package/dist/cjs/account/smartContractAccount.d.ts +9 -3
  2. package/dist/cjs/account/smartContractAccount.js +11 -6
  3. package/dist/cjs/account/smartContractAccount.js.map +1 -1
  4. package/dist/cjs/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
  5. package/dist/cjs/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
  6. package/dist/cjs/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
  7. package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.js +1 -5
  8. package/dist/cjs/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
  9. package/dist/cjs/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
  10. package/dist/cjs/actions/smartAccount/internal/initUserOperation.js.map +1 -1
  11. package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
  12. package/dist/cjs/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
  13. package/dist/cjs/actions/smartAccount/sendUserOperation.js.map +1 -1
  14. package/dist/cjs/client/bundlerClient.js.map +1 -1
  15. package/dist/cjs/client/decorators/bundlerClient.js.map +1 -1
  16. package/dist/cjs/client/isSmartAccountClient.js.map +1 -1
  17. package/dist/cjs/client/smartAccountClient.js +6 -0
  18. package/dist/cjs/client/smartAccountClient.js.map +1 -1
  19. package/dist/cjs/client/types.d.ts +2 -7
  20. package/dist/cjs/client/types.js.map +1 -1
  21. package/dist/cjs/ens/utils.d.ts +1 -1
  22. package/dist/cjs/ens/utils.js +3 -3
  23. package/dist/cjs/ens/utils.js.map +1 -1
  24. package/dist/cjs/errors/account.js.map +1 -1
  25. package/dist/cjs/errors/client.js.map +1 -1
  26. package/dist/cjs/errors/entrypoint.js.map +1 -1
  27. package/dist/cjs/errors/signer.js.map +1 -1
  28. package/dist/cjs/errors/transaction.js.map +1 -1
  29. package/dist/cjs/errors/useroperation.js.map +1 -1
  30. package/dist/cjs/index.d.ts +3 -6
  31. package/dist/cjs/index.js +38 -64
  32. package/dist/cjs/index.js.map +1 -1
  33. package/dist/cjs/logger.js.map +1 -1
  34. package/dist/cjs/middleware/actions.js +2 -18
  35. package/dist/cjs/middleware/actions.js.map +1 -1
  36. package/dist/cjs/middleware/defaults/gasEstimator.js +4 -2
  37. package/dist/cjs/middleware/defaults/gasEstimator.js.map +1 -1
  38. package/dist/cjs/middleware/erc7677middleware.d.ts +40 -0
  39. package/dist/cjs/middleware/erc7677middleware.js +77 -0
  40. package/dist/cjs/middleware/erc7677middleware.js.map +1 -0
  41. package/dist/cjs/middleware/noopMiddleware.d.ts +2 -1
  42. package/dist/cjs/middleware/noopMiddleware.js.map +1 -1
  43. package/dist/cjs/middleware/types.d.ts +3 -2
  44. package/dist/cjs/middleware/types.js.map +1 -1
  45. package/dist/cjs/signer/local-account.d.ts +44 -44
  46. package/dist/cjs/signer/local-account.js.map +1 -1
  47. package/dist/cjs/signer/wallet-client.d.ts +44 -44
  48. package/dist/cjs/signer/wallet-client.js.map +1 -1
  49. package/dist/cjs/transport/split.js.map +1 -1
  50. package/dist/cjs/utils/bigint.js.map +1 -1
  51. package/dist/cjs/utils/bytes.js.map +1 -1
  52. package/dist/cjs/utils/defaults.d.ts +2 -4
  53. package/dist/cjs/utils/defaults.js +5 -45
  54. package/dist/cjs/utils/defaults.js.map +1 -1
  55. package/dist/cjs/utils/index.d.ts +0 -3
  56. package/dist/cjs/utils/index.js +1 -25
  57. package/dist/cjs/utils/index.js.map +1 -1
  58. package/dist/cjs/utils/types.js.map +1 -1
  59. package/dist/cjs/utils/userop.js.map +1 -1
  60. package/dist/cjs/version.d.ts +1 -1
  61. package/dist/cjs/version.js +1 -1
  62. package/dist/cjs/version.js.map +1 -1
  63. package/dist/esm/account/smartContractAccount.d.ts +9 -3
  64. package/dist/esm/account/smartContractAccount.js +6 -1
  65. package/dist/esm/account/smartContractAccount.js.map +1 -1
  66. package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
  67. package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
  68. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
  69. package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js +2 -6
  70. package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
  71. package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
  72. package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
  73. package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
  74. package/dist/esm/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
  75. package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
  76. package/dist/esm/client/bundlerClient.js.map +1 -1
  77. package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
  78. package/dist/esm/client/isSmartAccountClient.js.map +1 -1
  79. package/dist/esm/client/smartAccountClient.js +6 -0
  80. package/dist/esm/client/smartAccountClient.js.map +1 -1
  81. package/dist/esm/client/types.d.ts +2 -7
  82. package/dist/esm/client/types.js.map +1 -1
  83. package/dist/esm/ens/utils.d.ts +1 -1
  84. package/dist/esm/ens/utils.js +1 -1
  85. package/dist/esm/ens/utils.js.map +1 -1
  86. package/dist/esm/errors/account.js.map +1 -1
  87. package/dist/esm/errors/client.js.map +1 -1
  88. package/dist/esm/errors/entrypoint.js.map +1 -1
  89. package/dist/esm/errors/signer.js.map +1 -1
  90. package/dist/esm/errors/transaction.js.map +1 -1
  91. package/dist/esm/errors/useroperation.js.map +1 -1
  92. package/dist/esm/index.d.ts +3 -6
  93. package/dist/esm/index.js +2 -4
  94. package/dist/esm/index.js.map +1 -1
  95. package/dist/esm/logger.js.map +1 -1
  96. package/dist/esm/middleware/actions.js +3 -18
  97. package/dist/esm/middleware/actions.js.map +1 -1
  98. package/dist/esm/middleware/defaults/gasEstimator.js +4 -2
  99. package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
  100. package/dist/esm/middleware/erc7677middleware.d.ts +40 -0
  101. package/dist/esm/middleware/erc7677middleware.js +73 -0
  102. package/dist/esm/middleware/erc7677middleware.js.map +1 -0
  103. package/dist/esm/middleware/noopMiddleware.d.ts +2 -1
  104. package/dist/esm/middleware/noopMiddleware.js.map +1 -1
  105. package/dist/esm/middleware/types.d.ts +3 -2
  106. package/dist/esm/middleware/types.js.map +1 -1
  107. package/dist/esm/signer/local-account.d.ts +44 -44
  108. package/dist/esm/signer/local-account.js.map +1 -1
  109. package/dist/esm/signer/wallet-client.d.ts +44 -44
  110. package/dist/esm/signer/wallet-client.js.map +1 -1
  111. package/dist/esm/transport/split.js.map +1 -1
  112. package/dist/esm/utils/bigint.js.map +1 -1
  113. package/dist/esm/utils/bytes.js.map +1 -1
  114. package/dist/esm/utils/defaults.d.ts +2 -4
  115. package/dist/esm/utils/defaults.js +1 -40
  116. package/dist/esm/utils/defaults.js.map +1 -1
  117. package/dist/esm/utils/index.d.ts +0 -3
  118. package/dist/esm/utils/index.js +0 -11
  119. package/dist/esm/utils/index.js.map +1 -1
  120. package/dist/esm/utils/types.js.map +1 -1
  121. package/dist/esm/utils/userop.js.map +1 -1
  122. package/dist/esm/version.d.ts +1 -1
  123. package/dist/esm/version.js +1 -1
  124. package/dist/esm/version.js.map +1 -1
  125. package/dist/types/account/smartContractAccount.d.ts +17 -11
  126. package/dist/types/account/smartContractAccount.d.ts.map +1 -1
  127. package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts +33 -33
  128. package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts +43 -59
  129. package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts.map +1 -1
  130. package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +18 -18
  131. package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts.map +1 -1
  132. package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts +3 -3
  133. package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts +3 -4
  134. package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts.map +1 -1
  135. package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts +0 -14
  136. package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts.map +1 -1
  137. package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts +0 -7
  138. package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts.map +1 -1
  139. package/dist/types/actions/smartAccount/sendUserOperation.d.ts +17 -3
  140. package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
  141. package/dist/types/client/bundlerClient.d.ts +2 -2
  142. package/dist/types/client/decorators/bundlerClient.d.ts +8 -8
  143. package/dist/types/client/isSmartAccountClient.d.ts +4 -4
  144. package/dist/types/client/smartAccountClient.d.ts.map +1 -1
  145. package/dist/types/client/types.d.ts +2 -7
  146. package/dist/types/client/types.d.ts.map +1 -1
  147. package/dist/types/ens/utils.d.ts +1 -1
  148. package/dist/types/ens/utils.d.ts.map +1 -1
  149. package/dist/types/errors/account.d.ts +53 -4
  150. package/dist/types/errors/account.d.ts.map +1 -1
  151. package/dist/types/errors/client.d.ts +15 -0
  152. package/dist/types/errors/client.d.ts.map +1 -1
  153. package/dist/types/errors/entrypoint.d.ts +12 -0
  154. package/dist/types/errors/entrypoint.d.ts.map +1 -1
  155. package/dist/types/errors/signer.d.ts +5 -0
  156. package/dist/types/errors/signer.d.ts.map +1 -1
  157. package/dist/types/errors/transaction.d.ts +8 -1
  158. package/dist/types/errors/transaction.d.ts.map +1 -1
  159. package/dist/types/errors/useroperation.d.ts +5 -5
  160. package/dist/types/errors/useroperation.d.ts.map +1 -1
  161. package/dist/types/index.d.ts +3 -6
  162. package/dist/types/index.d.ts.map +1 -1
  163. package/dist/types/logger.d.ts +88 -0
  164. package/dist/types/logger.d.ts.map +1 -1
  165. package/dist/types/middleware/actions.d.ts +3 -3
  166. package/dist/types/middleware/actions.d.ts.map +1 -1
  167. package/dist/types/middleware/defaults/gasEstimator.d.ts +2 -2
  168. package/dist/types/middleware/defaults/gasEstimator.d.ts.map +1 -1
  169. package/dist/types/middleware/erc7677middleware.d.ts +62 -0
  170. package/dist/types/middleware/erc7677middleware.d.ts.map +1 -0
  171. package/dist/types/middleware/noopMiddleware.d.ts +4 -4
  172. package/dist/types/middleware/noopMiddleware.d.ts.map +1 -1
  173. package/dist/types/middleware/types.d.ts +3 -2
  174. package/dist/types/middleware/types.d.ts.map +1 -1
  175. package/dist/types/signer/local-account.d.ts +137 -45
  176. package/dist/types/signer/local-account.d.ts.map +1 -1
  177. package/dist/types/signer/wallet-client.d.ts +133 -44
  178. package/dist/types/signer/wallet-client.d.ts.map +1 -1
  179. package/dist/types/transport/split.d.ts +3 -3
  180. package/dist/types/utils/bigint.d.ts +14 -14
  181. package/dist/types/utils/bigint.d.ts.map +1 -1
  182. package/dist/types/utils/bytes.d.ts +5 -5
  183. package/dist/types/utils/defaults.d.ts +2 -12
  184. package/dist/types/utils/defaults.d.ts.map +1 -1
  185. package/dist/types/utils/index.d.ts +12 -22
  186. package/dist/types/utils/index.d.ts.map +1 -1
  187. package/dist/types/utils/types.d.ts +2 -2
  188. package/dist/types/utils/userop.d.ts +33 -33
  189. package/dist/types/version.d.ts +1 -1
  190. package/dist/types/version.d.ts.map +1 -1
  191. package/package.json +4 -3
  192. package/src/account/smartContractAccount.ts +19 -13
  193. package/src/actions/smartAccount/buildUserOperationFromTx.ts +35 -35
  194. package/src/actions/smartAccount/buildUserOperationFromTxs.ts +44 -60
  195. package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +19 -19
  196. package/src/actions/smartAccount/dropAndReplaceUserOperation.ts +10 -10
  197. package/src/actions/smartAccount/estimateUserOperationGas.ts +3 -3
  198. package/src/actions/smartAccount/internal/initUserOperation.ts +3 -4
  199. package/src/actions/smartAccount/internal/runMiddlewareStack.ts +0 -22
  200. package/src/actions/smartAccount/internal/sendUserOperation.ts +0 -7
  201. package/src/actions/smartAccount/sendUserOperation.ts +17 -3
  202. package/src/client/bundlerClient.ts +2 -2
  203. package/src/client/decorators/bundlerClient.ts +8 -8
  204. package/src/client/isSmartAccountClient.ts +4 -4
  205. package/src/client/smartAccountClient.ts +7 -0
  206. package/src/client/types.ts +2 -15
  207. package/src/ens/utils.ts +1 -2
  208. package/src/errors/account.ts +64 -4
  209. package/src/errors/client.ts +18 -0
  210. package/src/errors/entrypoint.ts +12 -0
  211. package/src/errors/signer.ts +6 -0
  212. package/src/errors/transaction.ts +10 -1
  213. package/src/errors/useroperation.ts +5 -6
  214. package/src/index.ts +2 -31
  215. package/src/logger.ts +88 -0
  216. package/src/middleware/actions.ts +6 -27
  217. package/src/middleware/defaults/gasEstimator.ts +9 -5
  218. package/src/middleware/erc7677middleware.ts +201 -0
  219. package/src/middleware/noopMiddleware.ts +6 -4
  220. package/src/middleware/types.ts +16 -7
  221. package/src/signer/local-account.ts +94 -2
  222. package/src/signer/wallet-client.ts +89 -0
  223. package/src/transport/split.ts +3 -3
  224. package/src/utils/bigint.ts +15 -15
  225. package/src/utils/bytes.ts +5 -5
  226. package/src/utils/defaults.ts +3 -76
  227. package/src/utils/index.ts +12 -35
  228. package/src/utils/types.ts +2 -2
  229. package/src/utils/userop.ts +33 -33
  230. package/src/version.ts +1 -1
  231. package/dist/cjs/account/base.d.ts +0 -49
  232. package/dist/cjs/account/base.js +0 -257
  233. package/dist/cjs/account/base.js.map +0 -1
  234. package/dist/cjs/account/schema.d.ts +0 -100
  235. package/dist/cjs/account/schema.js +0 -43
  236. package/dist/cjs/account/schema.js.map +0 -1
  237. package/dist/cjs/account/simple.d.ts +0 -14
  238. package/dist/cjs/account/simple.js +0 -119
  239. package/dist/cjs/account/simple.js.map +0 -1
  240. package/dist/cjs/account/types.d.ts +0 -30
  241. package/dist/cjs/account/types.js +0 -3
  242. package/dist/cjs/account/types.js.map +0 -1
  243. package/dist/cjs/chains/index.d.ts +0 -20
  244. package/dist/cjs/chains/index.js +0 -169
  245. package/dist/cjs/chains/index.js.map +0 -1
  246. package/dist/esm/account/base.d.ts +0 -49
  247. package/dist/esm/account/base.js +0 -253
  248. package/dist/esm/account/base.js.map +0 -1
  249. package/dist/esm/account/schema.d.ts +0 -100
  250. package/dist/esm/account/schema.js +0 -35
  251. package/dist/esm/account/schema.js.map +0 -1
  252. package/dist/esm/account/simple.d.ts +0 -14
  253. package/dist/esm/account/simple.js +0 -115
  254. package/dist/esm/account/simple.js.map +0 -1
  255. package/dist/esm/account/types.d.ts +0 -30
  256. package/dist/esm/account/types.js +0 -2
  257. package/dist/esm/account/types.js.map +0 -1
  258. package/dist/esm/chains/index.d.ts +0 -20
  259. package/dist/esm/chains/index.js +0 -166
  260. package/dist/esm/chains/index.js.map +0 -1
  261. package/dist/types/account/base.d.ts +0 -128
  262. package/dist/types/account/base.d.ts.map +0 -1
  263. package/dist/types/account/schema.d.ts +0 -101
  264. package/dist/types/account/schema.d.ts.map +0 -1
  265. package/dist/types/account/simple.d.ts +0 -15
  266. package/dist/types/account/simple.d.ts.map +0 -1
  267. package/dist/types/account/types.d.ts +0 -144
  268. package/dist/types/account/types.d.ts.map +0 -1
  269. package/dist/types/chains/index.d.ts +0 -21
  270. package/dist/types/chains/index.d.ts.map +0 -1
  271. package/src/account/base.ts +0 -415
  272. package/src/account/schema.ts +0 -51
  273. package/src/account/simple.ts +0 -221
  274. package/src/account/types.ts +0 -184
  275. package/src/chains/index.ts +0 -194
@@ -8,11 +8,11 @@ type TakeBytesOpts = {
8
8
  /**
9
9
  * Given a bytes string, returns a slice of the bytes
10
10
  *
11
- * @param bytes - the hex string representing bytes
12
- * @param opts - optional parameters for slicing the bytes
13
- * @param opts.offset - the offset in bytes to start slicing from
14
- * @param opts.count - the number of bytes to slice
15
- * @returns the sliced bytes
11
+ * @param {Hex} bytes - the hex string representing bytes
12
+ * @param {TakeBytesOpts} opts - optional parameters for slicing the bytes
13
+ * @param {number} opts.offset - the offset in bytes to start slicing from
14
+ * @param {number} opts.count - the number of bytes to slice
15
+ * @returns {Hex} the sliced bytes
16
16
  */
17
17
  export const takeBytes = (bytes: Hex, opts: TakeBytesOpts = {}): Hex => {
18
18
  const { offset, count } = opts;
@@ -1,79 +1,6 @@
1
- import { type Address, type Chain } from "viem";
2
- import {
3
- arbitrum,
4
- arbitrumGoerli,
5
- arbitrumSepolia,
6
- base,
7
- baseGoerli,
8
- baseSepolia,
9
- fraxtal,
10
- fraxtalSepolia,
11
- goerli,
12
- mainnet,
13
- optimism,
14
- optimismGoerli,
15
- optimismSepolia,
16
- polygon,
17
- polygonAmoy,
18
- polygonMumbai,
19
- sepolia,
20
- zora,
21
- zoraSepolia,
22
- } from "../chains/index.js";
23
- import { defaultEntryPointVersion } from "../entrypoint/index.js";
24
- import type { EntryPointVersion } from "../entrypoint/types.js";
25
- import { DefaultFactoryNotDefinedError } from "../errors/account.js";
26
- import type { UserOperationFeeOptions } from "../types";
27
-
28
- /**
29
- * Utility method returning the default simple account factory address given a {@link Chain} object
30
- *
31
- * @param chain - a {@link Chain} object
32
- * @param version - {@link EntryPointVersion} value that defaults to `defaultEntryPointVersion`
33
- * @returns a {@link abi.Address} for the given chain
34
- * @throws if the chain doesn't have an address currently deployed
35
- */
36
- export const getDefaultSimpleAccountFactoryAddress = (
37
- chain: Chain,
38
- version: EntryPointVersion = defaultEntryPointVersion
39
- ): Address => {
40
- switch (version) {
41
- case "0.6.0":
42
- switch (chain.id) {
43
- case mainnet.id:
44
- case polygon.id:
45
- case polygonAmoy.id:
46
- case optimism.id:
47
- case optimismSepolia.id:
48
- case arbitrum.id:
49
- case arbitrumSepolia.id:
50
- case base.id:
51
- case baseGoerli.id:
52
- case baseSepolia.id:
53
- case fraxtal.id:
54
- case fraxtalSepolia.id:
55
- case zora.id:
56
- case zoraSepolia.id:
57
- return "0x15Ba39375ee2Ab563E8873C8390be6f2E2F50232";
58
- case sepolia.id:
59
- case goerli.id:
60
- case polygonMumbai.id:
61
- case optimismGoerli.id:
62
- case arbitrumGoerli.id:
63
- return "0x9406Cc6185a346906296840746125a0E44976454";
64
- default:
65
- break;
66
- }
67
- break;
68
- case "0.7.0":
69
- switch (chain.id) {
70
- default:
71
- return "0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985";
72
- }
73
- }
74
-
75
- throw new DefaultFactoryNotDefinedError("SimpleAccount", chain, version);
76
- };
1
+ import { type Chain } from "viem";
2
+ import { arbitrum, arbitrumGoerli, arbitrumSepolia } from "viem/chains";
3
+ import type { UserOperationFeeOptions } from "../types.js";
77
4
 
78
5
  export const minPriorityFeePerBidDefaults = new Map<number, bigint>([
79
6
  [arbitrum.id, 10_000_000n],
@@ -1,35 +1,12 @@
1
- import type { Chain } from "viem";
2
1
  import { toHex } from "viem";
3
- import * as chains from "viem/chains";
4
- import * as alchemyChains from "../chains/index.js";
5
2
  import type { PromiseOrValue } from "../types.js";
6
3
  import type { RecordableKeys } from "./types.js";
7
4
 
8
- export const AlchemyChainMap = new Map<number, Chain>(
9
- Object.values(alchemyChains).map((c) => [c.id, c])
10
- );
11
-
12
- /**
13
- * Utility method for converting a chainId to a {@link Chain} object
14
- *
15
- * @param chainId - the chainId to convert
16
- * @returns a {@link Chain} object for the given chainId
17
- * @throws if the chainId is not found
18
- */
19
- export const getChain = (chainId: number): Chain => {
20
- for (const chain of Object.values(chains)) {
21
- if (chain.id === chainId) {
22
- return AlchemyChainMap.get(chain.id) ?? chain;
23
- }
24
- }
25
- throw new Error("could not find chain");
26
- };
27
-
28
5
  /**
29
6
  * Utility function that allows for piping a series of async functions together
30
7
  *
31
- * @param fns - functions to pipe
32
- * @returns result of the pipe
8
+ * @param {((s: S, o?: O, f?: F) => Promise<S>)[]} fns - functions to pipe
9
+ * @returns {S} result of the pipe
33
10
  */
34
11
  export const asyncPipe =
35
12
  <S, O, F>(...fns: ((s: S, o?: O, f?: F) => Promise<S>)[]) =>
@@ -47,10 +24,10 @@ export type Deferrable<T> = {
47
24
  };
48
25
 
49
26
  /**
50
- * Await all of the properties of a {@link Deferrable} object
27
+ * Await all of the properties of a Deferrable object
51
28
  *
52
- * @param object - a {@link Deferrable} object
53
- * @returns the object with its properties resolved
29
+ * @param {Deferrable<T>} object - a Deferrable object
30
+ * @returns {Promise<T>} the object with its properties resolved
54
31
  */
55
32
  export async function resolveProperties<T>(object: Deferrable<T>): Promise<T> {
56
33
  const promises = Object.keys(object).map((key) => {
@@ -71,8 +48,8 @@ export async function resolveProperties<T>(object: Deferrable<T>): Promise<T> {
71
48
  /**
72
49
  * Recursively converts all values in an object to hex strings
73
50
  *
74
- * @param obj - obj to deep hexlify
75
- * @returns object with all of its values hexlified
51
+ * @param {any} obj - obj to deep hexlify
52
+ * @returns {any} object with all of its values hexlified
76
53
  */
77
54
  export function deepHexlify(obj: any): any {
78
55
  if (typeof obj === "function") {
@@ -149,8 +126,8 @@ export function pick(obj: Record<string, unknown>, keys: string | string[]) {
149
126
  /**
150
127
  * Utility method for checking if the passed in values are all equal (strictly)
151
128
  *
152
- * @param params - values to check
153
- * @returns a boolean indicating if all values are the same
129
+ * @param {...any[]} params - values to check
130
+ * @returns {boolean} a boolean indicating if all values are the same
154
131
  * @throws if no values are passed in
155
132
  */
156
133
  export const allEqual = (...params: any[]): boolean => {
@@ -163,9 +140,9 @@ export const allEqual = (...params: any[]): boolean => {
163
140
  /**
164
141
  * Utility method for checking the condition and return the value if condition holds true, undefined if not.
165
142
  *
166
- * @param condition - condition to check
167
- * @param value - value to return when condition holds true
168
- * @returns the value if condition holds true, undefined if not
143
+ * @param {Promise<boolean>} condition - condition to check
144
+ * @param {() => Promise<T>} value - value to return when condition holds true
145
+ * @returns {Promise<T | undefined>} the value if condition holds true, undefined if not
169
146
  */
170
147
  export const conditionalReturn = <T>(
171
148
  condition: Promise<boolean>,
@@ -10,7 +10,7 @@
10
10
  export type NoUndefined<T> = T extends undefined ? never : T;
11
11
  // borrowed from viem
12
12
  /**
13
- * @description Checks if {@link T} is `undefined`
13
+ * @description Checks if T is `undefined`
14
14
  * @param T - Type to check
15
15
  * @example
16
16
  * type Result = IsUndefined<undefined>
@@ -27,7 +27,7 @@ export type RequiredBy<TType, TKeys extends keyof TType> = Required<
27
27
  /**
28
28
  * @description Combines members of an intersection into a readable type.
29
29
  *
30
- * @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg}
30
+ * @see https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg
31
31
  * @example
32
32
  * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>
33
33
  * => { a: string, b: string, c: number, d: bigint }
@@ -14,10 +14,10 @@ import { bigIntClamp, bigIntMultiply } from "./bigint.js";
14
14
  import { allEqual, isBigNumberish } from "./index.js";
15
15
 
16
16
  /**
17
- * Utility method for asserting a {@link UserOperationStruct} has valid fields for the given entry point version
17
+ * Utility method for asserting a UserOperationStruct has valid fields for the given entry point version
18
18
  *
19
- * @param request a {@link UserOperationStruct} to validate
20
- * @returns a type guard that asserts the {@link UserOperationRequest} is valid
19
+ * @param {UserOperationStruct} request a UserOperationStruct to validate
20
+ * @returns {boolean} a type guard that asserts the UserOperationRequest is valid
21
21
  */
22
22
  export function isValidRequest<
23
23
  TEntryPointVersion extends EntryPointVersion = EntryPointVersion
@@ -37,10 +37,10 @@ export function isValidRequest<
37
37
  }
38
38
 
39
39
  /**
40
- * Utility method for asserting a {@link UserOperationRequest} has valid fields for the paymaster data
40
+ * Utility method for asserting a UserOperationRequest has valid fields for the paymaster data
41
41
  *
42
- * @param request a {@link UserOperationRequest} to validate
43
- * @returns a type guard that asserts the {@link UserOperationRequest} is a {@link UserOperationRequest}
42
+ * @param {UserOperationRequest} request a UserOperationRequest to validate
43
+ * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest
44
44
  */
45
45
  export function isValidPaymasterAndData<
46
46
  TEntryPointVersion extends EntryPointVersion = EntryPointVersion
@@ -59,10 +59,10 @@ export function isValidPaymasterAndData<
59
59
  }
60
60
 
61
61
  /**
62
- * Utility method for asserting a {@link UserOperationStruct} has valid fields for the paymaster data
62
+ * Utility method for asserting a UserOperationStruct has valid fields for the paymaster data
63
63
  *
64
- * @param request a {@link UserOperationRequest} to validate
65
- * @returns a type guard that asserts the {@link UserOperationStruct} is a {@link UserOperationRequest}
64
+ * @param {UserOperationRequest} request a UserOperationRequest to validate
65
+ * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest
66
66
  */
67
67
  export function isValidFactoryAndData<
68
68
  TEntryPointVersion extends EntryPointVersion = EntryPointVersion
@@ -80,12 +80,12 @@ export function isValidFactoryAndData<
80
80
  }
81
81
 
82
82
  /**
83
- * Utility method for applying a {@link UserOperationOverrides} field value
83
+ * Utility method for applying a UserOperationOverrides field value
84
84
  * over the current value set for the field
85
85
  *
86
- * @param value the current value of the field
87
- * @param override the override value to apply
88
- * @returns the new value of the field after applying the override
86
+ * @param {BigNumberish} value the current value of the field
87
+ * @param {BigNumberish | Multiplier} override the override value to apply
88
+ * @returns {BigNumberish} the new value of the field after applying the override
89
89
  */
90
90
  export function applyUserOpOverride<TValue extends BigNumberish | undefined>(
91
91
  value: TValue,
@@ -106,12 +106,12 @@ export function applyUserOpOverride<TValue extends BigNumberish | undefined>(
106
106
  }
107
107
 
108
108
  /**
109
- * Utility method for applying a {@link UserOperationFeeOptionsField} value
109
+ * Utility method for applying a UserOperationFeeOptionsField value
110
110
  * over the current value set for the field
111
111
  *
112
- * @param value the current value of the field
113
- * @param feeOption the fee option field value to apply
114
- * @returns the new value of the field after applying the fee option
112
+ * @param {BigNumberish} value the current value of the field
113
+ * @param {UserOperationFeeOptionsField} feeOption the override value to apply
114
+ * @returns {BigNumberish} the new value of the field after applying the override
115
115
  */
116
116
  export function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(
117
117
  value: TValue,
@@ -133,14 +133,14 @@ export function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(
133
133
  }
134
134
 
135
135
  /**
136
- * Utility method for applying a {@link UserOperationOverrides} field value and
137
- * a {@link UserOperationFeeOptionsField} value over the current value set for the field,
136
+ * Utility method for applying a UserOperationOverrides field value and
137
+ * a UserOperationFeeOptionsField value over the current value set for the field,
138
138
  * with the override taking precedence over the fee option
139
139
  *
140
- * @param value the current value of the field
141
- * @param [override] the override value to apply
142
- * @param [feeOption] the fee option field value to apply
143
- * @returns the new value of the field after applying the override or fee option
140
+ * @param {BigNumberish} value the current value of the field
141
+ * @param {BigNumberish | Multiplier} [override] the override value to apply
142
+ * @param {UserOperationFeeOptionsField} [feeOption] the fee option field value to apply
143
+ * @returns {BigNumberish} the new value of the field after applying the override or fee option
144
144
  */
145
145
  export function applyUserOpOverrideOrFeeOption<
146
146
  TValue extends BigNumberish | undefined
@@ -160,8 +160,8 @@ export function applyUserOpOverrideOrFeeOption<
160
160
  * either because the UserOp is paying for its own gas, or passing a specific paymaster
161
161
  *
162
162
  * @template EntryPointVersion TEntryPointVersion
163
- * @param overrides the user operation overrides to check
164
- * @returns whether the paymaster middleware should be bypassed
163
+ * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
164
+ * @returns {boolean} whether the paymaster middleware should be bypassed
165
165
  */
166
166
  export const bypassPaymasterAndData = <
167
167
  TEntryPointVersion extends EntryPointVersion = EntryPointVersion
@@ -177,8 +177,8 @@ export const bypassPaymasterAndData = <
177
177
  * pay for its own gas
178
178
  *
179
179
  * @template EntryPointVersion TEntryPointVersion
180
- * @param overrides the user operation overrides to check
181
- * @returns whether the paymaster middleware should be bypassed
180
+ * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
181
+ * @returns {boolean} whether the paymaster middleware should be bypassed
182
182
  */
183
183
  export const bypassPaymasterAndDataEmptyHex = <
184
184
  TEntryPointVersion extends EntryPointVersion = EntryPointVersion
@@ -192,9 +192,9 @@ export const bypassPaymasterAndDataEmptyHex = <
192
192
  /**
193
193
  * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string
194
194
  *
195
- * @param paymasterAndData the paymaster and data hex string to parse.
195
+ * @param {Hex} paymasterAndData the paymaster and data hex string to parse.
196
196
  * The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request
197
- * @returns the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field
197
+ * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field
198
198
  */
199
199
  export const parsePaymasterAndData = (
200
200
  paymasterAndData: Hex
@@ -207,11 +207,11 @@ export const parsePaymasterAndData = (
207
207
  * Utility method for converting the object containing the paymaster address and paymaster data
208
208
  * to the paymaster and data concatenated hex string
209
209
  *
210
- * @param paymasterAndData the object containing the picked paymaster and paymasterData fields of
210
+ * @param {{ paymaster: Hex; paymasterData: Hex}} paymasterAndData the object containing the picked paymaster and paymasterData fields of
211
211
  * entrypoint v0.7 user operation request
212
- * @param paymasterAndData.paymaster the paymaster address
213
- * @param paymasterAndData.paymasterData the paymaster data
214
- * @returns the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field
212
+ * @param {Hex} paymasterAndData.paymaster the paymaster address
213
+ * @param {Hex} paymasterAndData.paymasterData the paymaster data
214
+ * @returns {Hex} the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field
215
215
  */
216
216
  export const concatPaymasterAndData = ({
217
217
  paymaster = "0x",
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.0.0-alpha.1";
3
+ export const VERSION = "4.0.0-alpha.11";
@@ -1,49 +0,0 @@
1
- import type { Address } from "abitype";
2
- import { type GetContractReturnType, type Hash, type Hex, type HttpTransport, type PublicClient, type Transport } from "viem";
3
- import { EntryPointAbi_v6 as EntryPointAbi } from "../abis/EntryPointAbi_v6.js";
4
- import { type BundlerClient } from "../client/bundlerClient.js";
5
- import type { SmartAccountSigner } from "../signer/types.js";
6
- import type { BatchUserOperationCallData, NullAddress } from "../types.js";
7
- import type { BaseSmartAccountParams, ISmartContractAccount, SignTypedDataParams } from "./types.js";
8
- export declare enum DeploymentState {
9
- UNDEFINED = "0x0",
10
- NOT_DEPLOYED = "0x1",
11
- DEPLOYED = "0x2"
12
- }
13
- export declare abstract class BaseSmartContractAccount<TTransport extends Transport = Transport, TSigner extends SmartAccountSigner = SmartAccountSigner> implements ISmartContractAccount<TTransport, TSigner> {
14
- protected factoryAddress: Address;
15
- protected deploymentState: DeploymentState;
16
- protected accountAddress?: Address;
17
- protected accountInitCode?: Hex;
18
- protected signer: TSigner;
19
- protected entryPoint: GetContractReturnType<typeof EntryPointAbi, PublicClient>;
20
- protected entryPointAddress: Address;
21
- readonly rpcProvider: BundlerClient<TTransport> | BundlerClient<HttpTransport>;
22
- constructor(params_: BaseSmartAccountParams<TTransport, TSigner>);
23
- abstract getDummySignature(): Hex | Promise<Hex>;
24
- abstract encodeExecute(target: string, value: bigint, data: string): Promise<Hash>;
25
- abstract signMessage(msg: string | Uint8Array): Promise<Hash>;
26
- protected abstract getAccountInitCode(): Promise<Hash>;
27
- signUserOperationHash(uoHash: Hash): Promise<Hash>;
28
- signTypedData(_params: SignTypedDataParams): Promise<`0x${string}`>;
29
- signMessageWith6492(msg: string | Uint8Array): Promise<`0x${string}`>;
30
- signTypedDataWith6492(params: SignTypedDataParams): Promise<`0x${string}`>;
31
- encodeBatchExecute(_txs: BatchUserOperationCallData): Promise<`0x${string}`>;
32
- encodeUpgradeToAndCall: (_upgradeToImplAddress: Address, _upgradeToInitData: Hex) => Promise<Hex>;
33
- getNonce(): Promise<bigint>;
34
- getInitCode(): Promise<Hex>;
35
- getAddress(): Promise<Address>;
36
- extend: <R>(fn: (self: this) => R) => this & R;
37
- getSigner(): TSigner;
38
- getFactoryAddress(): Address;
39
- getEntryPointAddress(): Address;
40
- isAccountDeployed(): Promise<boolean>;
41
- getDeploymentState(): Promise<DeploymentState>;
42
- protected parseFactoryAddressFromAccountInitCode(): Promise<[
43
- Address,
44
- Hex
45
- ]>;
46
- protected getImplementationAddress(): Promise<NullAddress | Address>;
47
- private _getAccountInitCode;
48
- private create6492Signature;
49
- }
@@ -1,257 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseSmartContractAccount = exports.DeploymentState = void 0;
4
- const viem_1 = require("viem");
5
- const EntryPointAbi_v6_js_1 = require("../abis/EntryPointAbi_v6.js");
6
- const bundlerClient_js_1 = require("../client/bundlerClient.js");
7
- const index_js_1 = require("../entrypoint/index.js");
8
- const account_js_1 = require("../errors/account.js");
9
- const client_js_1 = require("../errors/client.js");
10
- const logger_js_1 = require("../logger.js");
11
- const utils_js_1 = require("../signer/utils.js");
12
- const schema_js_1 = require("./schema.js");
13
- var DeploymentState;
14
- (function (DeploymentState) {
15
- DeploymentState["UNDEFINED"] = "0x0";
16
- DeploymentState["NOT_DEPLOYED"] = "0x1";
17
- DeploymentState["DEPLOYED"] = "0x2";
18
- })(DeploymentState || (exports.DeploymentState = DeploymentState = {}));
19
- class BaseSmartContractAccount {
20
- constructor(params_) {
21
- Object.defineProperty(this, "factoryAddress", {
22
- enumerable: true,
23
- configurable: true,
24
- writable: true,
25
- value: void 0
26
- });
27
- Object.defineProperty(this, "deploymentState", {
28
- enumerable: true,
29
- configurable: true,
30
- writable: true,
31
- value: DeploymentState.UNDEFINED
32
- });
33
- Object.defineProperty(this, "accountAddress", {
34
- enumerable: true,
35
- configurable: true,
36
- writable: true,
37
- value: void 0
38
- });
39
- Object.defineProperty(this, "accountInitCode", {
40
- enumerable: true,
41
- configurable: true,
42
- writable: true,
43
- value: void 0
44
- });
45
- Object.defineProperty(this, "signer", {
46
- enumerable: true,
47
- configurable: true,
48
- writable: true,
49
- value: void 0
50
- });
51
- Object.defineProperty(this, "entryPoint", {
52
- enumerable: true,
53
- configurable: true,
54
- writable: true,
55
- value: void 0
56
- });
57
- Object.defineProperty(this, "entryPointAddress", {
58
- enumerable: true,
59
- configurable: true,
60
- writable: true,
61
- value: void 0
62
- });
63
- Object.defineProperty(this, "rpcProvider", {
64
- enumerable: true,
65
- configurable: true,
66
- writable: true,
67
- value: void 0
68
- });
69
- Object.defineProperty(this, "encodeUpgradeToAndCall", {
70
- enumerable: true,
71
- configurable: true,
72
- writable: true,
73
- value: async (_upgradeToImplAddress, _upgradeToInitData) => {
74
- throw new account_js_1.UpgradeToAndCallNotSupportedError("BaseAccount");
75
- }
76
- });
77
- Object.defineProperty(this, "extend", {
78
- enumerable: true,
79
- configurable: true,
80
- writable: true,
81
- value: (fn) => {
82
- const extended = fn(this);
83
- for (const key in this) {
84
- delete extended[key];
85
- }
86
- return Object.assign(this, extended);
87
- }
88
- });
89
- const params = (0, schema_js_1.createBaseSmartAccountParamsSchema)().parse(params_);
90
- this.entryPointAddress =
91
- params.entryPointAddress ?? (0, index_js_1.getEntryPoint)(params.chain).address;
92
- const rpcUrl = typeof params.rpcClient === "string"
93
- ? params.rpcClient
94
- : params.rpcClient.transport.type === "http"
95
- ? params.rpcClient.transport.url || params.chain.rpcUrls.default.http[0]
96
- : undefined;
97
- const fetchOptions = typeof params.rpcClient === "string"
98
- ? undefined
99
- : params.rpcClient.transport.type === "http"
100
- ? params.rpcClient.transport.fetchOptions
101
- : undefined;
102
- this.rpcProvider = rpcUrl
103
- ? (0, bundlerClient_js_1.createBundlerClient)({
104
- chain: params.chain,
105
- transport: (0, viem_1.http)(rpcUrl, {
106
- fetchOptions: {
107
- ...fetchOptions,
108
- headers: {
109
- ...fetchOptions?.headers,
110
- ...(rpcUrl.toLowerCase().indexOf("alchemy") > -1
111
- ? {
112
- "Alchemy-Aa-Sdk-Signer": params.signer?.signerType || "unknown",
113
- "Alchemy-Aa-Sdk-Factory-Address": params.factoryAddress,
114
- }
115
- : undefined),
116
- },
117
- },
118
- }),
119
- })
120
- : params.rpcClient;
121
- this.accountAddress = params.accountAddress;
122
- this.factoryAddress = params.factoryAddress;
123
- this.signer = params.signer;
124
- this.accountInitCode = params.initCode;
125
- this.entryPoint = (0, viem_1.getContract)({
126
- address: this.entryPointAddress,
127
- abi: EntryPointAbi_v6_js_1.EntryPointAbi_v6,
128
- client: this.rpcProvider,
129
- });
130
- }
131
- async signUserOperationHash(uoHash) {
132
- return this.signMessage(uoHash);
133
- }
134
- async signTypedData(_params) {
135
- throw new Error("signTypedData not supported");
136
- }
137
- async signMessageWith6492(msg) {
138
- const [isDeployed, signature] = await Promise.all([
139
- this.isAccountDeployed(),
140
- this.signMessage(msg),
141
- ]);
142
- return this.create6492Signature(isDeployed, signature);
143
- }
144
- async signTypedDataWith6492(params) {
145
- const [isDeployed, signature] = await Promise.all([
146
- this.isAccountDeployed(),
147
- this.signTypedData(params),
148
- ]);
149
- return this.create6492Signature(isDeployed, signature);
150
- }
151
- async encodeBatchExecute(_txs) {
152
- throw new account_js_1.BatchExecutionNotSupportedError("BaseAccount");
153
- }
154
- async getNonce() {
155
- if (!(await this.isAccountDeployed())) {
156
- return 0n;
157
- }
158
- const address = await this.getAddress();
159
- return this.entryPoint.read.getNonce([address, BigInt(0)]);
160
- }
161
- async getInitCode() {
162
- if (this.deploymentState === DeploymentState.DEPLOYED) {
163
- return "0x";
164
- }
165
- const contractCode = await this.rpcProvider.getBytecode({
166
- address: await this.getAddress(),
167
- });
168
- if ((contractCode?.length ?? 0) > 2) {
169
- this.deploymentState = DeploymentState.DEPLOYED;
170
- return "0x";
171
- }
172
- else {
173
- this.deploymentState = DeploymentState.NOT_DEPLOYED;
174
- }
175
- return this._getAccountInitCode();
176
- }
177
- async getAddress() {
178
- if (!this.accountAddress) {
179
- const initCode = await this._getAccountInitCode();
180
- logger_js_1.Logger.verbose("[BaseSmartContractAccount](getAddress) initCode: ", initCode);
181
- try {
182
- await this.entryPoint.simulate.getSenderAddress([initCode]);
183
- }
184
- catch (err) {
185
- logger_js_1.Logger.verbose("[BaseSmartContractAccount](getAddress) getSenderAddress err: ", err);
186
- if (err.cause?.data?.errorName === "SenderAddressResult") {
187
- this.accountAddress = err.cause.data.args[0];
188
- logger_js_1.Logger.verbose("[BaseSmartContractAccount](getAddress) entryPoint.getSenderAddress result:", this.accountAddress);
189
- return this.accountAddress;
190
- }
191
- if (err.details === "Invalid URL") {
192
- throw new client_js_1.InvalidRpcUrlError();
193
- }
194
- }
195
- throw new account_js_1.GetCounterFactualAddressError();
196
- }
197
- return this.accountAddress;
198
- }
199
- getSigner() {
200
- return this.signer;
201
- }
202
- getFactoryAddress() {
203
- return this.factoryAddress;
204
- }
205
- getEntryPointAddress() {
206
- return this.entryPointAddress;
207
- }
208
- async isAccountDeployed() {
209
- return (await this.getDeploymentState()) === DeploymentState.DEPLOYED;
210
- }
211
- async getDeploymentState() {
212
- if (this.deploymentState === DeploymentState.UNDEFINED) {
213
- const initCode = await this.getInitCode();
214
- return initCode === "0x"
215
- ? DeploymentState.DEPLOYED
216
- : DeploymentState.NOT_DEPLOYED;
217
- }
218
- else {
219
- return this.deploymentState;
220
- }
221
- }
222
- async parseFactoryAddressFromAccountInitCode() {
223
- const initCode = await this._getAccountInitCode();
224
- const factoryAddress = `0x${initCode.substring(2, 42)}`;
225
- const factoryCalldata = `0x${initCode.substring(42)}`;
226
- return [factoryAddress, factoryCalldata];
227
- }
228
- async getImplementationAddress() {
229
- const accountAddress = await this.getAddress();
230
- const storage = await this.rpcProvider.getStorageAt({
231
- address: accountAddress,
232
- slot: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc",
233
- });
234
- if (storage == null) {
235
- throw new account_js_1.FailedToGetStorageSlotError("0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", "Proxy Implementation Address");
236
- }
237
- return (0, viem_1.trim)(storage);
238
- }
239
- async _getAccountInitCode() {
240
- return this.accountInitCode ?? this.getAccountInitCode();
241
- }
242
- async create6492Signature(isDeployed, signature) {
243
- if (isDeployed) {
244
- return signature;
245
- }
246
- const [factoryAddress, factoryCalldata] = await this.parseFactoryAddressFromAccountInitCode();
247
- logger_js_1.Logger.verbose(`[BaseSmartContractAccount](create6492Signature)\
248
- factoryAddress: ${factoryAddress}, factoryCalldata: ${factoryCalldata}`);
249
- return (0, utils_js_1.wrapSignatureWith6492)({
250
- factoryAddress,
251
- factoryCalldata,
252
- signature,
253
- });
254
- }
255
- }
256
- exports.BaseSmartContractAccount = BaseSmartContractAccount;
257
- //# sourceMappingURL=base.js.map