permissionless 0.0.10 → 0.0.12

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 (262) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/_cjs/accounts/index.js +7 -0
  3. package/_cjs/accounts/index.js.map +1 -0
  4. package/_cjs/accounts/privateKeyToSimpleSmartAccount.js +168 -0
  5. package/_cjs/accounts/privateKeyToSimpleSmartAccount.js.map +1 -0
  6. package/_cjs/accounts/types.js +3 -0
  7. package/_cjs/accounts/types.js.map +1 -0
  8. package/_cjs/actions/bundler/estimateUserOperationGas.js +4 -1
  9. package/_cjs/actions/bundler/estimateUserOperationGas.js.map +1 -1
  10. package/_cjs/actions/bundler/getUserOperationByHash.js.map +1 -1
  11. package/_cjs/actions/bundler/sendUserOperation.js +4 -1
  12. package/_cjs/actions/bundler/sendUserOperation.js.map +1 -1
  13. package/_cjs/actions/bundler/supportedEntryPoints.js.map +1 -1
  14. package/_cjs/actions/bundler/waitForUserOperationReceipt.js +7 -2
  15. package/_cjs/actions/bundler/waitForUserOperationReceipt.js.map +1 -1
  16. package/_cjs/actions/index.js.map +1 -1
  17. package/_cjs/actions/pimlico/getUserOperationGasPrice.js.map +1 -1
  18. package/_cjs/actions/pimlico/getUserOperationStatus.js.map +1 -1
  19. package/_cjs/actions/pimlico/sponsorUserOperation.js +4 -1
  20. package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -1
  21. package/_cjs/actions/pimlico.js.map +1 -1
  22. package/_cjs/actions/public/getAccountNonce.js +4 -2
  23. package/_cjs/actions/public/getAccountNonce.js.map +1 -1
  24. package/_cjs/actions/public/getSenderAddress.js +7 -3
  25. package/_cjs/actions/public/getSenderAddress.js.map +1 -1
  26. package/_cjs/actions/smartAccount/deployContract.js +38 -0
  27. package/_cjs/actions/smartAccount/deployContract.js.map +1 -0
  28. package/_cjs/actions/smartAccount/prepareUserOperationRequest.js +71 -0
  29. package/_cjs/actions/smartAccount/prepareUserOperationRequest.js.map +1 -0
  30. package/_cjs/actions/smartAccount/sendTransaction.js +43 -0
  31. package/_cjs/actions/smartAccount/sendTransaction.js.map +1 -0
  32. package/_cjs/actions/smartAccount/sendUserOperation.js +22 -0
  33. package/_cjs/actions/smartAccount/sendUserOperation.js.map +1 -0
  34. package/_cjs/actions/smartAccount/signMessage.js +16 -0
  35. package/_cjs/actions/smartAccount/signMessage.js.map +1 -0
  36. package/_cjs/actions/smartAccount/signTypedData.js +34 -0
  37. package/_cjs/actions/smartAccount/signTypedData.js.map +1 -0
  38. package/_cjs/actions/smartAccount/writeContract.js +21 -0
  39. package/_cjs/actions/smartAccount/writeContract.js.map +1 -0
  40. package/_cjs/actions/smartAccount.js +16 -0
  41. package/_cjs/actions/smartAccount.js.map +1 -0
  42. package/_cjs/actions/stackup/sponsorUserOperation.js +5 -1
  43. package/_cjs/actions/stackup/sponsorUserOperation.js.map +1 -1
  44. package/_cjs/clients/{bundler.js → createBundlerClient.js} +1 -1
  45. package/_cjs/clients/createBundlerClient.js.map +1 -0
  46. package/_cjs/clients/createSmartAccountClient.js +20 -0
  47. package/_cjs/clients/createSmartAccountClient.js.map +1 -0
  48. package/_cjs/clients/decorators/bundler.js.map +1 -1
  49. package/_cjs/clients/decorators/pimlico.js.map +1 -1
  50. package/_cjs/clients/decorators/smartAccount.js +28 -0
  51. package/_cjs/clients/decorators/smartAccount.js.map +1 -0
  52. package/_cjs/clients/decorators/stackup.js.map +1 -1
  53. package/_cjs/clients/pimlico.js.map +1 -1
  54. package/_cjs/clients/stackup.js.map +1 -1
  55. package/_cjs/index.js +9 -5
  56. package/_cjs/index.js.map +1 -1
  57. package/_cjs/utils/deepHexlify.js +4 -4
  58. package/_cjs/utils/deepHexlify.js.map +1 -1
  59. package/_cjs/utils/getAction.js +8 -0
  60. package/_cjs/utils/getAction.js.map +1 -0
  61. package/_cjs/utils/getUserOperationHash.js.map +1 -1
  62. package/_cjs/utils/index.js +8 -1
  63. package/_cjs/utils/index.js.map +1 -1
  64. package/_cjs/utils/observe.js +7 -2
  65. package/_cjs/utils/observe.js.map +1 -1
  66. package/_cjs/utils/signUserOperationHashWithECDSA.js +33 -11
  67. package/_cjs/utils/signUserOperationHashWithECDSA.js.map +1 -1
  68. package/_esm/accounts/index.js +4 -0
  69. package/_esm/accounts/index.js.map +1 -0
  70. package/_esm/accounts/privateKeyToSimpleSmartAccount.js +169 -0
  71. package/_esm/accounts/privateKeyToSimpleSmartAccount.js.map +1 -0
  72. package/_esm/accounts/types.js +2 -0
  73. package/_esm/accounts/types.js.map +1 -0
  74. package/_esm/actions/bundler/estimateUserOperationGas.js +4 -1
  75. package/_esm/actions/bundler/estimateUserOperationGas.js.map +1 -1
  76. package/_esm/actions/bundler/getUserOperationByHash.js.map +1 -1
  77. package/_esm/actions/bundler/sendUserOperation.js +4 -3
  78. package/_esm/actions/bundler/sendUserOperation.js.map +1 -1
  79. package/_esm/actions/bundler/supportedEntryPoints.js.map +1 -1
  80. package/_esm/actions/bundler/waitForUserOperationReceipt.js +7 -2
  81. package/_esm/actions/bundler/waitForUserOperationReceipt.js.map +1 -1
  82. package/_esm/actions/index.js.map +1 -1
  83. package/_esm/actions/pimlico/getUserOperationGasPrice.js +1 -1
  84. package/_esm/actions/pimlico/getUserOperationGasPrice.js.map +1 -1
  85. package/_esm/actions/pimlico/getUserOperationStatus.js.map +1 -1
  86. package/_esm/actions/pimlico/sponsorUserOperation.js +4 -1
  87. package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -1
  88. package/_esm/actions/pimlico.js.map +1 -1
  89. package/_esm/actions/public/getAccountNonce.js +7 -5
  90. package/_esm/actions/public/getAccountNonce.js.map +1 -1
  91. package/_esm/actions/public/getSenderAddress.js +8 -5
  92. package/_esm/actions/public/getSenderAddress.js.map +1 -1
  93. package/_esm/actions/smartAccount/deployContract.js +64 -0
  94. package/_esm/actions/smartAccount/deployContract.js.map +1 -0
  95. package/_esm/actions/smartAccount/prepareUserOperationRequest.js +67 -0
  96. package/_esm/actions/smartAccount/prepareUserOperationRequest.js.map +1 -0
  97. package/_esm/actions/smartAccount/sendTransaction.js +87 -0
  98. package/_esm/actions/smartAccount/sendTransaction.js.map +1 -0
  99. package/_esm/actions/smartAccount/sendUserOperation.js +18 -0
  100. package/_esm/actions/smartAccount/sendUserOperation.js.map +1 -0
  101. package/_esm/actions/smartAccount/signMessage.js +59 -0
  102. package/_esm/actions/smartAccount/signMessage.js.map +1 -0
  103. package/_esm/actions/smartAccount/signTypedData.js +129 -0
  104. package/_esm/actions/smartAccount/signTypedData.js.map +1 -0
  105. package/_esm/actions/smartAccount/writeContract.js +19 -0
  106. package/_esm/actions/smartAccount/writeContract.js.map +1 -0
  107. package/_esm/actions/smartAccount.js +8 -0
  108. package/_esm/actions/smartAccount.js.map +1 -0
  109. package/_esm/actions/stackup/sponsorUserOperation.js +5 -1
  110. package/_esm/actions/stackup/sponsorUserOperation.js.map +1 -1
  111. package/_esm/clients/{bundler.js → createBundlerClient.js} +1 -1
  112. package/_esm/clients/createBundlerClient.js.map +1 -0
  113. package/_esm/clients/createSmartAccountClient.js +38 -0
  114. package/_esm/clients/createSmartAccountClient.js.map +1 -0
  115. package/_esm/clients/decorators/bundler.js.map +1 -1
  116. package/_esm/clients/decorators/pimlico.js.map +1 -1
  117. package/_esm/clients/decorators/smartAccount.js +24 -0
  118. package/_esm/clients/decorators/smartAccount.js.map +1 -0
  119. package/_esm/clients/decorators/stackup.js.map +1 -1
  120. package/_esm/clients/pimlico.js.map +1 -1
  121. package/_esm/clients/stackup.js.map +1 -1
  122. package/_esm/index.js +5 -2
  123. package/_esm/index.js.map +1 -1
  124. package/_esm/utils/deepHexlify.js +6 -4
  125. package/_esm/utils/deepHexlify.js.map +1 -1
  126. package/_esm/utils/getAction.js +6 -0
  127. package/_esm/utils/getAction.js.map +1 -0
  128. package/_esm/utils/getUserOperationHash.js.map +1 -1
  129. package/_esm/utils/index.js +7 -2
  130. package/_esm/utils/index.js.map +1 -1
  131. package/_esm/utils/observe.js +7 -2
  132. package/_esm/utils/observe.js.map +1 -1
  133. package/_esm/utils/signUserOperationHashWithECDSA.js +31 -9
  134. package/_esm/utils/signUserOperationHashWithECDSA.js.map +1 -1
  135. package/_types/accounts/index.d.ts +4 -0
  136. package/_types/accounts/index.d.ts.map +1 -0
  137. package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts +20 -0
  138. package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts.map +1 -0
  139. package/_types/accounts/types.d.ts +21 -0
  140. package/_types/accounts/types.d.ts.map +1 -0
  141. package/_types/actions/bundler/chainId.d.ts +1 -1
  142. package/_types/actions/bundler/chainId.d.ts.map +1 -1
  143. package/_types/actions/bundler/estimateUserOperationGas.d.ts +1 -1
  144. package/_types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
  145. package/_types/actions/bundler/getUserOperationByHash.d.ts +1 -1
  146. package/_types/actions/bundler/getUserOperationByHash.d.ts.map +1 -1
  147. package/_types/actions/bundler/getUserOperationReceipt.d.ts +1 -1
  148. package/_types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -1
  149. package/_types/actions/bundler/sendUserOperation.d.ts +1 -3
  150. package/_types/actions/bundler/sendUserOperation.d.ts.map +1 -1
  151. package/_types/actions/bundler/supportedEntryPoints.d.ts +1 -1
  152. package/_types/actions/bundler/supportedEntryPoints.d.ts.map +1 -1
  153. package/_types/actions/bundler/waitForUserOperationReceipt.d.ts +1 -1
  154. package/_types/actions/bundler/waitForUserOperationReceipt.d.ts.map +1 -1
  155. package/_types/actions/index.d.ts.map +1 -1
  156. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts +4 -3
  157. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -1
  158. package/_types/actions/pimlico/getUserOperationStatus.d.ts +3 -4
  159. package/_types/actions/pimlico/getUserOperationStatus.d.ts.map +1 -1
  160. package/_types/actions/pimlico/sponsorUserOperation.d.ts +3 -3
  161. package/_types/actions/pimlico/sponsorUserOperation.d.ts.map +1 -1
  162. package/_types/actions/pimlico.d.ts.map +1 -1
  163. package/_types/actions/public/getAccountNonce.d.ts +5 -5
  164. package/_types/actions/public/getAccountNonce.d.ts.map +1 -1
  165. package/_types/actions/public/getSenderAddress.d.ts +3 -4
  166. package/_types/actions/public/getSenderAddress.d.ts.map +1 -1
  167. package/_types/actions/smartAccount/deployContract.d.ts +34 -0
  168. package/_types/actions/smartAccount/deployContract.d.ts.map +1 -0
  169. package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts +20 -0
  170. package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts.map +1 -0
  171. package/_types/actions/smartAccount/sendTransaction.d.ts +52 -0
  172. package/_types/actions/smartAccount/sendTransaction.d.ts.map +1 -0
  173. package/_types/actions/smartAccount/sendUserOperation.d.ts +10 -0
  174. package/_types/actions/smartAccount/sendUserOperation.d.ts.map +1 -0
  175. package/_types/actions/smartAccount/signMessage.d.ts +50 -0
  176. package/_types/actions/smartAccount/signMessage.d.ts.map +1 -0
  177. package/_types/actions/smartAccount/signTypedData.d.ts +104 -0
  178. package/_types/actions/smartAccount/signTypedData.d.ts.map +1 -0
  179. package/_types/actions/smartAccount/writeContract.d.ts +57 -0
  180. package/_types/actions/smartAccount/writeContract.d.ts.map +1 -0
  181. package/_types/actions/smartAccount.d.ts +8 -0
  182. package/_types/actions/smartAccount.d.ts.map +1 -0
  183. package/_types/actions/stackup/sponsorUserOperation.d.ts.map +1 -1
  184. package/_types/clients/{bundler.d.ts → createBundlerClient.d.ts} +1 -1
  185. package/_types/clients/createBundlerClient.d.ts.map +1 -0
  186. package/_types/clients/createSmartAccountClient.d.ts +281 -0
  187. package/_types/clients/createSmartAccountClient.d.ts.map +1 -0
  188. package/_types/clients/decorators/bundler.d.ts.map +1 -1
  189. package/_types/clients/decorators/pimlico.d.ts.map +1 -1
  190. package/_types/clients/decorators/smartAccount.d.ts +276 -0
  191. package/_types/clients/decorators/smartAccount.d.ts.map +1 -0
  192. package/_types/clients/decorators/stackup.d.ts.map +1 -1
  193. package/_types/clients/pimlico.d.ts.map +1 -1
  194. package/_types/clients/stackup.d.ts.map +1 -1
  195. package/_types/index.d.ts +6 -3
  196. package/_types/index.d.ts.map +1 -1
  197. package/_types/types/bundler.d.ts +4 -1
  198. package/_types/types/bundler.d.ts.map +1 -1
  199. package/_types/types/index.d.ts +19 -0
  200. package/_types/types/index.d.ts.map +1 -1
  201. package/_types/types/pimlico.d.ts.map +1 -1
  202. package/_types/types/stackup.d.ts.map +1 -1
  203. package/_types/utils/deepHexlify.d.ts.map +1 -1
  204. package/_types/utils/getAction.d.ts +3 -0
  205. package/_types/utils/getAction.d.ts.map +1 -0
  206. package/_types/utils/getUserOperationHash.d.ts.map +1 -1
  207. package/_types/utils/index.d.ts +4 -2
  208. package/_types/utils/index.d.ts.map +1 -1
  209. package/_types/utils/observe.d.ts.map +1 -1
  210. package/_types/utils/signUserOperationHashWithECDSA.d.ts +10 -10
  211. package/_types/utils/signUserOperationHashWithECDSA.d.ts.map +1 -1
  212. package/accounts/index.ts +14 -0
  213. package/accounts/privateKeyToSimpleSmartAccount.ts +220 -0
  214. package/accounts/types.ts +33 -0
  215. package/actions/bundler/chainId.ts +1 -1
  216. package/actions/bundler/estimateUserOperationGas.ts +9 -3
  217. package/actions/bundler/getUserOperationByHash.ts +8 -2
  218. package/actions/bundler/getUserOperationReceipt.ts +1 -1
  219. package/actions/bundler/sendUserOperation.ts +13 -6
  220. package/actions/bundler/supportedEntryPoints.ts +4 -2
  221. package/actions/bundler/waitForUserOperationReceipt.ts +50 -23
  222. package/actions/index.ts +4 -1
  223. package/actions/pimlico/getUserOperationGasPrice.ts +12 -5
  224. package/actions/pimlico/getUserOperationStatus.ts +11 -4
  225. package/actions/pimlico/sponsorUserOperation.ts +20 -7
  226. package/actions/pimlico.ts +8 -2
  227. package/actions/public/getAccountNonce.ts +20 -8
  228. package/actions/public/getSenderAddress.ts +25 -8
  229. package/actions/smartAccount/deployContract.ts +110 -0
  230. package/actions/smartAccount/prepareUserOperationRequest.ts +138 -0
  231. package/actions/smartAccount/sendTransaction.ts +136 -0
  232. package/actions/smartAccount/sendUserOperation.ts +70 -0
  233. package/actions/smartAccount/signMessage.ts +79 -0
  234. package/actions/smartAccount/signTypedData.ts +161 -0
  235. package/actions/smartAccount/writeContract.ts +126 -0
  236. package/actions/smartAccount.ts +42 -0
  237. package/actions/stackup/sponsorUserOperation.ts +13 -3
  238. package/clients/{bundler.ts → createBundlerClient.ts} +14 -3
  239. package/clients/createSmartAccountClient.ts +95 -0
  240. package/clients/decorators/bundler.ts +19 -9
  241. package/clients/decorators/pimlico.ts +18 -6
  242. package/clients/decorators/smartAccount.ts +390 -0
  243. package/clients/decorators/stackup.ts +12 -4
  244. package/clients/pimlico.ts +19 -4
  245. package/clients/stackup.ts +16 -3
  246. package/index.ts +20 -3
  247. package/package.json +11 -1
  248. package/tsconfig.build.tsbuildinfo +1 -1
  249. package/types/bundler.ts +4 -1
  250. package/types/index.ts +24 -0
  251. package/types/pimlico.ts +12 -2
  252. package/types/stackup.ts +4 -1
  253. package/utils/deepHexlify.test.ts +13 -7
  254. package/utils/deepHexlify.ts +5 -4
  255. package/utils/getAction.ts +15 -0
  256. package/utils/getUserOperationHash.ts +10 -2
  257. package/utils/index.ts +21 -3
  258. package/utils/observe.ts +18 -5
  259. package/utils/signUserOperationHashWithECDSA.ts +72 -40
  260. package/_cjs/clients/bundler.js.map +0 -1
  261. package/_esm/clients/bundler.js.map +0 -1
  262. package/_types/clients/bundler.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # permissionless
