permissionless 0.0.30 → 0.0.32

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 (118) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/_cjs/actions/bundler/estimateUserOperationGas.js +21 -15
  3. package/_cjs/actions/bundler/estimateUserOperationGas.js.map +1 -1
  4. package/_cjs/actions/bundler/sendUserOperation.js +14 -7
  5. package/_cjs/actions/bundler/sendUserOperation.js.map +1 -1
  6. package/_cjs/actions/index.js.map +1 -1
  7. package/_cjs/errors/account.js +311 -0
  8. package/_cjs/errors/account.js.map +1 -0
  9. package/_cjs/errors/bundler.js +61 -0
  10. package/_cjs/errors/bundler.js.map +1 -0
  11. package/_cjs/errors/estimateUserOperationGas.js +47 -0
  12. package/_cjs/errors/estimateUserOperationGas.js.map +1 -0
  13. package/_cjs/errors/gas.js +113 -0
  14. package/_cjs/errors/gas.js.map +1 -0
  15. package/_cjs/errors/index.js +35 -0
  16. package/_cjs/errors/index.js.map +1 -0
  17. package/_cjs/errors/paymaster.js +228 -0
  18. package/_cjs/errors/paymaster.js.map +1 -0
  19. package/_cjs/errors/sendUserOperation.js +47 -0
  20. package/_cjs/errors/sendUserOperation.js.map +1 -0
  21. package/_cjs/errors/utils.js +18 -0
  22. package/_cjs/errors/utils.js.map +1 -0
  23. package/_cjs/index.js +1 -0
  24. package/_cjs/index.js.map +1 -1
  25. package/_cjs/utils/errors/getBundlerError.js +124 -0
  26. package/_cjs/utils/errors/getBundlerError.js.map +1 -0
  27. package/_cjs/utils/errors/getEstimateUserOperationGasError.js +19 -0
  28. package/_cjs/utils/errors/getEstimateUserOperationGasError.js.map +1 -0
  29. package/_cjs/utils/errors/getSendUserOperationError.js +19 -0
  30. package/_cjs/utils/errors/getSendUserOperationError.js.map +1 -0
  31. package/_cjs/utils/getAddressFromInitCodeOrPaymasterAndData.js +15 -0
  32. package/_cjs/utils/getAddressFromInitCodeOrPaymasterAndData.js.map +1 -0
  33. package/_cjs/utils/index.js +5 -3
  34. package/_cjs/utils/index.js.map +1 -1
  35. package/_esm/actions/bundler/estimateUserOperationGas.js +22 -15
  36. package/_esm/actions/bundler/estimateUserOperationGas.js.map +1 -1
  37. package/_esm/actions/bundler/sendUserOperation.js +14 -7
  38. package/_esm/actions/bundler/sendUserOperation.js.map +1 -1
  39. package/_esm/actions/index.js.map +1 -1
  40. package/_esm/errors/account.js +298 -0
  41. package/_esm/errors/account.js.map +1 -0
  42. package/_esm/errors/bundler.js +56 -0
  43. package/_esm/errors/bundler.js.map +1 -0
  44. package/_esm/errors/estimateUserOperationGas.js +43 -0
  45. package/_esm/errors/estimateUserOperationGas.js.map +1 -0
  46. package/_esm/errors/gas.js +106 -0
  47. package/_esm/errors/gas.js.map +1 -0
  48. package/_esm/errors/index.js +8 -0
  49. package/_esm/errors/index.js.map +1 -0
  50. package/_esm/errors/paymaster.js +218 -0
  51. package/_esm/errors/paymaster.js.map +1 -0
  52. package/_esm/errors/sendUserOperation.js +44 -0
  53. package/_esm/errors/sendUserOperation.js.map +1 -0
  54. package/_esm/errors/utils.js +14 -0
  55. package/_esm/errors/utils.js.map +1 -0
  56. package/_esm/index.js +1 -0
  57. package/_esm/index.js.map +1 -1
  58. package/_esm/utils/errors/getBundlerError.js +121 -0
  59. package/_esm/utils/errors/getBundlerError.js.map +1 -0
  60. package/_esm/utils/errors/getEstimateUserOperationGasError.js +19 -0
  61. package/_esm/utils/errors/getEstimateUserOperationGasError.js.map +1 -0
  62. package/_esm/utils/errors/getSendUserOperationError.js +15 -0
  63. package/_esm/utils/errors/getSendUserOperationError.js.map +1 -0
  64. package/_esm/utils/getAddressFromInitCodeOrPaymasterAndData.js +11 -0
  65. package/_esm/utils/getAddressFromInitCodeOrPaymasterAndData.js.map +1 -0
  66. package/_esm/utils/index.js +3 -2
  67. package/_esm/utils/index.js.map +1 -1
  68. package/_types/actions/bundler/estimateUserOperationGas.d.ts +3 -1
  69. package/_types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
  70. package/_types/actions/bundler/sendUserOperation.d.ts.map +1 -1
  71. package/_types/actions/index.d.ts +2 -2
  72. package/_types/actions/index.d.ts.map +1 -1
  73. package/_types/errors/account.d.ts +121 -0
  74. package/_types/errors/account.d.ts.map +1 -0
  75. package/_types/errors/bundler.d.ts +24 -0
  76. package/_types/errors/bundler.d.ts.map +1 -0
  77. package/_types/errors/estimateUserOperationGas.d.ts +13 -0
  78. package/_types/errors/estimateUserOperationGas.d.ts.map +1 -0
  79. package/_types/errors/gas.d.ts +47 -0
  80. package/_types/errors/gas.d.ts.map +1 -0
  81. package/_types/errors/index.d.ts +8 -0
  82. package/_types/errors/index.d.ts.map +1 -0
  83. package/_types/errors/paymaster.d.ts +85 -0
  84. package/_types/errors/paymaster.d.ts.map +1 -0
  85. package/_types/errors/sendUserOperation.d.ts +13 -0
  86. package/_types/errors/sendUserOperation.d.ts.map +1 -0
  87. package/_types/errors/utils.d.ts +5 -0
  88. package/_types/errors/utils.d.ts.map +1 -0
  89. package/_types/index.d.ts +1 -0
  90. package/_types/index.d.ts.map +1 -1
  91. package/_types/utils/errors/getBundlerError.d.ts +11 -0
  92. package/_types/utils/errors/getBundlerError.d.ts.map +1 -0
  93. package/_types/utils/errors/getEstimateUserOperationGasError.d.ts +9 -0
  94. package/_types/utils/errors/getEstimateUserOperationGasError.d.ts.map +1 -0
  95. package/_types/utils/errors/getSendUserOperationError.d.ts +4 -0
  96. package/_types/utils/errors/getSendUserOperationError.d.ts.map +1 -0
  97. package/_types/utils/getAddressFromInitCodeOrPaymasterAndData.d.ts +3 -0
  98. package/_types/utils/getAddressFromInitCodeOrPaymasterAndData.d.ts.map +1 -0
  99. package/_types/utils/index.d.ts +3 -2
  100. package/_types/utils/index.d.ts.map +1 -1
  101. package/actions/bundler/estimateUserOperationGas.ts +33 -15
  102. package/actions/bundler/sendUserOperation.ts +26 -8
  103. package/actions/index.ts +3 -1
  104. package/errors/account.ts +345 -0
  105. package/errors/bundler.ts +62 -0
  106. package/errors/estimateUserOperationGas.ts +50 -0
  107. package/errors/gas.ts +120 -0
  108. package/errors/index.ts +118 -0
  109. package/errors/paymaster.ts +257 -0
  110. package/errors/sendUserOperation.ts +49 -0
  111. package/errors/utils.ts +19 -0
  112. package/index.ts +1 -0
  113. package/package.json +6 -1
  114. package/utils/errors/getBundlerError.ts +220 -0
  115. package/utils/errors/getEstimateUserOperationGasError.ts +37 -0
  116. package/utils/errors/getSendUserOperationError.ts +25 -0
  117. package/utils/getAddressFromInitCodeOrPaymasterAndData.ts +13 -0
  118. package/utils/index.ts +4 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # permissionless
