@aa-sdk/core 4.0.0-alpha.4 → 4.0.0-alpha.6

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 (239) 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/estimateUserOperationGas.js.map +1 -1
  8. package/dist/cjs/actions/smartAccount/internal/initUserOperation.js.map +1 -1
  9. package/dist/cjs/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
  10. package/dist/cjs/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
  11. package/dist/cjs/actions/smartAccount/sendUserOperation.js.map +1 -1
  12. package/dist/cjs/client/bundlerClient.js.map +1 -1
  13. package/dist/cjs/client/decorators/bundlerClient.js.map +1 -1
  14. package/dist/cjs/client/isSmartAccountClient.js.map +1 -1
  15. package/dist/cjs/client/types.d.ts +2 -7
  16. package/dist/cjs/client/types.js.map +1 -1
  17. package/dist/cjs/errors/account.js.map +1 -1
  18. package/dist/cjs/errors/client.js.map +1 -1
  19. package/dist/cjs/errors/entrypoint.js.map +1 -1
  20. package/dist/cjs/errors/signer.js.map +1 -1
  21. package/dist/cjs/errors/transaction.js.map +1 -1
  22. package/dist/cjs/errors/useroperation.js.map +1 -1
  23. package/dist/cjs/index.d.ts +3 -5
  24. package/dist/cjs/index.js +6 -9
  25. package/dist/cjs/index.js.map +1 -1
  26. package/dist/cjs/logger.js.map +1 -1
  27. package/dist/cjs/middleware/actions.js +2 -18
  28. package/dist/cjs/middleware/actions.js.map +1 -1
  29. package/dist/cjs/middleware/defaults/gasEstimator.js +3 -2
  30. package/dist/cjs/middleware/defaults/gasEstimator.js.map +1 -1
  31. package/dist/cjs/middleware/erc7677middleware.d.ts +40 -0
  32. package/dist/cjs/middleware/erc7677middleware.js +77 -0
  33. package/dist/cjs/middleware/erc7677middleware.js.map +1 -0
  34. package/dist/cjs/middleware/noopMiddleware.d.ts +2 -1
  35. package/dist/cjs/middleware/noopMiddleware.js.map +1 -1
  36. package/dist/cjs/middleware/types.d.ts +3 -2
  37. package/dist/cjs/middleware/types.js.map +1 -1
  38. package/dist/cjs/signer/local-account.d.ts +46 -46
  39. package/dist/cjs/signer/local-account.js.map +1 -1
  40. package/dist/cjs/signer/wallet-client.d.ts +46 -46
  41. package/dist/cjs/signer/wallet-client.js.map +1 -1
  42. package/dist/cjs/transport/split.js.map +1 -1
  43. package/dist/cjs/utils/bigint.js.map +1 -1
  44. package/dist/cjs/utils/bytes.js.map +1 -1
  45. package/dist/cjs/utils/defaults.d.ts +1 -3
  46. package/dist/cjs/utils/defaults.js +1 -41
  47. package/dist/cjs/utils/defaults.js.map +1 -1
  48. package/dist/cjs/utils/index.js.map +1 -1
  49. package/dist/cjs/utils/types.js.map +1 -1
  50. package/dist/cjs/utils/userop.js.map +1 -1
  51. package/dist/cjs/version.d.ts +1 -1
  52. package/dist/cjs/version.js +1 -1
  53. package/dist/cjs/version.js.map +1 -1
  54. package/dist/esm/account/smartContractAccount.d.ts +9 -3
  55. package/dist/esm/account/smartContractAccount.js +6 -1
  56. package/dist/esm/account/smartContractAccount.js.map +1 -1
  57. package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
  58. package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
  59. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
  60. package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
  61. package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
  62. package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
  63. package/dist/esm/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
  64. package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
  65. package/dist/esm/client/bundlerClient.js.map +1 -1
  66. package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
  67. package/dist/esm/client/isSmartAccountClient.js.map +1 -1
  68. package/dist/esm/client/types.d.ts +2 -7
  69. package/dist/esm/client/types.js.map +1 -1
  70. package/dist/esm/errors/account.js.map +1 -1
  71. package/dist/esm/errors/client.js.map +1 -1
  72. package/dist/esm/errors/entrypoint.js.map +1 -1
  73. package/dist/esm/errors/signer.js.map +1 -1
  74. package/dist/esm/errors/transaction.js.map +1 -1
  75. package/dist/esm/errors/useroperation.js.map +1 -1
  76. package/dist/esm/index.d.ts +3 -5
  77. package/dist/esm/index.js +2 -3
  78. package/dist/esm/index.js.map +1 -1
  79. package/dist/esm/logger.js.map +1 -1
  80. package/dist/esm/middleware/actions.js +3 -18
  81. package/dist/esm/middleware/actions.js.map +1 -1
  82. package/dist/esm/middleware/defaults/gasEstimator.js +3 -2
  83. package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
  84. package/dist/esm/middleware/erc7677middleware.d.ts +40 -0
  85. package/dist/esm/middleware/erc7677middleware.js +73 -0
  86. package/dist/esm/middleware/erc7677middleware.js.map +1 -0
  87. package/dist/esm/middleware/noopMiddleware.d.ts +2 -1
  88. package/dist/esm/middleware/noopMiddleware.js.map +1 -1
  89. package/dist/esm/middleware/types.d.ts +3 -2
  90. package/dist/esm/middleware/types.js.map +1 -1
  91. package/dist/esm/signer/local-account.d.ts +46 -46
  92. package/dist/esm/signer/local-account.js.map +1 -1
  93. package/dist/esm/signer/wallet-client.d.ts +46 -46
  94. package/dist/esm/signer/wallet-client.js.map +1 -1
  95. package/dist/esm/transport/split.js.map +1 -1
  96. package/dist/esm/utils/bigint.js.map +1 -1
  97. package/dist/esm/utils/bytes.js.map +1 -1
  98. package/dist/esm/utils/defaults.d.ts +1 -3
  99. package/dist/esm/utils/defaults.js +1 -40
  100. package/dist/esm/utils/defaults.js.map +1 -1
  101. package/dist/esm/utils/index.js.map +1 -1
  102. package/dist/esm/utils/types.js.map +1 -1
  103. package/dist/esm/utils/userop.js.map +1 -1
  104. package/dist/esm/version.d.ts +1 -1
  105. package/dist/esm/version.js +1 -1
  106. package/dist/esm/version.js.map +1 -1
  107. package/dist/types/account/smartContractAccount.d.ts +17 -11
  108. package/dist/types/account/smartContractAccount.d.ts.map +1 -1
  109. package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts +33 -33
  110. package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts +43 -59
  111. package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts.map +1 -1
  112. package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +18 -18
  113. package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts +3 -3
  114. package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts +3 -4
  115. package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts.map +1 -1
  116. package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts +0 -14
  117. package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts.map +1 -1
  118. package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts +0 -7
  119. package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts.map +1 -1
  120. package/dist/types/actions/smartAccount/sendUserOperation.d.ts +17 -3
  121. package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
  122. package/dist/types/client/bundlerClient.d.ts +2 -2
  123. package/dist/types/client/decorators/bundlerClient.d.ts +8 -8
  124. package/dist/types/client/isSmartAccountClient.d.ts +4 -4
  125. package/dist/types/client/types.d.ts +2 -7
  126. package/dist/types/client/types.d.ts.map +1 -1
  127. package/dist/types/errors/account.d.ts +53 -4
  128. package/dist/types/errors/account.d.ts.map +1 -1
  129. package/dist/types/errors/client.d.ts +15 -0
  130. package/dist/types/errors/client.d.ts.map +1 -1
  131. package/dist/types/errors/entrypoint.d.ts +12 -0
  132. package/dist/types/errors/entrypoint.d.ts.map +1 -1
  133. package/dist/types/errors/signer.d.ts +5 -0
  134. package/dist/types/errors/signer.d.ts.map +1 -1
  135. package/dist/types/errors/transaction.d.ts +8 -1
  136. package/dist/types/errors/transaction.d.ts.map +1 -1
  137. package/dist/types/errors/useroperation.d.ts +5 -5
  138. package/dist/types/errors/useroperation.d.ts.map +1 -1
  139. package/dist/types/index.d.ts +3 -5
  140. package/dist/types/index.d.ts.map +1 -1
  141. package/dist/types/logger.d.ts +88 -0
  142. package/dist/types/logger.d.ts.map +1 -1
  143. package/dist/types/middleware/actions.d.ts +3 -3
  144. package/dist/types/middleware/actions.d.ts.map +1 -1
  145. package/dist/types/middleware/defaults/gasEstimator.d.ts +2 -2
  146. package/dist/types/middleware/defaults/gasEstimator.d.ts.map +1 -1
  147. package/dist/types/middleware/erc7677middleware.d.ts +62 -0
  148. package/dist/types/middleware/erc7677middleware.d.ts.map +1 -0
  149. package/dist/types/middleware/noopMiddleware.d.ts +4 -4
  150. package/dist/types/middleware/noopMiddleware.d.ts.map +1 -1
  151. package/dist/types/middleware/types.d.ts +3 -2
  152. package/dist/types/middleware/types.d.ts.map +1 -1
  153. package/dist/types/signer/local-account.d.ts +139 -47
  154. package/dist/types/signer/local-account.d.ts.map +1 -1
  155. package/dist/types/signer/wallet-client.d.ts +135 -46
  156. package/dist/types/signer/wallet-client.d.ts.map +1 -1
  157. package/dist/types/transport/split.d.ts +2 -2
  158. package/dist/types/utils/bigint.d.ts +14 -14
  159. package/dist/types/utils/bigint.d.ts.map +1 -1
  160. package/dist/types/utils/bytes.d.ts +5 -5
  161. package/dist/types/utils/defaults.d.ts +1 -11
  162. package/dist/types/utils/defaults.d.ts.map +1 -1
  163. package/dist/types/utils/index.d.ts +12 -12
  164. package/dist/types/utils/types.d.ts +2 -2
  165. package/dist/types/utils/userop.d.ts +33 -33
  166. package/dist/types/version.d.ts +1 -1
  167. package/package.json +3 -2
  168. package/src/account/smartContractAccount.ts +19 -12
  169. package/src/actions/smartAccount/buildUserOperationFromTx.ts +35 -35
  170. package/src/actions/smartAccount/buildUserOperationFromTxs.ts +44 -60
  171. package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +19 -19
  172. package/src/actions/smartAccount/estimateUserOperationGas.ts +3 -3
  173. package/src/actions/smartAccount/internal/initUserOperation.ts +3 -4
  174. package/src/actions/smartAccount/internal/runMiddlewareStack.ts +0 -22
  175. package/src/actions/smartAccount/internal/sendUserOperation.ts +0 -7
  176. package/src/actions/smartAccount/sendUserOperation.ts +17 -3
  177. package/src/client/bundlerClient.ts +2 -2
  178. package/src/client/decorators/bundlerClient.ts +8 -8
  179. package/src/client/isSmartAccountClient.ts +4 -4
  180. package/src/client/types.ts +2 -15
  181. package/src/errors/account.ts +64 -4
  182. package/src/errors/client.ts +18 -0
  183. package/src/errors/entrypoint.ts +12 -0
  184. package/src/errors/signer.ts +6 -0
  185. package/src/errors/transaction.ts +10 -1
  186. package/src/errors/useroperation.ts +5 -6
  187. package/src/index.ts +2 -8
  188. package/src/logger.ts +88 -0
  189. package/src/middleware/actions.ts +6 -27
  190. package/src/middleware/defaults/gasEstimator.ts +8 -5
  191. package/src/middleware/erc7677middleware.ts +201 -0
  192. package/src/middleware/noopMiddleware.ts +6 -4
  193. package/src/middleware/types.ts +16 -7
  194. package/src/signer/local-account.ts +94 -2
  195. package/src/signer/wallet-client.ts +89 -0
  196. package/src/transport/split.ts +2 -2
  197. package/src/utils/bigint.ts +15 -15
  198. package/src/utils/bytes.ts +5 -5
  199. package/src/utils/defaults.ts +2 -74
  200. package/src/utils/index.ts +12 -12
  201. package/src/utils/types.ts +2 -2
  202. package/src/utils/userop.ts +33 -33
  203. package/src/version.ts +1 -1
  204. package/dist/cjs/account/base.d.ts +0 -49
  205. package/dist/cjs/account/base.js +0 -257
  206. package/dist/cjs/account/base.js.map +0 -1
  207. package/dist/cjs/account/schema.d.ts +0 -100
  208. package/dist/cjs/account/schema.js +0 -43
  209. package/dist/cjs/account/schema.js.map +0 -1
  210. package/dist/cjs/account/simple.d.ts +0 -14
  211. package/dist/cjs/account/simple.js +0 -119
  212. package/dist/cjs/account/simple.js.map +0 -1
  213. package/dist/cjs/account/types.d.ts +0 -30
  214. package/dist/cjs/account/types.js +0 -3
  215. package/dist/cjs/account/types.js.map +0 -1
  216. package/dist/esm/account/base.d.ts +0 -49
  217. package/dist/esm/account/base.js +0 -253
  218. package/dist/esm/account/base.js.map +0 -1
  219. package/dist/esm/account/schema.d.ts +0 -100
  220. package/dist/esm/account/schema.js +0 -35
  221. package/dist/esm/account/schema.js.map +0 -1
  222. package/dist/esm/account/simple.d.ts +0 -14
  223. package/dist/esm/account/simple.js +0 -115
  224. package/dist/esm/account/simple.js.map +0 -1
  225. package/dist/esm/account/types.d.ts +0 -30
  226. package/dist/esm/account/types.js +0 -2
  227. package/dist/esm/account/types.js.map +0 -1
  228. package/dist/types/account/base.d.ts +0 -128
  229. package/dist/types/account/base.d.ts.map +0 -1
  230. package/dist/types/account/schema.d.ts +0 -101
  231. package/dist/types/account/schema.d.ts.map +0 -1
  232. package/dist/types/account/simple.d.ts +0 -15
  233. package/dist/types/account/simple.d.ts.map +0 -1
  234. package/dist/types/account/types.d.ts +0 -144
  235. package/dist/types/account/types.d.ts.map +0 -1
  236. package/src/account/base.ts +0 -415
  237. package/src/account/schema.ts +0 -51
  238. package/src/account/simple.ts +0 -221
  239. package/src/account/types.ts +0 -184
