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

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 (263) 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/ens/utils.d.ts +1 -1
  18. package/dist/cjs/ens/utils.js +3 -3
  19. package/dist/cjs/ens/utils.js.map +1 -1
  20. package/dist/cjs/errors/account.js.map +1 -1
  21. package/dist/cjs/errors/client.js.map +1 -1
  22. package/dist/cjs/errors/entrypoint.js.map +1 -1
  23. package/dist/cjs/errors/signer.js.map +1 -1
  24. package/dist/cjs/errors/transaction.js.map +1 -1
  25. package/dist/cjs/errors/useroperation.js.map +1 -1
  26. package/dist/cjs/index.d.ts +3 -6
  27. package/dist/cjs/index.js +38 -64
  28. package/dist/cjs/index.js.map +1 -1
  29. package/dist/cjs/logger.js.map +1 -1
  30. package/dist/cjs/middleware/actions.js +2 -18
  31. package/dist/cjs/middleware/actions.js.map +1 -1
  32. package/dist/cjs/middleware/defaults/gasEstimator.js +4 -2
  33. package/dist/cjs/middleware/defaults/gasEstimator.js.map +1 -1
  34. package/dist/cjs/middleware/erc7677middleware.d.ts +40 -0
  35. package/dist/cjs/middleware/erc7677middleware.js +77 -0
  36. package/dist/cjs/middleware/erc7677middleware.js.map +1 -0
  37. package/dist/cjs/middleware/noopMiddleware.d.ts +2 -1
  38. package/dist/cjs/middleware/noopMiddleware.js.map +1 -1
  39. package/dist/cjs/middleware/types.d.ts +3 -2
  40. package/dist/cjs/middleware/types.js.map +1 -1
  41. package/dist/cjs/signer/local-account.d.ts +44 -44
  42. package/dist/cjs/signer/local-account.js.map +1 -1
  43. package/dist/cjs/signer/wallet-client.d.ts +44 -44
  44. package/dist/cjs/signer/wallet-client.js.map +1 -1
  45. package/dist/cjs/transport/split.js.map +1 -1
  46. package/dist/cjs/utils/bigint.js.map +1 -1
  47. package/dist/cjs/utils/bytes.js.map +1 -1
  48. package/dist/cjs/utils/defaults.d.ts +2 -4
  49. package/dist/cjs/utils/defaults.js +5 -45
  50. package/dist/cjs/utils/defaults.js.map +1 -1
  51. package/dist/cjs/utils/index.d.ts +0 -3
  52. package/dist/cjs/utils/index.js +1 -25
  53. package/dist/cjs/utils/index.js.map +1 -1
  54. package/dist/cjs/utils/types.js.map +1 -1
  55. package/dist/cjs/utils/userop.js.map +1 -1
  56. package/dist/cjs/version.d.ts +1 -1
  57. package/dist/cjs/version.js +1 -1
  58. package/dist/cjs/version.js.map +1 -1
  59. package/dist/esm/account/smartContractAccount.d.ts +9 -3
  60. package/dist/esm/account/smartContractAccount.js +6 -1
  61. package/dist/esm/account/smartContractAccount.js.map +1 -1
  62. package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
  63. package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
  64. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
  65. package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
  66. package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
  67. package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
  68. package/dist/esm/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
  69. package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
  70. package/dist/esm/client/bundlerClient.js.map +1 -1
  71. package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
  72. package/dist/esm/client/isSmartAccountClient.js.map +1 -1
  73. package/dist/esm/client/types.d.ts +2 -7
  74. package/dist/esm/client/types.js.map +1 -1
  75. package/dist/esm/ens/utils.d.ts +1 -1
  76. package/dist/esm/ens/utils.js +1 -1
  77. package/dist/esm/ens/utils.js.map +1 -1
  78. package/dist/esm/errors/account.js.map +1 -1
  79. package/dist/esm/errors/client.js.map +1 -1
  80. package/dist/esm/errors/entrypoint.js.map +1 -1
  81. package/dist/esm/errors/signer.js.map +1 -1
  82. package/dist/esm/errors/transaction.js.map +1 -1
  83. package/dist/esm/errors/useroperation.js.map +1 -1
  84. package/dist/esm/index.d.ts +3 -6
  85. package/dist/esm/index.js +2 -4
  86. package/dist/esm/index.js.map +1 -1
  87. package/dist/esm/logger.js.map +1 -1
  88. package/dist/esm/middleware/actions.js +3 -18
  89. package/dist/esm/middleware/actions.js.map +1 -1
  90. package/dist/esm/middleware/defaults/gasEstimator.js +4 -2
  91. package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
  92. package/dist/esm/middleware/erc7677middleware.d.ts +40 -0
  93. package/dist/esm/middleware/erc7677middleware.js +73 -0
  94. package/dist/esm/middleware/erc7677middleware.js.map +1 -0
  95. package/dist/esm/middleware/noopMiddleware.d.ts +2 -1
  96. package/dist/esm/middleware/noopMiddleware.js.map +1 -1
  97. package/dist/esm/middleware/types.d.ts +3 -2
  98. package/dist/esm/middleware/types.js.map +1 -1
  99. package/dist/esm/signer/local-account.d.ts +44 -44
  100. package/dist/esm/signer/local-account.js.map +1 -1
  101. package/dist/esm/signer/wallet-client.d.ts +44 -44
  102. package/dist/esm/signer/wallet-client.js.map +1 -1
  103. package/dist/esm/transport/split.js.map +1 -1
  104. package/dist/esm/utils/bigint.js.map +1 -1
  105. package/dist/esm/utils/bytes.js.map +1 -1
  106. package/dist/esm/utils/defaults.d.ts +2 -4
  107. package/dist/esm/utils/defaults.js +1 -40
  108. package/dist/esm/utils/defaults.js.map +1 -1
  109. package/dist/esm/utils/index.d.ts +0 -3
  110. package/dist/esm/utils/index.js +0 -11
  111. package/dist/esm/utils/index.js.map +1 -1
  112. package/dist/esm/utils/types.js.map +1 -1
  113. package/dist/esm/utils/userop.js.map +1 -1
  114. package/dist/esm/version.d.ts +1 -1
  115. package/dist/esm/version.js +1 -1
  116. package/dist/esm/version.js.map +1 -1
  117. package/dist/types/account/smartContractAccount.d.ts +17 -11
  118. package/dist/types/account/smartContractAccount.d.ts.map +1 -1
  119. package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts +33 -33
  120. package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts +43 -59
  121. package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts.map +1 -1
  122. package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts +18 -18
  123. package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts +3 -3
  124. package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts +3 -4
  125. package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts.map +1 -1
  126. package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts +0 -14
  127. package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts.map +1 -1
  128. package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts +0 -7
  129. package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts.map +1 -1
  130. package/dist/types/actions/smartAccount/sendUserOperation.d.ts +17 -3
  131. package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
  132. package/dist/types/client/bundlerClient.d.ts +2 -2
  133. package/dist/types/client/decorators/bundlerClient.d.ts +8 -8
  134. package/dist/types/client/isSmartAccountClient.d.ts +4 -4
  135. package/dist/types/client/types.d.ts +2 -7
  136. package/dist/types/client/types.d.ts.map +1 -1
  137. package/dist/types/ens/utils.d.ts +1 -1
  138. package/dist/types/ens/utils.d.ts.map +1 -1
  139. package/dist/types/errors/account.d.ts +53 -4
  140. package/dist/types/errors/account.d.ts.map +1 -1
  141. package/dist/types/errors/client.d.ts +15 -0
  142. package/dist/types/errors/client.d.ts.map +1 -1
  143. package/dist/types/errors/entrypoint.d.ts +12 -0
  144. package/dist/types/errors/entrypoint.d.ts.map +1 -1
  145. package/dist/types/errors/signer.d.ts +5 -0
  146. package/dist/types/errors/signer.d.ts.map +1 -1
  147. package/dist/types/errors/transaction.d.ts +8 -1
  148. package/dist/types/errors/transaction.d.ts.map +1 -1
  149. package/dist/types/errors/useroperation.d.ts +5 -5
  150. package/dist/types/errors/useroperation.d.ts.map +1 -1
  151. package/dist/types/index.d.ts +3 -6
  152. package/dist/types/index.d.ts.map +1 -1
  153. package/dist/types/logger.d.ts +88 -0
  154. package/dist/types/logger.d.ts.map +1 -1
  155. package/dist/types/middleware/actions.d.ts +3 -3
  156. package/dist/types/middleware/actions.d.ts.map +1 -1
  157. package/dist/types/middleware/defaults/gasEstimator.d.ts +2 -2
  158. package/dist/types/middleware/defaults/gasEstimator.d.ts.map +1 -1
  159. package/dist/types/middleware/erc7677middleware.d.ts +62 -0
  160. package/dist/types/middleware/erc7677middleware.d.ts.map +1 -0
  161. package/dist/types/middleware/noopMiddleware.d.ts +4 -4
  162. package/dist/types/middleware/noopMiddleware.d.ts.map +1 -1
  163. package/dist/types/middleware/types.d.ts +3 -2
  164. package/dist/types/middleware/types.d.ts.map +1 -1
  165. package/dist/types/signer/local-account.d.ts +137 -45
  166. package/dist/types/signer/local-account.d.ts.map +1 -1
  167. package/dist/types/signer/wallet-client.d.ts +133 -44
  168. package/dist/types/signer/wallet-client.d.ts.map +1 -1
  169. package/dist/types/transport/split.d.ts +2 -2
  170. package/dist/types/utils/bigint.d.ts +14 -14
  171. package/dist/types/utils/bigint.d.ts.map +1 -1
  172. package/dist/types/utils/bytes.d.ts +5 -5
  173. package/dist/types/utils/defaults.d.ts +2 -12
  174. package/dist/types/utils/defaults.d.ts.map +1 -1
  175. package/dist/types/utils/index.d.ts +12 -22
  176. package/dist/types/utils/index.d.ts.map +1 -1
  177. package/dist/types/utils/types.d.ts +2 -2
  178. package/dist/types/utils/userop.d.ts +33 -33
  179. package/dist/types/version.d.ts +1 -1
  180. package/dist/types/version.d.ts.map +1 -1
  181. package/package.json +4 -3
  182. package/src/account/smartContractAccount.ts +19 -13
  183. package/src/actions/smartAccount/buildUserOperationFromTx.ts +35 -35
  184. package/src/actions/smartAccount/buildUserOperationFromTxs.ts +44 -60
  185. package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +19 -19
  186. package/src/actions/smartAccount/estimateUserOperationGas.ts +3 -3
  187. package/src/actions/smartAccount/internal/initUserOperation.ts +3 -4
  188. package/src/actions/smartAccount/internal/runMiddlewareStack.ts +0 -22
  189. package/src/actions/smartAccount/internal/sendUserOperation.ts +0 -7
  190. package/src/actions/smartAccount/sendUserOperation.ts +17 -3
  191. package/src/client/bundlerClient.ts +2 -2
  192. package/src/client/decorators/bundlerClient.ts +8 -8
  193. package/src/client/isSmartAccountClient.ts +4 -4
  194. package/src/client/types.ts +2 -15
  195. package/src/ens/utils.ts +1 -2
  196. package/src/errors/account.ts +64 -4
  197. package/src/errors/client.ts +18 -0
  198. package/src/errors/entrypoint.ts +12 -0
  199. package/src/errors/signer.ts +6 -0
  200. package/src/errors/transaction.ts +10 -1
  201. package/src/errors/useroperation.ts +5 -6
  202. package/src/index.ts +2 -31
  203. package/src/logger.ts +88 -0
  204. package/src/middleware/actions.ts +6 -27
  205. package/src/middleware/defaults/gasEstimator.ts +9 -5
  206. package/src/middleware/erc7677middleware.ts +201 -0
  207. package/src/middleware/noopMiddleware.ts +6 -4
  208. package/src/middleware/types.ts +16 -7
  209. package/src/signer/local-account.ts +94 -2
  210. package/src/signer/wallet-client.ts +89 -0
  211. package/src/transport/split.ts +2 -2
  212. package/src/utils/bigint.ts +15 -15
  213. package/src/utils/bytes.ts +5 -5
  214. package/src/utils/defaults.ts +3 -76
  215. package/src/utils/index.ts +12 -35
  216. package/src/utils/types.ts +2 -2
  217. package/src/utils/userop.ts +33 -33
  218. package/src/version.ts +1 -1
  219. package/dist/cjs/account/base.d.ts +0 -49
  220. package/dist/cjs/account/base.js +0 -257
  221. package/dist/cjs/account/base.js.map +0 -1
  222. package/dist/cjs/account/schema.d.ts +0 -100
  223. package/dist/cjs/account/schema.js +0 -43
  224. package/dist/cjs/account/schema.js.map +0 -1
  225. package/dist/cjs/account/simple.d.ts +0 -14
  226. package/dist/cjs/account/simple.js +0 -119
  227. package/dist/cjs/account/simple.js.map +0 -1
  228. package/dist/cjs/account/types.d.ts +0 -30
  229. package/dist/cjs/account/types.js +0 -3
  230. package/dist/cjs/account/types.js.map +0 -1
  231. package/dist/cjs/chains/index.d.ts +0 -20
  232. package/dist/cjs/chains/index.js +0 -169
  233. package/dist/cjs/chains/index.js.map +0 -1
  234. package/dist/esm/account/base.d.ts +0 -49
  235. package/dist/esm/account/base.js +0 -253
  236. package/dist/esm/account/base.js.map +0 -1
  237. package/dist/esm/account/schema.d.ts +0 -100
  238. package/dist/esm/account/schema.js +0 -35
  239. package/dist/esm/account/schema.js.map +0 -1
  240. package/dist/esm/account/simple.d.ts +0 -14
  241. package/dist/esm/account/simple.js +0 -115
  242. package/dist/esm/account/simple.js.map +0 -1
  243. package/dist/esm/account/types.d.ts +0 -30
  244. package/dist/esm/account/types.js +0 -2
  245. package/dist/esm/account/types.js.map +0 -1
  246. package/dist/esm/chains/index.d.ts +0 -20
  247. package/dist/esm/chains/index.js +0 -166
  248. package/dist/esm/chains/index.js.map +0 -1
  249. package/dist/types/account/base.d.ts +0 -128
  250. package/dist/types/account/base.d.ts.map +0 -1
  251. package/dist/types/account/schema.d.ts +0 -101
  252. package/dist/types/account/schema.d.ts.map +0 -1
  253. package/dist/types/account/simple.d.ts +0 -15
  254. package/dist/types/account/simple.d.ts.map +0 -1
  255. package/dist/types/account/types.d.ts +0 -144
  256. package/dist/types/account/types.d.ts.map +0 -1
  257. package/dist/types/chains/index.d.ts +0 -21
  258. package/dist/types/chains/index.d.ts.map +0 -1
  259. package/src/account/base.ts +0 -415
  260. package/src/account/schema.ts +0 -51
  261. package/src/account/simple.ts +0 -221
  262. package/src/account/types.ts +0 -184
  263. package/src/chains/index.ts +0 -194