2
2
 
3
+ ## 0.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - aabe479: Added support for SimpleAccount management
8
+
9
+ ## 0.0.11
10
+
11
+ ### Patch Changes
12
+
13
+ - 5e990c1: Allow using raw accounts with `signUserOperationHashWithECDSA`
14
+
3
15
  ## 0.0.10
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.privateKeyToSimpleSmartAccount = exports.SignTransactionNotSupportedBySmartAccount = void 0;
4
+ const privateKeyToSimpleSmartAccount_js_1 = require("./privateKeyToSimpleSmartAccount.js");
5
+ Object.defineProperty(exports, "SignTransactionNotSupportedBySmartAccount", { enumerable: true, get: function () { return privateKeyToSimpleSmartAccount_js_1.SignTransactionNotSupportedBySmartAccount; } });
6
+ Object.defineProperty(exports, "privateKeyToSimpleSmartAccount", { enumerable: true, get: function () { return privateKeyToSimpleSmartAccount_js_1.privateKeyToSimpleSmartAccount; } });
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../accounts/index.ts"],"names":[],"mappings":";;;AAAA,2FAI4C;AAKxC,0HAPA,6EAAyC,OAOA;AAEzC,+GARA,kEAA8B,OAQA"}
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.privateKeyToSimpleSmartAccount = exports.SignTransactionNotSupportedBySmartAccount = void 0;
4
+ const viem_1 = require("viem");
5
+ const accounts_1 = require("viem/accounts");
6
+ const actions_1 = require("viem/actions");
7
+ const getAccountNonce_js_1 = require("../actions/public/getAccountNonce.js");
8
+ const getSenderAddress_js_1 = require("../actions/public/getSenderAddress.js");
9
+ const getUserOperationHash_js_1 = require("../utils/getUserOperationHash.js");
10
+ class SignTransactionNotSupportedBySmartAccount extends viem_1.BaseError {
11
+ constructor({ docsPath } = {}) {
12
+ super([
13
+ "A smart account cannot sign or send transaction, it can only sign message or userOperation.",
14
+ "Please send user operation instead."
15
+ ].join("\n"), {
16
+ docsPath,
17
+ docsSlug: "account"
18
+ });
19
+ Object.defineProperty(this, "name", {
20
+ enumerable: true,
21
+ configurable: true,
22
+ writable: true,
23
+ value: "SignTransactionNotSupportedBySmartAccount"
24
+ });
25
+ }
26
+ }
27
+ exports.SignTransactionNotSupportedBySmartAccount = SignTransactionNotSupportedBySmartAccount;
28
+ const getAccountInitCode = async (factoryAddress, owner, index = 0n) => {
29
+ if (!owner)
30
+ throw new Error("Owner account not found");
31
+ return (0, viem_1.concatHex)([
32
+ factoryAddress,
33
+ (0, viem_1.encodeFunctionData)({
34
+ abi: [
35
+ {
36
+ inputs: [
37
+ {
38
+ internalType: "address",
39
+ name: "owner",
40
+ type: "address"
41
+ },
42
+ {
43
+ internalType: "uint256",
44
+ name: "salt",
45
+ type: "uint256"
46
+ }
47
+ ],
48
+ name: "createAccount",
49
+ outputs: [
50
+ {
51
+ internalType: "contract SimpleAccount",
52
+ name: "ret",
53
+ type: "address"
54
+ }
55
+ ],
56
+ stateMutability: "nonpayable",
57
+ type: "function"
58
+ }
59
+ ],
60
+ functionName: "createAccount",
61
+ args: [owner, index]
62
+ })
63
+ ]);
64
+ };
65
+ const getAccountAddress = async ({ client, factoryAddress, entryPoint, owner }) => {
66
+ const initCode = await getAccountInitCode(factoryAddress, owner);
67
+ return (0, getSenderAddress_js_1.getSenderAddress)(client, {
68
+ initCode,
69
+ entryPoint
70
+ });
71
+ };
72
+ async function privateKeyToSimpleSmartAccount(client, { privateKey, factoryAddress, entryPoint }) {
73
+ const privateKeyAccount = (0, accounts_1.privateKeyToAccount)(privateKey);
74
+ const [accountAddress, chainId] = await Promise.all([
75
+ getAccountAddress({
76
+ client,
77
+ factoryAddress,
78
+ entryPoint,
79
+ owner: privateKeyAccount.address
80
+ }),
81
+ (0, actions_1.getChainId)(client)
82
+ ]);
83
+ if (!accountAddress)
84
+ throw new Error("Account address not found");
85
+ const account = (0, accounts_1.toAccount)({
86
+ address: accountAddress,
87
+ async signMessage({ message }) {
88
+ return privateKeyAccount.signMessage({ message });
89
+ },
90
+ async signTransaction(_, __) {
91
+ throw new SignTransactionNotSupportedBySmartAccount();
92
+ },
93
+ async signTypedData(typedData) {
94
+ return privateKeyAccount.signTypedData({ ...typedData, privateKey });
95
+ }
96
+ });
97
+ return {
98
+ ...account,
99
+ client: client,
100
+ publicKey: accountAddress,
101
+ entryPoint: entryPoint,
102
+ source: "privateKeySimpleSmartAccount",
103
+ async getNonce() {
104
+ return (0, getAccountNonce_js_1.getAccountNonce)(client, {
105
+ sender: accountAddress,
106
+ entryPoint: entryPoint
107
+ });
108
+ },
109
+ async signUserOperation(userOperation) {
110
+ return account.signMessage({
111
+ message: {
112
+ raw: (0, getUserOperationHash_js_1.getUserOperationHash)({
113
+ userOperation,
114
+ entryPoint: entryPoint,
115
+ chainId: chainId
116
+ })
117
+ }
118
+ });
119
+ },
120
+ async getInitCode() {
121
+ const contractCode = await (0, actions_1.getBytecode)(client, {
122
+ address: accountAddress
123
+ });
124
+ if ((contractCode?.length ?? 0) > 2)
125
+ return "0x";
126
+ return getAccountInitCode(factoryAddress, privateKeyAccount.address);
127
+ },
128
+ async encodeDeployCallData(_) {
129
+ throw new Error("Simple account doesn't support account deployment");
130
+ },
131
+ async encodeCallData({ to, value, data }) {
132
+ return (0, viem_1.encodeFunctionData)({
133
+ abi: [
134
+ {
135
+ inputs: [
136
+ {
137
+ internalType: "address",
138
+ name: "dest",
139
+ type: "address"
140
+ },
141
+ {
142
+ internalType: "uint256",
143
+ name: "value",
144
+ type: "uint256"
145
+ },
146
+ {
147
+ internalType: "bytes",
148
+ name: "func",
149
+ type: "bytes"
150
+ }
151
+ ],
152
+ name: "execute",
153
+ outputs: [],
154
+ stateMutability: "nonpayable",
155
+ type: "function"
156
+ }
157
+ ],
158
+ functionName: "execute",
159
+ args: [to, value, data]
160
+ });
161
+ },
162
+ async getDummySignature() {
163
+ return "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";
164
+ }
165
+ };
166
+ }
167
+ exports.privateKeyToSimpleSmartAccount = privateKeyToSimpleSmartAccount;
168
+ //# sourceMappingURL=privateKeyToSimpleSmartAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privateKeyToSimpleSmartAccount.js","sourceRoot":"","sources":["../../accounts/privateKeyToSimpleSmartAccount.ts"],"names":[],"mappings":";;;AAAA,+BASa;AACb,4CAA8D;AAC9D,0CAAsD;AACtD,6EAAsE;AACtE,+EAAwE;AACxE,8EAAuE;AAGvE,MAAa,yCAA0C,SAAQ,gBAAS;IAEpE,YAAY,EAAE,QAAQ,KAA4B,EAAE;QAChD,KAAK,CACD;YACI,6FAA6F;YAC7F,qCAAqC;SACxC,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACI,QAAQ;YACR,QAAQ,EAAE,SAAS;SACtB,CACJ,CAAA;QAXI;;;;mBAAO,2CAA2C;WAAA;IAY3D,CAAC;CACJ;AAdD,8FAcC;AAOD,MAAM,kBAAkB,GAAG,KAAK,EAC5B,cAAuB,EACvB,KAAc,EACd,KAAK,GAAG,EAAE,EACE,EAAE;IACd,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAEtD,OAAO,IAAA,gBAAS,EAAC;QACb,cAAc;QACd,IAAA,yBAAkB,EAAC;YACf,GAAG,EAAE;gBACD;oBACI,MAAM,EAAE;wBACJ;4BACI,YAAY,EAAE,SAAS;4BACvB,IAAI,EAAE,OAAO;4BACb,IAAI,EAAE,SAAS;yBAClB;wBACD;4BACI,YAAY,EAAE,SAAS;4BACvB,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,SAAS;yBAClB;qBACJ;oBACD,IAAI,EAAE,eAAe;oBACrB,OAAO,EAAE;wBACL;4BACI,YAAY,EAAE,wBAAwB;4BACtC,IAAI,EAAE,KAAK;4BACX,IAAI,EAAE,SAAS;yBAClB;qBACJ;oBACD,eAAe,EAAE,YAAY;oBAC7B,IAAI,EAAE,UAAU;iBACnB;aACJ;YACD,YAAY,EAAE,eAAe;YAC7B,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;SACvB,CAAQ;K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;4BACD;gCACI,YAAY,EAAE,OAAO;gCACrB,IAAI,EAAE,MAAM;gCACZ,IAAI,EAAE,OAAO;6BAChB;yBACJ;wBACD,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,EAAE;wBACX,eAAe,EAAE,YAAY;wBAC7B,IAAI,EAAE,UAAU;qBACnB;iBACJ;gBACD,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC;aAC1B,CAAC,CAAA;QACN,CAAC;QACD,KAAK,CAAC,iBAAiB;YACnB,OAAO,sIAAsI,CAAA;QACjJ,CAAC;KACJ,CAAA;AACL,CAAC;AAhHD,wEAgHC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../accounts/types.ts"],"names":[],"mappings":""}
@@ -6,7 +6,10 @@ const estimateUserOperationGas = async (client, args) => {
6
6
  const { userOperation, entryPoint } = args;
7
7
  const response = await client.request({
8
8
  method: "eth_estimateUserOperationGas",
9
- params: [(0, deepHexlify_js_1.deepHexlify)(userOperation), entryPoint]
9
+ params: [
10
+ (0, deepHexlify_js_1.deepHexlify)(userOperation),
11
+ entryPoint
12
+ ]
10
13
  });
11
14
  return {
12
15
  preVerificationGas: BigInt(response.preVerificationGas || 0),
@@ -1 +1 @@
1
- {"version":3,"file":"estimateUserOperationGas.js","sourceRoot":"","sources":["../../../actions/bundler/estimateUserOperationGas.ts"],"names":[],"mappings":";;;AAKA,+DAAwD;AAwCjD,MAAM,wBAAwB,GAAG,KAAK,EACzC,MAAqB,EACrB,IAAwC,EACG,EAAE;IAC7C,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IAE1C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,MAAM,EAAE,8BAA8B;QACtC,MAAM,EAAE,CAAC,IAAA,4BAAW,EAAC,aAAa,CAAiC,EAAE,UAAqB,CAAC;KAC9F,CAAC,CAAA;IAEF,OAAO;QACH,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,IAAI,CAAC,CAAC;QAC5D,oBAAoB,EAAE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,IAAI,CAAC,CAAC;QAChE,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,IAAI,CAAC,CAAC;KACnD,CAAA;AACL,CAAC,CAAA;AAhBY,QAAA,wBAAwB,4BAgBpC"}
1
+ {"version":3,"file":"estimateUserOperationGas.js","sourceRoot":"","sources":["../../../actions/bundler/estimateUserOperationGas.ts"],"names":[],"mappings":";;;AAKA,+DAAwD;AA2CjD,MAAM,wBAAwB,GAAG,KAAK,EACzC,MAAqB,EACrB,IAAwC,EACG,EAAE;IAC7C,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IAE1C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,MAAM,EAAE,8BAA8B;QACtC,MAAM,EAAE;YACJ,IAAA,4BAAW,EAAC,aAAa,CAAiC;YAC1D,UAAqB;SACxB;KACJ,CAAC,CAAA;IAEF,OAAO;QACH,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,IAAI,CAAC,CAAC;QAC5D,oBAAoB,EAAE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,IAAI,CAAC,CAAC;QAChE,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,IAAI,CAAC,CAAC;KACnD,CAAA;AACL,CAAC,CAAA;AAnBY,QAAA,wBAAwB,4BAmBpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getUserOperationByHash.js","sourceRoot":"","sources":["../../../actions/bundler/getUserOperationByHash.ts"],"names":[],"mappings":";;;AAsCO,MAAM,sBAAsB,GAAG,KAAK,EACvC,MAAqB,EACrB,EAAE,IAAI,EAAoC,EACD,EAAE;IAC3C,MAAM,MAAM,GAAW,CAAC,IAAI,CAAC,CAAA;IAE7B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,MAAM,EAAE,4BAA4B;QACpC,MAAM;KACT,CAAC,CAAA;IAEF,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAA;IAE1B,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAA;IAEvF,OAAO;QACH,aAAa,EAAE;YACX,GAAG,aAAa;YAChB,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;YAClC,YAAY,EAAE,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC;YAChD,oBAAoB,EAAE,MAAM,CAAC,aAAa,CAAC,oBAAoB,CAAC;YAChE,kBAAkB,EAAE,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC;YAC5D,YAAY,EAAE,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC;YAChD,oBAAoB,EAAE,MAAM,CAAC,aAAa,CAAC,oBAAoB,CAAC;SAClD;QAClB,UAAU,EAAE,UAAU;QACtB,eAAe,EAAE,eAAe;QAChC,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC;KACnC,CAAA;AACL,CAAC,CAAA;AA9BY,QAAA,sBAAsB,0BA8BlC"}
1
+ {"version":3,"file":"getUserOperationByHash.js","sourceRoot":"","sources":["../../../actions/bundler/getUserOperationByHash.ts"],"names":[],"mappings":";;;AAsCO,MAAM,sBAAsB,GAAG,KAAK,EACvC,MAAqB,EACrB,EAAE,IAAI,EAAoC,EACD,EAAE;IAC3C,MAAM,MAAM,GAAW,CAAC,IAAI,CAAC,CAAA;IAE7B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,MAAM,EAAE,4BAA4B;QACpC,MAAM;KACT,CAAC,CAAA;IAEF,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAA;IAE1B,MAAM,EACF,aAAa,EACb,UAAU,EACV,eAAe,EACf,SAAS,EACT,WAAW,EACd,GAAG,QAAQ,CAAA;IAEZ,OAAO;QACH,aAAa,EAAE;YACX,GAAG,aAAa;YAChB,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;YAClC,YAAY,EAAE,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC;YAChD,oBAAoB,EAAE,MAAM,CAAC,aAAa,CAAC,oBAAoB,CAAC;YAChE,kBAAkB,EAAE,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAAC;YAC5D,YAAY,EAAE,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC;YAChD,oBAAoB,EAAE,MAAM,CAAC,aAAa,CAAC,oBAAoB,CAAC;SAClD;QAClB,UAAU,EAAE,UAAU;QACtB,eAAe,EAAE,eAAe;QAChC,SAAS,EAAE,SAAS;QACpB,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC;KACnC,CAAA;AACL,CAAC,CAAA;AApCY,QAAA,sBAAsB,0BAoClC"}
@@ -6,7 +6,10 @@ const sendUserOperation = async (client, args) => {
6
6
  const { userOperation, entryPoint } = args;
7
7
  return client.request({
8
8
  method: "eth_sendUserOperation",
9
- params: [(0, deepHexlify_js_1.deepHexlify)(userOperation), entryPoint]
9
+ params: [
10
+ (0, deepHexlify_js_1.deepHexlify)(userOperation),
11
+ entryPoint
12
+ ]
10
13
  });
11
14
  };
12
15
  exports.sendUserOperation = sendUserOperation;
@@ -1 +1 @@
1
- {"version":3,"file":"sendUserOperation.js","sourceRoot":"","sources":["../../../actions/bundler/sendUserOperation.ts"],"names":[],"mappings":";;;AAGA,+DAAwD;AAkCjD,MAAM,iBAAiB,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAiC,EAAiB,EAAE;IAC/G,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IAE1C,OAAO,MAAM,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,uBAAuB;QAC/B,MAAM,EAAE,CAAC,IAAA,4BAAW,EAAC,aAAa,CAAiC,EAAE,UAAqB,CAAC;KAC9F,CAAC,CAAA;AACN,CAAC,CAAA;AAPY,QAAA,iBAAiB,qBAO7B"}
1
+ {"version":3,"file":"sendUserOperation.js","sourceRoot":"","sources":["../../../actions/bundler/sendUserOperation.ts"],"names":[],"mappings":";;;AAMA,+DAAwD;AAgCjD,MAAM,iBAAiB,GAAG,KAAK,EAClC,MAAqB,EACrB,IAAiC,EACpB,EAAE;IACf,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IAE1C,OAAO,MAAM,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,uBAAuB;QAC/B,MAAM,EAAE;YACJ,IAAA,4BAAW,EAAC,aAAa,CAAiC;YAC1D,UAAqB;SACxB;KACJ,CAAC,CAAA;AACN,CAAC,CAAA;AAbY,QAAA,iBAAiB,qBAa7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"supportedEntryPoints.js","sourceRoot":"","sources":["../../../actions/bundler/supportedEntryPoints.ts"],"names":[],"mappings":";;;AAyBO,MAAM,oBAAoB,GAAG,KAAK,EAAE,MAAqB,EAAsB,EAAE;IACpF,OAAO,MAAM,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,0BAA0B;QAClC,MAAM,EAAE,EAAE;KACb,CAAC,CAAA;AACN,CAAC,CAAA;AALY,QAAA,oBAAoB,wBAKhC"}
1
+ {"version":3,"file":"supportedEntryPoints.js","sourceRoot":"","sources":["../../../actions/bundler/supportedEntryPoints.ts"],"names":[],"mappings":";;;AAyBO,MAAM,oBAAoB,GAAG,KAAK,EACrC,MAAqB,EACH,EAAE;IACpB,OAAO,MAAM,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,0BAA0B;QAClC,MAAM,EAAE,EAAE;KACb,CAAC,CAAA;AACN,CAAC,CAAA;AAPY,QAAA,oBAAoB,wBAOhC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.waitForUserOperationReceipt = exports.WaitForUserOperationReceiptTimeoutError = void 0;
4
4
  const viem_1 = require("viem");
5
+ const getAction_js_1 = require("../../utils/getAction.js");
5
6
  const observe_js_1 = require("../../utils/observe.js");
6
7
  const getUserOperationReceipt_js_1 = require("./getUserOperationReceipt.js");
7
8
  class WaitForUserOperationReceiptTimeoutError extends viem_1.BaseError {
@@ -17,7 +18,11 @@ class WaitForUserOperationReceiptTimeoutError extends viem_1.BaseError {
17
18
  }
18
19
  exports.WaitForUserOperationReceiptTimeoutError = WaitForUserOperationReceiptTimeoutError;
19
20
  const waitForUserOperationReceipt = (bundlerClient, { hash, pollingInterval = bundlerClient.pollingInterval, timeout }) => {
20
- const observerId = (0, viem_1.stringify)(["waitForUserOperationReceipt", bundlerClient.uid, hash]);
21
+ const observerId = (0, viem_1.stringify)([
22
+ "waitForUserOperationReceipt",
23
+ bundlerClient.uid,
24
+ hash
25
+ ]);
21
26
  let userOperationReceipt;
22
27
  return new Promise((resolve, reject) => {
23
28
  if (timeout) {
@@ -30,7 +35,7 @@ const waitForUserOperationReceipt = (bundlerClient, { hash, pollingInterval = bu
30
35
  fn();
31
36
  _unobserve();
32
37
  };
33
- const _userOperationReceipt = await (0, getUserOperationReceipt_js_1.getUserOperationReceipt)(bundlerClient, { hash });
38
+ const _userOperationReceipt = await (0, getAction_js_1.getAction)(bundlerClient, getUserOperationReceipt_js_1.getUserOperationReceipt)({ hash });
34
39
  if (_userOperationReceipt !== null) {
35
40
  userOperationReceipt = _userOperationReceipt;
36
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"waitForUserOperationReceipt.js","sourceRoot":"","sources":["../../../actions/bundler/waitForUserOperationReceipt.ts"],"names":[],"mappings":";;;AAAA,+BAAkE;AAElE,uDAAgD;AAChD,6EAA8G;AAE9G,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EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAA;oBAC9C,OAAM;iBACT;YACL,CAAC,EAAE,eAAe,CAAC,CAAA;QACvB,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACN,CAAC,CAAA;AAlCY,QAAA,2BAA2B,+BAkCvC"}
1
+ {"version":3,"file":"waitForUserOperationReceipt.js","sourceRoot":"","sources":["../../../actions/bundler/waitForUserOperationReceipt.ts"],"names":[],"mappings":";;;AAAA,+BAAkE;AAElE,2DAAoD;AACpD,uDAAgD;AAChD,6EAGqC;AAErC,MAAa,uCAAwC,SAAQ,gBAAS;IAElE,YAAY,EAAE,IAAI,EAAkB;QAChC,KAAK,CACD,sDAAsD,IAAI,oBAAoB,CACjF,CAAA;QAJI;;;;mBAAO,yCAAyC;WAAA;IAKzD,CAAC;CACJ;AAPD,0FAOC;AAmCM,MAAM,2BAA2B,GAAG,CACvC,aAAoC,EACpC,EACI,IAAI,EACJ,eAAe,GAAG,aAAa,CAAC,eAAe,EAC/C,OAAO,EAC6B,EACE,EAAE;IAC5C,MAAM,UAAU,GAAG,IAAA,gBAAS,EAAC;QACzB,6BAA6B;QAC7B,aAAa,CAAC,GAAG;QACjB,IAAI;KACP,CAAC,CAAA;IAEF,IAAI,oBAAuD,CAAA;IAE3D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACnC,IAAI,OAAO,EAAE;YACT,UAAU,CACN,GAAG,EAAE,CACD,MAAM,CACF,IAAI,uCAAuC,CAAC,EAAE,IAAI,EAAE,CAAC,CACxD,EACL,OAAO,CACV,CAAA;SACJ;QAED,MAAM,UAAU,GAAG,IAAA,oBAAO,EACtB,UAAU,EACV,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,KAAK,EAAE,IAAI,EAAE,EAAE;YACX,MAAM,eAAe,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;gBAC3C,MAAM,IAAI,GAAG,CA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ources":["../../actions/index.ts"],"names":[],"mappings":";;;AAaA,sEAGqC;AAsCjC,uGAxCA,4CAAsB,OAwCA;AAFtB,iGArCA,sCAAgB,OAqCA;AAlCpB,qDAA8C;AA+B1C,wFA/BK,oBAAO,OA+BL;AA9BX,uFAAgF;AA4B5E,yGA5BK,sDAAwB,OA4BL;AA3B5B,mFAA4E;AA8BxE,uGA9BK,kDAAsB,OA8BL;AA7B1B,qFAA8E;AA8B1E,wGA9BK,oDAAuB,OA8BL;AA7B3B,yEAAkE;AAwB9D,kGAxBK,wCAAiB,OAwBL;AAvBrB,+EAAwE;AAyBpE,qGAzBK,8CAAoB,OAyBL;AAxBxB,6FAAsF;AA+BlF,4GA/BK,4DAA2B,OA+BL;AA9B/B,6FAGiD;AA4B7C,wHA7BA,wEAAuC,OA6BA;AA1B3C,oEAA6D;AAuBzD,gGAvBK,oCAAe,OAuBL"}
@@ -1 +1 @@
1
- {"version":3,"file":"getUserOperationGasPrice.js","sourceRoot":"","sources":["../../../actions/pimlico/getUserOperationGasPrice.ts"],"names":[],"mappings":";;;AAsCO,MAAM,wBAAwB,GAAG,KAAK,EACzC,MAA4B,EACe,EAAE;IAC7C,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACnC,MAAM,EAAE,kCAAkC;QAC1C,MAAM,EAAE,EAAE;KACb,CAAC,CAAA;IAEF,OAAO;QACH,IAAI,EAAE;YACF,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC;YACjD,oBAAoB,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC;SACpE;QACD,QAAQ,EAAE;YACN,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC;YACrD,oBAAoB,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC;SACxE;QACD,IAAI,EAAE;YACF,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC;YACjD,oBAAoB,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC;SACpE;KACJ,CAAA;AACL,CAAC,CAAA;AAtBY,QAAA,wBAAwB,4BAsBpC"}
1
+ {"version":3,"file":"getUserOperationGasPrice.js","sourceRoot":"","sources":["../../../actions/pimlico/getUserOperationGasPrice.ts"],"names":[],"mappings":";;;AAuCO,MAAM,wBAAwB,GAAG,KAAK,EAKzC,MAAqE,EAC1B,EAAE;IAC7C,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACnC,MAAM,EAAE,kCAAkC;QAC1C,MAAM,EAAE,EAAE;KACb,CAAC,CAAA;IAEF,OAAO;QACH,IAAI,EAAE;YACF,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC;YACjD,oBAAoB,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC;SACpE;QACD,QAAQ,EAAE;YACN,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC;YACrD,oBAAoB,EAAE,MAAM,CACxB,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAC1C;SACJ;QACD,IAAI,EAAE;YACF,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC;YACjD,oBAAoB,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC;SACpE;KACJ,CAAA;AACL,CAAC,CAAA;AA5BY,QAAA,wBAAwB,4BA4BpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getUserOperationStatus.js","sourceRoot":"","sources":["../../../actions/pimlico/getUserOperationStatus.ts"],"names":[],"mappings":";;;AAgCO,MAAM,sBAAsB,GAAG,KAAK,EACvC,MAA4B,EAC5B,EAAE,IAAI,EAAoC,EACD,EAAE;IAC3C,OAAO,MAAM,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,gCAAgC;QACxC,MAAM,EAAE,CAAC,IAAI,CAAC;KACjB,CAAC,CAAA;AACN,CAAC,CAAA;AARY,QAAA,sBAAsB,0BAQlC"}
1
+ {"version":3,"file":"getUserOperationStatus.js","sourceRoot":"","sources":["../../../actions/pimlico/getUserOperationStatus.ts"],"names":[],"mappings":";;;AAmCO,MAAM,sBAAsB,GAAG,KAAK,EAKvC,MAAqE,EACrE,EAAE,IAAI,EAAoC,EACD,EAAE;IAC3C,OAAO,MAAM,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,gCAAgC;QACxC,MAAM,EAAE,CAAC,IAAI,CAAC;KACjB,CAAC,CAAA;AACN,CAAC,CAAA;AAZY,QAAA,sBAAsB,0BAYlC"}
@@ -5,7 +5,10 @@ const deepHexlify_js_1 = require("../../utils/deepHexlify.js");
5
5
  const sponsorUserOperation = async (client, args) => {
6
6
  const response = await client.request({
7
7
  method: "pm_sponsorUserOperation",
8
- params: [(0, deepHexlify_js_1.deepHexlify)(args.userOperation), args.entryPoint]
8
+ params: [
9
+ (0, deepHexlify_js_1.deepHexlify)(args.userOperation),
10
+ args.entryPoint
11
+ ]
9
12
  });
10
13
  return {
11
14
  paymasterAndData: response.paymasterAndData,
@@ -1 +1 @@
1
- {"version":3,"file":"sponsorUserOperation.js","sourceRoot":"","sources":["../../../actions/pimlico/sponsorUserOperation.ts"],"names":[],"mappings":";;;AAIA,+DAAwD;AA0CjD,MAAM,oBAAoB,GAAG,KAAK,EACrC,MAA8B,EAC9B,IAAoC,EACG,EAAE;IACzC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,MAAM,EAAE,yBAAyB;QACjC,MAAM,EAAE,CAAC,IAAA,4BAAW,EAAC,IAAI,CAAC,aAAa,CAAiC,EAAE,IAAI,CAAC,UAAU,CAAC;KAC7F,CAAC,CAAA;IAEF,OAAO;QACH,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;QAC3C,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACvD,oBAAoB,EAAE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QAC3D,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;KAC9C,CAAA;AACL,CAAC,CAAA;AAfY,QAAA,oBAAoB,wBAehC"}
1
+ {"version":3,"file":"sponsorUserOperation.js","sourceRoot":"","sources":["../../../actions/pimlico/sponsorUserOperation.ts"],"names":[],"mappings":";;;AAOA,+DAAwD;AA6CjD,MAAM,oBAAoB,GAAG,KAAK,EAKrC,MAAuE,EACvE,IAAoC,EACG,EAAE;IACzC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,MAAM,EAAE,yBAAyB;QACjC,MAAM,EAAE;YACJ,IAAA,4BAAW,EAAC,IAAI,CAAC,aAAa,CAAiC;YAC/D,IAAI,CAAC,UAAU;SAClB;KACJ,CAAC,CAAA;IAEF,OAAO;QACH,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;QAC3C,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACvD,oBAAoB,EAAE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QAC3D,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;KAC9C,CAAA;AACL,CAAC,CAAA;AAtBY,QAAA,oBAAoB,wBAsBhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"pimlico.js","sourceRoot":"","sources":["../../actions/pimlico.ts"],"names":[],"mappings":";;;AAAA,uFAG8C;AA0B1C,yGA3BA,sDAAwB,OA2BA;AAzB5B,mFAI4C;AAsBxC,uGAvBA,kDAAsB,OAuBA;AArB1B,+EAI0C;AAkBtC,qGAnBA,8CAAoB,OAmBA;AAfxB,iEAAiG;AAgB7F,sGAhBK,kCAAqB,OAgBL;AACrB,wGAjB4B,oCAAuB,OAiB5B"}
1
+ {"version":3,"file":"pimlico.js","sourceRoot":"","sources":["../../actions/pimlico.ts"],"names":[],"mappings":";;;AAAA,uFAG8C;AAgC1C,yGAjCA,sDAAwB,OAiCA;AA/B5B,mFAI4C;AA4BxC,uGA7BA,kDAAsB,OA6BA;AA3B1B,+EAI0C;AAwBtC,qGAzBA,8CAAoB,OAyBA;AAlBxB,iEAGyC;AAgBrC,sGAlBA,kCAAqB,OAkBA;AACrB,wGAlBA,oCAAuB,OAkBA"}
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAccountNonce = void 0;
4
- const getAccountNonce = async (publicClient, { sender, entryPoint, key = BigInt(0) }) => {
5
- return await publicClient.readContract({
4
+ const actions_1 = require("viem/actions");
5
+ const getAction_js_1 = require("../../utils/getAction.js");
6
+ const getAccountNonce = async (client, { sender, entryPoint, key = BigInt(0) }) => {
7
+ return await (0, getAction_js_1.getAction)(client, actions_1.readContract)({
6
8
  address: entryPoint,
7
9
  abi: [
8
10
  {
@@ -1 +1 @@
1
- {"version":3,"file":"getAccountNonce.js","sourceRoot":"","sources":["../../../actions/public/getAccountNonce.ts"],"names":[],"mappings":";;;AA8BO,MAAM,eAAe,GAAG,KAAK,EAChC,YAA0B,EAC1B,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,EAAyB,EAC/C,EAAE;IACjB,OAAO,MAAM,YAAY,CAAC,YAAY,CAAC;QACnC,OAAO,EAAE,UAAU;QACnB,GAAG,EAAE;YACD;gBACI,MAAM,EAAE;oBACJ;wBACI,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,SAAS;qBAClB;oBACD;wBACI,IAAI,EAAE,KAAK;wBACX,IAAI,EAAE,SAAS;qBAClB;iBACJ;gBACD,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE;oBACL;wBACI,IAAI,EAAE,OAAO;wBACb,IAAI,EAAE,SAAS;qBAClB;iBACJ;gBACD,eAAe,EAAE,MAAM;gBACvB,IAAI,EAAE,UAAU;aACnB;SACJ;QACD,YAAY,EAAE,UAAU;QACxB,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC;KACtB,CAAC,CAAA;AACN,CAAC,CAAA;AAhCY,QAAA,eAAe,mBAgC3B"}
1
+ {"version":3,"file":"getAccountNonce.js","sourceRoot":"","sources":["../../../actions/public/getAccountNonce.ts"],"names":[],"mappings":";;;AACA,0CAA2C;AAC3C,2DAAoD;AAkC7C,MAAM,eAAe,GAAG,KAAK,EAIhC,MAAkC,EAClC,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,EAAyB,EAC/C,EAAE;IACjB,OAAO,MAAM,IAAA,wBAAS,EAClB,MAAM,EACN,sBAAY,CACf,CAAC;QACE,OAAO,EAAE,UAAU;QACnB,GAAG,EAAE;YACD;gBACI,MAAM,EAAE;oBACJ;wBACI,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,SAAS;qBAClB;oBACD;wBACI,IAAI,EAAE,KAAK;wBACX,IAAI,EAAE,SAAS;qBAClB;iBACJ;gBACD,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE;oBACL;wBACI,IAAI,EAAE,OAAO;wBACb,IAAI,EAAE,SAAS;qBAClB;iBACJ;gBACD,eAAe,EAAE,MAAM;gBACvB,IAAI,EAAE,UAAU;aACnB;SACJ;QACD,YAAY,EAAE,UAAU;QACxB,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC;KACtB,CAAC,CAAA;AACN,CAAC,CAAA;AAtCY,QAAA,eAAe,mBAsC3B"}
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSenderAddress = exports.InvalidEntryPointError = void 0;
4
4
  const viem_1 = require("viem");
5
+ const actions_1 = require("viem/actions");
6
+ const getAction_js_1 = require("../../utils/getAction.js");
5
7
  class InvalidEntryPointError extends viem_1.BaseError {
6
8
  constructor({ cause, entryPoint } = {}) {
7
9
  super(`The entry point address (\`entryPoint\`${entryPoint ? ` = ${entryPoint}` : ""}) is not a valid entry point. getSenderAddress did not revert with a SenderAddressResult error.`, {
@@ -16,9 +18,9 @@ class InvalidEntryPointError extends viem_1.BaseError {
16
18
  }
17
19
  }
18
20
  exports.InvalidEntryPointError = InvalidEntryPointError;
19
- const getSenderAddress = async (publicClient, { initCode, entryPoint }) => {
21
+ const getSenderAddress = async (client, { initCode, entryPoint }) => {
20
22
  try {
21
- await publicClient.simulateContract({
23
+ await (0, getAction_js_1.getAction)(client, actions_1.simulateContract)({
22
24
  address: entryPoint,
23
25
  abi: [
24
26
  {
@@ -55,7 +57,9 @@ const getSenderAddress = async (publicClient, { initCode, entryPoint }) => {
55
57
  if (err.cause.name === "ContractFunctionRevertedError") {
56
58
  const revertError = err.cause;
57
59
  const errorName = revertError.data?.errorName ?? "";
58
- if (errorName === "SenderAddressResult" && revertError.data?.args && revertError.data?.args[0]) {
60
+ if (errorName === "SenderAddressResult" &&
61
+ revertError.data?.args &&
62
+ revertError.data?.args[0]) {
59
63
  return revertError.data?.args[0];
60
64
  }
61
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getSenderAddress.js","sourceRoot":"","sources":["../../../actions/public/getSenderAddress.ts"],"names":[],"mappings":";;;AAAA,+BAOa;AAIb,MAAa,sBAAuB,SAAQ,gBAAS;IAGjD,YAAY,EAAE,KAAK,EAAE,UAAU,KAAkD,EAAE;QAC/E,KAAK,CACD,0CACI,UAAU,CAAC,CAAC,CAAC,MAAM,UAAU,EAAE,CAAC,CAAC,CAAC,EACtC,iGAAiG,EACjG;YACI,KAAK;SACR,CACJ,CAAA;QAVI;;;;mBAAO,wBAAwB;WAAA;IAWxC,CAAC;CACJ;AAbD,wDAaC;AA4BM,MAAM,gBAAgB,GAAG,KAAK,EACjC,YAA0B,EAC1B,EAAE,QAAQ,EAAE,UAAU,EAA0B,EAChC,EAAE;IAClB,IAAI;QACA,MAAM,YAAY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AAM,SAAS,GAAG,WAAW,CAAC,IAAI,EAAE,SAAS,IAAI,EAAE,CAAA;YACnD,IACI,SAAS,KAAK,qBAAqB;gBACnC,WAAW,CAAC,IAAI,EAAE,IAAI;gBACtB,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAC3B;gBACE,OAAO,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAY,CAAA;aAC9C;SACJ;QAED,MAAM,CAAC,CAAA;KACV;IAED,MAAM,IAAI,sBAAsB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAA;AACpD,CAAC,CAAA;AA7DY,QAAA,gBAAgB,oBA6D5B"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deployContract = void 0;
4
+ const getAction_js_1 = require("../../utils/getAction.js");
5
+ const index_js_1 = require("../../utils/index.js");
6
+ const signUserOperationHashWithECDSA_js_1 = require("../../utils/signUserOperationHashWithECDSA.js");
7
+ const waitForUserOperationReceipt_js_1 = require("../bundler/waitForUserOperationReceipt.js");
8
+ const sendUserOperation_js_1 = require("./sendUserOperation.js");
9
+ async function deployContract(client, { abi, args, bytecode, sponsorUserOperation, ...request }) {
10
+ const { account: account_ = client.account } = request;
11
+ if (!account_) {
12
+ throw new signUserOperationHashWithECDSA_js_1.AccountOrClientNotFoundError({
13
+ docsPath: "/docs/actions/wallet/sendTransaction"
14
+ });
15
+ }
16
+ const account = (0, index_js_1.parseAccount)(account_);
17
+ const userOpHash = await (0, getAction_js_1.getAction)(client, sendUserOperation_js_1.sendUserOperation)({
18
+ userOperation: {
19
+ sender: account.address,
20
+ paymasterAndData: "0x",
21
+ maxFeePerGas: request.maxFeePerGas || 0n,
22
+ maxPriorityFeePerGas: request.maxPriorityFeePerGas || 0n,
23
+ callData: await account.encodeDeployCallData({
24
+ abi,
25
+ args,
26
+ bytecode
27
+ })
28
+ },
29
+ account: account,
30
+ sponsorUserOperation
31
+ });
32
+ const userOperationReceipt = await (0, getAction_js_1.getAction)(client, waitForUserOperationReceipt_js_1.waitForUserOperationReceipt)({
33
+ hash: userOpHash
34
+ });
35
+ return userOperationReceipt?.receipt.transactionHash;
36
+ }
37
+ exports.deployContract = deployContract;
38
+ //# sourceMappingURL=deployContract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployContract.js","sourceRoot":"","sources":["../../../actions/smartAccount/deployContract.ts"],"names":[],"mappings":";;;AASA,2DAAoD;AACpD,mDAAmD;AACnD,qGAA4F;AAC5F,8FAAuF;AAEvF,iEAA0D;AAsCnD,KAAK,UAAU,cAAc,CAMhC,MAA2C,EAC3C,EACI,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,oBAAoB,EACpB,GAAG,OAAO,EAC0B;IAExC,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,OAAO,CAAA;IAEtD,IAAI,CAAC,QAAQ,EAAE;QACX,MAAM,IAAI,gEAA4B,CAAC;YACnC,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;KACL;IAED,MAAM,OAAO,GAAG,IAAA,uBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,MAAM,UAAU,GAAG,MAAM,IAAA,wBAAS,EAC9B,MAAM,EACN,wCAAiB,CACpB,CAAC;QACE,aAAa,EAAE;YACX,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,gBAAgB,EAAE,IAAI;YACtB,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;YACxC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,EAAE;YACxD,QAAQ,EAAE,MAAM,OAAO,CAAC,oBAAoB,CAAC;gBACzC,GAAG;gBACH,IAAI;gBACJ,QAAQ;aAMX,CAAC;SACL;QACD,OAAO,EAAE,OAAO;QAChB,oBAAoB;KACvB,CAAC,CAAA;IAEF,MAAM,oBAAoB,GAAG,MAAM,IAAA,wBAAS,EACxC,MAAM,EACN,4DAA2B,CAC9B,CAAC;QACE,IAAI,EAAE,UAAU;KACnB,CAAC,CAAA;IAEF,OAAO,oBAAoB,EAAE,OAAO,CAAC,eAAe,CAAA;AACxD,CAAC;AAzDD,wCAyDC"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.prepareUserOperationRequest = void 0;
4
+ const actions_1 = require("viem/actions");
5
+ const getAction_js_1 = require("../../utils/getAction.js");
6
+ const index_js_1 = require("../../utils/index.js");
7
+ const estimateUserOperationGas_js_1 = require("../bundler/estimateUserOperationGas.js");
8
+ async function prepareUserOperationRequest(client, args) {
9
+ const { account: account_ = client.account, userOperation: partialUserOperation, sponsorUserOperation } = args;
10
+ if (!account_)
11
+ throw new index_js_1.AccountOrClientNotFoundError();
12
+ const account = (0, index_js_1.parseAccount)(account_);
13
+ const [sender, nonce, initCode, signature, callData, gasEstimation] = await Promise.all([
14
+ partialUserOperation.sender || account.address,
15
+ partialUserOperation.nonce || account.getNonce(),
16
+ partialUserOperation.initCode || account.getInitCode(),
17
+ partialUserOperation.signature || account.getDummySignature(),
18
+ partialUserOperation.callData,
19
+ !partialUserOperation.maxFeePerGas ||
20
+ !partialUserOperation.maxPriorityFeePerGas
21
+ ? (0, actions_1.estimateFeesPerGas)(account.client)
22
+ : undefined
23
+ ]);
24
+ const userOperation = {
25
+ sender,
26
+ nonce,
27
+ initCode,
28
+ signature,
29
+ callData,
30
+ paymasterAndData: "0x",
31
+ maxFeePerGas: partialUserOperation.maxFeePerGas ||
32
+ gasEstimation?.maxFeePerGas ||
33
+ 0n,
34
+ maxPriorityFeePerGas: partialUserOperation.maxPriorityFeePerGas ||
35
+ gasEstimation?.maxPriorityFeePerGas ||
36
+ 0n,
37
+ callGasLimit: partialUserOperation.callGasLimit || 0n,
38
+ verificationGasLimit: partialUserOperation.verificationGasLimit || 0n,
39
+ preVerificationGas: partialUserOperation.preVerificationGas || 0n
40
+ };
41
+ if (sponsorUserOperation) {
42
+ const { callGasLimit, verificationGasLimit, preVerificationGas, paymasterAndData } = await sponsorUserOperation({
43
+ userOperation,
44
+ entryPoint: account.entryPoint
45
+ });
46
+ userOperation.paymasterAndData = paymasterAndData;
47
+ userOperation.callGasLimit = userOperation.callGasLimit || callGasLimit;
48
+ userOperation.verificationGasLimit =
49
+ userOperation.verificationGasLimit || verificationGasLimit;
50
+ userOperation.preVerificationGas =
51
+ userOperation.preVerificationGas || preVerificationGas;
52
+ }
53
+ else if (!userOperation.callGasLimit ||
54
+ !userOperation.verificationGasLimit ||
55
+ !userOperation.preVerificationGas) {
56
+ const gasParameters = await (0, getAction_js_1.getAction)(client, estimateUserOperationGas_js_1.estimateUserOperationGas)({
57
+ userOperation,
58
+ entryPoint: account.entryPoint
59
+ });
60
+ userOperation.callGasLimit =
61
+ userOperation.callGasLimit || gasParameters.callGasLimit;
62
+ userOperation.verificationGasLimit =
63
+ userOperation.verificationGasLimit ||
64
+ gasParameters.verificationGasLimit;
65
+ userOperation.preVerificationGas =
66
+ userOperation.preVerificationGas || gasParameters.preVerificationGas;
67
+ }
68
+ return userOperation;
69
+ }
70
+ exports.prepareUserOperationRequest = prepareUserOperationRequest;
71
+ //# sourceMappingURL=prepareUserOperationRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareUserOperationRequest.js","sourceRoot":"","sources":["../../../actions/smartAccount/prepareUserOperationRequest.ts"],"names":[],"mappings":";;;AACA,0CAAiD;AAOjD,2DAAoD;AACpD,mDAG6B;AAC7B,wFAAiF;AAmC1E,KAAK,UAAU,2BAA2B,CAK7C,MAA4C,EAC5C,IAAqD;IAErD,MAAM,EACF,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,aAAa,EAAE,oBAAoB,EACnC,oBAAoB,EACvB,GAAG,IAAI,CAAA;IACR,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,uCAA4B,EAAE,CAAA;IAEvD,MAAM,OAAO,GAAG,IAAA,uBAA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AAgB,GAAG,gBAAgB,CAAA;QACjD,aAAa,CAAC,YAAY,GAAG,aAAa,CAAC,YAAY,IAAI,YAAY,CAAA;QACvE,aAAa,CAAC,oBAAoB;YAC9B,aAAa,CAAC,oBAAoB,IAAI,oBAAoB,CAAA;QAC9D,aAAa,CAAC,kBAAkB;YAC5B,aAAa,CAAC,kBAAkB,IAAI,kBAAkB,CAAA;KAC7D;SAAM,IACH,CAAC,aAAa,CAAC,YAAY;QAC3B,CAAC,aAAa,CAAC,oBAAoB;QACnC,CAAC,aAAa,CAAC,kBAAkB,EACnC;QACE,MAAM,aAAa,GAAG,MAAM,IAAA,wBAAS,EACjC,MAAM,EACN,sDAAwB,CAC3B,CAAC;YACE,aAAa;YACb,UAAU,EAAE,OAAO,CAAC,UAAU;SACjC,CAAC,CAAA;QAEF,aAAa,CAAC,YAAY;YACtB,aAAa,CAAC,YAAY,IAAI,aAAa,CAAC,YAAY,CAAA;QAC5D,aAAa,CAAC,oBAAoB;YAC9B,aAAa,CAAC,oBAAoB;gBAClC,aAAa,CAAC,oBAAoB,CAAA;QACtC,aAAa,CAAC,kBAAkB;YAC5B,aAAa,CAAC,kBAAkB,IAAI,aAAa,CAAC,kBAAkB,CAAA;KAC3E;IAED,OAAO,aAAa,CAAA;AACxB,CAAC;AAzFD,kEAyFC"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendTransaction = void 0;
4
+ const getAction_js_1 = require("../../utils/getAction.js");
5
+ const index_js_1 = require("../../utils/index.js");
6
+ const waitForUserOperationReceipt_js_1 = require("../bundler/waitForUserOperationReceipt.js");
7
+ const sendUserOperation_js_1 = require("./sendUserOperation.js");
8
+ async function sendTransaction(client, args) {
9
+ const { account: account_ = client.account, data, maxFeePerGas, maxPriorityFeePerGas, to, value, sponsorUserOperation } = args;
10
+ if (!account_) {
11
+ throw new index_js_1.AccountOrClientNotFoundError({
12
+ docsPath: "/docs/actions/wallet/sendTransaction"
13
+ });
14
+ }
15
+ const account = (0, index_js_1.parseAccount)(account_);
16
+ if (!to)
17
+ throw new Error("Missing to address");
18
+ if (account.type !== "local") {
19
+ throw new Error("RPC account type not supported");
20
+ }
21
+ const callData = await account.encodeCallData({
22
+ to,
23
+ value: value || 0n,
24
+ data: data || "0x"
25
+ });
26
+ const userOpHash = await (0, getAction_js_1.getAction)(client, sendUserOperation_js_1.sendUserOperation)({
27
+ userOperation: {
28
+ sender: account.address,
29
+ paymasterAndData: "0x",
30
+ maxFeePerGas: maxFeePerGas || 0n,
31
+ maxPriorityFeePerGas: maxPriorityFeePerGas || 0n,
32
+ callData: callData
33
+ },
34
+ account: account,
35
+ sponsorUserOperation
36
+ });
37
+ const userOperationReceipt = await (0, getAction_js_1.getAction)(client, waitForUserOperationReceipt_js_1.waitForUserOperationReceipt)({
38
+ hash: userOpHash
39
+ });
40
+ return userOperationReceipt?.receipt.transactionHash;
41
+ }
42
+ exports.sendTransaction = sendTransaction;
43
+ //# sourceMappingURL=sendTransaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../actions/smartAccount/sendTransaction.ts"],"names":[],"mappings":";;;AAQA,2DAAoD;AACpD,mDAG6B;AAC7B,8FAAuF;AAEvF,iEAA0D;AAuDnD,KAAK,UAAU,eAAe,CAKjC,MAA2C,EAC3C,IAIC;IAED,MAAM,EACF,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,EAAE,EACF,KAAK,EACL,oBAAoB,EACvB,GAAG,IAAI,CAAA;IAER,IAAI,CAAC,QAAQ,EAAE;QACX,MAAM,IAAI,uCAA4B,CAAC;YACnC,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;KACL;IAED,MAAM,OAAO,GAAG,IAAA,uBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,IAAI,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;IAE9C,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;KACpD;IAED,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC;QAC1C,EAAE;QACF,KAAK,EAAE,KAAK,IAAI,EAAE;QAClB,IAAI,EAAE,IAAI,IAAI,IAAI;KACrB,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG,MAAM,IAAA,wBAAS,EAC9B,MAAM,EACN,wCAAiB,CACpB,CAAC;QACE,aAAa,EAAE;YACX,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,gBAAgB,EAAE,IAAI;YACtB,YAAY,EAAE,YAAY,IAAI,EAAE;YAChC,oBAAoB,EAAE,oBAAoB,IAAI,EAAE;YAChD,QAAQ,EAAE,QAAQ;SACrB;QACD,OAAO,EAAE,OAAO;QAChB,oBAAoB;KACvB,CAAC,CAAA;IAEF,MAAM,oBAAoB,GAAG,MAAM,IAAA,wBAAS,EACxC,MAAM,EACN,4DAA2B,CAC9B,CAAC;QACE,IAAI,EAAE,UAAU;KACnB,CAAC,CAAA;IAEF,OAAO,oBAAoB,EAAE,OAAO,CAAC,eAAe,CAAA;AACxD,CAAC;AAjED,0CAiEC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendUserOperation = void 0;
4
+ const getAction_js_1 = require("../../utils/getAction.js");
5
+ const index_js_1 = require("../../utils/index.js");
6
+ const sendUserOperation_js_1 = require("../bundler/sendUserOperation.js");
7
+ const prepareUserOperationRequest_js_1 = require("./prepareUserOperationRequest.js");
8
+ async function sendUserOperation(client, args) {
9
+ const { account: account_ = client.account } = args;
10
+ if (!account_)
11
+ throw new index_js_1.AccountOrClientNotFoundError();
12
+ const account = (0, index_js_1.parseAccount)(account_);
13
+ const userOperation = await (0, getAction_js_1.getAction)(client, prepareUserOperationRequest_js_1.prepareUserOperationRequest)(args);
14
+ userOperation.signature = await account.signUserOperation(userOperation);
15
+ const userOpHash = await (0, getAction_js_1.getAction)(client, sendUserOperation_js_1.sendUserOperation, "sendUserOperation")({
16
+ userOperation: userOperation,
17
+ entryPoint: account.entryPoint
18
+ });
19
+ return userOpHash;
20
+ }
21
+ exports.sendUserOperation = sendUserOperation;
22
+ //# sourceMappingURL=sendUserOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendUserOperation.js","sourceRoot":"","sources":["../../../actions/smartAccount/sendUserOperation.ts"],"names":[],"mappings":";;;AAOA,2DAAoD;AACpD,mDAG6B;AAC7B,0EAA+F;AAC/F,qFAGyC;AAuBlC,KAAK,UAAU,iBAAiB,CAKnC,MAA4C,EAC5C,IAA2C;IAE3C,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAA;IACnD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,uCAA4B,EAAE,CAAA;IAEvD,MAAM,OAAO,GAAG,IAAA,uBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,MAAM,aAAa,GAAG,MAAM,IAAA,wBAAS,EACjC,MAAM,EACN,4DAA2B,CAC9B,CAAC,IAAI,CAAC,CAAA;IAEP,aAAa,CAAC,SAAS,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAA;IAExE,MAAM,UAAU,GAAG,MAAM,IAAA,wBAAS,EAC9B,MAAM,EACN,wCAAwB,EACxB,mBAAmB,CACtB,CAAC;QACE,aAAa,EAAE,aAAa;QAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;KACjC,CAAC,CAAA;IAEF,OAAO,UAAU,CAAA;AACrB,CAAC;AA9BD,8CA8BC"}