@aa-sdk/core 4.34.1 → 4.35.1

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 (215) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/account/smartContractAccount.d.ts +1 -1
  3. package/dist/esm/account/smartContractAccount.js.map +1 -1
  4. package/dist/esm/actions/bundler/estimateUserOperationGas.d.ts +3 -2
  5. package/dist/esm/actions/bundler/estimateUserOperationGas.js.map +1 -1
  6. package/dist/esm/actions/bundler/getSupportedEntryPoints.js.map +1 -1
  7. package/dist/esm/actions/bundler/getUserOperationByHash.js.map +1 -1
  8. package/dist/esm/actions/bundler/getUserOperationReceipt.js.map +1 -1
  9. package/dist/esm/actions/bundler/sendRawUserOperation.d.ts +2 -1
  10. package/dist/esm/actions/bundler/sendRawUserOperation.js.map +1 -1
  11. package/dist/esm/actions/smartAccount/buildUserOperation.js.map +1 -1
  12. package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
  13. package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
  14. package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
  15. package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
  16. package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
  17. package/dist/esm/actions/smartAccount/getAddress.js.map +1 -1
  18. package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
  19. package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
  20. package/dist/esm/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
  21. package/dist/esm/actions/smartAccount/sendTransaction.js.map +1 -1
  22. package/dist/esm/actions/smartAccount/sendTransactions.js.map +1 -1
  23. package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
  24. package/dist/esm/actions/smartAccount/signMessage.js.map +1 -1
  25. package/dist/esm/actions/smartAccount/signTypedData.js.map +1 -1
  26. package/dist/esm/actions/smartAccount/signUserOperation.js.map +1 -1
  27. package/dist/esm/actions/smartAccount/types.js.map +1 -1
  28. package/dist/esm/actions/smartAccount/upgradeAccount.js.map +1 -1
  29. package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -1
  30. package/dist/esm/client/addBreadcrumb.js.map +1 -1
  31. package/dist/esm/client/bundlerClient.js.map +1 -1
  32. package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
  33. package/dist/esm/client/decorators/smartAccountClient.js.map +1 -1
  34. package/dist/esm/client/isSmartAccountClient.js.map +1 -1
  35. package/dist/esm/client/schema.d.ts +25 -25
  36. package/dist/esm/client/schema.js.map +1 -1
  37. package/dist/esm/client/smartAccountClient.js +5 -8
  38. package/dist/esm/client/smartAccountClient.js.map +1 -1
  39. package/dist/esm/client/types.js.map +1 -1
  40. package/dist/esm/ens/utils.js.map +1 -1
  41. package/dist/esm/entrypoint/0.6.d.ts +2 -2
  42. package/dist/esm/entrypoint/0.6.js.map +1 -1
  43. package/dist/esm/entrypoint/0.7.d.ts +1 -1
  44. package/dist/esm/entrypoint/0.7.js.map +1 -1
  45. package/dist/esm/entrypoint/index.d.ts +1 -1
  46. package/dist/esm/entrypoint/index.js.map +1 -1
  47. package/dist/esm/entrypoint/types.js.map +1 -1
  48. package/dist/esm/errors/account.js.map +1 -1
  49. package/dist/esm/errors/client.js.map +1 -1
  50. package/dist/esm/errors/entrypoint.js.map +1 -1
  51. package/dist/esm/errors/signer.js.map +1 -1
  52. package/dist/esm/errors/useroperation.js.map +1 -1
  53. package/dist/esm/middleware/actions.js.map +1 -1
  54. package/dist/esm/middleware/defaults/7702gasEstimator.d.ts +2 -2
  55. package/dist/esm/middleware/defaults/7702gasEstimator.js +2 -2
  56. package/dist/esm/middleware/defaults/7702gasEstimator.js.map +1 -1
  57. package/dist/esm/middleware/defaults/7702signer.d.ts +1 -1
  58. package/dist/esm/middleware/defaults/7702signer.js +1 -1
  59. package/dist/esm/middleware/defaults/7702signer.js.map +1 -1
  60. package/dist/esm/middleware/defaults/feeEstimator.js.map +1 -1
  61. package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
  62. package/dist/esm/middleware/defaults/paymasterAndData.js.map +1 -1
  63. package/dist/esm/middleware/defaults/userOpSigner.js.map +1 -1
  64. package/dist/esm/middleware/erc7677middleware.js.map +1 -1
  65. package/dist/esm/middleware/types.js.map +1 -1
  66. package/dist/esm/signer/local-account.d.ts +2 -207
  67. package/dist/esm/signer/local-account.js.map +1 -1
  68. package/dist/esm/signer/schema.d.ts +1 -1
  69. package/dist/esm/signer/types.js.map +1 -1
  70. package/dist/esm/signer/wallet-client.d.ts +2 -207
  71. package/dist/esm/signer/wallet-client.js.map +1 -1
  72. package/dist/esm/transport/split.js +1 -1
  73. package/dist/esm/transport/split.js.map +1 -1
  74. package/dist/esm/types.js.map +1 -1
  75. package/dist/esm/utils/bigint.js.map +1 -1
  76. package/dist/esm/utils/defaults.js.map +1 -1
  77. package/dist/esm/utils/index.d.ts +2 -2
  78. package/dist/esm/utils/index.js.map +1 -1
  79. package/dist/esm/utils/schema.js.map +1 -1
  80. package/dist/esm/utils/stateOverride.js.map +1 -1
  81. package/dist/esm/utils/testUtils.js.map +1 -1
  82. package/dist/esm/utils/traceHeader.js.map +1 -1
  83. package/dist/esm/utils/types.js.map +1 -1
  84. package/dist/esm/utils/userop.d.ts +2 -2
  85. package/dist/esm/utils/userop.js +1 -1
  86. package/dist/esm/utils/userop.js.map +1 -1
  87. package/dist/esm/version.d.ts +1 -1
  88. package/dist/esm/version.js +1 -1
  89. package/dist/esm/version.js.map +1 -1
  90. package/dist/types/account/smartContractAccount.d.ts +1 -1
  91. package/dist/types/account/smartContractAccount.d.ts.map +1 -1
  92. package/dist/types/actions/bundler/estimateUserOperationGas.d.ts +3 -2
  93. package/dist/types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
  94. package/dist/types/actions/bundler/getSupportedEntryPoints.d.ts.map +1 -1
  95. package/dist/types/actions/bundler/getUserOperationByHash.d.ts.map +1 -1
  96. package/dist/types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -1
  97. package/dist/types/actions/bundler/sendRawUserOperation.d.ts +2 -1
  98. package/dist/types/actions/bundler/sendRawUserOperation.d.ts.map +1 -1
  99. package/dist/types/actions/smartAccount/buildUserOperation.d.ts.map +1 -1
  100. package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts.map +1 -1
  101. package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts.map +1 -1
  102. package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts.map +1 -1
  103. package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts.map +1 -1
  104. package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts.map +1 -1
  105. package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts.map +1 -1
  106. package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts.map +1 -1
  107. package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts.map +1 -1
  108. package/dist/types/actions/smartAccount/sendTransaction.d.ts.map +1 -1
  109. package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
  110. package/dist/types/actions/smartAccount/signUserOperation.d.ts.map +1 -1
  111. package/dist/types/actions/smartAccount/types.d.ts.map +1 -1
  112. package/dist/types/client/decorators/smartAccountClient.d.ts.map +1 -1
  113. package/dist/types/client/schema.d.ts +25 -25
  114. package/dist/types/client/schema.d.ts.map +1 -1
  115. package/dist/types/client/smartAccountClient.d.ts.map +1 -1
  116. package/dist/types/ens/utils.d.ts.map +1 -1
  117. package/dist/types/entrypoint/0.6.d.ts +2 -2
  118. package/dist/types/entrypoint/0.6.d.ts.map +1 -1
  119. package/dist/types/entrypoint/0.7.d.ts +1 -1
  120. package/dist/types/entrypoint/0.7.d.ts.map +1 -1
  121. package/dist/types/entrypoint/index.d.ts +1 -1
  122. package/dist/types/entrypoint/index.d.ts.map +1 -1
  123. package/dist/types/entrypoint/types.d.ts.map +1 -1
  124. package/dist/types/errors/useroperation.d.ts.map +1 -1
  125. package/dist/types/middleware/actions.d.ts.map +1 -1
  126. package/dist/types/middleware/defaults/7702gasEstimator.d.ts +2 -2
  127. package/dist/types/middleware/defaults/7702signer.d.ts +1 -1
  128. package/dist/types/middleware/types.d.ts.map +1 -1
  129. package/dist/types/signer/local-account.d.ts +2 -207
  130. package/dist/types/signer/local-account.d.ts.map +1 -1
  131. package/dist/types/signer/schema.d.ts +1 -1
  132. package/dist/types/signer/schema.d.ts.map +1 -1
  133. package/dist/types/signer/utils.d.ts.map +1 -1
  134. package/dist/types/signer/wallet-client.d.ts +2 -207
  135. package/dist/types/signer/wallet-client.d.ts.map +1 -1
  136. package/dist/types/transport/split.d.ts.map +1 -1
  137. package/dist/types/types.d.ts.map +1 -1
  138. package/dist/types/utils/bigint.d.ts.map +1 -1
  139. package/dist/types/utils/bytes.d.ts.map +1 -1
  140. package/dist/types/utils/defaults.d.ts.map +1 -1
  141. package/dist/types/utils/index.d.ts +2 -2
  142. package/dist/types/utils/index.d.ts.map +1 -1
  143. package/dist/types/utils/testUtils.d.ts.map +1 -1
  144. package/dist/types/utils/traceHeader.d.ts.map +1 -1
  145. package/dist/types/utils/userop.d.ts +2 -2
  146. package/dist/types/utils/userop.d.ts.map +1 -1
  147. package/dist/types/version.d.ts +1 -1
  148. package/package.json +3 -6
  149. package/src/account/smartContractAccount.ts +27 -25
  150. package/src/actions/bundler/estimateUserOperationGas.ts +2 -2
  151. package/src/actions/bundler/getSupportedEntryPoints.ts +2 -2
  152. package/src/actions/bundler/getUserOperationByHash.ts +2 -2
  153. package/src/actions/bundler/getUserOperationReceipt.ts +2 -2
  154. package/src/actions/bundler/sendRawUserOperation.ts +2 -2
  155. package/src/actions/smartAccount/buildUserOperation.ts +5 -4
  156. package/src/actions/smartAccount/buildUserOperationFromTx.ts +4 -3
  157. package/src/actions/smartAccount/buildUserOperationFromTxs.ts +9 -8
  158. package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +5 -4
  159. package/src/actions/smartAccount/dropAndReplaceUserOperation.ts +7 -6
  160. package/src/actions/smartAccount/estimateUserOperationGas.ts +5 -4
  161. package/src/actions/smartAccount/getAddress.ts +2 -2
  162. package/src/actions/smartAccount/internal/initUserOperation.ts +7 -6
  163. package/src/actions/smartAccount/internal/runMiddlewareStack.ts +13 -12
  164. package/src/actions/smartAccount/internal/sendUserOperation.ts +3 -2
  165. package/src/actions/smartAccount/sendTransaction.ts +5 -4
  166. package/src/actions/smartAccount/sendTransactions.ts +3 -3
  167. package/src/actions/smartAccount/sendUserOperation.ts +4 -3
  168. package/src/actions/smartAccount/signMessage.ts +3 -3
  169. package/src/actions/smartAccount/signTypedData.ts +3 -3
  170. package/src/actions/smartAccount/signUserOperation.ts +4 -3
  171. package/src/actions/smartAccount/types.ts +23 -15
  172. package/src/actions/smartAccount/upgradeAccount.ts +3 -3
  173. package/src/actions/smartAccount/waitForUserOperationTransacation.ts +5 -5
  174. package/src/client/addBreadcrumb.ts +1 -1
  175. package/src/client/bundlerClient.ts +5 -5
  176. package/src/client/decorators/bundlerClient.ts +7 -7
  177. package/src/client/decorators/smartAccountClient.ts +20 -18
  178. package/src/client/isSmartAccountClient.ts +4 -4
  179. package/src/client/schema.ts +2 -2
  180. package/src/client/smartAccountClient.ts +98 -104
  181. package/src/client/types.ts +2 -2
  182. package/src/ens/utils.ts +1 -1
  183. package/src/entrypoint/0.6.ts +3 -3
  184. package/src/entrypoint/0.7.ts +4 -4
  185. package/src/entrypoint/index.ts +10 -9
  186. package/src/entrypoint/types.ts +30 -28
  187. package/src/errors/account.ts +1 -1
  188. package/src/errors/client.ts +3 -3
  189. package/src/errors/entrypoint.ts +2 -2
  190. package/src/errors/signer.ts +1 -1
  191. package/src/errors/useroperation.ts +6 -3
  192. package/src/middleware/actions.ts +3 -3
  193. package/src/middleware/defaults/7702gasEstimator.ts +4 -4
  194. package/src/middleware/defaults/7702signer.ts +3 -3
  195. package/src/middleware/defaults/feeEstimator.ts +4 -4
  196. package/src/middleware/defaults/gasEstimator.ts +6 -6
  197. package/src/middleware/defaults/paymasterAndData.ts +1 -1
  198. package/src/middleware/defaults/userOpSigner.ts +2 -2
  199. package/src/middleware/erc7677middleware.ts +9 -9
  200. package/src/middleware/types.ts +7 -5
  201. package/src/signer/local-account.ts +7 -7
  202. package/src/signer/types.ts +3 -3
  203. package/src/signer/wallet-client.ts +2 -2
  204. package/src/transport/split.ts +9 -12
  205. package/src/types.ts +29 -29
  206. package/src/utils/bigint.ts +4 -4
  207. package/src/utils/defaults.ts +1 -1
  208. package/src/utils/index.ts +12 -9
  209. package/src/utils/schema.ts +2 -2
  210. package/src/utils/stateOverride.ts +4 -4
  211. package/src/utils/testUtils.ts +2 -2
  212. package/src/utils/traceHeader.ts +14 -11
  213. package/src/utils/types.ts +1 -1
  214. package/src/utils/userop.ts +17 -17
  215. package/src/version.ts +1 -1
