@account-kit/infra 4.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/actions/simulateUserOperationChanges.d.ts +5 -0
  3. package/dist/cjs/actions/simulateUserOperationChanges.js +24 -0
  4. package/dist/cjs/actions/simulateUserOperationChanges.js.map +1 -0
  5. package/dist/cjs/actions/types.d.ts +39 -0
  6. package/dist/cjs/actions/types.js +17 -0
  7. package/dist/cjs/actions/types.js.map +1 -0
  8. package/dist/cjs/chains.d.ts +5 -0
  9. package/dist/cjs/chains.js +16 -0
  10. package/dist/cjs/chains.js.map +1 -0
  11. package/dist/cjs/client/decorators/alchemyEnhancedApis.d.ts +14 -0
  12. package/dist/cjs/client/decorators/alchemyEnhancedApis.js +26 -0
  13. package/dist/cjs/client/decorators/alchemyEnhancedApis.js.map +1 -0
  14. package/dist/cjs/client/decorators/smartAccount.d.ts +7 -0
  15. package/dist/cjs/client/decorators/smartAccount.js +9 -0
  16. package/dist/cjs/client/decorators/smartAccount.js.map +1 -0
  17. package/dist/cjs/client/internal/smartAccountClientFromRpc.d.ts +11 -0
  18. package/dist/cjs/client/internal/smartAccountClientFromRpc.js +55 -0
  19. package/dist/cjs/client/internal/smartAccountClientFromRpc.js.map +1 -0
  20. package/dist/cjs/client/isAlchemySmartAccountClient.d.ts +5539 -0
  21. package/dist/cjs/client/isAlchemySmartAccountClient.js +9 -0
  22. package/dist/cjs/client/isAlchemySmartAccountClient.js.map +1 -0
  23. package/dist/cjs/client/rpcClient.d.ts +8 -0
  24. package/dist/cjs/client/rpcClient.js +36 -0
  25. package/dist/cjs/client/rpcClient.js.map +1 -0
  26. package/dist/cjs/client/smartAccountClient.d.ts +18 -0
  27. package/dist/cjs/client/smartAccountClient.js +32 -0
  28. package/dist/cjs/client/smartAccountClient.js.map +1 -0
  29. package/dist/cjs/client/types.d.ts +76 -0
  30. package/dist/cjs/client/types.js +3 -0
  31. package/dist/cjs/client/types.js.map +1 -0
  32. package/dist/cjs/defaults.d.ts +3 -0
  33. package/dist/cjs/defaults.js +23 -0
  34. package/dist/cjs/defaults.js.map +1 -0
  35. package/dist/cjs/errors/base.d.ts +4 -0
  36. package/dist/cjs/errors/base.js +18 -0
  37. package/dist/cjs/errors/base.js.map +1 -0
  38. package/dist/cjs/errors/rpcUrl.d.ts +10 -0
  39. package/dist/cjs/errors/rpcUrl.js +26 -0
  40. package/dist/cjs/errors/rpcUrl.js.map +1 -0
  41. package/dist/cjs/gas-manager.d.ts +6 -0
  42. package/dist/cjs/gas-manager.js +35 -0
  43. package/dist/cjs/gas-manager.js.map +1 -0
  44. package/dist/cjs/index.d.ts +24 -0
  45. package/dist/cjs/index.js +32 -0
  46. package/dist/cjs/index.js.map +1 -0
  47. package/dist/cjs/middleware/feeEstimator.d.ts +3 -0
  48. package/dist/cjs/middleware/feeEstimator.js +26 -0
  49. package/dist/cjs/middleware/feeEstimator.js.map +1 -0
  50. package/dist/cjs/middleware/gasManager.d.ts +29 -0
  51. package/dist/cjs/middleware/gasManager.js +148 -0
  52. package/dist/cjs/middleware/gasManager.js.map +1 -0
  53. package/dist/cjs/middleware/userOperationSimulator.d.ts +3 -0
  54. package/dist/cjs/middleware/userOperationSimulator.js +21 -0
  55. package/dist/cjs/middleware/userOperationSimulator.js.map +1 -0
  56. package/dist/cjs/package.json +1 -0
  57. package/dist/cjs/schema.d.ts +396 -0
  58. package/dist/cjs/schema.js +26 -0
  59. package/dist/cjs/schema.js.map +1 -0
  60. package/dist/cjs/type.d.ts +3 -0
  61. package/dist/cjs/type.js +3 -0
  62. package/dist/cjs/type.js.map +1 -0
  63. package/dist/cjs/version.d.ts +1 -0
  64. package/dist/cjs/version.js +5 -0
  65. package/dist/cjs/version.js.map +1 -0
  66. package/dist/esm/actions/simulateUserOperationChanges.d.ts +5 -0
  67. package/dist/esm/actions/simulateUserOperationChanges.js +20 -0
  68. package/dist/esm/actions/simulateUserOperationChanges.js.map +1 -0
  69. package/dist/esm/actions/types.d.ts +39 -0
  70. package/dist/esm/actions/types.js +14 -0
  71. package/dist/esm/actions/types.js.map +1 -0
  72. package/dist/esm/chains.d.ts +5 -0
  73. package/dist/esm/chains.js +12 -0
  74. package/dist/esm/chains.js.map +1 -0
  75. package/dist/esm/client/decorators/alchemyEnhancedApis.d.ts +14 -0
  76. package/dist/esm/client/decorators/alchemyEnhancedApis.js +22 -0
  77. package/dist/esm/client/decorators/alchemyEnhancedApis.js.map +1 -0
  78. package/dist/esm/client/decorators/smartAccount.d.ts +7 -0
  79. package/dist/esm/client/decorators/smartAccount.js +5 -0
  80. package/dist/esm/client/decorators/smartAccount.js.map +1 -0
  81. package/dist/esm/client/internal/smartAccountClientFromRpc.d.ts +11 -0
  82. package/dist/esm/client/internal/smartAccountClientFromRpc.js +50 -0
  83. package/dist/esm/client/internal/smartAccountClientFromRpc.js.map +1 -0
  84. package/dist/esm/client/isAlchemySmartAccountClient.d.ts +5539 -0
  85. package/dist/esm/client/isAlchemySmartAccountClient.js +5 -0
  86. package/dist/esm/client/isAlchemySmartAccountClient.js.map +1 -0
  87. package/dist/esm/client/rpcClient.d.ts +8 -0
  88. package/dist/esm/client/rpcClient.js +32 -0
  89. package/dist/esm/client/rpcClient.js.map +1 -0
  90. package/dist/esm/client/smartAccountClient.d.ts +18 -0
  91. package/dist/esm/client/smartAccountClient.js +31 -0
  92. package/dist/esm/client/smartAccountClient.js.map +1 -0
  93. package/dist/esm/client/types.d.ts +76 -0
  94. package/dist/esm/client/types.js +2 -0
  95. package/dist/esm/client/types.js.map +1 -0
  96. package/dist/esm/defaults.d.ts +3 -0
  97. package/dist/esm/defaults.js +19 -0
  98. package/dist/esm/defaults.js.map +1 -0
  99. package/dist/esm/errors/base.d.ts +4 -0
  100. package/dist/esm/errors/base.js +14 -0
  101. package/dist/esm/errors/base.js.map +1 -0
  102. package/dist/esm/errors/rpcUrl.d.ts +10 -0
  103. package/dist/esm/errors/rpcUrl.js +24 -0
  104. package/dist/esm/errors/rpcUrl.js.map +1 -0
  105. package/dist/esm/gas-manager.d.ts +6 -0
  106. package/dist/esm/gas-manager.js +31 -0
  107. package/dist/esm/gas-manager.js.map +1 -0
  108. package/dist/esm/index.d.ts +24 -0
  109. package/dist/esm/index.js +15 -0
  110. package/dist/esm/index.js.map +1 -0
  111. package/dist/esm/middleware/feeEstimator.d.ts +3 -0
  112. package/dist/esm/middleware/feeEstimator.js +22 -0
  113. package/dist/esm/middleware/feeEstimator.js.map +1 -0
  114. package/dist/esm/middleware/gasManager.d.ts +29 -0
  115. package/dist/esm/middleware/gasManager.js +144 -0
  116. package/dist/esm/middleware/gasManager.js.map +1 -0
  117. package/dist/esm/middleware/userOperationSimulator.d.ts +3 -0
  118. package/dist/esm/middleware/userOperationSimulator.js +17 -0
  119. package/dist/esm/middleware/userOperationSimulator.js.map +1 -0
  120. package/dist/esm/package.json +1 -0
  121. package/dist/esm/schema.d.ts +396 -0
  122. package/dist/esm/schema.js +20 -0
  123. package/dist/esm/schema.js.map +1 -0
  124. package/dist/esm/type.d.ts +3 -0
  125. package/dist/esm/type.js +2 -0
  126. package/dist/esm/type.js.map +1 -0
  127. package/dist/esm/version.d.ts +1 -0
  128. package/dist/esm/version.js +2 -0
  129. package/dist/esm/version.js.map +1 -0
  130. package/dist/types/actions/simulateUserOperationChanges.d.ts +6 -0
  131. package/dist/types/actions/simulateUserOperationChanges.d.ts.map +1 -0
  132. package/dist/types/actions/types.d.ts +44 -0
  133. package/dist/types/actions/types.d.ts.map +1 -0
  134. package/dist/types/chains.d.ts +6 -0
  135. package/dist/types/chains.d.ts.map +1 -0
  136. package/dist/types/client/decorators/alchemyEnhancedApis.d.ts +15 -0
  137. package/dist/types/client/decorators/alchemyEnhancedApis.d.ts.map +1 -0
  138. package/dist/types/client/decorators/smartAccount.d.ts +8 -0
  139. package/dist/types/client/decorators/smartAccount.d.ts.map +1 -0
  140. package/dist/types/client/internal/smartAccountClientFromRpc.d.ts +19 -0
  141. package/dist/types/client/internal/smartAccountClientFromRpc.d.ts.map +1 -0
  142. package/dist/types/client/isAlchemySmartAccountClient.d.ts +5540 -0
  143. package/dist/types/client/isAlchemySmartAccountClient.d.ts.map +1 -0
  144. package/dist/types/client/rpcClient.d.ts +9 -0
  145. package/dist/types/client/rpcClient.d.ts.map +1 -0
  146. package/dist/types/client/smartAccountClient.d.ts +19 -0
  147. package/dist/types/client/smartAccountClient.d.ts.map +1 -0
  148. package/dist/types/client/types.d.ts +77 -0
  149. package/dist/types/client/types.d.ts.map +1 -0
  150. package/dist/types/defaults.d.ts +4 -0
  151. package/dist/types/defaults.d.ts.map +1 -0
  152. package/dist/types/errors/base.d.ts +5 -0
  153. package/dist/types/errors/base.d.ts.map +1 -0
  154. package/dist/types/errors/rpcUrl.d.ts +11 -0
  155. package/dist/types/errors/rpcUrl.d.ts.map +1 -0
  156. package/dist/types/gas-manager.d.ts +7 -0
  157. package/dist/types/gas-manager.d.ts.map +1 -0
  158. package/dist/types/index.d.ts +25 -0
  159. package/dist/types/index.d.ts.map +1 -0
  160. package/dist/types/middleware/feeEstimator.d.ts +4 -0
  161. package/dist/types/middleware/feeEstimator.d.ts.map +1 -0
  162. package/dist/types/middleware/gasManager.d.ts +94 -0
  163. package/dist/types/middleware/gasManager.d.ts.map +1 -0
  164. package/dist/types/middleware/userOperationSimulator.d.ts +4 -0
  165. package/dist/types/middleware/userOperationSimulator.d.ts.map +1 -0
  166. package/dist/types/schema.d.ts +397 -0
  167. package/dist/types/schema.d.ts.map +1 -0
  168. package/dist/types/type.d.ts +4 -0
  169. package/dist/types/type.d.ts.map +1 -0
  170. package/dist/types/version.d.ts +2 -0
  171. package/dist/types/version.d.ts.map +1 -0
  172. package/package.json +75 -0
  173. package/src/actions/simulateUserOperationChanges.ts +49 -0
  174. package/src/actions/types.ts +49 -0
  175. package/src/chains.ts +19 -0
  176. package/src/client/decorators/alchemyEnhancedApis.ts +54 -0
  177. package/src/client/decorators/smartAccount.ts +37 -0
  178. package/src/client/internal/smartAccountClientFromRpc.ts +121 -0
  179. package/src/client/isAlchemySmartAccountClient.ts +19 -0
  180. package/src/client/rpcClient.ts +50 -0
  181. package/src/client/smartAccountClient.ts +153 -0
  182. package/src/client/types.ts +89 -0
  183. package/src/defaults.ts +34 -0
  184. package/src/errors/base.ts +7 -0
  185. package/src/errors/rpcUrl.ts +20 -0
  186. package/src/gas-manager.ts +53 -0
  187. package/src/index.ts +24 -0
  188. package/src/middleware/feeEstimator.ts +40 -0
  189. package/src/middleware/gasManager.ts +432 -0
  190. package/src/middleware/userOperationSimulator.ts +26 -0
  191. package/src/schema.ts +33 -0
  192. package/src/type.ts +4 -0
  193. package/src/version.ts +3 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Alchemy Insights, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ import { type SendUserOperationParameters, type SmartContractAccount } from "@aa-sdk/core";