@@ -2,53 +2,53 @@ import { type Hex } from "viem";
2
2
  import type { EntryPointVersion } from "../entrypoint/types";
3
3
  import type { BigNumberish, Multiplier, UserOperationFeeOptionsField, UserOperationOverrides, UserOperationRequest, UserOperationStruct } from "../types";
4
4
  /**
5
- * Utility method for asserting a {@link UserOperationStruct} has valid fields for the given entry point version
5
+ * Utility method for asserting a UserOperationStruct has valid fields for the given entry point version
6
6
  *
7
- * @param request a {@link UserOperationStruct} to validate
8
- * @returns a type guard that asserts the {@link UserOperationRequest} is valid
7
+ * @param {UserOperationStruct} request a UserOperationStruct to validate
8
+ * @returns {boolean} a type guard that asserts the UserOperationRequest is valid
9
9
  */
10
10
  export declare function isValidRequest<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationStruct<TEntryPointVersion>): request is UserOperationRequest<TEntryPointVersion>;
11
11
  /**
12
- * Utility method for asserting a {@link UserOperationRequest} has valid fields for the paymaster data
12
+ * Utility method for asserting a UserOperationRequest has valid fields for the paymaster data
13
13
  *
14
- * @param request a {@link UserOperationRequest} to validate
15
- * @returns a type guard that asserts the {@link UserOperationRequest} is a {@link UserOperationRequest}
14
+ * @param {UserOperationRequest} request a UserOperationRequest to validate
15
+ * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest
16
16
  */