@@ -11,7 +11,7 @@ import { getEntryPoint } from "../entrypoint/index.js";
11
11
  import type { DefaultEntryPointVersion } from "../entrypoint/types.js";
12
12
 
13
13
  export const createDummySmartContractAccount = async <C extends BundlerClient>(
14
- client: C
14
+ client: C,
15
15
  ): Promise<SmartContractAccount<"dummy", DefaultEntryPointVersion>> => {
16
16
  return toSmartContractAccount({
17
17
  source: "dummy",
@@ -37,6 +37,6 @@ export const createTestClient = (chain: Chain) => {
37
37
  transport: custom({
38
38
  request: async () => {},
39
39
  }),
40
- })
40
+ }),
41
41
  );
42
42
  };
@@ -2,7 +2,7 @@ function generateRandomHexString(numBytes: number) {
2
2
  const hexPairs = new Array(numBytes).fill(0).map(() =>
3
3
  Math.floor(Math.random() * 16)
4
4
  .toString(16)
5
- .padStart(2, "0")
5
+ .padStart(2, "0"),
6
6
  );
7
7
  return hexPairs.join("");
8
8
  }
@@ -46,7 +46,7 @@ export class TraceHeader {
46
46
  traceId: string,
47
47
  parentId: string,
48
48
  traceFlags: string,
49
- traceState: TraceHeader["traceState"]
49
+ traceState: TraceHeader["traceState"],
50
50
  ) {
51
51
  this.traceId = traceId;
52
52
  this.parentId = parentId;
@@ -68,7 +68,7 @@ export class TraceHeader {
68
68
  clientTraceId,
69
69
  generateRandomHexString(8),
70
70
  "00", //Means no flag have been set, and no sampled state https://www.w3.org/TR/trace-context/#trace-flags
71
- {}
71
+ {},
72
72
  );
73
73
  }