2
2
 
3
+ ## 0.0.32
4
+
5
+ ### Patch Changes
6
+
7
+ - 57dd176305078ab121e0289cdf6566dd063ca0e4: Added custom error types corresponding to AA errors
8
+
9
+ ## 0.0.31
10
+
11
+ ### Patch Changes
12
+
13
+ - 3917ad1acfb6ac7f45da7f74e277a22bcf24231b: fix isSmartAccountDeployed
14
+
3
15
  ## 0.0.30
4
16
 
5
17
  ### Patch Changes
@@ -2,25 +2,31 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.estimateUserOperationGas = void 0;
4
4
  const deepHexlify_js_1 = require("../../utils/deepHexlify.js");
5
+ const getEstimateUserOperationGasError_js_1 = require("../../utils/errors/getEstimateUserOperationGasError.js");
5
6
  const estimateUserOperationGas = async (client, args, stateOverrides) => {
6
7
  const { userOperation, entryPoint } = args;
7
8
  const userOperationWithBigIntAsHex = (0, deepHexlify_js_1.deepHexlify)(userOperation);
8
9
  const stateOverridesWithBigIntAsHex = (0, deepHexlify_js_1.deepHexlify)(stateOverrides);
9
- const response = await client.request({
10
- method: "eth_estimateUserOperationGas",
11
- params: stateOverrides
12
- ? [
13
- userOperationWithBigIntAsHex,
14
- entryPoint,
15
- stateOverridesWithBigIntAsHex
16
- ]
17
- : [userOperationWithBigIntAsHex, entryPoint]
18
- });
19
- return {
20
- preVerificationGas: BigInt(response.preVerificationGas || 0),
21
- verificationGasLimit: BigInt(response.verificationGasLimit || 0),
22
- callGasLimit: BigInt(response.callGasLimit || 0)
23
- };
10
+ try {
11
+ const response = await client.request({
12
+ method: "eth_estimateUserOperationGas",
13
+ params: stateOverrides
14
+ ? [
15
+ userOperationWithBigIntAsHex,
16
+ entryPoint,
17
+ stateOverridesWithBigIntAsHex
18
+ ]
19
+ : [userOperationWithBigIntAsHex, entryPoint]
20
+ });
21
+ return {
22
+ preVerificationGas: BigInt(response.preVerificationGas || 0),
23
+ verificationGasLimit: BigInt(response.verificationGasLimit || 0),
24
+ callGasLimit: BigInt(response.callGasLimit || 0)
25
+ };
26
+ }
27
+ catch (err) {
28
+ throw (0, getEstimateUserOperationGasError_js_1.getEstimateUserOperationGasError)(err, args);
29
+ }
24
30
  };