17
17
  export declare function isValidPaymasterAndData<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationStruct<TEntryPointVersion>): boolean;
18
18
  /**
19
- * Utility method for asserting a {@link UserOperationStruct} has valid fields for the paymaster data
19
+ * Utility method for asserting a UserOperationStruct has valid fields for the paymaster data
20
20
  *
21
- * @param request a {@link UserOperationRequest} to validate
22
- * @returns a type guard that asserts the {@link UserOperationStruct} is a {@link UserOperationRequest}
21
+ * @param {UserOperationRequest} request a UserOperationRequest to validate
22
+ * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest
23
23
  */
24
24
  export declare function isValidFactoryAndData<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationStruct<TEntryPointVersion>): boolean;
25
25
  /**
26
- * Utility method for applying a {@link UserOperationOverrides} field value
26
+ * Utility method for applying a UserOperationOverrides field value
27
27
  * over the current value set for the field
28
28
  *
29
- * @param value the current value of the field
30
- * @param override the override value to apply
31
- * @returns the new value of the field after applying the override
29
+ * @param {BigNumberish} value the current value of the field
30
+ * @param {BigNumberish | Multiplier} override the override value to apply
31
+ * @returns {BigNumberish} the new value of the field after applying the override
32
32
  */
33
33
  export declare function applyUserOpOverride<TValue extends BigNumberish | undefined>(value: TValue, override?: BigNumberish | Multiplier): TValue | BigNumberish;