74
74
  /**
@@ -82,7 +82,7 @@ export class TraceHeader {
82
82
  * @returns {TraceHeader | undefined} The trace header object, or nothing if not found
83
83
  */
84
84
  static fromTraceHeader(
85
- headers: Record<string, string>
85
+ headers: Record<string, string>,
86
86
  ): TraceHeader | undefined {
87
87
  if (!headers[TRACE_HEADER_NAME]) {
88
88
  return undefined;
@@ -91,16 +91,19 @@ export class TraceHeader {
91
91
  headers[TRACE_HEADER_NAME]?.split("-");
92
92
 
93
93
  const traceState =
94
- headers[TRACE_HEADER_STATE]?.split(",").reduce((acc, curr) => {
95
- const [key, value] = curr.split("=");
96
- acc[key] = value;
97
- return acc;
98
- }, {} as Record<string, string>) || {};
94
+ headers[TRACE_HEADER_STATE]?.split(",").reduce(
95
+ (acc, curr) => {
96
+ const [key, value] = curr.split("=");
97
+ acc[key] = value;
98
+ return acc;
99
+ },
100
+ {} as Record<string, string>,
101
+ ) || {};
99
102
  if (version !== "00") {
100
103
  console.debug(
101
104
  new Error(
102
- `Invalid version for traceheader: ${headers[TRACE_HEADER_NAME]}`
103
- )
105
+ `Invalid version for traceheader: ${headers[TRACE_HEADER_NAME]}`,
106
+ ),
104
107
  );
105
108
  return undefined;
106
109
  }
@@ -62,7 +62,7 @@ export type EqualsOneOfTheComponents<T, Union> = Union extends infer Component /
62
62
  export type IsMemberOrSubtypeOfAComponent<
63
63
  T,
64
64
  Union,
65
- ConjunctionOfExplicitComponentChecks extends boolean
65
+ ConjunctionOfExplicitComponentChecks extends boolean,
66
66
  > = [T] extends [Union]
67
67
  ? true extends ConjunctionOfExplicitComponentChecks
68
68
  ? true
@@ -20,9 +20,9 @@ import { allEqual, isBigNumberish } from "./index.js";
20
20
  * @returns {boolean} a type guard that asserts the UserOperationRequest is valid
21
21
  */
22
22
  export function isValidRequest<
23
- TEntryPointVersion extends EntryPointVersion = EntryPointVersion
23
+ TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
24
24
  >(
25
- request: UserOperationStruct<TEntryPointVersion>
25
+ request: UserOperationStruct<TEntryPointVersion>,
26
26
  ): request is UserOperationRequest<TEntryPointVersion> {
27
27
  // These are the only ones marked as optional in the interface above
28
28
  return (
@@ -43,7 +43,7 @@ export function isValidRequest<
43
43
  * @returns {boolean} a type guard that asserts the UserOperationRequest is a UserOperationRequest
44
44
  */
45
45
  export function isValidPaymasterAndData<
46
- TEntryPointVersion extends EntryPointVersion = EntryPointVersion
46
+ TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
47
47
  >(request: UserOperationStruct<TEntryPointVersion>): boolean {
48
48
  if ("paymasterAndData" in request) {
49
49
  return (request as UserOperationStruct_v6).paymasterAndData != null;
@@ -54,7 +54,7 @@ export function isValidPaymasterAndData<
54
54
  (request as UserOperationStruct_v7).paymaster == null,
55
55
  (request as UserOperationStruct_v7).paymasterData == null,
56
56
  (request as UserOperationStruct_v7).paymasterPostOpGasLimit == null,
57
- (request as UserOperationStruct_v7).paymasterVerificationGasLimit == null
57
+ (request as UserOperationStruct_v7).paymasterVerificationGasLimit == null,
58
58
  );
59
59
  }
60
60
 
@@ -65,7 +65,7 @@ export function isValidPaymasterAndData<
65
65
  * @returns {boolean} a type guard that asserts the UserOperationStruct is a UserOperationRequest
66
66
  */
67
67
  export function isValidFactoryAndData<
68
- TEntryPointVersion extends EntryPointVersion = EntryPointVersion
68
+ TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
69
69
  >(request: UserOperationStruct<TEntryPointVersion>): boolean {
70
70
  if ("initCode" in request) {
71
71
  const { initCode } = request as UserOperationStruct_v6;
@@ -75,7 +75,7 @@ export function isValidFactoryAndData<
75
75
  // either all exist, or none.
76
76
  return allEqual(
77
77
  (request as UserOperationStruct_v7).factory == null,
78
- (request as UserOperationStruct_v7).factoryData == null
78
+ (request as UserOperationStruct_v7).factoryData == null,
79
79
  );
80
80
  }
81
81
 
@@ -89,7 +89,7 @@ export function isValidFactoryAndData<
89
89
  */
90
90
  export function applyUserOpOverride<TValue extends BigNumberish | undefined>(
91
91
  value: TValue,
92
- override?: BigNumberish | Multiplier
92
+ override?: BigNumberish | Multiplier,
93
93
  ): TValue | BigNumberish {
94
94
  if (override == null) {
95
95
  return value;
@@ -115,7 +115,7 @@ export function applyUserOpOverride<TValue extends BigNumberish | undefined>(
115
115
  */
116
116
  export function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(
117
117
  value: TValue,
118
- feeOption?: UserOperationFeeOptionsField
118
+ feeOption?: UserOperationFeeOptionsField,
119
119
  ): TValue | BigNumberish {
120
120
  if (feeOption == null) {
121
121
  return value;
@@ -127,9 +127,9 @@ export function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(
127
127
  ? bigIntMultiply(value, feeOption.multiplier)
128
128
  : value,
129
129
  feeOption.min,
130
- feeOption.max
130
+ feeOption.max,
131
131
  )
132
- : feeOption.min ?? 0n;
132
+ : (feeOption.min ?? 0n);
133
133
  }
134
134
 
135
135
  /**
@@ -143,11 +143,11 @@ export function applyUserOpFeeOption<TValue extends BigNumberish | undefined>(
143
143
  * @returns {BigNumberish} the new value of the field after applying the override or fee option
144
144
  */
145
145
  export function applyUserOpOverrideOrFeeOption<
146
- TValue extends BigNumberish | undefined
146
+ TValue extends BigNumberish | undefined,
147
147
  >(
148
148
  value: TValue,
149
149
  override?: BigNumberish | Multiplier,
150
- feeOption?: UserOperationFeeOptionsField
150
+ feeOption?: UserOperationFeeOptionsField,
151
151
  ): TValue | BigNumberish {
152
152
  return value != null && override != null
153
153
  ? applyUserOpOverride(value, override)!
@@ -164,9 +164,9 @@ export function applyUserOpOverrideOrFeeOption<
164
164
  * @returns {boolean} whether the paymaster middleware should be bypassed
165
165
  */
166
166
  export const bypassPaymasterAndData = <
167
- TEntryPointVersion extends EntryPointVersion = EntryPointVersion
167
+ TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
168
168
  >(
169
- overrides: UserOperationOverrides<TEntryPointVersion> | undefined
169
+ overrides: UserOperationOverrides<TEntryPointVersion> | undefined,
170
170
  ): boolean =>
171
171
  !!overrides &&
172
172
  ("paymasterAndData" in overrides || "paymasterData" in overrides);
@@ -181,9 +181,9 @@ export const bypassPaymasterAndData = <
181
181
  * @returns {boolean} whether the paymaster middleware should be bypassed
182
182
  */
183
183
  export const bypassPaymasterAndDataEmptyHex = <
184
- TEntryPointVersion extends EntryPointVersion = EntryPointVersion
184
+ TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
185
185
  >(
186
- overrides: UserOperationOverrides<TEntryPointVersion> | undefined
186
+ overrides: UserOperationOverrides<TEntryPointVersion> | undefined,
187
187
  ): boolean =>
188
188
  overrides !== undefined &&
189
189
  (("paymasterAndData" in overrides && overrides.paymasterAndData === "0x") ||
@@ -197,7 +197,7 @@ export const bypassPaymasterAndDataEmptyHex = <
197
197
  * @returns {{ paymaster: Hex; paymasterData: Hex}} the parsed paymaster and paymasterData fields of entrypoint v0.7 user operation request paymaster and paymasterData field
198
198
  */
199
199
  export const parsePaymasterAndData = (
200
- paymasterAndData: Hex
200
+ paymasterAndData: Hex,
201
201
  ): Pick<UserOperationRequest<"0.7.0">, "paymaster" | "paymasterData"> => ({
202
202
  paymaster: paymasterAndData.substring(0, 42) as Address,
203
203
  paymasterData: `0x${paymasterAndData.substring(42)}` as Hex,
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.34.1";
3
+ export const VERSION = "4.35.1";