25
31
  exports.estimateUserOperationGas = estimateUserOperationGas;
26
32
  //# sourceMappingURL=estimateUserOperationGas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"estimateUserOperationGas.js","sourceRoot":"","sources":["../../../actions/bundler/estimateUserOperationGas.ts"],"names":[],"mappings":";;;AAMA,+DAAwD;AA2CjD,MAAM,wBAAwB,GAAG,KAAK,EAKzC,MAA8D,EAC9D,IAAkD,EAClD,cAA+B,EACsB,EAAE;IACvD,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IAE1C,MAAM,4BAA4B,GAAG,IAAA,4BAAW,EAAC,aAAa,CAAC,CAAA;IAC/D,MAAM,6BAA6B,GAAG,IAAA,4BAAW,EAAC,cAAc,CAAC,CAAA;IAEjE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QAClC,MAAM,EAAE,8BAA8B;QACtC,MAAM,EAAE,cAAc;YAClB,CAAC,CAAC;gBACI,4BAA4B;gBAC5B,UAAU;gBACV,6BAA6B;aAChC;YACH,CAAC,CAAC,CAAC,4BAA4B,EAAE,UAAU,CAAC;KACnD,CAAC,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;QACX,MAAM,IAAA,sEAAgC,EAAC,GAAgB,EAAE,IAAI,CAAC,CAAA;IAClE,CAAC;AACL,CAAC,CAAA;AAlCY,QAAA,wBAAwB,4BAkCpC"}
@@ -2,15 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sendUserOperation = void 0;
4
4
  const deepHexlify_js_1 = require("../../utils/deepHexlify.js");
5
+ const getSendUserOperationError_js_1 = require("../../utils/errors/getSendUserOperationError.js");
5
6
  const sendUserOperation = async (client, args) => {
6
7
  const { userOperation, entryPoint } = args;
7
- return client.request({
8
- method: "eth_sendUserOperation",
9
- params: [
10
- (0, deepHexlify_js_1.deepHexlify)(userOperation),
11
- entryPoint
12
- ]
13
- });
8
+ try {
9
+ const userOperationHash = await client.request({
10
+ method: "eth_sendUserOperation",
11
+ params: [
12
+ (0, deepHexlify_js_1.deepHexlify)(userOperation),
13
+ entryPoint
14
+ ]
15
+ });
16
+ return userOperationHash;
17
+ }
18
+ catch (err) {
19
+ throw (0, getSendUserOperationError_js_1.getSendUserOperationError)(err, args);
20
+ }
14
21
  };
15
22
  exports.sendUserOperation = sendUserOperation;
16
23
  //# sourceMappingURL=sendUserOperation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sendUserOperation.js","sourceRoot":"","sources":["../../../actions/bundler/sendUserOperation.ts"],"names":[],"mappings":";;;AAQA,+DAAwD;AAgCjD,MAAM,iBAAiB,GAAG,KAAK,EAKlC,MAA8D,EAC9D,IAA2C,EAC9B,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;AAjBY,QAAA,iBAAiB,qBAiB7B"}