34
34
  /**
35
- * Utility method for applying a {@link UserOperationFeeOptionsField} value
35
+ * Utility method for applying a UserOperationFeeOptionsField value
36
36
  * over the current value set for the field
37
37
  *
38
- * @param value the current value of the field
39
- * @param feeOption the fee option field value to apply
40
- * @returns the new value of the field after applying the fee option
38
+ * @param {BigNumberish} value the current value of the field
39
+ * @param {UserOperationFeeOptionsField} feeOption the override value to apply
40
+ * @returns {BigNumberish} the new value of the field after applying the override
41
41
  */
42
42
  export declare function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(value: TValue, feeOption?: UserOperationFeeOptionsField): TValue | BigNumberish;
43
43
  /**
44
- * Utility method for applying a {@link UserOperationOverrides} field value and
45
- * a {@link UserOperationFeeOptionsField} value over the current value set for the field,
44
+ * Utility method for applying a UserOperationOverrides field value and
45
+ * a UserOperationFeeOptionsField value over the current value set for the field,
46
46
  * with the override taking precedence over the fee option
47
47
  *
48
- * @param value the current value of the field
49
- * @param [override] the override value to apply
50
- * @param [feeOption] the fee option field value to apply
51
- * @returns the new value of the field after applying the override or fee option
48
+ * @param {BigNumberish} value the current value of the field
49
+ * @param {BigNumberish | Multiplier} [override] the override value to apply
50
+ * @param {UserOperationFeeOptionsField} [feeOption] the fee option field value to apply
51
+ * @returns {BigNumberish} the new value of the field after applying the override or fee option
52
52
  */
53
53
  export declare function applyUserOpOverrideOrFeeOption<TValue extends BigNumberish | undefined>(value: TValue, override?: BigNumberish | Multiplier, feeOption?: UserOperationFeeOptionsField): TValue | BigNumberish;
54
54
  /**
@@ -57,8 +57,8 @@ export declare function applyUserOpOverrideOrFeeOption<TValue extends BigNumberi
57
57
  * either because the UserOp is paying for its own gas, or passing a specific paymaster
58
58
  *
59
59
  * @template EntryPointVersion TEntryPointVersion
60
- * @param overrides the user operation overrides to check
61
- * @returns whether the paymaster middleware should be bypassed
60
+ * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
61
+ * @returns {boolean} whether the paymaster middleware should be bypassed
62
62
  */
