@pimlico/alto 0.0.0-staging.20240606T100452 → 0.0.0-staging.20240606T101741
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.
- package/lib/cli/alto.js +59 -28
- package/lib/cli/alto.js.map +1 -1
- package/lib/cli/config/bundler.js +76 -73
- package/lib/cli/config/bundler.js.map +1 -1
- package/lib/cli/config/index.js +18 -2
- package/lib/cli/config/index.js.map +1 -1
- package/lib/cli/config/options.js +13 -10
- package/lib/cli/config/options.js.map +1 -1
- package/lib/cli/customTransport.js +11 -7
- package/lib/cli/customTransport.js.map +1 -1
- package/lib/cli/handler.js +28 -24
- package/lib/cli/handler.js.map +1 -1
- package/lib/cli/index.d.ts +1 -0
- package/lib/cli/index.js +19 -2
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/instrumentation.js +22 -20
- package/lib/cli/instrumentation.js.map +1 -1
- package/lib/cli/setupServer.js +21 -17
- package/lib/cli/setupServer.js.map +1 -1
- package/lib/cli/util.js +5 -1
- package/lib/cli/util.js.map +1 -1
- package/lib/executor/executor.js +84 -56
- package/lib/executor/executor.js.map +1 -1
- package/lib/executor/executorManager.js +11 -7
- package/lib/executor/executorManager.js.map +1 -1
- package/lib/executor/index.js +20 -4
- package/lib/executor/index.js.map +1 -1
- package/lib/executor/senderManager.js +12 -8
- package/lib/executor/senderManager.js.map +1 -1
- package/lib/executor/test/utils.js +28 -22
- package/lib/executor/test/utils.js.map +1 -1
- package/lib/executor/utils.js +61 -31
- package/lib/executor/utils.js.map +1 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/mempool/index.js +20 -4
- package/lib/mempool/index.js.map +1 -1
- package/lib/mempool/mempool.js +59 -55
- package/lib/mempool/mempool.js.map +1 -1
- package/lib/mempool/monitoring.js +5 -1
- package/lib/mempool/monitoring.js.map +1 -1
- package/lib/mempool/nullMempool.js +5 -1
- package/lib/mempool/nullMempool.js.map +1 -1
- package/lib/mempool/reputationManager.js +49 -44
- package/lib/mempool/reputationManager.js.map +1 -1
- package/lib/mempool/store.js +5 -1
- package/lib/mempool/store.js.map +1 -1
- package/lib/rpc/EntryPointSimulationsV07.js +50 -44
- package/lib/rpc/EntryPointSimulationsV07.js.map +1 -1
- package/lib/rpc/ExecuteSimulator.js +5 -2
- package/lib/rpc/ExecuteSimulator.js.map +1 -1
- package/lib/rpc/gasEstimation.js +69 -62
- package/lib/rpc/gasEstimation.js.map +1 -1
- package/lib/rpc/index.js +20 -4
- package/lib/rpc/index.js.map +1 -1
- package/lib/rpc/nonceQueuer.js +20 -16
- package/lib/rpc/nonceQueuer.js.map +1 -1
- package/lib/rpc/rpcHandler.js +103 -76
- package/lib/rpc/rpcHandler.js.map +1 -1
- package/lib/rpc/server.js +56 -26
- package/lib/rpc/server.js.map +1 -1
- package/lib/rpc/validation/BundlerCollectorTracerV06.js +5 -1
- package/lib/rpc/validation/BundlerCollectorTracerV06.js.map +1 -1
- package/lib/rpc/validation/BundlerCollectorTracerV07.js +5 -1
- package/lib/rpc/validation/BundlerCollectorTracerV07.js.map +1 -1
- package/lib/rpc/validation/SafeValidator.js +69 -65
- package/lib/rpc/validation/SafeValidator.js.map +1 -1
- package/lib/rpc/validation/TracerResultParserV06.js +30 -26
- package/lib/rpc/validation/TracerResultParserV06.js.map +1 -1
- package/lib/rpc/validation/TracerResultParserV07.js +36 -29
- package/lib/rpc/validation/TracerResultParserV07.js.map +1 -1
- package/lib/rpc/validation/UnsafeValidator.js +73 -46
- package/lib/rpc/validation/UnsafeValidator.js.map +1 -1
- package/lib/rpc/validation/index.js +18 -2
- package/lib/rpc/validation/index.js.map +1 -1
- package/lib/rpc/validation/tracer.js +37 -7
- package/lib/rpc/validation/tracer.js.map +1 -1
- package/lib/types/contracts/BundleBulker.js +4 -1
- package/lib/types/contracts/BundleBulker.js.map +1 -1
- package/lib/types/contracts/CallEngine.js +4 -1
- package/lib/types/contracts/CallEngine.js.map +1 -1
- package/lib/types/contracts/CodeHashGetter.js +5 -2
- package/lib/types/contracts/CodeHashGetter.js.map +1 -1
- package/lib/types/contracts/EntryPoint.js +7 -4
- package/lib/types/contracts/EntryPoint.js.map +1 -1
- package/lib/types/contracts/EntryPointSimulations.js +6 -3
- package/lib/types/contracts/EntryPointSimulations.js.map +1 -1
- package/lib/types/contracts/IOpInflator.js +4 -1
- package/lib/types/contracts/IOpInflator.js.map +1 -1
- package/lib/types/contracts/IPaymaster.js +4 -1
- package/lib/types/contracts/IPaymaster.js.map +1 -1
- package/lib/types/contracts/Inflator.js +4 -1
- package/lib/types/contracts/Inflator.js.map +1 -1
- package/lib/types/contracts/PerOpInflator.js +4 -1
- package/lib/types/contracts/PerOpInflator.js.map +1 -1
- package/lib/types/contracts/PimlicoEntryPointSimulations.js +5 -2
- package/lib/types/contracts/PimlicoEntryPointSimulations.js.map +1 -1
- package/lib/types/contracts/SenderCreator.js +5 -2
- package/lib/types/contracts/SenderCreator.js.map +1 -1
- package/lib/types/contracts/SimpleAccountFactory.js +5 -2
- package/lib/types/contracts/SimpleAccountFactory.js.map +1 -1
- package/lib/types/contracts/TestOpcodesAccount.js +5 -2
- package/lib/types/contracts/TestOpcodesAccount.js.map +1 -1
- package/lib/types/contracts/TestOpcodesAccountFactory.js +5 -2
- package/lib/types/contracts/TestOpcodesAccountFactory.js.map +1 -1
- package/lib/types/contracts/TestStorageAccount.js +5 -2
- package/lib/types/contracts/TestStorageAccount.js.map +1 -1
- package/lib/types/contracts/index.js +32 -16
- package/lib/types/contracts/index.js.map +1 -1
- package/lib/types/gasPrice.js +17 -14
- package/lib/types/gasPrice.js.map +1 -1
- package/lib/types/index.js +26 -10
- package/lib/types/index.js.map +1 -1
- package/lib/types/interfaces.js +2 -1
- package/lib/types/mempool.js +10 -5
- package/lib/types/mempool.js.map +1 -1
- package/lib/types/schemas.js +284 -254
- package/lib/types/schemas.js.map +1 -1
- package/lib/types/test/validationTestErrors.js +5 -2
- package/lib/types/test/validationTestErrors.js.map +1 -1
- package/lib/types/utils.js +9 -5
- package/lib/types/utils.js.map +1 -1
- package/lib/types/validation.js +142 -139
- package/lib/types/validation.js.map +1 -1
- package/lib/utils/bigInt.js +7 -2
- package/lib/utils/bigInt.js.map +1 -1
- package/lib/utils/compressionHandler.js +11 -7
- package/lib/utils/compressionHandler.js.map +1 -1
- package/lib/utils/gasPriceManager.js +57 -30
- package/lib/utils/gasPriceManager.js.map +1 -1
- package/lib/utils/helpers.js +10 -5
- package/lib/utils/helpers.js.map +1 -1
- package/lib/utils/index.js +25 -9
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/logger.js +19 -10
- package/lib/utils/logger.js.map +1 -1
- package/lib/utils/metrics.js +24 -20
- package/lib/utils/metrics.js.map +1 -1
- package/lib/utils/rpc-reply.js +3 -1
- package/lib/utils/rpc-reply.js.map +1 -1
- package/lib/utils/test.js +67 -36
- package/lib/utils/test.js.map +1 -1
- package/lib/utils/userop.js +107 -62
- package/lib/utils/userop.js.map +1 -1
- package/lib/utils/validation.js +99 -64
- package/lib/utils/validation.js.map +1 -1
- package/package.json +1 -4
package/lib/types/schemas.js
CHANGED
|
@@ -1,38 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receiptSchema = exports.logSchema = exports.hexDataSchema = exports.hexData32Schema = exports.addressSchema = exports.bundlerResponseSchema = exports.pimlicoGetUserOperationGasPriceResponseSchema = exports.pimlicoGetUserOperationStatusResponseSchema = exports.bundlerDumpReputationsResponseSchema = exports.bundlerSetReputationsResponseSchema = exports.bundlerSetBundlingModeResponseSchema = exports.bundlerSendBundleNowResponseSchema = exports.bundlerGetStakeStatusResponseSchema = exports.bundlerDumpMempoolResponseSchema = exports.bundlerClearMempoolResponseSchema = exports.bundlerClearStateResponseSchema = exports.userOperationSchema = exports.jsonRpcResultSchema = exports.jsonRpcSchema = exports.bundlerRequestSchema = exports.pimlicoGetUserOperationGasPriceRequestSchema = exports.pimlicoGetUserOperationStatusRequestSchema = exports.pimlicoGetStakeStatusRequestSchema = exports.bundlerDumpReputationsRequestSchema = exports.bundlerSetReputationsRequestSchema = exports.bundlerSetBundlingModeRequestSchema = exports.bundlerSendBundleNowRequestSchema = exports.bundlerDumpMempoolRequestSchema = exports.bundlerClearMempoolRequestSchema = exports.bundlerClearStateRequestSchema = exports.altoVersions = exports.hexNumberSchema = exports.commaSeperatedAddressPattern = exports.hexData32Pattern = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
const zod_1 = require("zod");
|
|
3
6
|
const hexDataPattern = /^0x[0-9A-Fa-f]*$/;
|
|
4
7
|
const addressPattern = /^0x[0-9,a-f,A-F]{40}$/;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const addressSchema = z
|
|
8
|
+
exports.hexData32Pattern = /^0x([0-9a-fA-F][0-9a-fA-F]){0,32}$/;
|
|
9
|
+
exports.commaSeperatedAddressPattern = /^(0x[0-9a-fA-F]{40})(,\s*(0x[0-9a-fA-F]{40}))*$/;
|
|
10
|
+
const addressSchema = zod_1.z
|
|
8
11
|
.string()
|
|
9
12
|
.regex(addressPattern, { message: "not a valid hex address" })
|
|
10
|
-
.transform((val) => getAddress(val));
|
|
11
|
-
|
|
13
|
+
.transform((val) => (0, viem_1.getAddress)(val));
|
|
14
|
+
exports.addressSchema = addressSchema;
|
|
15
|
+
exports.hexNumberSchema = zod_1.z
|
|
12
16
|
.string()
|
|
13
17
|
.regex(hexDataPattern)
|
|
14
|
-
.or(z.number())
|
|
15
|
-
.or(z.bigint())
|
|
18
|
+
.or(zod_1.z.number())
|
|
19
|
+
.or(zod_1.z.bigint())
|
|
16
20
|
.transform((val) => BigInt(val));
|
|
17
|
-
const hexDataSchema = z
|
|
21
|
+
const hexDataSchema = zod_1.z
|
|
18
22
|
.string()
|
|
19
23
|
.regex(hexDataPattern, { message: "not valid hex data" })
|
|
20
24
|
.transform((val) => val);
|
|
21
|
-
|
|
25
|
+
exports.hexDataSchema = hexDataSchema;
|
|
26
|
+
const hexData32Schema = zod_1.z
|
|
22
27
|
.string()
|
|
23
|
-
.regex(hexData32Pattern, { message: "not valid 32-byte hex data" })
|
|
28
|
+
.regex(exports.hexData32Pattern, { message: "not valid 32-byte hex data" })
|
|
24
29
|
.transform((val) => val);
|
|
25
|
-
|
|
30
|
+
exports.hexData32Schema = hexData32Schema;
|
|
31
|
+
const userOperationV06Schema = zod_1.z
|
|
26
32
|
.object({
|
|
27
33
|
sender: addressSchema,
|
|
28
|
-
nonce: hexNumberSchema,
|
|
34
|
+
nonce: exports.hexNumberSchema,
|
|
29
35
|
initCode: hexDataSchema,
|
|
30
36
|
callData: hexDataSchema,
|
|
31
|
-
callGasLimit: hexNumberSchema,
|
|
32
|
-
verificationGasLimit: hexNumberSchema,
|
|
33
|
-
preVerificationGas: hexNumberSchema,
|
|
34
|
-
maxPriorityFeePerGas: hexNumberSchema,
|
|
35
|
-
maxFeePerGas: hexNumberSchema,
|
|
37
|
+
callGasLimit: exports.hexNumberSchema,
|
|
38
|
+
verificationGasLimit: exports.hexNumberSchema,
|
|
39
|
+
preVerificationGas: exports.hexNumberSchema,
|
|
40
|
+
maxPriorityFeePerGas: exports.hexNumberSchema,
|
|
41
|
+
maxFeePerGas: exports.hexNumberSchema,
|
|
36
42
|
paymasterAndData: hexDataSchema,
|
|
37
43
|
signature: hexDataSchema
|
|
38
44
|
})
|
|
@@ -40,10 +46,10 @@ const userOperationV06Schema = z
|
|
|
40
46
|
.transform((val) => {
|
|
41
47
|
return val;
|
|
42
48
|
});
|
|
43
|
-
const userOperationV07Schema = z
|
|
49
|
+
const userOperationV07Schema = zod_1.z
|
|
44
50
|
.object({
|
|
45
51
|
sender: addressSchema,
|
|
46
|
-
nonce: hexNumberSchema,
|
|
52
|
+
nonce: exports.hexNumberSchema,
|
|
47
53
|
factory: addressSchema
|
|
48
54
|
.nullable()
|
|
49
55
|
.optional()
|
|
@@ -53,20 +59,20 @@ const userOperationV07Schema = z
|
|
|
53
59
|
.optional()
|
|
54
60
|
.transform((val) => val ?? null),
|
|
55
61
|
callData: hexDataSchema,
|
|
56
|
-
callGasLimit: hexNumberSchema,
|
|
57
|
-
verificationGasLimit: hexNumberSchema,
|
|
58
|
-
preVerificationGas: hexNumberSchema,
|
|
59
|
-
maxFeePerGas: hexNumberSchema,
|
|
60
|
-
maxPriorityFeePerGas: hexNumberSchema,
|
|
62
|
+
callGasLimit: exports.hexNumberSchema,
|
|
63
|
+
verificationGasLimit: exports.hexNumberSchema,
|
|
64
|
+
preVerificationGas: exports.hexNumberSchema,
|
|
65
|
+
maxFeePerGas: exports.hexNumberSchema,
|
|
66
|
+
maxPriorityFeePerGas: exports.hexNumberSchema,
|
|
61
67
|
paymaster: addressSchema
|
|
62
68
|
.nullable()
|
|
63
69
|
.optional()
|
|
64
70
|
.transform((val) => val ?? null),
|
|
65
|
-
paymasterVerificationGasLimit: hexNumberSchema
|
|
71
|
+
paymasterVerificationGasLimit: exports.hexNumberSchema
|
|
66
72
|
.nullable()
|
|
67
73
|
.optional()
|
|
68
74
|
.transform((val) => val ?? null),
|
|
69
|
-
paymasterPostOpGasLimit: hexNumberSchema
|
|
75
|
+
paymasterPostOpGasLimit: exports.hexNumberSchema
|
|
70
76
|
.nullable()
|
|
71
77
|
.optional()
|
|
72
78
|
.transform((val) => val ?? null),
|
|
@@ -78,17 +84,17 @@ const userOperationV07Schema = z
|
|
|
78
84
|
})
|
|
79
85
|
.strict()
|
|
80
86
|
.transform((val) => val);
|
|
81
|
-
const partialUserOperationV06Schema = z
|
|
87
|
+
const partialUserOperationV06Schema = zod_1.z
|
|
82
88
|
.object({
|
|
83
89
|
sender: addressSchema,
|
|
84
|
-
nonce: hexNumberSchema,
|
|
90
|
+
nonce: exports.hexNumberSchema,
|
|
85
91
|
initCode: hexDataSchema,
|
|
86
92
|
callData: hexDataSchema,
|
|
87
|
-
callGasLimit: hexNumberSchema.default(1n),
|
|
88
|
-
verificationGasLimit: hexNumberSchema.default(1n),
|
|
89
|
-
preVerificationGas: hexNumberSchema.default(1n),
|
|
90
|
-
maxPriorityFeePerGas: hexNumberSchema.default(1n),
|
|
91
|
-
maxFeePerGas: hexNumberSchema.default(1n),
|
|
93
|
+
callGasLimit: exports.hexNumberSchema.default(1n),
|
|
94
|
+
verificationGasLimit: exports.hexNumberSchema.default(1n),
|
|
95
|
+
preVerificationGas: exports.hexNumberSchema.default(1n),
|
|
96
|
+
maxPriorityFeePerGas: exports.hexNumberSchema.default(1n),
|
|
97
|
+
maxFeePerGas: exports.hexNumberSchema.default(1n),
|
|
92
98
|
paymasterAndData: hexDataSchema,
|
|
93
99
|
signature: hexDataSchema
|
|
94
100
|
})
|
|
@@ -96,10 +102,10 @@ const partialUserOperationV06Schema = z
|
|
|
96
102
|
.transform((val) => {
|
|
97
103
|
return val;
|
|
98
104
|
});
|
|
99
|
-
const partialUserOperationV07Schema = z
|
|
105
|
+
const partialUserOperationV07Schema = zod_1.z
|
|
100
106
|
.object({
|
|
101
107
|
sender: addressSchema,
|
|
102
|
-
nonce: hexNumberSchema,
|
|
108
|
+
nonce: exports.hexNumberSchema,
|
|
103
109
|
factory: addressSchema
|
|
104
110
|
.nullable()
|
|
105
111
|
.optional()
|
|
@@ -109,20 +115,20 @@ const partialUserOperationV07Schema = z
|
|
|
109
115
|
.optional()
|
|
110
116
|
.transform((val) => val ?? null),
|
|
111
117
|
callData: hexDataSchema,
|
|
112
|
-
callGasLimit: hexNumberSchema.default(1n),
|
|
113
|
-
verificationGasLimit: hexNumberSchema.default(1n),
|
|
114
|
-
preVerificationGas: hexNumberSchema.default(1n),
|
|
115
|
-
maxFeePerGas: hexNumberSchema.default(1n),
|
|
116
|
-
maxPriorityFeePerGas: hexNumberSchema.default(1n),
|
|
118
|
+
callGasLimit: exports.hexNumberSchema.default(1n),
|
|
119
|
+
verificationGasLimit: exports.hexNumberSchema.default(1n),
|
|
120
|
+
preVerificationGas: exports.hexNumberSchema.default(1n),
|
|
121
|
+
maxFeePerGas: exports.hexNumberSchema.default(1n),
|
|
122
|
+
maxPriorityFeePerGas: exports.hexNumberSchema.default(1n),
|
|
117
123
|
paymaster: addressSchema
|
|
118
124
|
.nullable()
|
|
119
125
|
.optional()
|
|
120
126
|
.transform((val) => val ?? null),
|
|
121
|
-
paymasterVerificationGasLimit: hexNumberSchema
|
|
127
|
+
paymasterVerificationGasLimit: exports.hexNumberSchema
|
|
122
128
|
.nullable()
|
|
123
129
|
.optional()
|
|
124
130
|
.transform((val) => val ?? null),
|
|
125
|
-
paymasterPostOpGasLimit: hexNumberSchema
|
|
131
|
+
paymasterPostOpGasLimit: exports.hexNumberSchema
|
|
126
132
|
.nullable()
|
|
127
133
|
.optional()
|
|
128
134
|
.transform((val) => val ?? null),
|
|
@@ -134,147 +140,160 @@ const partialUserOperationV07Schema = z
|
|
|
134
140
|
})
|
|
135
141
|
.strict()
|
|
136
142
|
.transform((val) => val);
|
|
137
|
-
const packerUserOperationSchema = z
|
|
143
|
+
const packerUserOperationSchema = zod_1.z
|
|
138
144
|
.object({
|
|
139
145
|
sender: addressSchema,
|
|
140
|
-
nonce: hexNumberSchema,
|
|
146
|
+
nonce: exports.hexNumberSchema,
|
|
141
147
|
initCode: hexDataSchema,
|
|
142
148
|
callData: hexDataSchema,
|
|
143
149
|
accountGasLimits: hexData32Schema,
|
|
144
|
-
preVerificationGas: hexNumberSchema,
|
|
150
|
+
preVerificationGas: exports.hexNumberSchema,
|
|
145
151
|
gasFees: hexData32Schema,
|
|
146
152
|
paymasterAndData: hexDataSchema,
|
|
147
153
|
signature: hexDataSchema
|
|
148
154
|
})
|
|
149
155
|
.strict()
|
|
150
156
|
.transform((val) => val);
|
|
151
|
-
const partialUserOperationSchema = z.union([
|
|
157
|
+
const partialUserOperationSchema = zod_1.z.union([
|
|
152
158
|
partialUserOperationV06Schema,
|
|
153
159
|
partialUserOperationV07Schema
|
|
154
160
|
]);
|
|
155
|
-
const userOperationSchema = z.union([
|
|
161
|
+
const userOperationSchema = zod_1.z.union([
|
|
156
162
|
userOperationV06Schema,
|
|
157
163
|
userOperationV07Schema
|
|
158
164
|
]);
|
|
159
|
-
|
|
165
|
+
exports.userOperationSchema = userOperationSchema;
|
|
166
|
+
const jsonRpcSchema = zod_1.z
|
|
160
167
|
.object({
|
|
161
|
-
jsonrpc: z.literal("2.0"),
|
|
162
|
-
id: z.number(),
|
|
163
|
-
method: z.string(),
|
|
164
|
-
params: z
|
|
165
|
-
.array(z.unknown())
|
|
168
|
+
jsonrpc: zod_1.z.literal("2.0"),
|
|
169
|
+
id: zod_1.z.number(),
|
|
170
|
+
method: zod_1.z.string(),
|
|
171
|
+
params: zod_1.z
|
|
172
|
+
.array(zod_1.z.unknown())
|
|
166
173
|
.optional()
|
|
167
174
|
.transform((val) => val ?? [])
|
|
168
175
|
})
|
|
169
176
|
.strict();
|
|
170
|
-
|
|
177
|
+
exports.jsonRpcSchema = jsonRpcSchema;
|
|
178
|
+
const jsonRpcResultSchema = zod_1.z
|
|
171
179
|
.object({
|
|
172
|
-
jsonrpc: z.literal("2.0"),
|
|
173
|
-
id: z.number(),
|
|
174
|
-
result: z.unknown()
|
|
180
|
+
jsonrpc: zod_1.z.literal("2.0"),
|
|
181
|
+
id: zod_1.z.number(),
|
|
182
|
+
result: zod_1.z.unknown()
|
|
175
183
|
})
|
|
176
184
|
.strict();
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
exports.jsonRpcResultSchema = jsonRpcResultSchema;
|
|
186
|
+
const chainIdRequestSchema = zod_1.z.object({
|
|
187
|
+
method: zod_1.z.literal("eth_chainId"),
|
|
188
|
+
params: zod_1.z.tuple([])
|
|
189
|
+
});
|
|
190
|
+
const supportedEntryPointsRequestSchema = zod_1.z.object({
|
|
191
|
+
method: zod_1.z.literal("eth_supportedEntryPoints"),
|
|
192
|
+
params: zod_1.z.tuple([])
|
|
193
|
+
});
|
|
194
|
+
const stateOverridesSchema = zod_1.z.record(addressSchema, zod_1.z.object({
|
|
195
|
+
balance: exports.hexNumberSchema.optional(),
|
|
196
|
+
nonce: exports.hexNumberSchema.optional(),
|
|
188
197
|
code: hexDataSchema.optional(),
|
|
189
|
-
state: z.unknown().optional(),
|
|
190
|
-
stateDiff: z.unknown().optional()
|
|
198
|
+
state: zod_1.z.unknown().optional(),
|
|
199
|
+
stateDiff: zod_1.z.unknown().optional()
|
|
191
200
|
}));
|
|
192
|
-
const estimateUserOperationGasRequestSchema = z.object({
|
|
193
|
-
method: z.literal("eth_estimateUserOperationGas"),
|
|
194
|
-
params: z.union([
|
|
195
|
-
z.tuple([partialUserOperationSchema, addressSchema]),
|
|
196
|
-
z.tuple([
|
|
201
|
+
const estimateUserOperationGasRequestSchema = zod_1.z.object({
|
|
202
|
+
method: zod_1.z.literal("eth_estimateUserOperationGas"),
|
|
203
|
+
params: zod_1.z.union([
|
|
204
|
+
zod_1.z.tuple([partialUserOperationSchema, addressSchema]),
|
|
205
|
+
zod_1.z.tuple([
|
|
197
206
|
partialUserOperationSchema,
|
|
198
207
|
addressSchema,
|
|
199
208
|
stateOverridesSchema
|
|
200
209
|
])
|
|
201
210
|
])
|
|
202
211
|
});
|
|
203
|
-
const sendUserOperationRequestSchema = z.object({
|
|
204
|
-
method: z.literal("eth_sendUserOperation"),
|
|
205
|
-
params: z.tuple([userOperationSchema, addressSchema])
|
|
212
|
+
const sendUserOperationRequestSchema = zod_1.z.object({
|
|
213
|
+
method: zod_1.z.literal("eth_sendUserOperation"),
|
|
214
|
+
params: zod_1.z.tuple([userOperationSchema, addressSchema])
|
|
206
215
|
});
|
|
207
|
-
const getUserOperationByHashRequestSchema = z.object({
|
|
208
|
-
method: z.literal("eth_getUserOperationByHash"),
|
|
209
|
-
params: z.tuple([
|
|
210
|
-
z
|
|
216
|
+
const getUserOperationByHashRequestSchema = zod_1.z.object({
|
|
217
|
+
method: zod_1.z.literal("eth_getUserOperationByHash"),
|
|
218
|
+
params: zod_1.z.tuple([
|
|
219
|
+
zod_1.z
|
|
211
220
|
.string()
|
|
212
|
-
.regex(hexData32Pattern, { message: "Missing/invalid userOpHash" })
|
|
221
|
+
.regex(exports.hexData32Pattern, { message: "Missing/invalid userOpHash" })
|
|
213
222
|
.transform((val) => val)
|
|
214
223
|
])
|
|
215
224
|
});
|
|
216
|
-
const getUserOperationReceiptRequestSchema = z.object({
|
|
217
|
-
method: z.literal("eth_getUserOperationReceipt"),
|
|
218
|
-
params: z.tuple([
|
|
219
|
-
z
|
|
225
|
+
const getUserOperationReceiptRequestSchema = zod_1.z.object({
|
|
226
|
+
method: zod_1.z.literal("eth_getUserOperationReceipt"),
|
|
227
|
+
params: zod_1.z.tuple([
|
|
228
|
+
zod_1.z
|
|
220
229
|
.string()
|
|
221
|
-
.regex(hexData32Pattern, { message: "Missing/invalid userOpHash" })
|
|
230
|
+
.regex(exports.hexData32Pattern, { message: "Missing/invalid userOpHash" })
|
|
222
231
|
.transform((val) => val)
|
|
223
232
|
])
|
|
224
233
|
});
|
|
225
|
-
const bundlerClearStateRequestSchema = z.object({
|
|
226
|
-
method: z.literal("debug_bundler_clearState"),
|
|
227
|
-
params: z.tuple([])
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
method: z.literal("
|
|
247
|
-
params: z.tuple([
|
|
248
|
-
|
|
234
|
+
const bundlerClearStateRequestSchema = zod_1.z.object({
|
|
235
|
+
method: zod_1.z.literal("debug_bundler_clearState"),
|
|
236
|
+
params: zod_1.z.tuple([])
|
|
237
|
+
});
|
|
238
|
+
exports.bundlerClearStateRequestSchema = bundlerClearStateRequestSchema;
|
|
239
|
+
const bundlerClearMempoolRequestSchema = zod_1.z.object({
|
|
240
|
+
method: zod_1.z.literal("debug_bundler_clearMempool"),
|
|
241
|
+
params: zod_1.z.tuple([])
|
|
242
|
+
});
|
|
243
|
+
exports.bundlerClearMempoolRequestSchema = bundlerClearMempoolRequestSchema;
|
|
244
|
+
const bundlerDumpMempoolRequestSchema = zod_1.z.object({
|
|
245
|
+
method: zod_1.z.literal("debug_bundler_dumpMempool"),
|
|
246
|
+
params: zod_1.z.tuple([addressSchema])
|
|
247
|
+
});
|
|
248
|
+
exports.bundlerDumpMempoolRequestSchema = bundlerDumpMempoolRequestSchema;
|
|
249
|
+
const bundlerSendBundleNowRequestSchema = zod_1.z.object({
|
|
250
|
+
method: zod_1.z.literal("debug_bundler_sendBundleNow"),
|
|
251
|
+
params: zod_1.z.tuple([])
|
|
252
|
+
});
|
|
253
|
+
exports.bundlerSendBundleNowRequestSchema = bundlerSendBundleNowRequestSchema;
|
|
254
|
+
const bundlerSetBundlingModeRequestSchema = zod_1.z.object({
|
|
255
|
+
method: zod_1.z.literal("debug_bundler_setBundlingMode"),
|
|
256
|
+
params: zod_1.z.tuple([zod_1.z.enum(["manual", "auto"])])
|
|
257
|
+
});
|
|
258
|
+
exports.bundlerSetBundlingModeRequestSchema = bundlerSetBundlingModeRequestSchema;
|
|
259
|
+
const bundlerSetReputationsRequestSchema = zod_1.z.object({
|
|
260
|
+
method: zod_1.z.literal("debug_bundler_setReputation"),
|
|
261
|
+
params: zod_1.z.tuple([
|
|
262
|
+
zod_1.z.array(zod_1.z.object({
|
|
249
263
|
address: addressSchema,
|
|
250
|
-
opsSeen: hexNumberSchema,
|
|
251
|
-
opsIncluded: hexNumberSchema
|
|
264
|
+
opsSeen: exports.hexNumberSchema,
|
|
265
|
+
opsIncluded: exports.hexNumberSchema
|
|
252
266
|
})),
|
|
253
267
|
addressSchema
|
|
254
268
|
])
|
|
255
269
|
});
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const
|
|
273
|
-
method: z.literal("
|
|
274
|
-
params: z.tuple([
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
const
|
|
270
|
+
exports.bundlerSetReputationsRequestSchema = bundlerSetReputationsRequestSchema;
|
|
271
|
+
const bundlerDumpReputationsRequestSchema = zod_1.z.object({
|
|
272
|
+
method: zod_1.z.literal("debug_bundler_dumpReputation"),
|
|
273
|
+
params: zod_1.z.tuple([addressSchema])
|
|
274
|
+
});
|
|
275
|
+
exports.bundlerDumpReputationsRequestSchema = bundlerDumpReputationsRequestSchema;
|
|
276
|
+
const pimlicoGetStakeStatusRequestSchema = zod_1.z.object({
|
|
277
|
+
method: zod_1.z.literal("debug_bundler_getStakeStatus"),
|
|
278
|
+
params: zod_1.z.tuple([addressSchema, addressSchema])
|
|
279
|
+
});
|
|
280
|
+
exports.pimlicoGetStakeStatusRequestSchema = pimlicoGetStakeStatusRequestSchema;
|
|
281
|
+
const pimlicoGetUserOperationStatusRequestSchema = zod_1.z.object({
|
|
282
|
+
method: zod_1.z.literal("pimlico_getUserOperationStatus"),
|
|
283
|
+
params: zod_1.z.tuple([hexData32Schema])
|
|
284
|
+
});
|
|
285
|
+
exports.pimlicoGetUserOperationStatusRequestSchema = pimlicoGetUserOperationStatusRequestSchema;
|
|
286
|
+
const pimlicoGetUserOperationGasPriceRequestSchema = zod_1.z.object({
|
|
287
|
+
method: zod_1.z.literal("pimlico_getUserOperationGasPrice"),
|
|
288
|
+
params: zod_1.z.tuple([])
|
|
289
|
+
});
|
|
290
|
+
exports.pimlicoGetUserOperationGasPriceRequestSchema = pimlicoGetUserOperationGasPriceRequestSchema;
|
|
291
|
+
const pimlicoSendCompressedUserOperationRequestSchema = zod_1.z.object({
|
|
292
|
+
method: zod_1.z.literal("pimlico_sendCompressedUserOperation"),
|
|
293
|
+
params: zod_1.z.tuple([hexDataSchema, addressSchema, addressSchema])
|
|
294
|
+
});
|
|
295
|
+
exports.altoVersions = zod_1.z.enum(["v1", "v2"]);
|
|
296
|
+
const bundlerRequestSchema = zod_1.z.discriminatedUnion("method", [
|
|
278
297
|
chainIdRequestSchema,
|
|
279
298
|
supportedEntryPointsRequestSchema,
|
|
280
299
|
estimateUserOperationGasRequestSchema,
|
|
@@ -293,149 +312,160 @@ const bundlerRequestSchema = z.discriminatedUnion("method", [
|
|
|
293
312
|
pimlicoGetUserOperationGasPriceRequestSchema,
|
|
294
313
|
pimlicoSendCompressedUserOperationRequestSchema
|
|
295
314
|
]);
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
315
|
+
exports.bundlerRequestSchema = bundlerRequestSchema;
|
|
316
|
+
const chainIdResponseSchema = zod_1.z.object({
|
|
317
|
+
method: zod_1.z.literal("eth_chainId"),
|
|
318
|
+
result: exports.hexNumberSchema
|
|
319
|
+
});
|
|
320
|
+
const supportedEntryPointsResponseSchema = zod_1.z.object({
|
|
321
|
+
method: zod_1.z.literal("eth_supportedEntryPoints"),
|
|
322
|
+
result: zod_1.z.array(addressSchema)
|
|
323
|
+
});
|
|
324
|
+
const estimateUserOperationGasResponseSchema = zod_1.z.object({
|
|
325
|
+
method: zod_1.z.literal("eth_estimateUserOperationGas"),
|
|
326
|
+
result: zod_1.z.union([
|
|
327
|
+
zod_1.z.object({
|
|
328
|
+
callGasLimit: exports.hexNumberSchema,
|
|
329
|
+
preVerificationGas: exports.hexNumberSchema,
|
|
330
|
+
verificationGasLimit: exports.hexNumberSchema,
|
|
331
|
+
verificationGas: exports.hexNumberSchema.optional()
|
|
312
332
|
}),
|
|
313
|
-
z.object({
|
|
314
|
-
callGasLimit: hexNumberSchema,
|
|
315
|
-
preVerificationGas: hexNumberSchema,
|
|
316
|
-
verificationGasLimit: hexNumberSchema,
|
|
317
|
-
paymasterVerificationGasLimit: hexNumberSchema.optional(),
|
|
318
|
-
paymasterPostOpGasLimit: hexNumberSchema.optional()
|
|
333
|
+
zod_1.z.object({
|
|
334
|
+
callGasLimit: exports.hexNumberSchema,
|
|
335
|
+
preVerificationGas: exports.hexNumberSchema,
|
|
336
|
+
verificationGasLimit: exports.hexNumberSchema,
|
|
337
|
+
paymasterVerificationGasLimit: exports.hexNumberSchema.optional(),
|
|
338
|
+
paymasterPostOpGasLimit: exports.hexNumberSchema.optional()
|
|
319
339
|
})
|
|
320
340
|
])
|
|
321
341
|
});
|
|
322
|
-
const sendUserOperationResponseSchema = z.object({
|
|
323
|
-
method: z.literal("eth_sendUserOperation"),
|
|
342
|
+
const sendUserOperationResponseSchema = zod_1.z.object({
|
|
343
|
+
method: zod_1.z.literal("eth_sendUserOperation"),
|
|
324
344
|
result: hexData32Schema
|
|
325
345
|
});
|
|
326
|
-
const getUserOperationByHashResponseSchema = z.object({
|
|
327
|
-
method: z.literal("eth_getUserOperationByHash"),
|
|
328
|
-
result: z
|
|
346
|
+
const getUserOperationByHashResponseSchema = zod_1.z.object({
|
|
347
|
+
method: zod_1.z.literal("eth_getUserOperationByHash"),
|
|
348
|
+
result: zod_1.z
|
|
329
349
|
.object({
|
|
330
350
|
userOperation: userOperationSchema,
|
|
331
351
|
entryPoint: addressSchema,
|
|
332
|
-
blockNumber: hexNumberSchema,
|
|
352
|
+
blockNumber: exports.hexNumberSchema,
|
|
333
353
|
blockHash: hexData32Schema,
|
|
334
354
|
transactionHash: hexData32Schema
|
|
335
355
|
})
|
|
336
|
-
.or(z.null())
|
|
356
|
+
.or(zod_1.z.null())
|
|
337
357
|
});
|
|
338
|
-
const logSchema = z.object({
|
|
358
|
+
const logSchema = zod_1.z.object({
|
|
339
359
|
//removed: z.boolean().optional(),
|
|
340
|
-
logIndex: hexNumberSchema,
|
|
341
|
-
transactionIndex: hexNumberSchema,
|
|
360
|
+
logIndex: exports.hexNumberSchema,
|
|
361
|
+
transactionIndex: exports.hexNumberSchema,
|
|
342
362
|
transactionHash: hexData32Schema,
|
|
343
363
|
blockHash: hexData32Schema,
|
|
344
|
-
blockNumber: hexNumberSchema,
|
|
364
|
+
blockNumber: exports.hexNumberSchema,
|
|
345
365
|
address: addressSchema,
|
|
346
366
|
data: hexDataSchema,
|
|
347
|
-
topics: z.array(hexData32Schema)
|
|
367
|
+
topics: zod_1.z.array(hexData32Schema)
|
|
348
368
|
});
|
|
349
|
-
|
|
369
|
+
exports.logSchema = logSchema;
|
|
370
|
+
const receiptSchema = zod_1.z.object({
|
|
350
371
|
transactionHash: hexData32Schema,
|
|
351
|
-
transactionIndex: hexNumberSchema,
|
|
372
|
+
transactionIndex: exports.hexNumberSchema,
|
|
352
373
|
blockHash: hexData32Schema,
|
|
353
|
-
blockNumber: hexNumberSchema,
|
|
374
|
+
blockNumber: exports.hexNumberSchema,
|
|
354
375
|
from: addressSchema,
|
|
355
|
-
to: addressSchema.or(z.null()),
|
|
356
|
-
cumulativeGasUsed: hexNumberSchema,
|
|
357
|
-
gasUsed: hexNumberSchema,
|
|
358
|
-
contractAddress: addressSchema.or(z.null()),
|
|
359
|
-
logs: z.array(logSchema),
|
|
360
|
-
logsBloom: z.string().regex(/^0x[0-9a-f]{512}$/),
|
|
376
|
+
to: addressSchema.or(zod_1.z.null()),
|
|
377
|
+
cumulativeGasUsed: exports.hexNumberSchema,
|
|
378
|
+
gasUsed: exports.hexNumberSchema,
|
|
379
|
+
contractAddress: addressSchema.or(zod_1.z.null()),
|
|
380
|
+
logs: zod_1.z.array(logSchema),
|
|
381
|
+
logsBloom: zod_1.z.string().regex(/^0x[0-9a-f]{512}$/),
|
|
361
382
|
//root: hexData32Schema,
|
|
362
|
-
status: hexNumberSchema.or(z.null()),
|
|
363
|
-
effectiveGasPrice: hexNumberSchema
|
|
383
|
+
status: exports.hexNumberSchema.or(zod_1.z.null()),
|
|
384
|
+
effectiveGasPrice: exports.hexNumberSchema
|
|
364
385
|
//type: hexNumberSchema
|
|
365
386
|
});
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
387
|
+
exports.receiptSchema = receiptSchema;
|
|
388
|
+
const getUserOperationReceiptResponseSchema = zod_1.z.object({
|
|
389
|
+
method: zod_1.z.literal("eth_getUserOperationReceipt"),
|
|
390
|
+
result: zod_1.z
|
|
369
391
|
.object({
|
|
370
392
|
userOpHash: hexData32Schema,
|
|
371
393
|
entryPoint: addressSchema,
|
|
372
394
|
sender: addressSchema,
|
|
373
|
-
nonce: hexNumberSchema,
|
|
395
|
+
nonce: exports.hexNumberSchema,
|
|
374
396
|
paymaster: addressSchema.optional(),
|
|
375
|
-
actualGasCost: hexNumberSchema,
|
|
376
|
-
actualGasUsed: hexNumberSchema,
|
|
377
|
-
success: z.boolean(),
|
|
397
|
+
actualGasCost: exports.hexNumberSchema,
|
|
398
|
+
actualGasUsed: exports.hexNumberSchema,
|
|
399
|
+
success: zod_1.z.boolean(),
|
|
378
400
|
reason: hexDataSchema.optional(), // revert reason
|
|
379
|
-
logs: z.array(logSchema),
|
|
401
|
+
logs: zod_1.z.array(logSchema),
|
|
380
402
|
receipt: receiptSchema
|
|
381
403
|
})
|
|
382
|
-
.or(z.null())
|
|
383
|
-
});
|
|
384
|
-
const bundlerClearStateResponseSchema = z.object({
|
|
385
|
-
method: z.literal("debug_bundler_clearState"),
|
|
386
|
-
result: z.literal("ok")
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
404
|
+
.or(zod_1.z.null())
|
|
405
|
+
});
|
|
406
|
+
const bundlerClearStateResponseSchema = zod_1.z.object({
|
|
407
|
+
method: zod_1.z.literal("debug_bundler_clearState"),
|
|
408
|
+
result: zod_1.z.literal("ok")
|
|
409
|
+
});
|
|
410
|
+
exports.bundlerClearStateResponseSchema = bundlerClearStateResponseSchema;
|
|
411
|
+
const bundlerClearMempoolResponseSchema = zod_1.z.object({
|
|
412
|
+
method: zod_1.z.literal("debug_bundler_clearMempool"),
|
|
413
|
+
result: zod_1.z.literal("ok")
|
|
414
|
+
});
|
|
415
|
+
exports.bundlerClearMempoolResponseSchema = bundlerClearMempoolResponseSchema;
|
|
416
|
+
const bundlerDumpMempoolResponseSchema = zod_1.z.object({
|
|
417
|
+
method: zod_1.z.literal("debug_bundler_dumpMempool"),
|
|
418
|
+
result: zod_1.z.array(userOperationSchema)
|
|
419
|
+
});
|
|
420
|
+
exports.bundlerDumpMempoolResponseSchema = bundlerDumpMempoolResponseSchema;
|
|
421
|
+
const bundlerGetStakeStatusResponseSchema = zod_1.z.object({
|
|
422
|
+
method: zod_1.z.literal("debug_bundler_getStakeStatus"),
|
|
423
|
+
result: zod_1.z.object({
|
|
424
|
+
stakeInfo: zod_1.z.object({
|
|
425
|
+
addr: zod_1.z.string(),
|
|
426
|
+
stake: zod_1.z
|
|
402
427
|
.string()
|
|
403
|
-
.or(z.number())
|
|
404
|
-
.or(z.bigint())
|
|
428
|
+
.or(zod_1.z.number())
|
|
429
|
+
.or(zod_1.z.bigint())
|
|
405
430
|
.transform((val) => Number(val).toString()),
|
|
406
|
-
unstakeDelaySec: z
|
|
431
|
+
unstakeDelaySec: zod_1.z
|
|
407
432
|
.string()
|
|
408
|
-
.or(z.number())
|
|
409
|
-
.or(z.bigint())
|
|
433
|
+
.or(zod_1.z.number())
|
|
434
|
+
.or(zod_1.z.bigint())
|
|
410
435
|
.transform((val) => Number(val).toString())
|
|
411
436
|
}),
|
|
412
|
-
isStaked: z.boolean()
|
|
437
|
+
isStaked: zod_1.z.boolean()
|
|
413
438
|
})
|
|
414
439
|
});
|
|
415
|
-
|
|
416
|
-
|
|
440
|
+
exports.bundlerGetStakeStatusResponseSchema = bundlerGetStakeStatusResponseSchema;
|
|
441
|
+
const bundlerSendBundleNowResponseSchema = zod_1.z.object({
|
|
442
|
+
method: zod_1.z.literal("debug_bundler_sendBundleNow"),
|
|
417
443
|
result: hexData32Schema
|
|
418
444
|
});
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
445
|
+
exports.bundlerSendBundleNowResponseSchema = bundlerSendBundleNowResponseSchema;
|
|
446
|
+
const bundlerSetBundlingModeResponseSchema = zod_1.z.object({
|
|
447
|
+
method: zod_1.z.literal("debug_bundler_setBundlingMode"),
|
|
448
|
+
result: zod_1.z.literal("ok")
|
|
422
449
|
});
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
450
|
+
exports.bundlerSetBundlingModeResponseSchema = bundlerSetBundlingModeResponseSchema;
|
|
451
|
+
const bundlerSetReputationsResponseSchema = zod_1.z.object({
|
|
452
|
+
method: zod_1.z.literal("debug_bundler_setReputation"),
|
|
453
|
+
result: zod_1.z.literal("ok")
|
|
426
454
|
});
|
|
427
|
-
|
|
428
|
-
|
|
455
|
+
exports.bundlerSetReputationsResponseSchema = bundlerSetReputationsResponseSchema;
|
|
456
|
+
const bundlerDumpReputationsResponseSchema = zod_1.z.object({
|
|
457
|
+
method: zod_1.z.literal("debug_bundler_dumpReputation"),
|
|
429
458
|
// TODO: FIX
|
|
430
|
-
result: z.array(z.object({
|
|
459
|
+
result: zod_1.z.array(zod_1.z.object({
|
|
431
460
|
address: addressSchema,
|
|
432
|
-
opsSeen: hexNumberSchema,
|
|
433
|
-
opsIncluded: hexNumberSchema,
|
|
434
|
-
status: hexNumberSchema.optional()
|
|
461
|
+
opsSeen: exports.hexNumberSchema,
|
|
462
|
+
opsIncluded: exports.hexNumberSchema,
|
|
463
|
+
status: exports.hexNumberSchema.optional()
|
|
435
464
|
}))
|
|
436
465
|
});
|
|
437
|
-
|
|
438
|
-
|
|
466
|
+
exports.bundlerDumpReputationsResponseSchema = bundlerDumpReputationsResponseSchema;
|
|
467
|
+
const userOperationStatus = zod_1.z.object({
|
|
468
|
+
status: zod_1.z.enum([
|
|
439
469
|
"not_found",
|
|
440
470
|
"not_submitted",
|
|
441
471
|
"submitted",
|
|
@@ -444,35 +474,37 @@ const userOperationStatus = z.object({
|
|
|
444
474
|
"included",
|
|
445
475
|
"failed"
|
|
446
476
|
]),
|
|
447
|
-
transactionHash: hexData32Schema.or(z.null())
|
|
477
|
+
transactionHash: hexData32Schema.or(zod_1.z.null())
|
|
448
478
|
});
|
|
449
|
-
const pimlicoGetUserOperationStatusResponseSchema = z.object({
|
|
450
|
-
method: z.literal("pimlico_getUserOperationStatus"),
|
|
479
|
+
const pimlicoGetUserOperationStatusResponseSchema = zod_1.z.object({
|
|
480
|
+
method: zod_1.z.literal("pimlico_getUserOperationStatus"),
|
|
451
481
|
result: userOperationStatus
|
|
452
482
|
});
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
483
|
+
exports.pimlicoGetUserOperationStatusResponseSchema = pimlicoGetUserOperationStatusResponseSchema;
|
|
484
|
+
const gasPriceSchema = zod_1.z.object({
|
|
485
|
+
slow: zod_1.z.object({
|
|
486
|
+
maxFeePerGas: zod_1.z.bigint(),
|
|
487
|
+
maxPriorityFeePerGas: zod_1.z.bigint()
|
|
457
488
|
}),
|
|
458
|
-
standard: z.object({
|
|
459
|
-
maxFeePerGas: z.bigint(),
|
|
460
|
-
maxPriorityFeePerGas: z.bigint()
|
|
489
|
+
standard: zod_1.z.object({
|
|
490
|
+
maxFeePerGas: zod_1.z.bigint(),
|
|
491
|
+
maxPriorityFeePerGas: zod_1.z.bigint()
|
|
461
492
|
}),
|
|
462
|
-
fast: z.object({
|
|
463
|
-
maxFeePerGas: z.bigint(),
|
|
464
|
-
maxPriorityFeePerGas: z.bigint()
|
|
493
|
+
fast: zod_1.z.object({
|
|
494
|
+
maxFeePerGas: zod_1.z.bigint(),
|
|
495
|
+
maxPriorityFeePerGas: zod_1.z.bigint()
|
|
465
496
|
})
|
|
466
497
|
});
|
|
467
|
-
const pimlicoGetUserOperationGasPriceResponseSchema = z.object({
|
|
468
|
-
method: z.literal("pimlico_getUserOperationGasPrice"),
|
|
498
|
+
const pimlicoGetUserOperationGasPriceResponseSchema = zod_1.z.object({
|
|
499
|
+
method: zod_1.z.literal("pimlico_getUserOperationGasPrice"),
|
|
469
500
|
result: gasPriceSchema
|
|
470
501
|
});
|
|
471
|
-
|
|
472
|
-
|
|
502
|
+
exports.pimlicoGetUserOperationGasPriceResponseSchema = pimlicoGetUserOperationGasPriceResponseSchema;
|
|
503
|
+
const pimlicoSendCompressedUserOperationResponseSchema = zod_1.z.object({
|
|
504
|
+
method: zod_1.z.literal("pimlico_sendCompressedUserOperation"),
|
|
473
505
|
result: hexData32Schema
|
|
474
506
|
});
|
|
475
|
-
const bundlerResponseSchema = z.discriminatedUnion("method", [
|
|
507
|
+
const bundlerResponseSchema = zod_1.z.discriminatedUnion("method", [
|
|
476
508
|
chainIdResponseSchema,
|
|
477
509
|
supportedEntryPointsResponseSchema,
|
|
478
510
|
estimateUserOperationGasResponseSchema,
|
|
@@ -491,7 +523,5 @@ const bundlerResponseSchema = z.discriminatedUnion("method", [
|
|
|
491
523
|
pimlicoGetUserOperationGasPriceResponseSchema,
|
|
492
524
|
pimlicoSendCompressedUserOperationResponseSchema
|
|
493
525
|
]);
|
|
494
|
-
|
|
495
|
-
export { bundlerClearStateResponseSchema, bundlerClearMempoolResponseSchema, bundlerDumpMempoolResponseSchema, bundlerGetStakeStatusResponseSchema, bundlerSendBundleNowResponseSchema, bundlerSetBundlingModeResponseSchema, bundlerSetReputationsResponseSchema, bundlerDumpReputationsResponseSchema, pimlicoGetUserOperationStatusResponseSchema, pimlicoGetUserOperationGasPriceResponseSchema, bundlerResponseSchema };
|
|
496
|
-
export { addressSchema, hexData32Schema, hexDataSchema, logSchema, receiptSchema };
|
|
526
|
+
exports.bundlerResponseSchema = bundlerResponseSchema;
|
|
497
527
|
//# sourceMappingURL=schemas.js.map
|