2
+ import type { Chain, Client, Transport } from "viem";
3
+ import type { AlchemyRpcSchema } from "../client/types.js";
4
+ import type { SimulateUserOperationAssetChangesResponse } from "./types.js";
5
+ export declare const simulateUserOperationChanges: <TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(client: Client<Transport, TChain, TAccount, AlchemyRpcSchema>, args: SendUserOperationParameters<TAccount>) => Promise<SimulateUserOperationAssetChangesResponse>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.simulateUserOperationChanges = void 0;
4
+ const core_1 = require("@aa-sdk/core");
5
+ const isAlchemySmartAccountClient_js_1 = require("../client/isAlchemySmartAccountClient.js");
6
+ const simulateUserOperationChanges = async (client, { account = client.account, overrides, ...params }) => {
7
+ if (!account) {
8
+ throw new core_1.AccountNotFoundError();
9
+ }
10
+ if (!(0, isAlchemySmartAccountClient_js_1.isAlchemySmartAccountClient)(client)) {
11
+ throw new core_1.IncompatibleClientError("AlchemySmartAccountClient", "SimulateUserOperationAssetChanges", client);
12
+ }
13
+ const uoStruct = (0, core_1.deepHexlify)(await client.buildUserOperation({
14
+ ...params,
15
+ account,
16
+ overrides,
17
+ }));
18
+ return client.request({
19
+ method: "alchemy_simulateUserOperationAssetChanges",
20
+ params: [uoStruct, account.getEntryPoint().address],
21
+ });
22
+ };
23
+ exports.simulateUserOperationChanges = simulateUserOperationChanges;
24
+ //# sourceMappingURL=simulateUserOperationChanges.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulateUserOperationChanges.js","sourceRoot":"","sources":["../../../src/actions/simulateUserOperationChanges.ts"],"names":[],"mappings":";;;AAAA,uCAMsB;AAEtB,6FAAuF;AAIhF,MAAM,4BAA4B,GAQiB,KAAK,EAC7D,MAAM,EACN,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,EAClD,EAAE;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,2BAAoB,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,CAAC,IAAA,4DAA2B,EAAC,MAAM,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,8BAAuB,CAC/B,2BAA2B,EAC3B,mCAAmC,EACnC,MAAM,CACP,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,IAAA,kBAAW,EAC1B,MAAM,MAAM,CAAC,kBAAkB,CAAC;QAC9B,GAAG,MAAM;QACT,OAAO;QACP,SAAS;KACV,CAAC,CACH,CAAC;IAEF,OAAO,MAAM,CAAC,OAAO,CAAC;QACpB,MAAM,EAAE,2CAA2C;QACnD,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC;KACpD,CAAC,CAAC;AACL,CAAC,CAAC;AApCW,QAAA,4BAA4B,gCAoCvC","sourcesContent":["import {\n AccountNotFoundError,\n IncompatibleClientError,\n deepHexlify,\n type SendUserOperationParameters,\n type SmartContractAccount,\n} from \"@aa-sdk/core\";\nimport type { Chain, Client, Transport } from \"viem\";\nimport { isAlchemySmartAccountClient } from \"../client/isAlchemySmartAccountClient.js\";\nimport type { AlchemyRpcSchema } from \"../client/types.js\";\nimport type { SimulateUserOperationAssetChangesResponse } from \"./types.js\";\n\nexport const simulateUserOperationChanges: <\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n>(\n client: Client<Transport, TChain, TAccount, AlchemyRpcSchema>,\n args: SendUserOperationParameters<TAccount>\n) => Promise<SimulateUserOperationAssetChangesResponse> = async (\n client,\n { account = client.account, overrides, ...params }\n) => {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isAlchemySmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"AlchemySmartAccountClient\",\n \"SimulateUserOperationAssetChanges\",\n client\n );\n }\n\n const uoStruct = deepHexlify(\n await client.buildUserOperation({\n ...params,\n account,\n overrides,\n })\n );\n\n return client.request({\n method: \"alchemy_simulateUserOperationAssetChanges\",\n params: [uoStruct, account.getEntryPoint().address],\n });\n};\n"]}
@@ -0,0 +1,39 @@
1
+ import type { UserOperationStruct } from "@aa-sdk/core";
2
+ import type { Address, Hash } from "viem";
3
+ export declare enum SimulateAssetType {
4
+ NATIVE = "NATIVE",
5
+ ERC20 = "ERC20",
6
+ ERC721 = "ERC721",
7
+ ERC1155 = "ERC1155",
8
+ SPECIAL_NFT = "SPECIAL_NFT"
9
+ }
10
+ export declare enum SimulateChangeType {
11
+ APPROVE = "APPROVE",
12
+ TRANSFER = "TRANSFER"
13
+ }
14
+ export type SimulateUserOperationAssetChangesRequest = [
15
+ UserOperationStruct,
16
+ entryPoint: Address,
17
+ blockNumber?: Hash
18
+ ];
19
+ export type SimulateUserOperationAssetChangesResponse = {
20
+ changes: SimulateAssetChange[];
21
+ error?: SimulateAssetChangesError;
22
+ };
23
+ export interface SimulateAssetChangesError extends Record<string, any> {
24
+ message: string;
25
+ }
26
+ export interface SimulateAssetChange {
27
+ assetType: SimulateAssetType;
28
+ changeType: SimulateChangeType;
29
+ from: Address;
30
+ to: Address;
31
+ rawAmount?: string;
32
+ amount?: string;
33
+ contactAddress: Address;
34
+ tokenId?: string;
35
+ decimals: number;
36
+ symbol: string;
37
+ name?: string;
38
+ logo?: string;
39
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SimulateChangeType = exports.SimulateAssetType = void 0;
4
+ var SimulateAssetType;
5
+ (function (SimulateAssetType) {
6
+ SimulateAssetType["NATIVE"] = "NATIVE";
7
+ SimulateAssetType["ERC20"] = "ERC20";
8
+ SimulateAssetType["ERC721"] = "ERC721";
9
+ SimulateAssetType["ERC1155"] = "ERC1155";
10
+ SimulateAssetType["SPECIAL_NFT"] = "SPECIAL_NFT";
11
+ })(SimulateAssetType || (exports.SimulateAssetType = SimulateAssetType = {}));
12
+ var SimulateChangeType;
13
+ (function (SimulateChangeType) {
14
+ SimulateChangeType["APPROVE"] = "APPROVE";
15
+ SimulateChangeType["TRANSFER"] = "TRANSFER";
16
+ })(SimulateChangeType || (exports.SimulateChangeType = SimulateChangeType = {}));
17
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/actions/types.ts"],"names":[],"mappings":";;;AAGA,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IAKnB,gDAA2B,CAAA;AAC7B,CAAC,EAVW,iBAAiB,iCAAjB,iBAAiB,QAU5B;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;AACvB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B","sourcesContent":["import type { UserOperationStruct } from \"@aa-sdk/core\";\nimport type { Address, Hash } from \"viem\";\n\nexport enum SimulateAssetType {\n NATIVE = \"NATIVE\",\n ERC20 = \"ERC20\",\n ERC721 = \"ERC721\",\n ERC1155 = \"ERC1155\",\n /**\n * Special contracts that don't follow ERC 721/1155. Currently limited to\n * CryptoKitties and CryptoPunks.\n */\n SPECIAL_NFT = \"SPECIAL_NFT\",\n}\n\nexport enum SimulateChangeType {\n APPROVE = \"APPROVE\",\n TRANSFER = \"TRANSFER\",\n}\n\nexport type SimulateUserOperationAssetChangesRequest = [\n UserOperationStruct,\n entryPoint: Address,\n blockNumber?: Hash\n];\n\nexport type SimulateUserOperationAssetChangesResponse = {\n changes: SimulateAssetChange[];\n error?: SimulateAssetChangesError;\n};\n\nexport interface SimulateAssetChangesError extends Record<string, any> {\n message: string;\n}\n\nexport interface SimulateAssetChange {\n assetType: SimulateAssetType;\n changeType: SimulateChangeType;\n from: Address;\n to: Address;\n rawAmount?: string;\n amount?: string;\n contactAddress: Address;\n tokenId?: string;\n decimals: number;\n symbol: string;\n name?: string;\n logo?: string;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import type { Chain } from "viem";
2
+ export declare const defineAlchemyChain: ({ chain, rpcBaseUrl, }: {
3
+ chain: Chain;
4
+ rpcBaseUrl: string;
5
+ }) => Chain;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defineAlchemyChain = void 0;
4
+ const defineAlchemyChain = ({ chain, rpcBaseUrl, }) => {
5
+ return {
6
+ ...chain,
7
+ rpcUrls: {
8
+ ...chain.rpcUrls,
9
+ alchemy: {
10
+ http: [rpcBaseUrl],
11
+ },
12
+ },
13
+ };
14
+ };
15
+ exports.defineAlchemyChain = defineAlchemyChain;
16
+ //# sourceMappingURL=chains.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chains.js","sourceRoot":"","sources":["../../src/chains.ts"],"names":[],"mappings":";;;AAEO,MAAM,kBAAkB,GAAG,CAAC,EACjC,KAAK,EACL,UAAU,GAIX,EAAS,EAAE;IACV,OAAO;QACL,GAAG,KAAK;QACR,OAAO,EAAE;YACP,GAAG,KAAK,CAAC,OAAO;YAChB,OAAO,EAAE;gBACP,IAAI,EAAE,CAAC,UAAU,CAAC;aACnB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,kBAAkB,sBAgB7B","sourcesContent":["import type { Chain } from \"viem\";\n\nexport const defineAlchemyChain = ({\n chain,\n rpcBaseUrl,\n}: {\n chain: Chain;\n rpcBaseUrl: string;\n}): Chain => {\n return {\n ...chain,\n rpcUrls: {\n ...chain.rpcUrls,\n alchemy: {\n http: [rpcBaseUrl],\n },\n },\n };\n};\n"]}
@@ -0,0 +1,14 @@
1
+ import type { SmartContractAccount } from "@aa-sdk/core";
2
+ import type { Alchemy } from "alchemy-sdk";
3
+ import type { Chain, Transport } from "viem";
4
+ import type { AlchemySmartAccountClient } from "../smartAccountClient.js";
5
+ export type AlchemyEnhancedApis = {
6
+ core: Alchemy["core"];
7
+ nft: Alchemy["nft"];
8
+ transact: Alchemy["transact"];
9
+ debug: Alchemy["debug"];
10
+ ws: Alchemy["ws"];
11
+ notify: Alchemy["notify"];
12
+ config: Alchemy["config"];
13
+ };
14
+ export declare const alchemyEnhancedApiActions: (alchemy: Alchemy) => <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(client: AlchemySmartAccountClient<TTransport, TChain, TAccount>) => AlchemyEnhancedApis;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.alchemyEnhancedApiActions = void 0;
4
+ const schema_js_1 = require("../../schema.js");
5
+ const alchemyEnhancedApiActions = (alchemy) => (client) => {
6
+ const alchemySdk = schema_js_1.AlchemySdkClientSchema.parse(alchemy);
7
+ if (client.transport.type === "http") {
8
+ const { url } = client.transport;
9
+ if (client.transport.type === "http" &&
10
+ alchemy.config.url &&
11
+ alchemy.config.url !== url) {
12
+ throw new Error("Alchemy SDK client JSON-RPC URL must match AlchemyProvider JSON-RPC URL");
13
+ }
14
+ }
15
+ return {
16
+ core: alchemySdk.core,
17
+ nft: alchemySdk.nft,
18
+ transact: alchemySdk.transact,
19
+ debug: alchemySdk.debug,
20
+ ws: alchemySdk.ws,
21
+ notify: alchemySdk.notify,
22
+ config: alchemySdk.config,
23
+ };
24
+ };
25
+ exports.alchemyEnhancedApiActions = alchemyEnhancedApiActions;
26
+ //# sourceMappingURL=alchemyEnhancedApis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alchemyEnhancedApis.js","sourceRoot":"","sources":["../../../../src/client/decorators/alchemyEnhancedApis.ts"],"names":[],"mappings":";;;AAGA,+CAAyD;AAalD,MAAM,yBAAyB,GAUX,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE;IACjD,MAAM,UAAU,GAAG,kCAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEzD,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACrC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,SACa,CAAC;QAErC,IACE,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,MAAM;YAChC,OAAO,CAAC,MAAM,CAAC,GAAG;YAClB,OAAO,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,EAC1B,CAAC;YACD,MAAM,IAAI,KAAK,CACb,yEAAyE,CAC1E,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,GAAG,EAAE,UAAU,CAAC,GAAG;QACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,EAAE,EAAE,UAAU,CAAC,EAAE;QACjB,MAAM,EAAE,UAAU,CAAC,MAAM;QACzB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,yBAAyB,6BAqCpC","sourcesContent":["import type { SmartContractAccount } from \"@aa-sdk/core\";\nimport type { Alchemy } from \"alchemy-sdk\";\nimport type { Chain, HttpTransport, Transport } from \"viem\";\nimport { AlchemySdkClientSchema } from \"../../schema.js\";\nimport type { AlchemySmartAccountClient } from \"../smartAccountClient.js\";\n\nexport type AlchemyEnhancedApis = {\n core: Alchemy[\"core\"];\n nft: Alchemy[\"nft\"];\n transact: Alchemy[\"transact\"];\n debug: Alchemy[\"debug\"];\n ws: Alchemy[\"ws\"];\n notify: Alchemy[\"notify\"];\n config: Alchemy[\"config\"];\n};\n\nexport const alchemyEnhancedApiActions: (\n alchemy: Alchemy\n) => <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n>(\n client: AlchemySmartAccountClient<TTransport, TChain, TAccount>\n) => AlchemyEnhancedApis = (alchemy) => (client) => {\n const alchemySdk = AlchemySdkClientSchema.parse(alchemy);\n\n if (client.transport.type === \"http\") {\n const { url } = client.transport as ReturnType<HttpTransport>[\"config\"] &\n ReturnType<HttpTransport>[\"value\"];\n\n if (\n client.transport.type === \"http\" &&\n alchemy.config.url &&\n alchemy.config.url !== url\n ) {\n throw new Error(\n \"Alchemy SDK client JSON-RPC URL must match AlchemyProvider JSON-RPC URL\"\n );\n }\n }\n\n return {\n core: alchemySdk.core,\n nft: alchemySdk.nft,\n transact: alchemySdk.transact,\n debug: alchemySdk.debug,\n ws: alchemySdk.ws,\n notify: alchemySdk.notify,\n config: alchemySdk.config,\n };\n};\n"]}
@@ -0,0 +1,7 @@
1
+ import type { SendUserOperationParameters, SmartContractAccount, UserOperationContext } from "@aa-sdk/core";
2
+ import type { Chain, Client, Transport } from "viem";
3
+ import type { SimulateUserOperationAssetChangesResponse } from "../../actions/types.js";
4
+ export type AlchemySmartAccountClientActions<TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined> = {
5
+ simulateUserOperation: (args: SendUserOperationParameters<TAccount, TContext>) => Promise<SimulateUserOperationAssetChangesResponse>;
6
+ };
7
+ export declare const alchemyActions: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(client: Client<TTransport, TChain, TAccount>) => AlchemySmartAccountClientActions<TAccount, TContext>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.alchemyActions = void 0;
4
+ const simulateUserOperationChanges_js_1 = require("../../actions/simulateUserOperationChanges.js");
5
+ const alchemyActions = (client) => ({
6
+ simulateUserOperation: async (args) => (0, simulateUserOperationChanges_js_1.simulateUserOperationChanges)(client, args),
7
+ });
8
+ exports.alchemyActions = alchemyActions;
9
+ //# sourceMappingURL=smartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smartAccount.js","sourceRoot":"","sources":["../../../../src/client/decorators/smartAccount.ts"],"names":[],"mappings":";;;AAMA,mGAA6F;AAgBtF,MAAM,cAAc,GAWiC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACvE,qBAAqB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CACpC,IAAA,8DAA4B,EAAC,MAAM,EAAE,IAAI,CAAC;CAC7C,CAAC,CAAC;AAdU,QAAA,cAAc,kBAcxB","sourcesContent":["import type {\n SendUserOperationParameters,\n SmartContractAccount,\n UserOperationContext,\n} from \"@aa-sdk/core\";\nimport type { Chain, Client, Transport } from \"viem\";\nimport { simulateUserOperationChanges } from \"../../actions/simulateUserOperationChanges.js\";\nimport type { SimulateUserOperationAssetChangesResponse } from \"../../actions/types.js\";\n\nexport type AlchemySmartAccountClientActions<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = {\n simulateUserOperation: (\n args: SendUserOperationParameters<TAccount, TContext>\n ) => Promise<SimulateUserOperationAssetChangesResponse>;\n};\n\nexport const alchemyActions: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>\n) => AlchemySmartAccountClientActions<TAccount, TContext> = (client) => ({\n simulateUserOperation: async (args) =>\n simulateUserOperationChanges(client, args),\n});\n"]}
@@ -0,0 +1,11 @@
1
+ import { type SmartContractAccount, type SmartContractAccountWithSigner, type UserOperationContext } from "@aa-sdk/core";
2
+ import type { Chain, CustomTransport, Transport } from "viem";
3
+ import type { AlchemySmartAccountClient, AlchemySmartAccountClientConfig } from "../smartAccountClient.js";
4
+ import type { ClientWithAlchemyMethods } from "../types.js";
5
+ export type CreateAlchemySmartAccountClientFromRpcClient<TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined> = Omit<AlchemySmartAccountClientConfig<Transport, Chain, TAccount, TContext>, "rpcUrl" | "chain" | "apiKey" | "jwt"> & {
6
+ client: ClientWithAlchemyMethods;
7
+ };
8
+ export declare function getSignerTypeHeader<TAccount extends SmartContractAccountWithSigner>(account: TAccount): {
9
+ "Alchemy-Aa-Sdk-Signer": string;
10
+ };
11
+ export declare function createAlchemySmartAccountClientFromRpcClient<TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(args: CreateAlchemySmartAccountClientFromRpcClient<TAccount, TContext>): AlchemySmartAccountClient<CustomTransport, TChain, TAccount, Record<string, never>, TContext>;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAlchemySmartAccountClientFromRpcClient = exports.getSignerTypeHeader = void 0;
4
+ const core_1 = require("@aa-sdk/core");
5
+ const feeEstimator_js_1 = require("../../middleware/feeEstimator.js");
6
+ const gasManager_js_1 = require("../../middleware/gasManager.js");
7
+ const userOperationSimulator_js_1 = require("../../middleware/userOperationSimulator.js");
8
+ const smartAccount_js_1 = require("../decorators/smartAccount.js");
9
+ function getSignerTypeHeader(account) {
10
+ return { "Alchemy-Aa-Sdk-Signer": account.getSigner().signerType };
11
+ }
12
+ exports.getSignerTypeHeader = getSignerTypeHeader;
13
+ function createAlchemySmartAccountClientFromRpcClient({ opts, account, useSimulation, gasManagerConfig, feeEstimator, gasEstimator, customMiddleware, signUserOperation, client, }) {
14
+ const feeOptions = opts?.feeOptions ?? (0, core_1.getDefaultUserOperationFeeOptions)(client.chain);
15
+ const scaClient = (0, core_1.createSmartAccountClientFromExisting)({
16
+ account,
17
+ client,
18
+ type: "AlchemySmartAccountClient",
19
+ opts: {
20
+ ...opts,
21
+ feeOptions,
22
+ },
23
+ customMiddleware: async (struct, args) => {
24
+ if ((0, core_1.isSmartAccountWithSigner)(args.account)) {
25
+ client.updateHeaders(getSignerTypeHeader(args.account));
26
+ }
27
+ return customMiddleware ? customMiddleware(struct, args) : struct;
28
+ },
29
+ feeEstimator: feeEstimator ?? (0, feeEstimator_js_1.alchemyFeeEstimator)(client),
30
+ userOperationSimulator: useSimulation
31
+ ? (0, userOperationSimulator_js_1.alchemyUserOperationSimulator)(client)
32
+ : undefined,
33
+ gasEstimator,
34
+ ...(gasManagerConfig &&
35
+ (0, gasManager_js_1.alchemyGasManagerMiddleware)(client, {
36
+ ...gasManagerConfig,
37
+ gasEstimationOptions: {
38
+ ...gasManagerConfig.gasEstimationOptions,
39
+ disableGasEstimation: gasManagerConfig.gasEstimationOptions?.disableGasEstimation ??
40
+ false,
41
+ fallbackFeeDataGetter: gasManagerConfig.gasEstimationOptions?.fallbackFeeDataGetter ??
42
+ feeEstimator,
43
+ fallbackGasEstimator: gasManagerConfig.gasEstimationOptions?.fallbackGasEstimator ??
44
+ gasEstimator,
45
+ },
46
+ })),
47
+ signUserOperation,
48
+ }).extend(smartAccount_js_1.alchemyActions);
49
+ if (account && (0, core_1.isSmartAccountWithSigner)(account)) {
50
+ client.updateHeaders(getSignerTypeHeader(account));
51
+ }
52
+ return scaClient;
53
+ }
54
+ exports.createAlchemySmartAccountClientFromRpcClient = createAlchemySmartAccountClientFromRpcClient;
55
+ //# sourceMappingURL=smartAccountClientFromRpc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smartAccountClientFromRpc.js","sourceRoot":"","sources":["../../../../src/client/internal/smartAccountClientFromRpc.ts"],"names":[],"mappings":";;;AAAA,uCAOsB;AAEtB,sEAAuE;AACvE,kEAA6E;AAC7E,0FAA2F;AAC3F,mEAA+D;AAmB/D,SAAgB,mBAAmB,CAEjC,OAAiB;IACjB,OAAO,EAAE,uBAAuB,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,CAAC;AACrE,CAAC;AAJD,kDAIC;AA2BD,SAAgB,4CAA4C,CAAC,EAC3D,IAAI,EACJ,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,MAAM,GACuC;IAC7C,MAAM,UAAU,GACd,IAAI,EAAE,UAAU,IAAI,IAAA,wCAAiC,EAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAEtE,MAAM,SAAS,GAAG,IAAA,2CAAoC,EAAC;QACrD,OAAO;QACP,MAAM;QACN,IAAI,EAAE,2BAA2B;QACjC,IAAI,EAAE;YACJ,GAAG,IAAI;YACP,UAAU;SACX;QACD,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;YACvC,IAAI,IAAA,+BAAwB,EAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC3C,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAC1D,CAAC;YAED,OAAO,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACpE,CAAC;QACD,YAAY,EAAE,YAAY,IAAI,IAAA,qCAAmB,EAAC,MAAM,CAAC;QACzD,sBAAsB,EAAE,aAAa;YACnC,CAAC,CAAC,IAAA,yDAA6B,EAAC,MAAM,CAAC;YACvC,CAAC,CAAC,SAAS;QACb,YAAY;QACZ,GAAG,CAAC,gBAAgB;YAClB,IAAA,2CAA2B,EAAC,MAAM,EAAE;gBAClC,GAAG,gBAAgB;gBACnB,oBAAoB,EAAE;oBACpB,GAAG,gBAAgB,CAAC,oBAAoB;oBACxC,oBAAoB,EAClB,gBAAgB,CAAC,oBAAoB,EAAE,oBAAoB;wBAC3D,KAAK;oBACP,qBAAqB,EACnB,gBAAgB,CAAC,oBAAoB,EAAE,qBAAqB;wBAC5D,YAAY;oBACd,oBAAoB,EAClB,gBAAgB,CAAC,oBAAoB,EAAE,oBAAoB;wBAC3D,YAAY;iBACf;aACF,CAAC,CAAC;QACL,iBAAiB;KAClB,CAAC,CAAC,MAAM,CAAC,gCAAc,CAAC,CAAC;IAE1B,IAAI,OAAO,IAAI,IAAA,+BAAwB,EAAC,OAAO,CAAC,EAAE,CAAC;QACjD,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AA1DD,oGA0DC","sourcesContent":["import {\n createSmartAccountClientFromExisting,\n getDefaultUserOperationFeeOptions,\n isSmartAccountWithSigner,\n type SmartContractAccount,\n type SmartContractAccountWithSigner,\n type UserOperationContext,\n} from \"@aa-sdk/core\";\nimport type { Chain, CustomTransport, Transport } from \"viem\";\nimport { alchemyFeeEstimator } from \"../../middleware/feeEstimator.js\";\nimport { alchemyGasManagerMiddleware } from \"../../middleware/gasManager.js\";\nimport { alchemyUserOperationSimulator } from \"../../middleware/userOperationSimulator.js\";\nimport { alchemyActions } from \"../decorators/smartAccount.js\";\nimport type {\n AlchemySmartAccountClient,\n AlchemySmartAccountClientConfig,\n} from \"../smartAccountClient.js\";\nimport type { ClientWithAlchemyMethods } from \"../types.js\";\n\nexport type CreateAlchemySmartAccountClientFromRpcClient<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = Omit<\n AlchemySmartAccountClientConfig<Transport, Chain, TAccount, TContext>,\n \"rpcUrl\" | \"chain\" | \"apiKey\" | \"jwt\"\n> & { client: ClientWithAlchemyMethods };\n\nexport function getSignerTypeHeader<\n TAccount extends SmartContractAccountWithSigner\n>(account: TAccount) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n}\n\n/**\n * Helper method meant to be used internally to create an alchemy smart account client\n * from an existing Alchemy Rpc Client\n *\n * @param args configuration for the client\n * @returns a smart account client configured to use Alchemy's RPC\n */\nexport function createAlchemySmartAccountClientFromRpcClient<\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n>(\n args: CreateAlchemySmartAccountClientFromRpcClient<TAccount, TContext>\n): AlchemySmartAccountClient<\n CustomTransport,\n TChain,\n TAccount,\n Record<string, never>,\n TContext\n>;\n\nexport function createAlchemySmartAccountClientFromRpcClient({\n opts,\n account,\n useSimulation,\n gasManagerConfig,\n feeEstimator,\n gasEstimator,\n customMiddleware,\n signUserOperation,\n client,\n}: CreateAlchemySmartAccountClientFromRpcClient): AlchemySmartAccountClient {\n const feeOptions =\n opts?.feeOptions ?? getDefaultUserOperationFeeOptions(client.chain);\n\n const scaClient = createSmartAccountClientFromExisting({\n account,\n client,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...opts,\n feeOptions,\n },\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n client.updateHeaders(getSignerTypeHeader(args.account));\n }\n\n return customMiddleware ? customMiddleware(struct, args) : struct;\n },\n feeEstimator: feeEstimator ?? alchemyFeeEstimator(client),\n userOperationSimulator: useSimulation\n ? alchemyUserOperationSimulator(client)\n : undefined,\n gasEstimator,\n ...(gasManagerConfig &&\n alchemyGasManagerMiddleware(client, {\n ...gasManagerConfig,\n gasEstimationOptions: {\n ...gasManagerConfig.gasEstimationOptions,\n disableGasEstimation:\n gasManagerConfig.gasEstimationOptions?.disableGasEstimation ??\n false,\n fallbackFeeDataGetter:\n gasManagerConfig.gasEstimationOptions?.fallbackFeeDataGetter ??\n feeEstimator,\n fallbackGasEstimator:\n gasManagerConfig.gasEstimationOptions?.fallbackGasEstimator ??\n gasEstimator,\n },\n })),\n signUserOperation,\n }).extend(alchemyActions);\n\n if (account && isSmartAccountWithSigner(account)) {\n client.updateHeaders(getSignerTypeHeader(account));\n }\n\n return scaClient;\n}\n"]}