1
+ {"version":3,"file":"sendUserOperation.js","sourceRoot":"","sources":["../../../actions/bundler/sendUserOperation.ts"],"names":[],"mappings":";;;AAgBA,+DAAwD;AACxD,kGAA2F;AAgCpF,MAAM,iBAAiB,GAAG,KAAK,EAKlC,MAA8D,EAC9D,IAA2C,EAC9B,EAAE;IACf,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IAE1C,IAAI,CAAC;QACD,MAAM,iBAAiB,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;YAC3C,MAAM,EAAE,uBAAuB;YAC/B,MAAM,EAAE;gBACJ,IAAA,4BAAW,EAAC,aAAa,CAAiC;gBAC1D,UAAqB;aACxB;SACJ,CAAC,CAAA;QAEF,OAAO,iBAAiB,CAAA;IAC5B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,MAAM,IAAA,wDAAyB,EAC3B,GAAgB,EAChB,IAAmC,CACtC,CAAA;IACL,CAAC;AACL,CAAC,CAAA;AA1BY,QAAA,iBAAiB,qBA0B7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../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
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../actions/index.ts"],"names":[],"mappings":";;;AAcA,sEAGqC;AAuCjC,uGAzCA,4CAAsB,OAyCA;AAFtB,iGAtCA,sCAAgB,OAsCA;AAnCpB,qDAA8C;AAgC1C,wFAhCK,oBAAO,OAgCL;AA/BX,uFAAgF;AA6B5E,yGA7BK,sDAAwB,OA6BL;AA5B5B,mFAA4E;AA+BxE,uGA/BK,kDAAsB,OA+BL;AA9B1B,qFAA8E;AA+B1E,wGA/BK,oDAAuB,OA+BL;AA9B3B,yEAAkE;AAyB9D,kGAzBK,wCAAiB,OAyBL;AAxBrB,+EAAwE;AA0BpE,qGA1BK,8CAAoB,OA0BL;AAzBxB,6FAAsF;AAgClF,4GAhCK,4DAA2B,OAgCL;AA/B/B,6FAGiD;AA6B7C,wHA9BA,wEAAuC,OA8BA;AA3B3C,oEAA6D;AAwBzD,gGAxBK,oCAAe,OAwBL"}
@@ -0,0 +1,311 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidSmartAccountNonceError = exports.InvalidSmartAccountSignatureError = exports.SmartAccountValidationRevertedError = exports.SmartAccountSignatureValidityPeriodError = exports.SmartAccountInsufficientFundsError = exports.SenderNotDeployedError = exports.InitCodeDidNotDeploySenderError = exports.SenderAddressMismatchError = exports.InitCodeRevertedError = exports.SenderAlreadyDeployedError = void 0;
4
+ const viem_1 = require("viem");
5
+ class SenderAlreadyDeployedError extends viem_1.BaseError {
6
+ constructor({ cause, sender, docsPath } = {}) {
7
+ super([
8
+ `Smart account ${sender} is already deployed.`,
9
+ "",
10
+ "Possible solutions:",
11
+ `• Remove the initCode from the user operation and set it to "0x"`,
12
+ "",
13
+ docsPath ? `Docs: ${docsPath}` : ""
14
+ ].join("\n"), {
15
+ cause
16
+ });
17
+ Object.defineProperty(this, "name", {
18
+ enumerable: true,
19
+ configurable: true,
20
+ writable: true,
21
+ value: "SenderAlreadyDeployedError"
22
+ });
23
+ }
24
+ }
25
+ exports.SenderAlreadyDeployedError = SenderAlreadyDeployedError;
26
+ Object.defineProperty(SenderAlreadyDeployedError, "message", {
27
+ enumerable: true,
28
+ configurable: true,
29
+ writable: true,
30
+ value: /aa10/
31
+ });
32
+ class InitCodeRevertedError extends viem_1.BaseError {
33
+ constructor({ cause, docsPath } = {}) {
34
+ super([
35
+ "EntryPoint failed to create the smart account with the initCode provided.",
36
+ "",
37
+ "Possible reasons:",
38
+ "• The initCode ran out of gas",
39
+ "• The initCode reverted during the account deployment process",
40
+ "",
41
+ "Possible solutions:",
42
+ "• Verify that the factory address in the initCode is correct (the factory address is the first 20 bytes of the initCode).",
43
+ "• Verify that the initCode is correct.",
44
+ "• Check whether the verificationGasLimit is sufficient for the initCode to complete without running out of gas.",
45
+ "",
46
+ docsPath ? `Docs: ${docsPath}` : ""
47
+ ].join("\n"), {
48
+ cause
49
+ });
50
+ Object.defineProperty(this, "name", {
51
+ enumerable: true,
52
+ configurable: true,
53
+ writable: true,
54
+ value: "InitCodeRevertedError"
55
+ });
56
+ }
57
+ }
58
+ exports.InitCodeRevertedError = InitCodeRevertedError;
59
+ Object.defineProperty(InitCodeRevertedError, "message", {
60
+ enumerable: true,
61
+ configurable: true,
62
+ writable: true,
63
+ value: /aa13/
64
+ });
65
+ class SenderAddressMismatchError extends viem_1.BaseError {
66
+ constructor({ cause, sender, docsPath }) {
67
+ super([
68
+ "The initCode returned a different smart account address than expected.",
69
+ `Expected: ${sender}`,
70
+ "",
71
+ "Possible reasons:",
72
+ "• Account deployed with the initCode provided does not match match the sender address provided",
73
+ "",
74
+ "Possible solutions:",
75
+ "• Verify that the sender address was generated deterministically from the initCode. (consider leveraging functions like getSenderAddress)",
76
+ "• Verify that the factory address in the initCode is correct (the factory address is the first 20 bytes of the initCode)",
77
+ "• Verify that the initCode is correct.",
78
+ "",
79
+ docsPath ? `Docs: ${docsPath}` : ""
80
+ ].join("\n"), {
81
+ cause
82
+ });
83
+ Object.defineProperty(this, "name", {
84
+ enumerable: true,
85
+ configurable: true,
86
+ writable: true,
87
+ value: "SenderAddressMismatchError"
88
+ });
89
+ }
90
+ }
91
+ exports.SenderAddressMismatchError = SenderAddressMismatchError;
92
+ Object.defineProperty(SenderAddressMismatchError, "message", {
93
+ enumerable: true,
94
+ configurable: true,
95
+ writable: true,
96
+ value: /aa14/
97
+ });
98
+ class InitCodeDidNotDeploySenderError extends viem_1.BaseError {
99
+ constructor({ cause, sender, docsPath }) {
100
+ super([
101
+ `The initCode did not deploy the sender at the address ${sender}.`,
102
+ "",
103
+ "Possible reasons:",
104
+ "• The initCode factory is not creating an account.",
105
+ "• The initCode factory is creating an account, but is not implemented correctly as it is not deploying at the sender address",
106
+ "",
107
+ "Possible solutions:",
108
+ "• Verify that the factory address in the initCode is correct (the factory address is the first 20 bytes of the initCode).",
109
+ "• Verify that the initCode factory is implemented correctly. The factory must deploy the smart account at the sender address.",
110
+ "",
111
+ docsPath ? `Docs: ${docsPath}` : ""
112
+ ].join("\n"), {
113
+ cause
114
+ });
115
+ Object.defineProperty(this, "name", {
116
+ enumerable: true,
117
+ configurable: true,
118
+ writable: true,
119
+ value: "InitCodeDidNotDeploySenderError"
120
+ });
121
+ }
122
+ }
123
+ exports.InitCodeDidNotDeploySenderError = InitCodeDidNotDeploySenderError;
124
+ Object.defineProperty(InitCodeDidNotDeploySenderError, "message", {
125
+ enumerable: true,
126
+ configurable: true,
127
+ writable: true,
128
+ value: /aa15/
129
+ });
130
+ class SenderNotDeployedError extends viem_1.BaseError {
131
+ constructor({ cause, sender, docsPath }) {
132
+ super([
133
+ `Smart account ${sender} is not deployed.`,
134
+ "",
135
+ "Possible reasons:",
136
+ "• An initCode was not specified, but the sender address (i.e. the smart account) is not deployed.",
137
+ "",
138
+ "Possible solutions:",
139
+ "• If this is the first transaction by this account, make sure the initCode is included in the user operation.",
140
+ "• If the smart account is already supposed to be deployed, verify that you have selected the correct sender address for the user operation.",
141
+ "",
142
+ docsPath ? `Docs: ${docsPath}` : ""
143
+ ].join("\n"), {
144
+ cause
145
+ });
146
+ Object.defineProperty(this, "name", {
147
+ enumerable: true,
148
+ configurable: true,
149
+ writable: true,
150
+ value: "SenderNotDeployedError"
151
+ });
152
+ }
153
+ }
154
+ exports.SenderNotDeployedError = SenderNotDeployedError;
155
+ Object.defineProperty(SenderNotDeployedError, "message", {
156
+ enumerable: true,
157
+ configurable: true,
158
+ writable: true,
159
+ value: /aa20/
160
+ });
161
+ class SmartAccountInsufficientFundsError extends viem_1.BaseError {
162
+ constructor({ cause, sender, docsPath }) {
163
+ super([
164
+ `You are not using a paymaster, and the ${sender} address did not have enough native tokens to cover the gas costs associated with the user operation.`,
165
+ "",
166
+ "Possible solutions:",
167
+ "• If you are not using a paymaster, verify that the sender address has enough native tokens to cover the required prefund. Consider leveraging functions like getRequiredPrefund.",
168
+ "• If you are looking to use a paymaster to cover the gas fees, verify that the paymasterAndData field is set.",
169
+ "",
170
+ docsPath ? `Docs: ${docsPath}` : ""
171
+ ].join("\n"), {
172
+ cause
173
+ });
174
+ Object.defineProperty(this, "name", {
175
+ enumerable: true,
176
+ configurable: true,
177
+ writable: true,
178
+ value: "SmartAccountInsufficientFundsError"
179
+ });
180
+ }
181
+ }
182
+ exports.SmartAccountInsufficientFundsError = SmartAccountInsufficientFundsError;
183
+ Object.defineProperty(SmartAccountInsufficientFundsError, "message", {
184
+ enumerable: true,
185
+ configurable: true,
186
+ writable: true,
187
+ value: /aa21/
188
+ });
189
+ class SmartAccountSignatureValidityPeriodError extends viem_1.BaseError {
190
+ constructor({ cause, docsPath }) {
191
+ super([
192
+ "The signature used in the user operation is not valid, because it is outside of the time range it specified.",
193
+ "",
194
+ "Possible reasons:",
195
+ "• This error occurs when the block.timestamp falls after the validUntil timestamp, or before the validAfter timestamp.",
196
+ "",
197
+ "Possible solutions:",
198
+ "• If you are looking to use time-based signatures, verify that the validAfter and validUntil fields are set correctly and that the user operation is sent within the specified range.",
199
+ "• If you are not looking to use time-based signatures, verify that the validAfter and validUntil fields are set to 0.",
200
+ "",
201
+ docsPath ? `Docs: ${docsPath}` : ""
202
+ ].join("\n"), {
203
+ cause
204
+ });
205
+ Object.defineProperty(this, "name", {
206
+ enumerable: true,
207
+ configurable: true,
208
+ writable: true,
209
+ value: "SmartAccountSignatureValidityPeriodError"
210
+ });
211
+ }
212
+ }
213
+ exports.SmartAccountSignatureValidityPeriodError = SmartAccountSignatureValidityPeriodError;
214
+ Object.defineProperty(SmartAccountSignatureValidityPeriodError, "message", {
215
+ enumerable: true,
216
+ configurable: true,
217
+ writable: true,
218
+ value: /aa22/
219
+ });
220
+ class SmartAccountValidationRevertedError extends viem_1.BaseError {
221
+ constructor({ cause, sender, docsPath }) {
222
+ super([
223
+ `The smart account ${sender} reverted or ran out of gas during the validation of the user operation.`,
224
+ "",
225
+ "Possible solutions:",
226
+ "• Verify that the verificationGasLimit is high enough to cover the validateUserOp function's gas costs.",
227
+ "• Make sure validateUserOp returns uint(1) for invalid signatures, and MUST NOT REVERT when the signature is invalid",
228
+ "• If you are not using a paymaster, verify that the sender address has enough native tokens to cover the required pre fund. Consider leveraging functions like getRequiredPrefund.",
229
+ "• Verify that the validateUserOp function is implemented with the correct logic, and that the user operation is supposed to be valid.",
230
+ "",
231
+ docsPath ? `Docs: ${docsPath}` : ""
232
+ ].join("\n"), {
233
+ cause
234
+ });
235
+ Object.defineProperty(this, "name", {
236
+ enumerable: true,
237
+ configurable: true,
238
+ writable: true,
239
+ value: "SmartAccountValidationRevertedError"
240
+ });
241
+ }
242
+ }
243
+ exports.SmartAccountValidationRevertedError = SmartAccountValidationRevertedError;
244
+ Object.defineProperty(SmartAccountValidationRevertedError, "message", {
245
+ enumerable: true,
246
+ configurable: true,
247
+ writable: true,
248
+ value: /aa23/
249
+ });
250
+ class InvalidSmartAccountSignatureError extends viem_1.BaseError {
251
+ constructor({ cause, sender, docsPath }) {
252
+ super([
253
+ `The smart account ${sender} signature is invalid.`,
254
+ "",
255
+ "Possible solutions:",
256
+ "• Verify that the user operation was correctly signed, and that the signature was correctly encoded in the signature field of the user operation.",
257
+ "• Most smart account implementations sign over the userOpHash. Make sure that the userOpHash is correctly computed. Consider leveraging functions like getUserOperationHash.",
258
+ "• Make sure you have selected the correct chainId and entryPointAddress when computing the userOpHash.",
259
+ "• Make sure the smart account signature verification function is correctly implemented.",
260
+ "",
261
+ docsPath ? `Docs: ${docsPath}` : ""
262
+ ].join("\n"), {
263
+ cause
264
+ });
265
+ Object.defineProperty(this, "name", {
266
+ enumerable: true,
267
+ configurable: true,
268
+ writable: true,
269
+ value: "InvalidSmartAccountSignatureError"
270
+ });
271
+ }
272
+ }
273
+ exports.InvalidSmartAccountSignatureError = InvalidSmartAccountSignatureError;
274
+ Object.defineProperty(InvalidSmartAccountSignatureError, "message", {
275
+ enumerable: true,
276
+ configurable: true,
277
+ writable: true,
278
+ value: /aa24/
279
+ });
280
+ class InvalidSmartAccountNonceError extends viem_1.BaseError {
281
+ constructor({ cause, sender, nonce, docsPath }) {
282
+ const nonceKey = nonce >> 64n;
283
+ const nonceSequence = nonce & 0xffffffffffffffffn;
284
+ super([
285
+ `The smart account ${sender} nonce is invalid.`,
286
+ `Nonce sent: ${nonce} (key: ${nonceKey}, sequence: ${nonceSequence})`,
287
+ "",
288
+ "Possible solutions:",
289
+ "• Verify that you are using the correct nonce for the user operation. The nonce should be the current nonce of the smart account for the selected key. Consider leveraging functions like getAccountNonce.",
290
+ "• Verify that the nonce is formatted correctly.",
291
+ "",
292
+ docsPath ? `Docs: ${docsPath}` : ""
293
+ ].join("\n"), {
294
+ cause
295
+ });
296
+ Object.defineProperty(this, "name", {
297
+ enumerable: true,
298
+ configurable: true,
299
+ writable: true,
300
+ value: "InvalidSmartAccountNonceError"
301
+ });
302
+ }
303
+ }
304
+ exports.InvalidSmartAccountNonceError = InvalidSmartAccountNonceError;
305
+ Object.defineProperty(InvalidSmartAccountNonceError, "message", {
306
+ enumerable: true,
307
+ configurable: true,
308
+ writable: true,
309
+ value: /aa25/
310
+ });
311
+ //# sourceMappingURL=account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.js","sourceRoot":"","sources":["../../errors/account.ts"],"names":[],"mappings":";;;AAAA,+BAA8C;AAK9C,MAAa,0BAA2B,SAAQ,gBAAS;IAGrD,YAAY,EACR,KAAK,EACL,MAAM,EACN,QAAQ,KACoD,EAAE;QAC9D,KAAK,CACD;YACI,iBAAiB,MAAM,uBAAuB;YAC9C,EAAE;YACF,qBAAqB;YACrB,kEAAkE;YAClE,EAAE;YACF,QAAQ,CAAC,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE;SACtC,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACI,KAAK;SACR,CACJ,CAAA;QAlBI;;;;mBAAO,4BAAqC;WAAA;IAmBrD,CAAC;;AArBL,gEAsBC;AArBU;;;;WAAU,MAAM;EAAT,CAAS;AA0B3B,MAAa,qBAAsB,SAAQ,gBAAS;IAGhD,YAAY,EACR,KAAK,EACL,QAAQ,KACkC,EAAE;QAC5C,KAAK,CACD;YACI,2EAA2E;YAC3E,EAAE;YACF,mBAAmB;YACnB,+BAA+B;YAC/B,+DAA+D;YAC/D,EAAE;YACF,qBAAqB;YACrB,2HAA2H;YAC3H,wCAAwC;YACxC,iHAAiH;YACjH,EAAE;YACF,QAAQ,CAAC,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE;SACtC,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACI,KAAK;SACR,CACJ,CAAA;QAvBI;;;;mBAAO,uBAAgC;WAAA;IAwBhD,CAAC;;AA1BL,sDA2BC;AA1BU;;;;WAAU,MAAM;EAAT,CAAS;AA+B3B,MAAa,0BAA2B,SAAQ,gBAAS;IAGrD,YAAY,EACR,KAAK,EACL,MAAM,EACN,QAAQ,EAKX;QACG,KAAK,CACD;YACI,wEAAwE;YACxE,aAAa,MAAM,EAAE;YACrB,EAAE;YACF,mBAAmB;YACnB,gGAA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IA8BxD,CAAC;;AAhCL,sEAiCC;AAhCU;;;;WAAU,MAAM;EAAT,CAAS"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidAggregatorError = exports.InvalidBeneficiaryAddressError = void 0;
4
+ const viem_1 = require("viem");
5
+ class InvalidBeneficiaryAddressError extends viem_1.BaseError {
6
+ constructor({ cause, docsPath }) {
7
+ super([
8
+ "The bundler did not set a beneficiary address when bundling the user operation.",
9
+ "",
10
+ "Possible solutions:",
11
+ "• If you encounter this error when running self-hosted bundler, make sure you have configured the bundler correctly.",
12
+ "• If you are using a bundler provider, reach out to them.",
13
+ "",
14
+ docsPath ? `Docs: ${docsPath}` : ""
15
+ ].join("\n"), {
16
+ cause
17
+ });
18
+ Object.defineProperty(this, "name", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: "InvalidBeneficiaryAddressError"
23
+ });
24
+ }
25
+ }
26
+ exports.InvalidBeneficiaryAddressError = InvalidBeneficiaryAddressError;
27
+ Object.defineProperty(InvalidBeneficiaryAddressError, "message", {
28
+ enumerable: true,
29
+ configurable: true,
30
+ writable: true,
31
+ value: /aa9[01]/
32
+ });
33
+ class InvalidAggregatorError extends viem_1.BaseError {
34
+ constructor({ cause, docsPath }) {
35
+ super([
36
+ "The bundler tried to bundle the user operation with an invalid aggregator.",
37
+ "",
38
+ "Possible solutions:",
39
+ "• If you are using your own bundler, configure it to use a valid aggregator.",
40
+ "• If you are using a bundler provider, reach out to them.",
41
+ "",
42
+ docsPath ? `Docs: ${docsPath}` : ""
43
+ ].join("\n"), {
44
+ cause
45
+ });
46
+ Object.defineProperty(this, "name", {
47
+ enumerable: true,
48
+ configurable: true,
49
+ writable: true,
50
+ value: "InvalidAggregatorError"
51
+ });
52
+ }
53
+ }
54
+ exports.InvalidAggregatorError = InvalidAggregatorError;
55
+ Object.defineProperty(InvalidAggregatorError, "message", {
56
+ enumerable: true,
57
+ configurable: true,
58
+ writable: true,
59
+ value: /aa96/
60
+ });
61
+ //# sourceMappingURL=bundler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundler.js","sourceRoot":"","sources":["../../errors/bundler.ts"],"names":[],"mappings":";;;AAAA,+BAAgC;AAMhC,MAAa,8BAA+B,SAAQ,gBAAS;IAGzD,YAAY,EACR,KAAK,EACL,QAAQ,EAIX;QACG,KAAK,CACD;YACI,iFAAiF;YACjF,EAAE;YACF,qBAAqB;YACrB,sHAAsH;YACtH,2DAA2D;YAC3D,EAAE;YACF,QAAQ,CAAC,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE;SACtC,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACI,KAAK;SACR,CACJ,CAAA;QArBI;;;;mBAAO,gCAAgC;WAAA;IAsBhD,CAAC;;AAxBL,wEAyBC;AAxBU;;;;WAAU,SAAS;EAAZ,CAAY;AA6B9B,MAAa,sBAAuB,SAAQ,gBAAS;IAGjD,YAAY,EACR,KAAK,EACL,QAAQ,EAIX;QACG,KAAK,CACD;YACI,4EAA4E;YAC5E,EAAE;YACF,qBAAqB;YACrB,8EAA8E;YAC9E,2DAA2D;YAC3D,EAAE;YACF,QAAQ,CAAC,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE;SACtC,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACI,KAAK;SACR,CACJ,CAAA;QArBI;;;;mBAAO,wBAAwB;WAAA;IAsBxC,CAAC;;AAxBL,wDAyBC;AAxBU;;;;WAAU,MAAM;EAAT,CAAS"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EstimateUserOperationGasError = void 0;
4
+ const viem_1 = require("viem");
5
+ const utils_js_1 = require("./utils.js");
6
+ class EstimateUserOperationGasError extends viem_1.BaseError {
7
+ constructor(cause, { userOperation, entryPoint, docsPath }) {
8
+ const prettyArgs = (0, utils_js_1.prettyPrint)({
9
+ sender: userOperation.sender,
10
+ nonce: userOperation.nonce,
11
+ initCode: userOperation.initCode,
12
+ callData: userOperation.callData,
13
+ callGasLimit: userOperation.callGasLimit,
14
+ verificationGasLimit: userOperation.verificationGasLimit,
15
+ preVerificationGas: userOperation.preVerificationGas,
16
+ maxFeePerGas: userOperation.maxFeePerGas,
17
+ maxPriorityFeePerGas: userOperation.maxPriorityFeePerGas,
18
+ paymasterAndData: userOperation.paymasterAndData,
19
+ signature: userOperation.signature,
20
+ entryPoint
21
+ });
22
+ super(cause.shortMessage, {
23
+ cause,
24
+ docsPath,
25
+ metaMessages: [
26
+ ...(cause.metaMessages ? [...cause.metaMessages, " "] : []),
27
+ "Estimate Gas Arguments:",
28
+ prettyArgs
29
+ ].filter(Boolean)
30
+ });
31
+ Object.defineProperty(this, "cause", {
32
+ enumerable: true,
33
+ configurable: true,
34
+ writable: true,
35
+ value: void 0
36
+ });
37
+ Object.defineProperty(this, "name", {
38
+ enumerable: true,
39
+ configurable: true,
40
+ writable: true,
41
+ value: "EstimateUserOperationGasError"
42
+ });
43
+ this.cause = cause;
44
+ }
45
+ }
46
+ exports.EstimateUserOperationGasError = EstimateUserOperationGasError;
47
+ //# sourceMappingURL=estimateUserOperationGas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"estimateUserOperationGas.js","sourceRoot":"","sources":["../../errors/estimateUserOperationGas.ts"],"names":[],"mappings":";;;AAAA,+BAAgC;AAEhC,yCAAwC;AAMxC,MAAa,6BAA8B,SAAQ,gBAAS;IAKxD,YACI,KAAgB,EAChB,EACI,aAAa,EACb,UAAU,EACV,QAAQ,EAGX;QAED,MAAM,UAAU,GAAG,IAAA,sBAAW,EAAC;YAC3B,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,KAAK,EAAE,aAAa,CAAC,KAAK;YAC1B,QAAQ,EAAE,aAAa,CAAC,QAAQ;YAChC,QAAQ,EAAE,aAAa,CAAC,QAAQ;YAChC,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,oBAAoB,EAAE,aAAa,CAAC,oBAAoB;YACxD,kBAAkB,EAAE,aAAa,CAAC,kBAAkB;YACpD,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,oBAAoB,EAAE,aAAa,CAAC,oBAAoB;YACxD,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;YAChD,SAAS,EAAE,aAAa,CAAC,SAAS;YAClC,UAAU;SACb,CAAC,CAAA;QAEF,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE;YACtB,KAAK;YACL,QAAQ;YACR,YAAY,EAAE;gBACV,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC3D,yBAAyB;gBACzB,UAAU;aACb,CAAC,MAAM,CAAC,OAAO,CAAa;SAChC,CAAC,CAAA;QArCG;;;;;WAAgB;QAEhB;;;;mBAAO,+BAA+B;WAAA;QAoC3C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACtB,CAAC;CACJ;AAzCD,sEAyCC"}