@getpara/aa-zerodev 3.25.0 → 3.27.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 (2) hide show
  1. package/dist/action.js +16 -4
  2. package/package.json +3 -3
package/dist/action.js CHANGED
@@ -17,6 +17,7 @@ import { createPublicClient, http } from "viem";
17
17
  function getZeroDevRpcUrl(projectId, chainId) {
18
18
  return `https://rpc.zerodev.app/api/v3/${projectId}/chain/${chainId}`;
19
19
  }
20
+ const RECEIPT_LOOKUP_TIMEOUT_MS = 3e4;
20
21
  const ENTRYPOINT_V07 = {
21
22
  address: "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
22
23
  version: "0.7"
@@ -73,13 +74,24 @@ async function createZeroDevSmartAccount(params) {
73
74
  provider: "ZERODEV"
74
75
  });
75
76
  }
77
+ if (!("waitForUserOperationReceipt" in kernelClient && typeof kernelClient.waitForUserOperationReceipt === "function")) {
78
+ throw new SmartAccountError({
79
+ code: "INVALID_CONFIG",
80
+ message: "waitForUserOperationReceipt not available on client",
81
+ provider: "ZERODEV"
82
+ });
83
+ }
76
84
  try {
77
85
  const hash = await kernelClient.sendUserOperation({ calls });
78
- if ("waitForUserOperationReceipt" in kernelClient && typeof kernelClient.waitForUserOperationReceipt === "function") {
79
- const result = await kernelClient.waitForUserOperationReceipt({ hash });
80
- return result.receipt;
86
+ const { receipt: bundlerReceipt } = await kernelClient.waitForUserOperationReceipt({ hash });
87
+ try {
88
+ return await publicClient.waitForTransactionReceipt({
89
+ hash: bundlerReceipt.transactionHash,
90
+ timeout: RECEIPT_LOOKUP_TIMEOUT_MS
91
+ });
92
+ } catch {
93
+ return bundlerReceipt;
81
94
  }
82
- return publicClient.getTransactionReceipt({ hash });
83
95
  } catch (error) {
84
96
  throw wrapProviderError(error, "ZERODEV");
85
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/aa-zerodev",
3
- "version": "3.25.0",
3
+ "version": "3.27.0",
4
4
  "description": "ZeroDev smart account integration for Para",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "typecheck": "tsc --noEmit"
24
24
  },
25
25
  "dependencies": {
26
- "@getpara/viem-v2-integration": "3.25.0",
26
+ "@getpara/viem-v2-integration": "3.27.0",
27
27
  "@zerodev/ecdsa-validator": "^5.4.3",
28
28
  "@zerodev/sdk": "^5.4.3",
29
29
  "events": "^3.3.0"
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "757f086d7e0ff8adcc488ad0fc0801ec56366ee2"
41
+ "gitHead": "6f1dd93f4508c6da9256b76bcc306ec995002754"
42
42
  }