63
63
  export declare const bypassPaymasterAndData: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: Partial<{
64
64
  callGasLimit: {
@@ -85,8 +85,8 @@ export declare const bypassPaymasterAndData: <TEntryPointVersion extends keyof i
85
85
  * pay for its own gas
86
86
  *
87
87
  * @template EntryPointVersion TEntryPointVersion
88
- * @param overrides the user operation overrides to check
89
- * @returns whether the paymaster middleware should be bypassed
88
+ * @param {UserOperationOverrides<TEntryPointVersion> | undefined} overrides the user operation overrides to check
89
+ * @returns {boolean} whether the paymaster middleware should be bypassed
90
90
  */
91
91
  export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends keyof import("../entrypoint/types").EntryPointRegistryBase<unknown> = keyof import("../entrypoint/types").EntryPointRegistryBase<unknown>>(overrides: Partial<{
92
92
  callGasLimit: {
@@ -110,20 +110,20 @@ export declare const bypassPaymasterAndDataEmptyHex: <TEntryPointVersion extends
110
110
  /**
111
111
  * Utility method for parsing the paymaster address and paymasterData from the paymasterAndData hex string
112
112
  *
113
- * @param paymasterAndData the paymaster and data hex string to parse.
113
+ * @param {Hex} paymasterAndData the paymaster and data hex string to parse.
114
114
  * The hex string refers to the paymasterAndData field of entrypoint v0.6 user operation request
115
- * @returns the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field
115
+ * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field
116
116
  */
117
117
  export declare const parsePaymasterAndData: (paymasterAndData: Hex) => Pick<UserOperationRequest<"0.7.0">, "paymaster" | "paymasterData">;
118
118
  /**
119
119
  * Utility method for converting the object containing the paymaster address and paymaster data
120
120
  * to the paymaster and data concatenated hex string
121
121
  *
122
- * @param paymasterAndData the object containing the picked paymaster and paymasterData fields of
122
+ * @param {{ paymaster: Hex; paymasterData: Hex}} paymasterAndData the object containing the picked paymaster and paymasterData fields of
123
123
  * entrypoint v0.7 user operation request
124
- * @param paymasterAndData.paymaster the paymaster address
125
- * @param paymasterAndData.paymasterData the paymaster data
126
- * @returns the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field
124
+ * @param {Hex} paymasterAndData.paymaster the paymaster address
125
+ * @param {Hex} paymasterAndData.paymasterData the paymaster data
126
+ * @returns {Hex} the paymasterAndData hex value of entrypoint v0.6 user operation request paymasterAndData field
127
127
  */
128
128
  export declare const concatPaymasterAndData: ({ paymaster, paymasterData, }: Pick<UserOperationRequest<"0.7.0">, "paymaster" | "paymasterData">) => Hex;
129
129
  //# sourceMappingURL=userop.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.0.0-alpha.4";
1
+ export declare const VERSION = "4.0.0-alpha.6";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aa-sdk/core",
3
3
  "license": "MIT",
4
- "version": "4.0.0-alpha.4",
4
+ "version": "4.0.0-alpha.6",
5
5
  "description": "viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts",
6
6
  "author": "Alchemy",
7
7
  "type": "module",
@@ -37,6 +37,7 @@
37
37
  "build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir ./dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
38
38
  "build:esm": "tsc --project tsconfig.build.json --module es2020 --outDir ./dist/esm --removeComments && echo > ./dist/esm/package.json '{\"type\":\"module\"}'",
39
39
  "build:types": "tsc --project tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
40
+ "docs:gen": "npx ak-docgen generate --in ./src/index.ts --out ../../site/pages/reference/aa-sdk/core",
40
41
  "clean": "rm -rf ./dist",
41
42
  "test": "vitest",
42
43
  "test:run": "vitest run",
@@ -66,5 +67,5 @@
66
67
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
67
68
  },
68
69
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
69
- "gitHead": "07d3a1a98377c9db41d7f48cd89747d9e881267c"
70
+ "gitHead": "2c35ec701f526c77ea5e00e2e6f147156c7ac0e4"
70
71
  }
@@ -34,7 +34,6 @@ import type { SmartAccountSigner } from "../signer/types.js";
34
34
  import { wrapSignatureWith6492 } from "../signer/utils.js";
35
35
  import type { NullAddress } from "../types.js";
36
36
  import type { IsUndefined } from "../utils/types.js";
37
- import { DeploymentState } from "./base.js";
38
37
 
39
38
  export type AccountOp = {
40
39
  target: Address;
@@ -42,6 +41,12 @@ export type AccountOp = {
42
41
  data: Hex | "0x";
43
42
  };
44
43
 
44
+ export enum DeploymentState {
45
+ UNDEFINED = "0x0",
46
+ NOT_DEPLOYED = "0x1",
47
+ DEPLOYED = "0x2",
48
+ }
49
+
45
50
  export type GetEntryPointFromAccount<
46
51
  TAccount extends SmartContractAccount | undefined,
47
52
  TAccountOverride extends SmartContractAccount = SmartContractAccount
@@ -174,6 +179,13 @@ export const parseFactoryAddressFromAccountInitCode = (
174
179
  return [factoryAddress, factoryCalldata];
175
180
  };
176
181
 
182
+ export type GetAccountAddressParams = {
183
+ client: PublicClient;
184
+ entryPoint: EntryPointDef;
185
+ accountAddress?: Address;
186
+ getAccountInitCode: () => Promise<Hex>;
187
+ };
188
+
177
189
  /**
178
190
  * Retrieves the account address. Uses a provided `accountAddress` if available; otherwise, it computes the address using the entry point contract and the initial code.
179
191
  *
@@ -188,11 +200,11 @@ export const parseFactoryAddressFromAccountInitCode = (
188
200
  * });
189
201
  * ```
190
202
  *
191
- * @param {object} config The configuration object
192
- * @param {PublicClient} config.client A public client instance to interact with the blockchain
193
- * @param {EntryPointDef} config.entryPoint The entry point definition which includes the address and ABI
194
- * @param {Address} config.accountAddress Optional existing account address
195
- * @param {function(): Promise<Hex>} config.getAccountInitCode A function that returns a Promise resolving to a Hex string representing the initial code of the account
203
+ * @param {GetAccountAddressParams} params The configuration object
204
+ * @param {PublicClient} params.client A public client instance to interact with the blockchain
205
+ * @param {EntryPointDef} params.entryPoint The entry point definition which includes the address and ABI
206
+ * @param {Address} params.accountAddress Optional existing account address
207
+ * @param {() => Promise<Hex>} params.getAccountInitCode A function that returns a Promise resolving to a Hex string representing the initial code of the account
196
208
  * @returns {Promise<Address>} A promise that resolves to the account address
197
209
  */
198
210
  export const getAccountAddress = async ({
@@ -200,12 +212,7 @@ export const getAccountAddress = async ({
200
212
  entryPoint,
201
213
  accountAddress,
202
214
  getAccountInitCode,
203
- }: {
204
- client: PublicClient;
205
- entryPoint: EntryPointDef;
206
- accountAddress?: Address;
207
- getAccountInitCode: () => Promise<Hex>;
208
- }) => {
215
+ }: GetAccountAddressParams) => {
209
216
  if (accountAddress) return accountAddress;
210
217
 
211
218
  const entryPointContract = getContract({
@@ -20,43 +20,43 @@ import { buildUserOperation } from "./buildUserOperation.js";
20
20
  import type { UserOperationContext } from "./types.js";
21
21
 
22
22
  /**
23
- * Performs [`buildUserOperationFromTx`](./buildUserOperationFromTx.md) in batch and builds into a single, yet to be signed `UserOperation` (UO) struct. The output user operation struct will be filled with all gas fields (and paymaster data if a paymaster is used) based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`, `maxPriorityFeePerGas`) computed using the configured [`ClientMiddlewares`](/packages/aa-core/smart-account-client/middleware/index) on the `SmartAccountClient`
24
- *
23
+ * Performs `buildUserOperationFromTx` in batch and builds into a single, yet to be signed `UserOperation` (UO) struct. The output user operation struct will be filled with all gas fields (and paymaster data if a paymaster is used) based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`, `maxPriorityFeePerGas`) computed using the configured [`ClientMiddlewares`](/packages/aa-core/smart-account-client/middleware/index) on the `SmartAccountClient`
24
+ *
25
25
  * @example
26
26
  * ```ts
27
- import type { RpcTransactionRequest } from "viem";
28
- import { smartAccountClient } from "./smartAccountClient";
29
- // [!code focus:99]
30
- // buildUserOperationFromTx converts a traditional Ethereum transaction and returns
31
- // the unsigned user operation struct after constructing the user operation struct
32
- // through the middleware pipeline
33
- const tx: RpcTransactionRequest = {
34
- from, // ignored
35
- to,
36
- data: encodeFunctionData({
37
- abi: ContractABI.abi,
38
- functionName: "func",
39
- args: [arg1, arg2, ...],
40
- }),
41
- };
42
- const uoStruct = await smartAccountClient.buildUserOperationFromTx(tx);
43
-
44
- // signUserOperation signs the above unsigned user operation struct built
45
- // using the account connected to the smart account client
46
- const request = await smartAccountClient.signUserOperation({ uoStruct });
47
-
48
- // You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts)
49
- // to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the
50
- // EntryPoint contract pointed at by the entryPoint address parameter
51
- const entryPointAddress = client.account.getEntryPoint().address;
52
- const uoHash = await smartAccountClient.sendRawUserOperation({ request, entryPoint: entryPointAddress });
53
- ```
54
- *
55
- * @param client the smart account client to use for RPC requests
56
- * @param args {@link SendTransactionParameters}
57
- * @param overrides optional {@link UserOperationOverrides} to use for any of the fields
58
- * @param context if the smart account client requires additinoal context for building UOs
59
- * @returns a Promise containing the built user operation
27
+ * import type { RpcTransactionRequest } from "viem";
28
+ * import { smartAccountClient } from "./smartAccountClient";
29
+ * // [!code focus:99]
30
+ * // buildUserOperationFromTx converts a traditional Ethereum transaction and returns
31
+ * // the unsigned user operation struct after constructing the user operation struct
32
+ * // through the middleware pipeline
33
+ * const tx: RpcTransactionRequest = {
34
+ * from, // ignored
35
+ * to,
36
+ * data: encodeFunctionData({
37
+ * abi: ContractABI.abi,
38
+ * functionName: "func",
39
+ * args: [arg1, arg2, ...],
40
+ * }),
41
+ * };
42
+ * const uoStruct = await smartAccountClient.buildUserOperationFromTx(tx);
43
+ *
44
+ * // signUserOperation signs the above unsigned user operation struct built
45
+ * // using the account connected to the smart account client
46
+ * const request = await smartAccountClient.signUserOperation({ uoStruct });
47
+ *
48
+ * // You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts)
49
+ * // to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the
50
+ * // EntryPoint contract pointed at by the entryPoint address parameter
51
+ * const entryPointAddress = client.account.getEntryPoint().address;
52
+ * const uoHash = await smartAccountClient.sendRawUserOperation({ request, entryPoint: entryPointAddress });
53
+ * ```
54
+ *
55
+ * @param {Client<Transport, TChain, TAccount>} client the smart account client to use for RPC requests
56
+ * @param {SendTransactionParameters} args the send tx parameters
57
+ * @param {UserOperationOverrides} overrides optional overrides to use for any of the fields
58
+ * @param {TContext} context if the smart account client requires additinoal context for building UOs
59
+ * @returns {Promise<UserOperationStruct<TEntryPointVersion>>} a Promise containing the built user operation
60
60
  */
61
61
  export async function buildUserOperationFromTx<
62
62
  TChain extends Chain | undefined = Chain | undefined,
@@ -17,74 +17,58 @@ import type {
17
17
  } from "./types";
18
18
 
19
19
  /**
20
- * Performs {@link buildUserOperationFromTx} in batch and builds into a single,
20
+ * Performs `buildUserOperationFromTx` in batch and builds into a single,
21
21
  * yet to be signed `UserOperation` (UO) struct. The output user operation struct
22
22
  * will be filled with all gas fields (and paymaster data if a paymaster is used)
23
23
  * based on the transactions data (`to`, `data`, `value`, `maxFeePerGas`,
24
- * `maxPriorityFeePerGas`) computed using the configured
25
- * [`ClientMiddlewares`](/packages/aa-core/smart-account-client/middleware/index) on the `SmartAccountClient`
26
- *
24
+ * `maxPriorityFeePerGas`) computed using the configured ClientMiddlewares on the SmartAccountClient.
25
+ *
27
26
  * @example
28
27
  * ```ts
29
28
  * import type { RpcTransactionRequest } from "viem";
30
- import { smartAccountClient } from "./smartAccountClient";
31
- // [!code focus:99]
32
- // buildUserOperationFromTxs converts traditional Ethereum transactions in batch and returns
33
- // the unsigned user operation struct after constructing the user operation struct
34
- // through the middleware pipeline
35
- const requests: RpcTransactionRequest[] = [
36
- {
37
- from, // ignored
38
- to,
39
- data: encodeFunctionData({
40
- abi: ContractABI.abi,
41
- functionName: "func",
42
- args: [arg1, arg2, ...],
43
- }),
44
- },
45
- {
46
- from, // ignored
47
- to,
48
- data: encodeFunctionData({
49
- abi: ContractABI.abi,
50
- functionName: "func",
51
- args: [arg1, arg2, ...],
52
- }),
53
- },
54
- ...
55
- {
56
- from, // ignored
57
- to,
58
- data: encodeFunctionData({
59
- abi: ContractABI.abi,
60
- functionName: "func",
61
- args: [arg1, arg2, ...],
62
- }),
63
- },
64
- ];
65
- const uoStruct = await smartAccountClient.buildUserOperationFromTxs({
66
- requests,
67
- });
68
-
69
- // signUserOperation signs the above unsigned user operation struct built
70
- // using the account connected to the smart account client
71
- const request = await smartAccountClient.signUserOperation({ uoStruct });
72
-
73
- // You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts)
74
- // to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the
75
- // EntryPoint contract pointed at by the entryPoint address parameter
76
- const entryPointAddress = client.account.getEntryPoint().address;
77
- const uoHash = await smartAccountClient.sendRawUserOperation({
78
- request,
79
- entryPoint: entryPointAddress,
80
- });
29
+ * import { smartAccountClient } from "./smartAccountClient";
30
+ *
31
+ * const requests: RpcTransactionRequest[] = [
32
+ * {
33
+ * from, // ignored
34
+ * to,
35
+ * data: encodeFunctionData({
36
+ * abi: ContractABI.abi,
37
+ * functionName: "func",
38
+ * args: [arg1, arg2, ...],
39
+ * }),
40
+ * },
41
+ * {
42
+ * from, // ignored
43
+ * to,
44
+ * data: encodeFunctionData({
45
+ * abi: ContractABI.abi,
46
+ * functionName: "func",
47
+ * args: [arg1, arg2, ...],
48
+ * }),
49
+ * },
50
+ * ];
51
+ * const uoStruct = await smartAccountClient.buildUserOperationFromTxs({
52
+ * requests,
53
+ * });
54
+ *
55
+ * // signUserOperation signs the above unsigned user operation struct built
56
+ * // using the account connected to the smart account client
57
+ * const request = await smartAccountClient.signUserOperation({ uoStruct });
58
+ *
59
+ * // You can use the BundlerAction `sendRawUserOperation` (packages/core/src/actions/bundler/sendRawUserOperation.ts)
60
+ * // to send the signed user operation request to the bundler, requesting the bundler to send the signed uo to the
61
+ * // EntryPoint contract pointed at by the entryPoint address parameter
62
+ * const entryPointAddress = client.account.getEntryPoint().address;
63
+ * const uoHash = await smartAccountClient.sendRawUserOperation({
64
+ * request,
65
+ * entryPoint: entryPointAddress,
66
+ * });
81
67
  * ```
82
68
  *
83
- * @param client the smart account client to use to make RPC calls
84
- * @param args {@link BuildTransactionParameters} an object containing the requests
85
- * to build as well as, the account if not hoisted, the context, the overrides, and
86
- * optionally a flag to enable signing of the UO via the underlying middleware
87
- * @returns a Promise containing the built user operation
69
+ * @param {Client<TTransport, TChain, TAccount>} client the smart account client to use to make RPC calls
70
+ * @param {BuildTransactionParameters} args an object containing the requests to build as well as, the account if not hoisted, the context, the overrides, and optionally a flag to enable signing of the UO via the underlying middleware
71
+ * @returns {Promise<BuildUserOperationFromTransactionsResult<TEntryPointVersion>>} a Promise containing the built user operation
88
72
  */
89
73
  export async function buildUserOperationFromTxs<
90
74
  TTransport extends Transport = Transport,
@@ -12,31 +12,31 @@ import type {
12
12
 
13
13
  /**
14
14
  * This function verifies the eligibility of the connected account for gas sponsorship concerning the upcoming `UserOperation` (UO) that is intended to be sent.
15
- * Internally, this method invokes [`buildUserOperation`](./buildUserOperation.md), which navigates through the middleware pipeline, including the `PaymasterMiddleware`. Its purpose is to construct the UO struct meant for transmission to the bundler. Following the construction of the UO struct, this function verifies if the resulting structure contains a non-empty `paymasterAndData` field.
15
+ * Internally, this method invokes `buildUserOperation`, which navigates through the middleware pipeline, including the `PaymasterMiddleware`. Its purpose is to construct the UO struct meant for transmission to the bundler. Following the construction of the UO struct, this function verifies if the resulting structure contains a non-empty `paymasterAndData` field.
16
16
  * You can utilize this method before sending the user operation to confirm its eligibility for gas sponsorship. Depending on the outcome, it allows you to tailor the user experience accordingly, based on eligibility.
17
17
  *
18
18
  * @example
19
19
  * ```ts
20
20
  * import { smartAccountClient } from "./smartAccountClient";
21
- // [!code focus:99]
22
- const eligible = await smartAccountClient.checkGasSponsorshipEligibility({
23
- uo: {
24
- data: "0xCalldata",
25
- target: "0xTarget",
26
- value: 0n,
27
- },
28
- });
29
-
30
- console.log(
31
- `User Operation is ${
32
- eligible ? "eligible" : "ineligible"
33
- } for gas sponsorship.`
34
- );
21
+ * // [!code focus:99]
22
+ * const eligible = await smartAccountClient.checkGasSponsorshipEligibility({
23
+ * uo: {
24
+ * data: "0xCalldata",
25
+ * target: "0xTarget",
26
+ * value: 0n,
27
+ * },
28
+ * });
29
+ *
30
+ * console.log(
31
+ * `User Operation is ${
32
+ * eligible ? "eligible" : "ineligible"
33
+ * } for gas sponsorship.`
34
+ * );
35
35
  * ```
36
- *
37
- * @param client the smart account client to use for making RPC calls
38
- * @param args {@link SendUserOperationParameters} containing the user operation, account, context, and overrides
39
- * @returns a Promise containing a boolean indicating if the account is elgibile for sponsorship
36
+ *
37
+ * @param {Client<TTransport, TChain, TAccount>} client the smart account client to use for making RPC calls
38
+ * @param {SendUserOperationParameters} args containing the user operation, account, context, and overrides
39
+ * @returns {Promise<boolean>} a Promise containing a boolean indicating if the account is elgibile for sponsorship
40
40
  */
41
41
  export function checkGasSponsorshipEligibility<
42
42
  TTransport extends Transport = Transport,
@@ -23,9 +23,9 @@ import type {
23
23
  * @template {SmartContractAccount | undefined} TAccount
24
24
  * @template {UserOperationContext | undefined} TContext
25
25
  * @template {GetEntryPointFromAccount<TAccount>} TEntryPointVersion
26
- * @param client smart account client
27
- * @param args send user operation parameters
28
- * @returns user operation gas estimate response
26
+ * @param {Client<TTransport, TChain, TAccount>} client smart account client
27
+ * @param {SendUserOperationParameters<TAccount, TContext>} args send user operation parameters
28
+ * @returns {Promise<UserOperationEstimateGasResponse<TEntryPointVersion>>}user operation gas estimate response
29
29
  */
30
30
  export async function estimateUserOperationGas<
31
31
  TTransport extends Transport = Transport,
@@ -18,15 +18,14 @@ import type {
18
18
  * Description internal action function of SmartAccountClient for initializing
19
19
  * a user operation for the sender account
20
20
  *
21
- * @async
22
21
  * @template {Transport} TTransport
23
22
  * @template {Chain | undefined} TChain
24
23
  * @template {SmartContractAccount | undefined} TAccount
25
24
  * @template {UserOperationContext | undefined} TContext
26
25
  * @template {GetEntryPointFromAccount} TEntryPointVersion
27
- * @param client smart account client
28
- * @param args send user operation parameters
29
- * @returns initialized user operation struct
26
+ * @param {BaseSmartAccountClient<TTransport, TChain, TAccount>} client smart account client
27
+ * @param {SendUserOperationParameters<TAccount, TContext, TEntryPointVersion> | BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion>} args send user operation parameters
28
+ * @returns {Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>>} initialized user operation struct
30
29
  */
31
30
  export async function _initUserOperation<
32
31
  TTransport extends Transport = Transport,
@@ -19,14 +19,6 @@ import {
19
19
  } from "../../../utils/index.js";
20
20
  import type { UserOperationContext } from "../types";
21
21
 
22
- /**
23
- * Utility method for running a sequence of async functions as a pipeline
24
- *
25
- * @template S
26
- * @template Opts
27
- * @param fns async functions to run in a pipeline sequence
28
- * @returns a function that runs the async functions in a pipeline sequence
29
- */
30
22
  const asyncPipe =
31
23
  <S, Opts>(...fns: ((s: S, opts: Opts) => Promise<S>)[]) =>
32
24
  async (s: S, opts: Opts) => {
@@ -37,20 +29,6 @@ const asyncPipe =
37
29
  return result;
38
30
  };
39
31
 
40
- /**
41
- * Internal method of {@link SmartAccountClient} running the middleware stack for a user operation
42
- *
43
- * @async
44
- * @template TTransport
45
- * @template TChain
46
- * @template TAccount
47
- * @template TContext the {@link UserOperationContext} passed to the middleware
48
- * @template TEntryPointVersion
49
- * @param client the smart account client instance that runs the middleware pipeline with
50
- * @param args the Deferrable {@link UserOperationStruct} to run the middleware pipeline on
51
- *
52
- * @returns the resolved {@link UserOperationStruct} after running the middleware pipeline
53
- */
54
32
  export async function _runMiddlewareStack<
55
33
  TTransport extends Transport = Transport,
56
34
  TChain extends Chain | undefined = Chain | undefined,
@@ -15,13 +15,6 @@ import type {
15
15
  import { signUserOperation } from "../signUserOperation.js";
16
16
  import type { GetContextParameter, UserOperationContext } from "../types";
17
17
 
18
- /**
19
- * Used internally to send a user operation that has **already** been signed
20
- *
21
- * @param client a base smart account client instance with middleware configured
22
- * @param args user operation struct, overrides, account, and context to be used in sending
23
- * @returns A Promise containing the send user operation result {@link SendUserOperationResult}
24
- */
25
18
  export async function _sendUserOperation<
26
19
  TTransport extends Transport = Transport,
27
20
  TChain extends Chain | undefined = Chain | undefined,
@@ -17,9 +17,23 @@ import type {
17
17
  /**
18
18
  * Sends a user operation or batch of user operations using the connected account. Before executing, sendUserOperation will run the user operation through the middleware pipeline.
19
19
  *
20
- * @param client the smart account client to use for RPC requests
21
- * @param args {@link SendUserOperationParameters} containg the UO or batch to send, context, overrides, and account if not hoisted on the client
22
- * @returns a Promise containing the {@link SendUserOperationResult}
20
+ * @example
21
+ * ```ts
22
+ * import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core";
23
+ *
24
+ * const account = await toSmartContractAccount(...);
25
+ * const result = await createSmartAccountClient(...).sendUserOperation({
26
+ * uo: {
27
+ * target: "0x...",
28
+ * data: "0x...", // or "0x",
29
+ * value: 0n, // optional
30
+ * }
31
+ * });
32
+ * ```
33
+ *
34
+ * @param {Client<TTransport, TChain, TAccount>} client the smart account client to use for RPC requests
35
+ * @param {SendUserOperationParameters<TAccount, TContext>} args contains the UO or batch to send, context, overrides, and account if not hoisted on the client
36
+ * @returns {Promise<SendUserOperationResult<TEntryPointVersion>>} a Promise containing the result of the user operation
23
37
  */
24
38
  export async function sendUserOperation<
25
39
  TTransport extends Transport = Transport,
@@ -58,8 +58,8 @@ export const createBundlerClientFromExisting: <
58
58
  /**
59
59
  * Creates a PublicClient with methods for calling Bundler RPC methods
60
60
  *
61
- * @param args - configuration for the client
62
- * @returns a PublicClient with methods for calling Bundler RPC methods
61
+ * @param {PublicClientConfig<TTransport, Chain> & { type?: string }} args - configuration for the client
62
+ * @returns {BundlerClient<TTransport>} a PublicClient with methods for calling Bundler RPC methods
63
63
  */
64
64
  export function createBundlerClient<TTransport extends Transport>(
65
65
  args: PublicClientConfig<TTransport, Chain> & { type?: string }