@@ -5,9 +5,23 @@ import type { SendUserOperationParameters, UserOperationContext } from "./types.
5
5
  /**
6
6
  * 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.
7
7
  *
8
- * @param client the smart account client to use for RPC requests
9
- * @param args {@link SendUserOperationParameters} containg the UO or batch to send, context, overrides, and account if not hoisted on the client
10
- * @returns a Promise containing the {@link SendUserOperationResult}
8
+ * @example
9
+ * ```ts
10
+ * import { createSmartAccountClient, toSmartContractAccount } from "@aa-sdk/core";
11
+ *
12
+ * const account = await toSmartContractAccount(...);
13
+ * const result = await createSmartAccountClient(...).sendUserOperation({
14
+ * uo: {
15
+ * target: "0x...",
16
+ * data: "0x...", // or "0x",
17
+ * value: 0n, // optional
18
+ * }
19
+ * });
20
+ * ```
21
+ *
22
+ * @param {Client<TTransport, TChain, TAccount>} client the smart account client to use for RPC requests
23
+ * @param {SendUserOperationParameters<TAccount, TContext>} args contains the UO or batch to send, context, overrides, and account if not hoisted on the client
24
+ * @returns {Promise<SendUserOperationResult<TEntryPointVersion>>} a Promise containing the result of the user operation
11
25
  */
12
26
  export declare function sendUserOperation<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined, TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>>(client: Client<TTransport, TChain, TAccount>, args: SendUserOperationParameters<TAccount, TContext>): Promise<SendUserOperationResult<TEntryPointVersion>>;
13
27
  //# sourceMappingURL=sendUserOperation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAKrE,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,CAAC,GACpD,OAAO,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CA4BtD"}
1
+ {"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAKrE,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAAS,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,EAElG,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,CAAC,GACpD,OAAO,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CA4BtD"}
@@ -23,8 +23,8 @@ export declare const createBundlerClientFromExisting: <T extends Transport | Fal
23
23
  /**
24
24
  * Creates a PublicClient with methods for calling Bundler RPC methods
25
25
  *
26
- * @param args - configuration for the client
27
- * @returns a PublicClient with methods for calling Bundler RPC methods
26
+ * @param {PublicClientConfig<TTransport, Chain> & { type?: string }} args - configuration for the client
27
+ * @returns {BundlerClient<TTransport>} a PublicClient with methods for calling Bundler RPC methods
28
28
  */
29
29
  export declare function createBundlerClient<TTransport extends Transport>(args: PublicClientConfig<TTransport, Chain> & {
30
30
  type?: string;
@@ -32,38 +32,38 @@ export type BundlerActions = {
32
32
  /**
33
33
  * calls `eth_estimateUserOperationGas` and returns the result
34
34
  *
35
- * @param request - the {@link UserOperationRequest} to estimate gas for
35
+ * @param request - the UserOperationRequest to estimate gas for
36
36
  * @param entryPoint - the entry point address the op will be sent to
37
37
  * @param stateOverride - the state override to use for the estimation
38
- * @returns the gas estimates for the given response (see: {@link UserOperationEstimateGasResponse})
38
+ * @returns the gas estimates for the given response
39
39
  */
40
40
  estimateUserOperationGas<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationRequest<TEntryPointVersion>, entryPoint: Address, stateOverride?: StateOverride): Promise<UserOperationEstimateGasResponse<TEntryPointVersion>>;
41
41
  /**
42
42
  * calls `eth_sendUserOperation` and returns the hash of the sent UserOperation
43
43
  *
44
- * @param request - the {@link UserOperationRequest} to send
44
+ * @param request - the UserOperationRequest to send
45
45
  * @param entryPoint - the entry point address the op will be sent to
46
46
  * @returns the hash of the sent UserOperation
47
47
  */
48
48
  sendRawUserOperation<TEntryPointVersion extends EntryPointVersion = EntryPointVersion>(request: UserOperationRequest<TEntryPointVersion>, entryPoint: Address): Promise<Hash>;
49
49
  /**
50
- * calls `eth_getUserOperationByHash` and returns the {@link UserOperationResponse}
50
+ * calls `eth_getUserOperationByHash` and returns the UserOperationResponse
51
51
  *
52
52
  * @param hash - the hash of the UserOperation to fetch
53
- * @returns - {@link UserOperationResponse}
53
+ * @returns - the user operation if found or null
54
54
  */
55
55
  getUserOperationByHash(hash: Hash): Promise<UserOperationResponse | null>;
56
56
  /**
57
- * calls `eth_getUserOperationReceipt` and returns the {@link UserOperationReceipt}
57
+ * calls `eth_getUserOperationReceipt` and returns the UserOperationReceipt
58
58
  *
59
59
  * @param hash - the hash of the UserOperation to get the receipt for
60
- * @returns - {@link UserOperationReceipt}
60
+ * @returns - a user operation receipt or null if not found
61
61
  */
62
62
  getUserOperationReceipt(hash: Hash): Promise<UserOperationReceipt | null>;
63
63
  /**
64
64
  * calls `eth_supportedEntryPoints` and returns the entry points the RPC supports
65
65
  *
66
- * @returns - {@link Address}[]
66
+ * @returns - an array of the entrypoint addresses supported
67
67
  */
68
68
  getSupportedEntryPoints(): Promise<Address[]>;
69
69
  };
@@ -6,8 +6,8 @@ import type { BaseSmartAccountClient, SmartAccountClient } from "./smartAccountC
6
6
  * Useful for narrowing the type of the client down when used within the
7
7
  * smart account client decorators
8
8
  *
9
- * @param client a viem client
10
- * @returns true if the client is a SmartAccountClient
9
+ * @param {Client<TTransport, TChain, TAccount>} client a viem client
10
+ * @returns {boolean} true if the client is a SmartAccountClient
11
11
  */
12
12
  export declare function isSmartAccountClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(client: Client<TTransport, TChain, TAccount>): client is SmartAccountClient<TTransport, TChain, TAccount>;
13
13
  /**
@@ -15,8 +15,8 @@ export declare function isSmartAccountClient<TTransport extends Transport = Tran
15
15
  * Useful for narrowing the type of the client down when used within the
16
16
  * smart account action decorators
17
17
  *
18
- * @param client a viem client
19
- * @returns true if the account is a BaseSmartAccountClient
18
+ * @param {Client<TTransport, TChain, TAccount>} client a viem client
19
+ * @returns {boolean} true if the account is a BaseSmartAccountClient
20
20
  */
21
21
  export declare function isBaseSmartAccountClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(client: Client<TTransport, TChain, TAccount>): client is BaseSmartAccountClient<TTransport, TChain, TAccount>;
22
22
  //# sourceMappingURL=isSmartAccountClient.d.ts.map
@@ -3,7 +3,7 @@ import type { Hash, Hex } from "viem";
3
3
  import type { z } from "zod";
4
4
  import type { UserOperationContext } from "../actions/smartAccount/types.js";
5
5
  import type { EntryPointVersion } from "../entrypoint/types.js";
6
- import type { ClientMiddleware, ClientMiddlewareFn } from "../middleware/types.js";
6
+ import type { ClientMiddleware } from "../middleware/types.js";
7
7
  import type { UserOperationRequest } from "../types.js";
8
8
  import type { ConnectionConfigSchema } from "./schema.js";
9
9
  export type ConnectorData = {
@@ -18,10 +18,5 @@ export type UpgradeToData = {
18
18
  implAddress: Address;
19
19
  initializationData: Hex;
20
20
  };
21
- export type ClientMiddlewareConfig<TContext extends UserOperationContext | undefined = UserOperationContext | undefined> = Omit<Partial<ClientMiddleware<TContext>>, "dummyPaymasterAndData" | "paymasterAndData"> & {
22
- paymasterAndData?: {
23
- dummyPaymasterAndData: () => UserOperationRequest<"0.6.0">["paymasterAndData"] | Pick<UserOperationRequest<"0.7.0">, "paymaster" | "paymasterData">;
24
- paymasterAndData: ClientMiddlewareFn<TContext>;
25
- };
26
- };
21
+ export type ClientMiddlewareConfig<TContext extends UserOperationContext | undefined = UserOperationContext | undefined> = Partial<ClientMiddleware<TContext>>;
27
22
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC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,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,MAAM,MAAM,uBAAuB,CACjC,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,IAC9D;IACF,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;CACnD,CAAC;AAIF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,GAAG,CAAC;CACzB,CAAC;AAIF,MAAM,MAAM,sBAAsB,CAChC,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,IACX,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { Chain } from "viem/chains";
2
1
  import * as chains from "viem/chains";
2
+ import { type Chain } from "viem/chains";
3
3
  export declare const ChainsById: Map<number, chains.Chain>;
4
4
  /**
5
5
  * Converts a given chain ID to a coin type, following specific standards for mainnet and non-mainnet chains.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ens/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAGtC,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAEhD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,YAAa,MAAM,KAAG,MAQ1D,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,aAAc,MAAM,KAAG,MAQ3D,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,KAQzD,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/ens/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAW,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAEhD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,YAAa,MAAM,KAAG,MAQ1D,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,aAAc,MAAM,KAAG,MAQ3D,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,KAQzD,CAAC"}
@@ -6,7 +6,9 @@ import { BaseError } from "./base.js";
6
6
  */
7
7
  export declare class AccountNotFoundError extends BaseError {
8
8
  name: string;
9
- constructor();
9
+ /**
10
+ * Constructor for initializing an error message indicating that an account could not be found to execute the specified action.
11
+ */ constructor();
10
12
  }
11
13
  /**
12
14
  * Represents an error that is thrown when no default factory is defined for a specific account type on a given chain and entry point version.
@@ -14,6 +16,13 @@ export declare class AccountNotFoundError extends BaseError {
14
16
  */
15
17
  export declare class DefaultFactoryNotDefinedError extends BaseError {
16
18
  name: string;
19
+ /**
20
+ * Constructs an error message indicating that no default factory was found for the given account type, chain, and entry point version.
21
+ *
22
+ * @param {string} accountType the type of account
23
+ * @param {Chain} chain the blockchain chain
24
+ * @param {EntryPointVersion} version the entry point version
25
+ */
17
26
  constructor(accountType: string, chain: Chain, version: EntryPointVersion);
18
27
  }
19
28
  /**
@@ -21,13 +30,20 @@ export declare class DefaultFactoryNotDefinedError extends BaseError {
21
30
  */
22
31
  export declare class GetCounterFactualAddressError extends BaseError {
23
32
  name: string;
24
- constructor();
33
+ /**
34
+ * Constructor for initializing an error message indicating the failure of fetching the counter-factual address.
35
+ */ constructor();
25
36
  }
26
37
  /**
27
38
  * An error class representing the condition where upgrades are not supported for a specific account type. This error extends the `BaseError` class and provides a custom error message based on the account type.
28
39
  */
29
40
  export declare class UpgradesNotSupportedError extends BaseError {
30
41
  name: string;
42
+ /**
43
+ * Error constructor for indicating that upgrades are not supported by the given account type.
44
+ *
45
+ * @param {string} accountType The type of account that does not support upgrades
46
+ */
31
47
  constructor(accountType: string);
32
48
  }
33
49
  /**
@@ -35,13 +51,23 @@ export declare class UpgradesNotSupportedError extends BaseError {
35
51
  */
36
52
  export declare class SignTransactionNotSupportedError extends BaseError {
37
53
  name: string;
38
- constructor();
54
+ /**
55
+ * Throws an error indicating that signing a transaction is not supported by smart contracts.
56
+ *
57
+
58
+ */ constructor();
39
59
  }
40
60
  /**
41
61
  * Custom error class `FailedToGetStorageSlotError` which is used to signal a failure when attempting to retrieve a storage slot. This error includes the slot and slot descriptor in its message and inherits from `BaseError`.
42
62
  */
43
63
  export declare class FailedToGetStorageSlotError extends BaseError {
44
64
  name: string;
65
+ /**
66
+ * Custom error message constructor for failing to get a specific storage slot.
67
+ *
68
+ * @param {string} slot The storage slot that failed to be accessed or retrieved
69
+ * @param {string} slotDescriptor A description of the storage slot, for additional context in the error message
70
+ */
45
71
  constructor(slot: string, slotDescriptor: string);
46
72
  }
47
73
  /**
@@ -49,6 +75,11 @@ export declare class FailedToGetStorageSlotError extends BaseError {
49
75
  */
50
76
  export declare class BatchExecutionNotSupportedError extends BaseError {
51
77
  name: string;
78
+ /**
79
+ * Constructs an error message indicating that batch execution is not supported by the specified account type.
80
+ *
81
+ * @param {string} accountType the type of account that does not support batch execution
82
+ */
52
83
  constructor(accountType: string);
53
84
  }
54
85
  /**
@@ -56,6 +87,11 @@ export declare class BatchExecutionNotSupportedError extends BaseError {
56
87
  */
57
88
  export declare class AccountRequiresOwnerError extends BaseError {
58
89
  name: string;
90
+ /**
91
+ * Constructs an error indicating that an account of the specified type requires an owner to execute.
92
+ *
93
+ * @param {string} accountType The type of account that requires an owner
94
+ */
59
95
  constructor(accountType: string);
60
96
  }
61
97
  /**
@@ -63,6 +99,11 @@ export declare class AccountRequiresOwnerError extends BaseError {
63
99
  */
64
100
  export declare class UpgradeToAndCallNotSupportedError extends BaseError {
65
101
  name: string;
102
+ /**
103
+ * Constructs an error message indicating that `UpgradeToAndCall` is not supported by the specified account type.
104
+ *
105
+ * @param {string} accountType The type of account that does not support `UpgradeToAndCall`
106
+ */
66
107
  constructor(accountType: string);
67
108
  }
68
109
  /**
@@ -70,6 +111,12 @@ export declare class UpgradeToAndCallNotSupportedError extends BaseError {
70
111
  */
71
112
  export declare class IncorrectAccountType extends BaseError {
72
113
  name: string;
114
+ /**
115
+ * Constructs an error object indicating that the expected account type does not match the actual account type.
116
+ *
117
+ * @param {string} expected the expected account type
118
+ * @param {string} actual the actual account type that was received
119
+ */
73
120
  constructor(expected: string, actual: string);
74
121
  }
75
122
  /**
@@ -77,6 +124,8 @@ export declare class IncorrectAccountType extends BaseError {
77
124
  */
78
125
  export declare class SmartAccountWithSignerRequiredError extends BaseError {
79
126
  name: string;
80
- constructor();
127
+ /**
128
+ * Initializes a new instance of the error class with a predefined error message indicating that a smart account requires a signer.
129
+ */ constructor();
81
130
  }
82
131
  //# sourceMappingURL=account.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/errors/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,SAAS;IACxC,IAAI,SAA0B;;CAMxC;AAED;;;GAGG;AACH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;;OAEG;CAGJ"}
@@ -5,6 +5,13 @@ import { BaseError } from "./base.js";
5
5
  */
6
6
  export declare class IncompatibleClientError extends BaseError {
7
7
  name: string;
8
+ /**
9
+ * Throws an error when the client type does not match the expected client type.
10
+ *
11
+ * @param {string} expectedClient The expected type of the client.
12
+ * @param {string} method The method that was called.
13
+ * @param {Client} client The client instance.
14
+ */
8
15
  constructor(expectedClient: string, method: string, client: Client);
9
16
  }
10
17
  /**
@@ -12,6 +19,11 @@ export declare class IncompatibleClientError extends BaseError {
12
19
  */
13
20
  export declare class InvalidRpcUrlError extends BaseError {
14
21
  name: string;
22
+ /**
23
+ * Creates an instance of an error with a message indicating an invalid RPC URL.
24
+ *
25
+ * @param {string} [rpcUrl] The invalid RPC URL that caused the error
26
+ */
15
27
  constructor(rpcUrl?: string);
16
28
  }
17
29
  /**
@@ -19,6 +31,9 @@ export declare class InvalidRpcUrlError extends BaseError {
19
31
  */
20
32
  export declare class ChainNotFoundError extends BaseError {
21
33
  name: string;
34
+ /**
35
+ * Initializes a new instance of the error message with a default message indicating that no chain was supplied to the client.
36
+ */
22
37
  constructor();
23
38
  }
24
39
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/errors/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,SAAS;IAC3C,IAAI,SAA6B;gBAC9B,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAQnE;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IACtC,IAAI,SAAwB;gBACzB,MAAM,CAAC,EAAE,MAAM;CAG5B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IACtC,IAAI,SAAwB;;CAItC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/errors/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,SAAS;IAC3C,IAAI,SAA6B;IAE1C;;;;;;OAMG;gBACS,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAQnE;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IACtC,IAAI,SAAwB;IAErC;;;;OAIG;gBACS,MAAM,CAAC,EAAE,MAAM;CAG5B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,SAAS;IACtC,IAAI,SAAwB;IAErC;;OAEG;;CAIJ"}
@@ -5,6 +5,12 @@ import { BaseError } from "./base.js";
5
5
  */
6
6
  export declare class EntryPointNotFoundError extends BaseError {
7
7
  name: string;
8
+ /**
9
+ * Constructs an error message indicating that no default entry point exists for the given chain and entry point version.
10
+ *
11
+ * @param {Chain} chain The blockchain network for which the entry point is being queried
12
+ * @param {any} entryPointVersion The version of the entry point for which no default exists
13
+ */
8
14
  constructor(chain: Chain, entryPointVersion: any);
9
15
  }
10
16
  /**
@@ -12,6 +18,12 @@ export declare class EntryPointNotFoundError extends BaseError {
12
18
  */
13
19
  export declare class InvalidEntryPointError extends BaseError {
14
20
  name: string;
21
+ /**
22
+ * Constructs an error indicating an invalid entry point version for a specific chain.
23
+ *
24
+ * @param {Chain} chain The chain object containing information about the blockchain
25
+ * @param {any} entryPointVersion The entry point version that is invalid
26
+ */
15
27
  constructor(chain: Chain, entryPointVersion: any);
16
28
  }
17
29
  //# sourceMappingURL=entrypoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../../src/errors/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,SAAS;IAC3C,IAAI,SAA6B;gBAE9B,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG;CAQjD;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;IAC1C,IAAI,SAA4B;gBAE7B,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG;CAKjD"}
1
+ {"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../../src/errors/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,SAAS;IAC3C,IAAI,SAA6B;IAE1C;;;;;OAKG;gBACS,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG;CAQjD;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;IAC1C,IAAI,SAA4B;IAEzC;;;;;OAKG;gBACS,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG;CAKjD"}
@@ -4,6 +4,11 @@ import { BaseError } from "./base.js";
4
4
  */
5
5
  export declare class InvalidSignerTypeError extends BaseError {
6
6
  name: string;
7
+ /**
8
+ * Constructs an error message when an invalid signer type is passed to SmartAccountSigner.
9
+ *
10
+ * @param {string} [signerType] An optional parameter specifying the signer type. If not provided, a default error message will be used.
11
+ */
7
12
  constructor(signerType?: string);
8
13
  }
9
14
  //# sourceMappingURL=signer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/errors/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;IAC1C,IAAI,SAA4B;gBAC7B,UAAU,CAAC,EAAE,MAAM;CAQhC"}
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/errors/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;IAC1C,IAAI,SAA4B;IAEzC;;;;OAIG;gBACS,UAAU,CAAC,EAAE,MAAM;CAQhC"}
@@ -5,13 +5,20 @@ import { BaseError } from "./base.js";
5
5
  */
6
6
  export declare class TransactionMissingToParamError extends BaseError {
7
7
  name: string;
8
- constructor();
8
+ /**
9
+ * Throws an error indicating that a transaction is missing the `to` address in the request.
10
+ */ constructor();
9
11
  }
10
12
  /**
11
13
  * Represents an error that occurs when a transaction cannot be found for a given user operation. This error extends from `BaseError`. The `hash` of the transaction is provided to indicate which transaction could not be found.
12
14
  */
13
15
  export declare class FailedToFindTransactionError extends BaseError {
14
16
  name: string;
17
+ /**
18
+ * Constructs a new error message indicating a failure to find the transaction for the specified user operation hash.
19
+ *
20
+ * @param {Hex} hash The hexadecimal value representing the user operation hash.
21
+ */
15
22
  constructor(hash: Hex);
16
23
  }
17
24
  //# sourceMappingURL=transaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/errors/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,SAAS;IAClD,IAAI,SAAoC;;CAIlD;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,SAAS;IAChD,IAAI,SAAkC;gBACnC,IAAI,EAAE,GAAG;CAGtB"}
1
+ {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/errors/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,SAAS;IAClD,IAAI,SAAoC;IAEjD;;OAEG;CAGJ;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,SAAS;IAChD,IAAI,SAAkC;IAE/C;;;;OAIG;gBACS,IAAI,EAAE,GAAG;CAGtB"}
@@ -1,7 +1,7 @@
1
1
  import type { UserOperationRequest, UserOperationStruct } from "../types.js";
2
2
  import { BaseError } from "./base.js";
3
3
  /**
4
- * Thrown when a {@link UserOperationStruct} is not a valid request
4
+ * Thrown when a UserOperationStruct is not a valid request
5
5
  *
6
6
  * extends viem BaseError
7
7
  */
@@ -15,7 +15,7 @@ export declare class InvalidUserOperationError extends BaseError {
15
15
  *
16
16
  * InvalidUserOperationError constructor
17
17
  *
18
- * @param uo the invalid user operation struct
18
+ * @param {UserOperationStruct} uo the invalid user operation struct
19
19
  */
20
20
  constructor(uo: UserOperationStruct);
21
21
  }
@@ -23,13 +23,13 @@ export declare class InvalidUserOperationError extends BaseError {
23
23
  * Error thrown when waiting for user operation request to be mined.
24
24
  *
25
25
  * Includes the internal error as well as the request that failed. This request
26
- * can then be used with {@link dropAndReplaceUserOperation} to retry the operation.
26
+ * can then be used with dropAndReplaceUserOperation to retry the operation.
27
27
  */
28
28
  export declare class WaitForUserOperationError extends BaseError {
29
29
  request: UserOperationRequest;
30
30
  /**
31
- * @param request the user operation request that failed
32
- * @param error the underlying error that caused the failure
31
+ * @param {UserOperationRequest} request the user operation request that failed
32
+ * @param {Error} error the underlying error that caused the failure
33
33
  */
34
34
  constructor(request: UserOperationRequest, error: Error);
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useroperation.d.ts","sourceRoot":"","sources":["../../../src/errors/useroperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAItC;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACtD;;OAEG;IACM,IAAI,SAA+B;IAC5C;;;;;;OAMG;gBACS,EAAE,EAAE,mBAAmB;CAepC;AAED;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IAKnC,OAAO,EAAE,oBAAoB;IAJhD;;;OAGG;gBACgB,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK;CAG/D"}
1
+ {"version":3,"file":"useroperation.d.ts","sourceRoot":"","sources":["../../../src/errors/useroperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC;;;;GAIG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACtD;;OAEG;IACM,IAAI,SAA+B;IAC5C;;;;;;OAMG;gBACS,EAAE,EAAE,mBAAmB;CAepC;AAED;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IAKnC,OAAO,EAAE,oBAAoB;IAJhD;;;OAGG;gBACgB,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK;CAG/D"}
@@ -6,12 +6,8 @@ export { EntryPointAbi_v7 } from "./abis/EntryPointAbi_v7.js";
6
6
  export { SimpleAccountAbi_v6 } from "./abis/SimpleAccountAbi_v6.js";
7
7
  export { SimpleAccountAbi_v7 } from "./abis/SimpleAccountAbi_v7.js";
8
8
  export { SimpleAccountFactoryAbi } from "./abis/SimpleAccountFactoryAbi.js";
9
- export { BaseSmartContractAccount } from "./account/base.js";
10
- export { createSimpleSmartAccount } from "./account/simple.js";
11
- export type { SimpleSmartAccount } from "./account/simple.js";
12
9
  export type * from "./account/smartContractAccount.js";
13
10
  export { getAccountAddress, isSmartAccountWithSigner, parseFactoryAddressFromAccountInitCode, toSmartContractAccount, } from "./account/smartContractAccount.js";
14
- export type { BaseSmartAccountParams, SignTypedDataParams, } from "./account/types.js";
15
11
  export { buildUserOperation } from "./actions/smartAccount/buildUserOperation.js";
16
12
  export { buildUserOperationFromTx } from "./actions/smartAccount/buildUserOperationFromTx.js";
17
13
  export { buildUserOperationFromTxs } from "./actions/smartAccount/buildUserOperationFromTxs.js";
@@ -22,7 +18,6 @@ export { sendTransactions } from "./actions/smartAccount/sendTransactions.js";
22
18
  export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js";
23
19
  export type * from "./actions/smartAccount/types.js";
24
20
  export { waitForUserOperationTransaction } from "./actions/smartAccount/waitForUserOperationTransacation.js";
25
- export { arbitrum, arbitrumGoerli, arbitrumSepolia, base, baseGoerli, baseSepolia, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, zora, zoraSepolia, } from "./chains/index.js";
26
21
  export type * from "./client/bundlerClient.js";
27
22
  export { createBundlerClient, createBundlerClientFromExisting, } from "./client/bundlerClient.js";
28
23
  export type * from "./client/decorators/bundlerClient.js";
@@ -50,6 +45,8 @@ export { defaultFeeEstimator } from "./middleware/defaults/feeEstimator.js";
50
45
  export { defaultGasEstimator } from "./middleware/defaults/gasEstimator.js";
51
46
  export { defaultPaymasterAndData } from "./middleware/defaults/paymasterAndData.js";
52
47
  export { defaultUserOpSigner } from "./middleware/defaults/userOpSigner.js";
48
+ export type * from "./middleware/erc7677middleware.js";
49
+ export { erc7677Middleware } from "./middleware/erc7677middleware.js";
53
50
  export { noopMiddleware } from "./middleware/noopMiddleware.js";
54
51
  export type * from "./middleware/types.js";
55
52
  export { LocalAccountSigner } from "./signer/local-account.js";
@@ -60,5 +57,5 @@ export { WalletClientSigner } from "./signer/wallet-client.js";
60
57
  export { split, type SplitTransportParams } from "./transport/split.js";
61
58
  export type * from "./types.js";
62
59
  export type * from "./utils/index.js";
63
- export { AlchemyChainMap, BigNumberishRangeSchema, BigNumberishSchema, ChainSchema, HexSchema, MultiplierSchema, allEqual, applyUserOpFeeOption, applyUserOpOverride, applyUserOpOverrideOrFeeOption, asyncPipe, bigIntMax, bigIntMultiply, bypassPaymasterAndData, bypassPaymasterAndDataEmptyHex, concatPaymasterAndData, deepHexlify, filterUndefined, getChain, getDefaultSimpleAccountFactoryAddress, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
60
+ export { BigNumberishRangeSchema, BigNumberishSchema, ChainSchema, HexSchema, MultiplierSchema, allEqual, applyUserOpFeeOption, applyUserOpOverride, applyUserOpOverrideOrFeeOption, asyncPipe, bigIntMax, bigIntMultiply, bypassPaymasterAndData, bypassPaymasterAndDataEmptyHex, concatPaymasterAndData, deepHexlify, filterUndefined, getDefaultUserOperationFeeOptions, isBigNumberish, isMultiplier, isValidRequest, parsePaymasterAndData, pick, resolveProperties, takeBytes, toRecord, } from "./utils/index.js";
64
61
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AACnC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uB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,CAAC"}
@@ -12,12 +12,100 @@ export declare enum LogLevel {
12
12
  export declare class Logger {
13
13
  static logLevel: LogLevel;
14
14
  static logFilter?: string;
15
+ /**
16
+ * Sets the log level for logging purposes.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * import { Logger, LogLevel } from "@aa-sdk/core";
21
+ * Logger.setLogLevel(LogLevel.DEBUG);
22
+ * ```
23
+ *
24
+ * @param {LogLevel} logLevel The desired log level
25
+ */
15
26
  static setLogLevel(logLevel: LogLevel): void;
27
+ /**
28
+ * Sets the log filter pattern.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * import { Logger } from "@aa-sdk/core";
33
+ *
34
+ * Logger.setLogFilter("error");
35
+ * ```
36
+ *
37
+ * @param {string} pattern The pattern to set as the log filter
38
+ */
16
39
  static setLogFilter(pattern: string): void;
40
+ /**
41
+ * Logs an error message to the console if the logging condition is met.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * import { Logger } from "@aa-sdk/core";
46
+ *
47
+ * Logger.error("An error occurred while processing the request");
48
+ * ```
49
+ *
50
+ * @param {string} msg The primary error message to be logged
51
+ * @param {...any[]} args Additional arguments to be logged along with the error message
52
+ */
17
53
  static error(msg: string, ...args: any[]): void;
54
+ /**
55
+ * Logs a warning message if the logging conditions are met.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * import { Logger } from "@aa-sdk/core";
60
+ *
61
+ * Logger.warn("Careful...");
62
+ * ```
63
+ *
64
+ * @param {string} msg The message to log as a warning
65
+ * @param {...any[]} args Additional parameters to log along with the message
66
+ */
18
67
  static warn(msg: string, ...args: any[]): void;
68
+ /**
69
+ * Logs a debug message to the console if the log level allows it.
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * import { Logger } from "@aa-sdk/core";
74
+ *
75
+ * Logger.debug("Something is happening");
76
+ * ```
77
+ *
78
+ * @param {string} msg The message to log
79
+ * @param {...any[]} args Additional arguments to pass to the console.debug method
80
+ */
19
81
  static debug(msg: string, ...args: any[]): void;
82
+ /**
83
+ * Logs an informational message to the console if the logging level is set to INFO.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * import { Logger } from "@aa-sdk/core";
88
+ *
89
+ * Logger.info("Something is happening");
90
+ * ```
91
+ *
92
+ * @param {string} msg the message to log
93
+ * @param {...any[]} args additional arguments to log alongside the message
94
+ */
20
95
  static info(msg: string, ...args: any[]): void;
96
+ /**
97
+ * Logs a message with additional arguments if the logging level permits it.
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * import { Logger } from "@aa-sdk/core";
102
+ *
103
+ * Logger.verbose("Something is happening");
104
+ * ```
105
+ *
106
+ * @param {string} msg The message to log
107
+ * @param {...any[]} args Additional arguments to be logged
108
+ */
21
109
  static verbose(msg: string, ...args: any[]): void;
22
110
  private static shouldLog;
23
111
  }
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,OAAO,IAAI;IACX,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,IAAI,IAAI;CACT;AAED;;GAEG;AACH,qBAAa,MAAM;IACjB,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAiB;IAC1C,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE1B,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ;IAIrC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM;IAInC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMxC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMvC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMxC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM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