x402-proxy 0.10.7 → 0.10.9

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 (90) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/README.md +7 -1
  3. package/dist/Credential-COZQnr1-.js +2055 -0
  4. package/dist/Mcp-CrCEqLqO.js +10 -0
  5. package/dist/Sse-ChldYgU7.js +9742 -0
  6. package/dist/Sse-kCB38G56.js +16482 -0
  7. package/dist/accounts-DsuvWwph.js +232 -0
  8. package/dist/accounts-DzvAlQRn.js +5 -0
  9. package/dist/accounts-IG-Cmrwy.js +229 -0
  10. package/dist/api-CUzmQvTQ.js +2802 -0
  11. package/dist/auth-DTzQmnZ_.js +1196 -0
  12. package/dist/bin/cli.js +585 -242
  13. package/dist/ccip-Bx-zoUCJ.js +240 -0
  14. package/dist/ccip-C2k1DD1T.js +153 -0
  15. package/dist/ccip-C6CQOJYv.js +152 -0
  16. package/dist/ccip-RZzsZ5Mv.js +156 -0
  17. package/dist/chain-CafcHffR.js +1997 -0
  18. package/dist/chain-DwfP5RGZ.js +1968 -0
  19. package/dist/chunk-DBEY4PJZ.js +16 -0
  20. package/dist/chunk-DjEMn6fM.js +36 -0
  21. package/dist/client-Blw2V7LF.js +657 -0
  22. package/dist/client-C37gWJOZ.js +102 -0
  23. package/dist/client-CEc4NYAA.js +6388 -0
  24. package/dist/client-CVDTUY0l.js +5152 -0
  25. package/dist/config-BUQsit4s.js +3 -0
  26. package/dist/config-DR1Fs_wL.js +6600 -0
  27. package/dist/{config-D9wIR3xc.js → config-rvKA3SYT.js} +10 -5
  28. package/dist/decodeFunctionData-DuFcwhC_.js +4510 -0
  29. package/dist/decodeFunctionData-JPOUdvil.js +4394 -0
  30. package/dist/derive-DNUl8LU9.js +9109 -0
  31. package/dist/dist-C2YO6HSQ.js +6581 -0
  32. package/dist/dist-DM5_F3r5.js +4 -0
  33. package/dist/dist-DxJCYyL5.js +1388 -0
  34. package/dist/hashTypedData-BHmP9dBd.js +859 -0
  35. package/dist/hashTypedData-CtEdfx4y.js +846 -0
  36. package/dist/helpers-CuUSw-tH.js +7125 -0
  37. package/dist/hmac-59IlS_by.js +648 -0
  38. package/dist/http-BAtucMbS.js +2060 -0
  39. package/dist/index.d.ts +1903 -9
  40. package/dist/index.js +18006 -50
  41. package/dist/index.node-CxkL0OFh.js +3592 -0
  42. package/dist/index.node-DvmeuZBj.js +3 -0
  43. package/dist/isAddressEqual-BLrd1Hg1.js +9 -0
  44. package/dist/isAddressEqual-DsAqfQOD.js +10 -0
  45. package/dist/localBatchGatewayRequest-C-RPJyDO.js +6260 -0
  46. package/dist/localBatchGatewayRequest-DOdQ9bR7.js +93 -0
  47. package/dist/localBatchGatewayRequest-DQkbZaSy.js +6261 -0
  48. package/dist/parseUnits-CApwcKSD.js +49 -0
  49. package/dist/parseUnits-cMO2udMe.js +48 -0
  50. package/dist/schemas-BxMFYNbH.js +1270 -0
  51. package/dist/secp256k1-BZpiyffY.js +2525 -0
  52. package/dist/secp256k1-BjenrLl5.js +1877 -0
  53. package/dist/secp256k1-CLPUX17u.js +3 -0
  54. package/dist/sendRawTransactionSync-DvSkhZtW.js +3612 -0
  55. package/dist/server-CSq0IuUq.js +565 -0
  56. package/dist/setup-BY4J49Lv.js +1110 -0
  57. package/dist/setup-wMOAgrsN.js +3 -0
  58. package/dist/sha256-FAs0qeni.js +17 -0
  59. package/dist/sha3-CYkWM8Xa.js +195 -0
  60. package/dist/sha3-DbMJRJ3C.js +194 -0
  61. package/dist/sse-B4LLqBQm.js +408 -0
  62. package/dist/status-Bu23RjW6.js +3 -0
  63. package/dist/{status-DihAcUSC.js → status-X21VnGUO.js} +16 -15
  64. package/dist/stdio-BADqxZdZ.js +85 -0
  65. package/dist/streamableHttp-BHkJypcI.js +358 -0
  66. package/dist/tempo-3nttrxgQ.js +17 -0
  67. package/dist/tempo-DER0P-ul.js +18 -0
  68. package/dist/types-BEKUz-Mf.js +1240 -0
  69. package/dist/types-DatK5vR5.js +3 -0
  70. package/dist/utils-BYjkXZDF.js +444 -0
  71. package/dist/utils-SeGHMW9O.js +445 -0
  72. package/dist/wallet-DKVlrR1S.js +3 -0
  73. package/dist/wallet-DSyht15_.js +17759 -0
  74. package/package.json +18 -71
  75. package/dist/config-B_upkJeK.js +0 -66
  76. package/dist/config-Be35NM5s.js +0 -3
  77. package/dist/config-J1m-CWXT.js +0 -27
  78. package/dist/derive-CL6e8K0Z.js +0 -81
  79. package/dist/openclaw/plugin.d.ts +0 -15
  80. package/dist/openclaw/plugin.js +0 -2067
  81. package/dist/openclaw.plugin.json +0 -93
  82. package/dist/setup-CNyMLnM-.js +0 -197
  83. package/dist/setup-DTIxPe58.js +0 -3
  84. package/dist/status-DZlJ4pS7.js +0 -3
  85. package/dist/wallet-B0S-rma9.js +0 -544
  86. package/dist/wallet-DBrVZJqe.js +0 -3
  87. package/openclaw.plugin.json +0 -93
  88. package/skills/SKILL.md +0 -183
  89. package/skills/references/library.md +0 -85
  90. package/skills/references/openclaw-plugin.md +0 -145
@@ -0,0 +1,1968 @@
1
+ import { t as keccak_256 } from "./sha3-DbMJRJ3C.js";
2
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/formatAbiItem.js
3
+ function formatAbiItem(abiItem, { includeName = false } = {}) {
4
+ if (abiItem.type !== "function" && abiItem.type !== "event" && abiItem.type !== "error") throw new InvalidDefinitionTypeError(abiItem.type);
5
+ return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;
6
+ }
7
+ function formatAbiParams(params, { includeName = false } = {}) {
8
+ if (!params) return "";
9
+ return params.map((param) => formatAbiParam(param, { includeName })).join(includeName ? ", " : ",");
10
+ }
11
+ function formatAbiParam(param, { includeName }) {
12
+ if (param.type.startsWith("tuple")) return `(${formatAbiParams(param.components, { includeName })})${param.type.slice(5)}`;
13
+ return param.type + (includeName && param.name ? ` ${param.name}` : "");
14
+ }
15
+ //#endregion
16
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/isHex.js
17
+ function isHex(value, { strict = true } = {}) {
18
+ if (!value) return false;
19
+ if (typeof value !== "string") return false;
20
+ return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
21
+ }
22
+ //#endregion
23
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/size.js
24
+ /**
25
+ * @description Retrieves the size of the value (in bytes).
26
+ *
27
+ * @param value The value (hex or byte array) to retrieve the size of.
28
+ * @returns The size of the value (in bytes).
29
+ */
30
+ function size(value) {
31
+ if (isHex(value, { strict: false })) return Math.ceil((value.length - 2) / 2);
32
+ return value.length;
33
+ }
34
+ //#endregion
35
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/version.js
36
+ const version = "2.47.6";
37
+ //#endregion
38
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/base.js
39
+ let errorConfig = {
40
+ getDocsUrl: ({ docsBaseUrl, docsPath = "", docsSlug }) => docsPath ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath}${docsSlug ? `#${docsSlug}` : ""}` : void 0,
41
+ version: `viem@${version}`
42
+ };
43
+ var BaseError = class BaseError extends Error {
44
+ constructor(shortMessage, args = {}) {
45
+ const details = (() => {
46
+ if (args.cause instanceof BaseError) return args.cause.details;
47
+ if (args.cause?.message) return args.cause.message;
48
+ return args.details;
49
+ })();
50
+ const docsPath = (() => {
51
+ if (args.cause instanceof BaseError) return args.cause.docsPath || args.docsPath;
52
+ return args.docsPath;
53
+ })();
54
+ const docsUrl = errorConfig.getDocsUrl?.({
55
+ ...args,
56
+ docsPath
57
+ });
58
+ const message = [
59
+ shortMessage || "An error occurred.",
60
+ "",
61
+ ...args.metaMessages ? [...args.metaMessages, ""] : [],
62
+ ...docsUrl ? [`Docs: ${docsUrl}`] : [],
63
+ ...details ? [`Details: ${details}`] : [],
64
+ ...errorConfig.version ? [`Version: ${errorConfig.version}`] : []
65
+ ].join("\n");
66
+ super(message, args.cause ? { cause: args.cause } : void 0);
67
+ Object.defineProperty(this, "details", {
68
+ enumerable: true,
69
+ configurable: true,
70
+ writable: true,
71
+ value: void 0
72
+ });
73
+ Object.defineProperty(this, "docsPath", {
74
+ enumerable: true,
75
+ configurable: true,
76
+ writable: true,
77
+ value: void 0
78
+ });
79
+ Object.defineProperty(this, "metaMessages", {
80
+ enumerable: true,
81
+ configurable: true,
82
+ writable: true,
83
+ value: void 0
84
+ });
85
+ Object.defineProperty(this, "shortMessage", {
86
+ enumerable: true,
87
+ configurable: true,
88
+ writable: true,
89
+ value: void 0
90
+ });
91
+ Object.defineProperty(this, "version", {
92
+ enumerable: true,
93
+ configurable: true,
94
+ writable: true,
95
+ value: void 0
96
+ });
97
+ Object.defineProperty(this, "name", {
98
+ enumerable: true,
99
+ configurable: true,
100
+ writable: true,
101
+ value: "BaseError"
102
+ });
103
+ this.details = details;
104
+ this.docsPath = docsPath;
105
+ this.metaMessages = args.metaMessages;
106
+ this.name = args.name ?? this.name;
107
+ this.shortMessage = shortMessage;
108
+ this.version = version;
109
+ }
110
+ walk(fn) {
111
+ return walk(this, fn);
112
+ }
113
+ };
114
+ function walk(err, fn) {
115
+ if (fn?.(err)) return err;
116
+ if (err && typeof err === "object" && "cause" in err && err.cause !== void 0) return walk(err.cause, fn);
117
+ return fn ? null : err;
118
+ }
119
+ //#endregion
120
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/abi.js
121
+ var AbiConstructorNotFoundError = class extends BaseError {
122
+ constructor({ docsPath }) {
123
+ super(["A constructor was not found on the ABI.", "Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"), {
124
+ docsPath,
125
+ name: "AbiConstructorNotFoundError"
126
+ });
127
+ }
128
+ };
129
+ var AbiConstructorParamsNotFoundError = class extends BaseError {
130
+ constructor({ docsPath }) {
131
+ super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.", "Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"), {
132
+ docsPath,
133
+ name: "AbiConstructorParamsNotFoundError"
134
+ });
135
+ }
136
+ };
137
+ var AbiDecodingDataSizeTooSmallError = class extends BaseError {
138
+ constructor({ data, params, size }) {
139
+ super([`Data size of ${size} bytes is too small for given parameters.`].join("\n"), {
140
+ metaMessages: [`Params: (${formatAbiParams(params, { includeName: true })})`, `Data: ${data} (${size} bytes)`],
141
+ name: "AbiDecodingDataSizeTooSmallError"
142
+ });
143
+ Object.defineProperty(this, "data", {
144
+ enumerable: true,
145
+ configurable: true,
146
+ writable: true,
147
+ value: void 0
148
+ });
149
+ Object.defineProperty(this, "params", {
150
+ enumerable: true,
151
+ configurable: true,
152
+ writable: true,
153
+ value: void 0
154
+ });
155
+ Object.defineProperty(this, "size", {
156
+ enumerable: true,
157
+ configurable: true,
158
+ writable: true,
159
+ value: void 0
160
+ });
161
+ this.data = data;
162
+ this.params = params;
163
+ this.size = size;
164
+ }
165
+ };
166
+ var AbiDecodingZeroDataError = class extends BaseError {
167
+ constructor({ cause } = {}) {
168
+ super("Cannot decode zero data (\"0x\") with ABI parameters.", {
169
+ name: "AbiDecodingZeroDataError",
170
+ cause
171
+ });
172
+ }
173
+ };
174
+ var AbiEncodingArrayLengthMismatchError = class extends BaseError {
175
+ constructor({ expectedLength, givenLength, type }) {
176
+ super([
177
+ `ABI encoding array length mismatch for type ${type}.`,
178
+ `Expected length: ${expectedLength}`,
179
+ `Given length: ${givenLength}`
180
+ ].join("\n"), { name: "AbiEncodingArrayLengthMismatchError" });
181
+ }
182
+ };
183
+ var AbiEncodingBytesSizeMismatchError = class extends BaseError {
184
+ constructor({ expectedSize, value }) {
185
+ super(`Size of bytes "${value}" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: "AbiEncodingBytesSizeMismatchError" });
186
+ }
187
+ };
188
+ var AbiEncodingLengthMismatchError = class extends BaseError {
189
+ constructor({ expectedLength, givenLength }) {
190
+ super([
191
+ "ABI encoding params/values length mismatch.",
192
+ `Expected length (params): ${expectedLength}`,
193
+ `Given length (values): ${givenLength}`
194
+ ].join("\n"), { name: "AbiEncodingLengthMismatchError" });
195
+ }
196
+ };
197
+ var AbiErrorInputsNotFoundError = class extends BaseError {
198
+ constructor(errorName, { docsPath }) {
199
+ super([
200
+ `Arguments (\`args\`) were provided to "${errorName}", but "${errorName}" on the ABI does not contain any parameters (\`inputs\`).`,
201
+ "Cannot encode error result without knowing what the parameter types are.",
202
+ "Make sure you are using the correct ABI and that the inputs exist on it."
203
+ ].join("\n"), {
204
+ docsPath,
205
+ name: "AbiErrorInputsNotFoundError"
206
+ });
207
+ }
208
+ };
209
+ var AbiErrorNotFoundError = class extends BaseError {
210
+ constructor(errorName, { docsPath } = {}) {
211
+ super([`Error ${errorName ? `"${errorName}" ` : ""}not found on ABI.`, "Make sure you are using the correct ABI and that the error exists on it."].join("\n"), {
212
+ docsPath,
213
+ name: "AbiErrorNotFoundError"
214
+ });
215
+ }
216
+ };
217
+ var AbiErrorSignatureNotFoundError = class extends BaseError {
218
+ constructor(signature, { docsPath, cause }) {
219
+ super([
220
+ `Encoded error signature "${signature}" not found on ABI.`,
221
+ "Make sure you are using the correct ABI and that the error exists on it.",
222
+ `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${signature}.`
223
+ ].join("\n"), {
224
+ docsPath,
225
+ name: "AbiErrorSignatureNotFoundError",
226
+ cause
227
+ });
228
+ Object.defineProperty(this, "signature", {
229
+ enumerable: true,
230
+ configurable: true,
231
+ writable: true,
232
+ value: void 0
233
+ });
234
+ this.signature = signature;
235
+ }
236
+ };
237
+ var AbiEventSignatureEmptyTopicsError = class extends BaseError {
238
+ constructor({ docsPath }) {
239
+ super("Cannot extract event signature from empty topics.", {
240
+ docsPath,
241
+ name: "AbiEventSignatureEmptyTopicsError"
242
+ });
243
+ }
244
+ };
245
+ var AbiEventSignatureNotFoundError = class extends BaseError {
246
+ constructor(signature, { docsPath }) {
247
+ super([
248
+ `Encoded event signature "${signature}" not found on ABI.`,
249
+ "Make sure you are using the correct ABI and that the event exists on it.",
250
+ `You can look up the signature here: https://4byte.sourcify.dev/?q=${signature}.`
251
+ ].join("\n"), {
252
+ docsPath,
253
+ name: "AbiEventSignatureNotFoundError"
254
+ });
255
+ }
256
+ };
257
+ var AbiFunctionNotFoundError = class extends BaseError {
258
+ constructor(functionName, { docsPath } = {}) {
259
+ super([`Function ${functionName ? `"${functionName}" ` : ""}not found on ABI.`, "Make sure you are using the correct ABI and that the function exists on it."].join("\n"), {
260
+ docsPath,
261
+ name: "AbiFunctionNotFoundError"
262
+ });
263
+ }
264
+ };
265
+ var AbiFunctionOutputsNotFoundError = class extends BaseError {
266
+ constructor(functionName, { docsPath }) {
267
+ super([
268
+ `Function "${functionName}" does not contain any \`outputs\` on ABI.`,
269
+ "Cannot decode function result without knowing what the parameter types are.",
270
+ "Make sure you are using the correct ABI and that the function exists on it."
271
+ ].join("\n"), {
272
+ docsPath,
273
+ name: "AbiFunctionOutputsNotFoundError"
274
+ });
275
+ }
276
+ };
277
+ var AbiFunctionSignatureNotFoundError = class extends BaseError {
278
+ constructor(signature, { docsPath }) {
279
+ super([
280
+ `Encoded function signature "${signature}" not found on ABI.`,
281
+ "Make sure you are using the correct ABI and that the function exists on it.",
282
+ `You can look up the signature here: https://4byte.sourcify.dev/?q=${signature}.`
283
+ ].join("\n"), {
284
+ docsPath,
285
+ name: "AbiFunctionSignatureNotFoundError"
286
+ });
287
+ }
288
+ };
289
+ var AbiItemAmbiguityError = class extends BaseError {
290
+ constructor(x, y) {
291
+ super("Found ambiguous types in overloaded ABI items.", {
292
+ metaMessages: [
293
+ `\`${x.type}\` in \`${formatAbiItem(x.abiItem)}\`, and`,
294
+ `\`${y.type}\` in \`${formatAbiItem(y.abiItem)}\``,
295
+ "",
296
+ "These types encode differently and cannot be distinguished at runtime.",
297
+ "Remove one of the ambiguous items in the ABI."
298
+ ],
299
+ name: "AbiItemAmbiguityError"
300
+ });
301
+ }
302
+ };
303
+ var BytesSizeMismatchError = class extends BaseError {
304
+ constructor({ expectedSize, givenSize }) {
305
+ super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, { name: "BytesSizeMismatchError" });
306
+ }
307
+ };
308
+ var DecodeLogDataMismatch = class extends BaseError {
309
+ constructor({ abiItem, data, params, size }) {
310
+ super([`Data size of ${size} bytes is too small for non-indexed event parameters.`].join("\n"), {
311
+ metaMessages: [`Params: (${formatAbiParams(params, { includeName: true })})`, `Data: ${data} (${size} bytes)`],
312
+ name: "DecodeLogDataMismatch"
313
+ });
314
+ Object.defineProperty(this, "abiItem", {
315
+ enumerable: true,
316
+ configurable: true,
317
+ writable: true,
318
+ value: void 0
319
+ });
320
+ Object.defineProperty(this, "data", {
321
+ enumerable: true,
322
+ configurable: true,
323
+ writable: true,
324
+ value: void 0
325
+ });
326
+ Object.defineProperty(this, "params", {
327
+ enumerable: true,
328
+ configurable: true,
329
+ writable: true,
330
+ value: void 0
331
+ });
332
+ Object.defineProperty(this, "size", {
333
+ enumerable: true,
334
+ configurable: true,
335
+ writable: true,
336
+ value: void 0
337
+ });
338
+ this.abiItem = abiItem;
339
+ this.data = data;
340
+ this.params = params;
341
+ this.size = size;
342
+ }
343
+ };
344
+ var DecodeLogTopicsMismatch = class extends BaseError {
345
+ constructor({ abiItem, param }) {
346
+ super([`Expected a topic for indexed event parameter${param.name ? ` "${param.name}"` : ""} on event "${formatAbiItem(abiItem, { includeName: true })}".`].join("\n"), { name: "DecodeLogTopicsMismatch" });
347
+ Object.defineProperty(this, "abiItem", {
348
+ enumerable: true,
349
+ configurable: true,
350
+ writable: true,
351
+ value: void 0
352
+ });
353
+ this.abiItem = abiItem;
354
+ }
355
+ };
356
+ var InvalidAbiEncodingTypeError = class extends BaseError {
357
+ constructor(type, { docsPath }) {
358
+ super([`Type "${type}" is not a valid encoding type.`, "Please provide a valid ABI type."].join("\n"), {
359
+ docsPath,
360
+ name: "InvalidAbiEncodingType"
361
+ });
362
+ }
363
+ };
364
+ var InvalidAbiDecodingTypeError = class extends BaseError {
365
+ constructor(type, { docsPath }) {
366
+ super([`Type "${type}" is not a valid decoding type.`, "Please provide a valid ABI type."].join("\n"), {
367
+ docsPath,
368
+ name: "InvalidAbiDecodingType"
369
+ });
370
+ }
371
+ };
372
+ var InvalidArrayError = class extends BaseError {
373
+ constructor(value) {
374
+ super([`Value "${value}" is not a valid array.`].join("\n"), { name: "InvalidArrayError" });
375
+ }
376
+ };
377
+ var InvalidDefinitionTypeError = class extends BaseError {
378
+ constructor(type) {
379
+ super([`"${type}" is not a valid definition type.`, "Valid types: \"function\", \"event\", \"error\""].join("\n"), { name: "InvalidDefinitionTypeError" });
380
+ }
381
+ };
382
+ //#endregion
383
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/data.js
384
+ var SliceOffsetOutOfBoundsError = class extends BaseError {
385
+ constructor({ offset, position, size }) {
386
+ super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size}).`, { name: "SliceOffsetOutOfBoundsError" });
387
+ }
388
+ };
389
+ var SizeExceedsPaddingSizeError = class extends BaseError {
390
+ constructor({ size, targetSize, type }) {
391
+ super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size}) exceeds padding size (${targetSize}).`, { name: "SizeExceedsPaddingSizeError" });
392
+ }
393
+ };
394
+ var InvalidBytesLengthError = class extends BaseError {
395
+ constructor({ size, targetSize, type }) {
396
+ super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size} ${type} long.`, { name: "InvalidBytesLengthError" });
397
+ }
398
+ };
399
+ //#endregion
400
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/pad.js
401
+ function pad(hexOrBytes, { dir, size = 32 } = {}) {
402
+ if (typeof hexOrBytes === "string") return padHex(hexOrBytes, {
403
+ dir,
404
+ size
405
+ });
406
+ return padBytes(hexOrBytes, {
407
+ dir,
408
+ size
409
+ });
410
+ }
411
+ function padHex(hex_, { dir, size = 32 } = {}) {
412
+ if (size === null) return hex_;
413
+ const hex = hex_.replace("0x", "");
414
+ if (hex.length > size * 2) throw new SizeExceedsPaddingSizeError({
415
+ size: Math.ceil(hex.length / 2),
416
+ targetSize: size,
417
+ type: "hex"
418
+ });
419
+ return `0x${hex[dir === "right" ? "padEnd" : "padStart"](size * 2, "0")}`;
420
+ }
421
+ function padBytes(bytes, { dir, size = 32 } = {}) {
422
+ if (size === null) return bytes;
423
+ if (bytes.length > size) throw new SizeExceedsPaddingSizeError({
424
+ size: bytes.length,
425
+ targetSize: size,
426
+ type: "bytes"
427
+ });
428
+ const paddedBytes = new Uint8Array(size);
429
+ for (let i = 0; i < size; i++) {
430
+ const padEnd = dir === "right";
431
+ paddedBytes[padEnd ? i : size - i - 1] = bytes[padEnd ? i : bytes.length - i - 1];
432
+ }
433
+ return paddedBytes;
434
+ }
435
+ //#endregion
436
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/encoding.js
437
+ var IntegerOutOfRangeError = class extends BaseError {
438
+ constructor({ max, min, signed, size, value }) {
439
+ super(`Number "${value}" is not in safe ${size ? `${size * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
440
+ }
441
+ };
442
+ var InvalidBytesBooleanError = class extends BaseError {
443
+ constructor(bytes) {
444
+ super(`Bytes value "${bytes}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, { name: "InvalidBytesBooleanError" });
445
+ }
446
+ };
447
+ var InvalidHexBooleanError = class extends BaseError {
448
+ constructor(hex) {
449
+ super(`Hex value "${hex}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
450
+ }
451
+ };
452
+ var InvalidHexValueError = class extends BaseError {
453
+ constructor(value) {
454
+ super(`Hex value "${value}" is an odd length (${value.length}). It must be an even length.`, { name: "InvalidHexValueError" });
455
+ }
456
+ };
457
+ var SizeOverflowError = class extends BaseError {
458
+ constructor({ givenSize, maxSize }) {
459
+ super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: "SizeOverflowError" });
460
+ }
461
+ };
462
+ //#endregion
463
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/trim.js
464
+ function trim(hexOrBytes, { dir = "left" } = {}) {
465
+ let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
466
+ let sliceLength = 0;
467
+ for (let i = 0; i < data.length - 1; i++) if (data[dir === "left" ? i : data.length - i - 1].toString() === "0") sliceLength++;
468
+ else break;
469
+ data = dir === "left" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);
470
+ if (typeof hexOrBytes === "string") {
471
+ if (data.length === 1 && dir === "right") data = `${data}0`;
472
+ return `0x${data.length % 2 === 1 ? `0${data}` : data}`;
473
+ }
474
+ return data;
475
+ }
476
+ //#endregion
477
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/fromHex.js
478
+ function assertSize(hexOrBytes, { size: size$1 }) {
479
+ if (size(hexOrBytes) > size$1) throw new SizeOverflowError({
480
+ givenSize: size(hexOrBytes),
481
+ maxSize: size$1
482
+ });
483
+ }
484
+ /**
485
+ * Decodes a hex value into a bigint.
486
+ *
487
+ * - Docs: https://viem.sh/docs/utilities/fromHex#hextobigint
488
+ *
489
+ * @param hex Hex value to decode.
490
+ * @param opts Options.
491
+ * @returns BigInt value.
492
+ *
493
+ * @example
494
+ * import { hexToBigInt } from 'viem'
495
+ * const data = hexToBigInt('0x1a4', { signed: true })
496
+ * // 420n
497
+ *
498
+ * @example
499
+ * import { hexToBigInt } from 'viem'
500
+ * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })
501
+ * // 420n
502
+ */
503
+ function hexToBigInt(hex, opts = {}) {
504
+ const { signed } = opts;
505
+ if (opts.size) assertSize(hex, { size: opts.size });
506
+ const value = BigInt(hex);
507
+ if (!signed) return value;
508
+ const size = (hex.length - 2) / 2;
509
+ if (value <= (1n << BigInt(size) * 8n - 1n) - 1n) return value;
510
+ return value - BigInt(`0x${"f".padStart(size * 2, "f")}`) - 1n;
511
+ }
512
+ /**
513
+ * Decodes a hex value into a boolean.
514
+ *
515
+ * - Docs: https://viem.sh/docs/utilities/fromHex#hextobool
516
+ *
517
+ * @param hex Hex value to decode.
518
+ * @param opts Options.
519
+ * @returns Boolean value.
520
+ *
521
+ * @example
522
+ * import { hexToBool } from 'viem'
523
+ * const data = hexToBool('0x01')
524
+ * // true
525
+ *
526
+ * @example
527
+ * import { hexToBool } from 'viem'
528
+ * const data = hexToBool('0x0000000000000000000000000000000000000000000000000000000000000001', { size: 32 })
529
+ * // true
530
+ */
531
+ function hexToBool(hex_, opts = {}) {
532
+ let hex = hex_;
533
+ if (opts.size) {
534
+ assertSize(hex, { size: opts.size });
535
+ hex = trim(hex);
536
+ }
537
+ if (trim(hex) === "0x00") return false;
538
+ if (trim(hex) === "0x01") return true;
539
+ throw new InvalidHexBooleanError(hex);
540
+ }
541
+ /**
542
+ * Decodes a hex string into a number.
543
+ *
544
+ * - Docs: https://viem.sh/docs/utilities/fromHex#hextonumber
545
+ *
546
+ * @param hex Hex value to decode.
547
+ * @param opts Options.
548
+ * @returns Number value.
549
+ *
550
+ * @example
551
+ * import { hexToNumber } from 'viem'
552
+ * const data = hexToNumber('0x1a4')
553
+ * // 420
554
+ *
555
+ * @example
556
+ * import { hexToNumber } from 'viem'
557
+ * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })
558
+ * // 420
559
+ */
560
+ function hexToNumber(hex, opts = {}) {
561
+ const value = hexToBigInt(hex, opts);
562
+ const number = Number(value);
563
+ if (!Number.isSafeInteger(number)) throw new IntegerOutOfRangeError({
564
+ max: `${Number.MAX_SAFE_INTEGER}`,
565
+ min: `${Number.MIN_SAFE_INTEGER}`,
566
+ signed: opts.signed,
567
+ size: opts.size,
568
+ value: `${value}n`
569
+ });
570
+ return number;
571
+ }
572
+ //#endregion
573
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toHex.js
574
+ const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
575
+ /**
576
+ * Encodes a string, number, bigint, or ByteArray into a hex string
577
+ *
578
+ * - Docs: https://viem.sh/docs/utilities/toHex
579
+ * - Example: https://viem.sh/docs/utilities/toHex#usage
580
+ *
581
+ * @param value Value to encode.
582
+ * @param opts Options.
583
+ * @returns Hex value.
584
+ *
585
+ * @example
586
+ * import { toHex } from 'viem'
587
+ * const data = toHex('Hello world')
588
+ * // '0x48656c6c6f20776f726c6421'
589
+ *
590
+ * @example
591
+ * import { toHex } from 'viem'
592
+ * const data = toHex(420)
593
+ * // '0x1a4'
594
+ *
595
+ * @example
596
+ * import { toHex } from 'viem'
597
+ * const data = toHex('Hello world', { size: 32 })
598
+ * // '0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'
599
+ */
600
+ function toHex(value, opts = {}) {
601
+ if (typeof value === "number" || typeof value === "bigint") return numberToHex(value, opts);
602
+ if (typeof value === "string") return stringToHex(value, opts);
603
+ if (typeof value === "boolean") return boolToHex(value, opts);
604
+ return bytesToHex(value, opts);
605
+ }
606
+ /**
607
+ * Encodes a boolean into a hex string
608
+ *
609
+ * - Docs: https://viem.sh/docs/utilities/toHex#booltohex
610
+ *
611
+ * @param value Value to encode.
612
+ * @param opts Options.
613
+ * @returns Hex value.
614
+ *
615
+ * @example
616
+ * import { boolToHex } from 'viem'
617
+ * const data = boolToHex(true)
618
+ * // '0x1'
619
+ *
620
+ * @example
621
+ * import { boolToHex } from 'viem'
622
+ * const data = boolToHex(false)
623
+ * // '0x0'
624
+ *
625
+ * @example
626
+ * import { boolToHex } from 'viem'
627
+ * const data = boolToHex(true, { size: 32 })
628
+ * // '0x0000000000000000000000000000000000000000000000000000000000000001'
629
+ */
630
+ function boolToHex(value, opts = {}) {
631
+ const hex = `0x${Number(value)}`;
632
+ if (typeof opts.size === "number") {
633
+ assertSize(hex, { size: opts.size });
634
+ return pad(hex, { size: opts.size });
635
+ }
636
+ return hex;
637
+ }
638
+ /**
639
+ * Encodes a bytes array into a hex string
640
+ *
641
+ * - Docs: https://viem.sh/docs/utilities/toHex#bytestohex
642
+ *
643
+ * @param value Value to encode.
644
+ * @param opts Options.
645
+ * @returns Hex value.
646
+ *
647
+ * @example
648
+ * import { bytesToHex } from 'viem'
649
+ * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])
650
+ * // '0x48656c6c6f20576f726c6421'
651
+ *
652
+ * @example
653
+ * import { bytesToHex } from 'viem'
654
+ * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]), { size: 32 })
655
+ * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
656
+ */
657
+ function bytesToHex(value, opts = {}) {
658
+ let string = "";
659
+ for (let i = 0; i < value.length; i++) string += hexes[value[i]];
660
+ const hex = `0x${string}`;
661
+ if (typeof opts.size === "number") {
662
+ assertSize(hex, { size: opts.size });
663
+ return pad(hex, {
664
+ dir: "right",
665
+ size: opts.size
666
+ });
667
+ }
668
+ return hex;
669
+ }
670
+ /**
671
+ * Encodes a number or bigint into a hex string
672
+ *
673
+ * - Docs: https://viem.sh/docs/utilities/toHex#numbertohex
674
+ *
675
+ * @param value Value to encode.
676
+ * @param opts Options.
677
+ * @returns Hex value.
678
+ *
679
+ * @example
680
+ * import { numberToHex } from 'viem'
681
+ * const data = numberToHex(420)
682
+ * // '0x1a4'
683
+ *
684
+ * @example
685
+ * import { numberToHex } from 'viem'
686
+ * const data = numberToHex(420, { size: 32 })
687
+ * // '0x00000000000000000000000000000000000000000000000000000000000001a4'
688
+ */
689
+ function numberToHex(value_, opts = {}) {
690
+ const { signed, size } = opts;
691
+ const value = BigInt(value_);
692
+ let maxValue;
693
+ if (size) if (signed) maxValue = (1n << BigInt(size) * 8n - 1n) - 1n;
694
+ else maxValue = 2n ** (BigInt(size) * 8n) - 1n;
695
+ else if (typeof value_ === "number") maxValue = BigInt(Number.MAX_SAFE_INTEGER);
696
+ const minValue = typeof maxValue === "bigint" && signed ? -maxValue - 1n : 0;
697
+ if (maxValue && value > maxValue || value < minValue) {
698
+ const suffix = typeof value_ === "bigint" ? "n" : "";
699
+ throw new IntegerOutOfRangeError({
700
+ max: maxValue ? `${maxValue}${suffix}` : void 0,
701
+ min: `${minValue}${suffix}`,
702
+ signed,
703
+ size,
704
+ value: `${value_}${suffix}`
705
+ });
706
+ }
707
+ const hex = `0x${(signed && value < 0 ? (1n << BigInt(size * 8)) + BigInt(value) : value).toString(16)}`;
708
+ if (size) return pad(hex, { size });
709
+ return hex;
710
+ }
711
+ const encoder$1 = /* @__PURE__ */ new TextEncoder();
712
+ /**
713
+ * Encodes a UTF-8 string into a hex string
714
+ *
715
+ * - Docs: https://viem.sh/docs/utilities/toHex#stringtohex
716
+ *
717
+ * @param value Value to encode.
718
+ * @param opts Options.
719
+ * @returns Hex value.
720
+ *
721
+ * @example
722
+ * import { stringToHex } from 'viem'
723
+ * const data = stringToHex('Hello World!')
724
+ * // '0x48656c6c6f20576f726c6421'
725
+ *
726
+ * @example
727
+ * import { stringToHex } from 'viem'
728
+ * const data = stringToHex('Hello World!', { size: 32 })
729
+ * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'
730
+ */
731
+ function stringToHex(value_, opts = {}) {
732
+ return bytesToHex(encoder$1.encode(value_), opts);
733
+ }
734
+ //#endregion
735
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toBytes.js
736
+ const encoder = /* @__PURE__ */ new TextEncoder();
737
+ /**
738
+ * Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array.
739
+ *
740
+ * - Docs: https://viem.sh/docs/utilities/toBytes
741
+ * - Example: https://viem.sh/docs/utilities/toBytes#usage
742
+ *
743
+ * @param value Value to encode.
744
+ * @param opts Options.
745
+ * @returns Byte array value.
746
+ *
747
+ * @example
748
+ * import { toBytes } from 'viem'
749
+ * const data = toBytes('Hello world')
750
+ * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])
751
+ *
752
+ * @example
753
+ * import { toBytes } from 'viem'
754
+ * const data = toBytes(420)
755
+ * // Uint8Array([1, 164])
756
+ *
757
+ * @example
758
+ * import { toBytes } from 'viem'
759
+ * const data = toBytes(420, { size: 4 })
760
+ * // Uint8Array([0, 0, 1, 164])
761
+ */
762
+ function toBytes(value, opts = {}) {
763
+ if (typeof value === "number" || typeof value === "bigint") return numberToBytes(value, opts);
764
+ if (typeof value === "boolean") return boolToBytes(value, opts);
765
+ if (isHex(value)) return hexToBytes(value, opts);
766
+ return stringToBytes(value, opts);
767
+ }
768
+ /**
769
+ * Encodes a boolean into a byte array.
770
+ *
771
+ * - Docs: https://viem.sh/docs/utilities/toBytes#booltobytes
772
+ *
773
+ * @param value Boolean value to encode.
774
+ * @param opts Options.
775
+ * @returns Byte array value.
776
+ *
777
+ * @example
778
+ * import { boolToBytes } from 'viem'
779
+ * const data = boolToBytes(true)
780
+ * // Uint8Array([1])
781
+ *
782
+ * @example
783
+ * import { boolToBytes } from 'viem'
784
+ * const data = boolToBytes(true, { size: 32 })
785
+ * // Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
786
+ */
787
+ function boolToBytes(value, opts = {}) {
788
+ const bytes = new Uint8Array(1);
789
+ bytes[0] = Number(value);
790
+ if (typeof opts.size === "number") {
791
+ assertSize(bytes, { size: opts.size });
792
+ return pad(bytes, { size: opts.size });
793
+ }
794
+ return bytes;
795
+ }
796
+ const charCodeMap = {
797
+ zero: 48,
798
+ nine: 57,
799
+ A: 65,
800
+ F: 70,
801
+ a: 97,
802
+ f: 102
803
+ };
804
+ function charCodeToBase16(char) {
805
+ if (char >= charCodeMap.zero && char <= charCodeMap.nine) return char - charCodeMap.zero;
806
+ if (char >= charCodeMap.A && char <= charCodeMap.F) return char - (charCodeMap.A - 10);
807
+ if (char >= charCodeMap.a && char <= charCodeMap.f) return char - (charCodeMap.a - 10);
808
+ }
809
+ /**
810
+ * Encodes a hex string into a byte array.
811
+ *
812
+ * - Docs: https://viem.sh/docs/utilities/toBytes#hextobytes
813
+ *
814
+ * @param hex Hex string to encode.
815
+ * @param opts Options.
816
+ * @returns Byte array value.
817
+ *
818
+ * @example
819
+ * import { hexToBytes } from 'viem'
820
+ * const data = hexToBytes('0x48656c6c6f20776f726c6421')
821
+ * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])
822
+ *
823
+ * @example
824
+ * import { hexToBytes } from 'viem'
825
+ * const data = hexToBytes('0x48656c6c6f20776f726c6421', { size: 32 })
826
+ * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
827
+ */
828
+ function hexToBytes(hex_, opts = {}) {
829
+ let hex = hex_;
830
+ if (opts.size) {
831
+ assertSize(hex, { size: opts.size });
832
+ hex = pad(hex, {
833
+ dir: "right",
834
+ size: opts.size
835
+ });
836
+ }
837
+ let hexString = hex.slice(2);
838
+ if (hexString.length % 2) hexString = `0${hexString}`;
839
+ const length = hexString.length / 2;
840
+ const bytes = new Uint8Array(length);
841
+ for (let index = 0, j = 0; index < length; index++) {
842
+ const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));
843
+ const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));
844
+ if (nibbleLeft === void 0 || nibbleRight === void 0) throw new BaseError(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
845
+ bytes[index] = nibbleLeft * 16 + nibbleRight;
846
+ }
847
+ return bytes;
848
+ }
849
+ /**
850
+ * Encodes a number into a byte array.
851
+ *
852
+ * - Docs: https://viem.sh/docs/utilities/toBytes#numbertobytes
853
+ *
854
+ * @param value Number to encode.
855
+ * @param opts Options.
856
+ * @returns Byte array value.
857
+ *
858
+ * @example
859
+ * import { numberToBytes } from 'viem'
860
+ * const data = numberToBytes(420)
861
+ * // Uint8Array([1, 164])
862
+ *
863
+ * @example
864
+ * import { numberToBytes } from 'viem'
865
+ * const data = numberToBytes(420, { size: 4 })
866
+ * // Uint8Array([0, 0, 1, 164])
867
+ */
868
+ function numberToBytes(value, opts) {
869
+ return hexToBytes(numberToHex(value, opts));
870
+ }
871
+ /**
872
+ * Encodes a UTF-8 string into a byte array.
873
+ *
874
+ * - Docs: https://viem.sh/docs/utilities/toBytes#stringtobytes
875
+ *
876
+ * @param value String to encode.
877
+ * @param opts Options.
878
+ * @returns Byte array value.
879
+ *
880
+ * @example
881
+ * import { stringToBytes } from 'viem'
882
+ * const data = stringToBytes('Hello world!')
883
+ * // Uint8Array([72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33])
884
+ *
885
+ * @example
886
+ * import { stringToBytes } from 'viem'
887
+ * const data = stringToBytes('Hello world!', { size: 32 })
888
+ * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
889
+ */
890
+ function stringToBytes(value, opts = {}) {
891
+ const bytes = encoder.encode(value);
892
+ if (typeof opts.size === "number") {
893
+ assertSize(bytes, { size: opts.size });
894
+ return pad(bytes, {
895
+ dir: "right",
896
+ size: opts.size
897
+ });
898
+ }
899
+ return bytes;
900
+ }
901
+ //#endregion
902
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/keccak256.js
903
+ function keccak256(value, to_) {
904
+ const to = to_ || "hex";
905
+ const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
906
+ if (to === "bytes") return bytes;
907
+ return toHex(bytes);
908
+ }
909
+ //#endregion
910
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/address.js
911
+ var InvalidAddressError = class extends BaseError {
912
+ constructor({ address }) {
913
+ super(`Address "${address}" is invalid.`, {
914
+ metaMessages: ["- Address must be a hex value of 20 bytes (40 hex characters).", "- Address must match its checksum counterpart."],
915
+ name: "InvalidAddressError"
916
+ });
917
+ }
918
+ };
919
+ //#endregion
920
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/lru.js
921
+ /**
922
+ * Map with a LRU (Least recently used) policy.
923
+ *
924
+ * @link https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU
925
+ */
926
+ var LruMap = class extends Map {
927
+ constructor(size) {
928
+ super();
929
+ Object.defineProperty(this, "maxSize", {
930
+ enumerable: true,
931
+ configurable: true,
932
+ writable: true,
933
+ value: void 0
934
+ });
935
+ this.maxSize = size;
936
+ }
937
+ get(key) {
938
+ const value = super.get(key);
939
+ if (super.has(key)) {
940
+ super.delete(key);
941
+ super.set(key, value);
942
+ }
943
+ return value;
944
+ }
945
+ set(key, value) {
946
+ if (super.has(key)) super.delete(key);
947
+ super.set(key, value);
948
+ if (this.maxSize && this.size > this.maxSize) {
949
+ const firstKey = super.keys().next().value;
950
+ if (firstKey !== void 0) super.delete(firstKey);
951
+ }
952
+ return this;
953
+ }
954
+ };
955
+ //#endregion
956
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/getAddress.js
957
+ const checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
958
+ function checksumAddress(address_, chainId) {
959
+ if (checksumAddressCache.has(`${address_}.${chainId}`)) return checksumAddressCache.get(`${address_}.${chainId}`);
960
+ const hexAddress = chainId ? `${chainId}${address_.toLowerCase()}` : address_.substring(2).toLowerCase();
961
+ const hash = keccak256(stringToBytes(hexAddress), "bytes");
962
+ const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split("");
963
+ for (let i = 0; i < 40; i += 2) {
964
+ if (hash[i >> 1] >> 4 >= 8 && address[i]) address[i] = address[i].toUpperCase();
965
+ if ((hash[i >> 1] & 15) >= 8 && address[i + 1]) address[i + 1] = address[i + 1].toUpperCase();
966
+ }
967
+ const result = `0x${address.join("")}`;
968
+ checksumAddressCache.set(`${address_}.${chainId}`, result);
969
+ return result;
970
+ }
971
+ function getAddress(address, chainId) {
972
+ if (!isAddress(address, { strict: false })) throw new InvalidAddressError({ address });
973
+ return checksumAddress(address, chainId);
974
+ }
975
+ //#endregion
976
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/isAddress.js
977
+ const addressRegex = /^0x[a-fA-F0-9]{40}$/;
978
+ /** @internal */
979
+ const isAddressCache = /* @__PURE__ */ new LruMap(8192);
980
+ function isAddress(address, options) {
981
+ const { strict = true } = options ?? {};
982
+ const cacheKey = `${address}.${strict}`;
983
+ if (isAddressCache.has(cacheKey)) return isAddressCache.get(cacheKey);
984
+ const result = (() => {
985
+ if (!addressRegex.test(address)) return false;
986
+ if (address.toLowerCase() === address) return true;
987
+ if (strict) return checksumAddress(address) === address;
988
+ return true;
989
+ })();
990
+ isAddressCache.set(cacheKey, result);
991
+ return result;
992
+ }
993
+ //#endregion
994
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/concat.js
995
+ function concat(values) {
996
+ if (typeof values[0] === "string") return concatHex(values);
997
+ return concatBytes(values);
998
+ }
999
+ function concatBytes(values) {
1000
+ let length = 0;
1001
+ for (const arr of values) length += arr.length;
1002
+ const result = new Uint8Array(length);
1003
+ let offset = 0;
1004
+ for (const arr of values) {
1005
+ result.set(arr, offset);
1006
+ offset += arr.length;
1007
+ }
1008
+ return result;
1009
+ }
1010
+ function concatHex(values) {
1011
+ return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
1012
+ }
1013
+ //#endregion
1014
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/slice.js
1015
+ /**
1016
+ * @description Returns a section of the hex or byte array given a start/end bytes offset.
1017
+ *
1018
+ * @param value The hex or byte array to slice.
1019
+ * @param start The start offset (in bytes).
1020
+ * @param end The end offset (in bytes).
1021
+ */
1022
+ function slice(value, start, end, { strict } = {}) {
1023
+ if (isHex(value, { strict: false })) return sliceHex(value, start, end, { strict });
1024
+ return sliceBytes(value, start, end, { strict });
1025
+ }
1026
+ function assertStartOffset(value, start) {
1027
+ if (typeof start === "number" && start > 0 && start > size(value) - 1) throw new SliceOffsetOutOfBoundsError({
1028
+ offset: start,
1029
+ position: "start",
1030
+ size: size(value)
1031
+ });
1032
+ }
1033
+ function assertEndOffset(value, start, end) {
1034
+ if (typeof start === "number" && typeof end === "number" && size(value) !== end - start) throw new SliceOffsetOutOfBoundsError({
1035
+ offset: end,
1036
+ position: "end",
1037
+ size: size(value)
1038
+ });
1039
+ }
1040
+ /**
1041
+ * @description Returns a section of the byte array given a start/end bytes offset.
1042
+ *
1043
+ * @param value The byte array to slice.
1044
+ * @param start The start offset (in bytes).
1045
+ * @param end The end offset (in bytes).
1046
+ */
1047
+ function sliceBytes(value_, start, end, { strict } = {}) {
1048
+ assertStartOffset(value_, start);
1049
+ const value = value_.slice(start, end);
1050
+ if (strict) assertEndOffset(value, start, end);
1051
+ return value;
1052
+ }
1053
+ /**
1054
+ * @description Returns a section of the hex value given a start/end bytes offset.
1055
+ *
1056
+ * @param value The hex value to slice.
1057
+ * @param start The start offset (in bytes).
1058
+ * @param end The end offset (in bytes).
1059
+ */
1060
+ function sliceHex(value_, start, end, { strict } = {}) {
1061
+ assertStartOffset(value_, start);
1062
+ const value = `0x${value_.replace("0x", "").slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;
1063
+ if (strict) assertEndOffset(value, start, end);
1064
+ return value;
1065
+ }
1066
+ //#endregion
1067
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/regex.js
1068
+ const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
1069
+ const integerRegex = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
1070
+ //#endregion
1071
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
1072
+ /**
1073
+ * @description Encodes a list of primitive values into an ABI-encoded hex value.
1074
+ *
1075
+ * - Docs: https://viem.sh/docs/abi/encodeAbiParameters#encodeabiparameters
1076
+ *
1077
+ * Generates ABI encoded data using the [ABI specification](https://docs.soliditylang.org/en/latest/abi-spec), given a set of ABI parameters (inputs/outputs) and their corresponding values.
1078
+ *
1079
+ * @param params - a set of ABI Parameters (params), that can be in the shape of the inputs or outputs attribute of an ABI Item.
1080
+ * @param values - a set of values (values) that correspond to the given params.
1081
+ * @example
1082
+ * ```typescript
1083
+ * import { encodeAbiParameters } from 'viem'
1084
+ *
1085
+ * const encodedData = encodeAbiParameters(
1086
+ * [
1087
+ * { name: 'x', type: 'string' },
1088
+ * { name: 'y', type: 'uint' },
1089
+ * { name: 'z', type: 'bool' }
1090
+ * ],
1091
+ * ['wagmi', 420n, true]
1092
+ * )
1093
+ * ```
1094
+ *
1095
+ * You can also pass in Human Readable parameters with the parseAbiParameters utility.
1096
+ *
1097
+ * @example
1098
+ * ```typescript
1099
+ * import { encodeAbiParameters, parseAbiParameters } from 'viem'
1100
+ *
1101
+ * const encodedData = encodeAbiParameters(
1102
+ * parseAbiParameters('string x, uint y, bool z'),
1103
+ * ['wagmi', 420n, true]
1104
+ * )
1105
+ * ```
1106
+ */
1107
+ function encodeAbiParameters(params, values) {
1108
+ if (params.length !== values.length) throw new AbiEncodingLengthMismatchError({
1109
+ expectedLength: params.length,
1110
+ givenLength: values.length
1111
+ });
1112
+ const data = encodeParams(prepareParams({
1113
+ params,
1114
+ values
1115
+ }));
1116
+ if (data.length === 0) return "0x";
1117
+ return data;
1118
+ }
1119
+ function prepareParams({ params, values }) {
1120
+ const preparedParams = [];
1121
+ for (let i = 0; i < params.length; i++) preparedParams.push(prepareParam({
1122
+ param: params[i],
1123
+ value: values[i]
1124
+ }));
1125
+ return preparedParams;
1126
+ }
1127
+ function prepareParam({ param, value }) {
1128
+ const arrayComponents = getArrayComponents(param.type);
1129
+ if (arrayComponents) {
1130
+ const [length, type] = arrayComponents;
1131
+ return encodeArray(value, {
1132
+ length,
1133
+ param: {
1134
+ ...param,
1135
+ type
1136
+ }
1137
+ });
1138
+ }
1139
+ if (param.type === "tuple") return encodeTuple(value, { param });
1140
+ if (param.type === "address") return encodeAddress(value);
1141
+ if (param.type === "bool") return encodeBool(value);
1142
+ if (param.type.startsWith("uint") || param.type.startsWith("int")) {
1143
+ const signed = param.type.startsWith("int");
1144
+ const [, , size = "256"] = integerRegex.exec(param.type) ?? [];
1145
+ return encodeNumber(value, {
1146
+ signed,
1147
+ size: Number(size)
1148
+ });
1149
+ }
1150
+ if (param.type.startsWith("bytes")) return encodeBytes(value, { param });
1151
+ if (param.type === "string") return encodeString(value);
1152
+ throw new InvalidAbiEncodingTypeError(param.type, { docsPath: "/docs/contract/encodeAbiParameters" });
1153
+ }
1154
+ function encodeParams(preparedParams) {
1155
+ let staticSize = 0;
1156
+ for (let i = 0; i < preparedParams.length; i++) {
1157
+ const { dynamic, encoded } = preparedParams[i];
1158
+ if (dynamic) staticSize += 32;
1159
+ else staticSize += size(encoded);
1160
+ }
1161
+ const staticParams = [];
1162
+ const dynamicParams = [];
1163
+ let dynamicSize = 0;
1164
+ for (let i = 0; i < preparedParams.length; i++) {
1165
+ const { dynamic, encoded } = preparedParams[i];
1166
+ if (dynamic) {
1167
+ staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));
1168
+ dynamicParams.push(encoded);
1169
+ dynamicSize += size(encoded);
1170
+ } else staticParams.push(encoded);
1171
+ }
1172
+ return concat([...staticParams, ...dynamicParams]);
1173
+ }
1174
+ function encodeAddress(value) {
1175
+ if (!isAddress(value)) throw new InvalidAddressError({ address: value });
1176
+ return {
1177
+ dynamic: false,
1178
+ encoded: padHex(value.toLowerCase())
1179
+ };
1180
+ }
1181
+ function encodeArray(value, { length, param }) {
1182
+ const dynamic = length === null;
1183
+ if (!Array.isArray(value)) throw new InvalidArrayError(value);
1184
+ if (!dynamic && value.length !== length) throw new AbiEncodingArrayLengthMismatchError({
1185
+ expectedLength: length,
1186
+ givenLength: value.length,
1187
+ type: `${param.type}[${length}]`
1188
+ });
1189
+ let dynamicChild = false;
1190
+ const preparedParams = [];
1191
+ for (let i = 0; i < value.length; i++) {
1192
+ const preparedParam = prepareParam({
1193
+ param,
1194
+ value: value[i]
1195
+ });
1196
+ if (preparedParam.dynamic) dynamicChild = true;
1197
+ preparedParams.push(preparedParam);
1198
+ }
1199
+ if (dynamic || dynamicChild) {
1200
+ const data = encodeParams(preparedParams);
1201
+ if (dynamic) {
1202
+ const length = numberToHex(preparedParams.length, { size: 32 });
1203
+ return {
1204
+ dynamic: true,
1205
+ encoded: preparedParams.length > 0 ? concat([length, data]) : length
1206
+ };
1207
+ }
1208
+ if (dynamicChild) return {
1209
+ dynamic: true,
1210
+ encoded: data
1211
+ };
1212
+ }
1213
+ return {
1214
+ dynamic: false,
1215
+ encoded: concat(preparedParams.map(({ encoded }) => encoded))
1216
+ };
1217
+ }
1218
+ function encodeBytes(value, { param }) {
1219
+ const [, paramSize] = param.type.split("bytes");
1220
+ const bytesSize = size(value);
1221
+ if (!paramSize) {
1222
+ let value_ = value;
1223
+ if (bytesSize % 32 !== 0) value_ = padHex(value_, {
1224
+ dir: "right",
1225
+ size: Math.ceil((value.length - 2) / 2 / 32) * 32
1226
+ });
1227
+ return {
1228
+ dynamic: true,
1229
+ encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_])
1230
+ };
1231
+ }
1232
+ if (bytesSize !== Number.parseInt(paramSize, 10)) throw new AbiEncodingBytesSizeMismatchError({
1233
+ expectedSize: Number.parseInt(paramSize, 10),
1234
+ value
1235
+ });
1236
+ return {
1237
+ dynamic: false,
1238
+ encoded: padHex(value, { dir: "right" })
1239
+ };
1240
+ }
1241
+ function encodeBool(value) {
1242
+ if (typeof value !== "boolean") throw new BaseError(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
1243
+ return {
1244
+ dynamic: false,
1245
+ encoded: padHex(boolToHex(value))
1246
+ };
1247
+ }
1248
+ function encodeNumber(value, { signed, size = 256 }) {
1249
+ if (typeof size === "number") {
1250
+ const max = 2n ** (BigInt(size) - (signed ? 1n : 0n)) - 1n;
1251
+ const min = signed ? -max - 1n : 0n;
1252
+ if (value > max || value < min) throw new IntegerOutOfRangeError({
1253
+ max: max.toString(),
1254
+ min: min.toString(),
1255
+ signed,
1256
+ size: size / 8,
1257
+ value: value.toString()
1258
+ });
1259
+ }
1260
+ return {
1261
+ dynamic: false,
1262
+ encoded: numberToHex(value, {
1263
+ size: 32,
1264
+ signed
1265
+ })
1266
+ };
1267
+ }
1268
+ function encodeString(value) {
1269
+ const hexValue = stringToHex(value);
1270
+ const partsLength = Math.ceil(size(hexValue) / 32);
1271
+ const parts = [];
1272
+ for (let i = 0; i < partsLength; i++) parts.push(padHex(slice(hexValue, i * 32, (i + 1) * 32), { dir: "right" }));
1273
+ return {
1274
+ dynamic: true,
1275
+ encoded: concat([padHex(numberToHex(size(hexValue), { size: 32 })), ...parts])
1276
+ };
1277
+ }
1278
+ function encodeTuple(value, { param }) {
1279
+ let dynamic = false;
1280
+ const preparedParams = [];
1281
+ for (let i = 0; i < param.components.length; i++) {
1282
+ const param_ = param.components[i];
1283
+ const preparedParam = prepareParam({
1284
+ param: param_,
1285
+ value: value[Array.isArray(value) ? i : param_.name]
1286
+ });
1287
+ preparedParams.push(preparedParam);
1288
+ if (preparedParam.dynamic) dynamic = true;
1289
+ }
1290
+ return {
1291
+ dynamic,
1292
+ encoded: dynamic ? encodeParams(preparedParams) : concat(preparedParams.map(({ encoded }) => encoded))
1293
+ };
1294
+ }
1295
+ function getArrayComponents(type) {
1296
+ const matches = type.match(/^(.*)\[(\d+)?\]$/);
1297
+ return matches ? [matches[2] ? Number(matches[2]) : null, matches[1]] : void 0;
1298
+ }
1299
+ //#endregion
1300
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/accounts/utils/parseAccount.js
1301
+ function parseAccount(account) {
1302
+ if (typeof account === "string") return {
1303
+ address: account,
1304
+ type: "json-rpc"
1305
+ };
1306
+ return account;
1307
+ }
1308
+ //#endregion
1309
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/cursor.js
1310
+ var NegativeOffsetError = class extends BaseError {
1311
+ constructor({ offset }) {
1312
+ super(`Offset \`${offset}\` cannot be negative.`, { name: "NegativeOffsetError" });
1313
+ }
1314
+ };
1315
+ var PositionOutOfBoundsError = class extends BaseError {
1316
+ constructor({ length, position }) {
1317
+ super(`Position \`${position}\` is out of bounds (\`0 < position < ${length}\`).`, { name: "PositionOutOfBoundsError" });
1318
+ }
1319
+ };
1320
+ var RecursiveReadLimitExceededError = class extends BaseError {
1321
+ constructor({ count, limit }) {
1322
+ super(`Recursive read limit of \`${limit}\` exceeded (recursive read count: \`${count}\`).`, { name: "RecursiveReadLimitExceededError" });
1323
+ }
1324
+ };
1325
+ //#endregion
1326
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/cursor.js
1327
+ const staticCursor = {
1328
+ bytes: new Uint8Array(),
1329
+ dataView: /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(0)),
1330
+ position: 0,
1331
+ positionReadCount: /* @__PURE__ */ new Map(),
1332
+ recursiveReadCount: 0,
1333
+ recursiveReadLimit: Number.POSITIVE_INFINITY,
1334
+ assertReadLimit() {
1335
+ if (this.recursiveReadCount >= this.recursiveReadLimit) throw new RecursiveReadLimitExceededError({
1336
+ count: this.recursiveReadCount + 1,
1337
+ limit: this.recursiveReadLimit
1338
+ });
1339
+ },
1340
+ assertPosition(position) {
1341
+ if (position < 0 || position > this.bytes.length - 1) throw new PositionOutOfBoundsError({
1342
+ length: this.bytes.length,
1343
+ position
1344
+ });
1345
+ },
1346
+ decrementPosition(offset) {
1347
+ if (offset < 0) throw new NegativeOffsetError({ offset });
1348
+ const position = this.position - offset;
1349
+ this.assertPosition(position);
1350
+ this.position = position;
1351
+ },
1352
+ getReadCount(position) {
1353
+ return this.positionReadCount.get(position || this.position) || 0;
1354
+ },
1355
+ incrementPosition(offset) {
1356
+ if (offset < 0) throw new NegativeOffsetError({ offset });
1357
+ const position = this.position + offset;
1358
+ this.assertPosition(position);
1359
+ this.position = position;
1360
+ },
1361
+ inspectByte(position_) {
1362
+ const position = position_ ?? this.position;
1363
+ this.assertPosition(position);
1364
+ return this.bytes[position];
1365
+ },
1366
+ inspectBytes(length, position_) {
1367
+ const position = position_ ?? this.position;
1368
+ this.assertPosition(position + length - 1);
1369
+ return this.bytes.subarray(position, position + length);
1370
+ },
1371
+ inspectUint8(position_) {
1372
+ const position = position_ ?? this.position;
1373
+ this.assertPosition(position);
1374
+ return this.bytes[position];
1375
+ },
1376
+ inspectUint16(position_) {
1377
+ const position = position_ ?? this.position;
1378
+ this.assertPosition(position + 1);
1379
+ return this.dataView.getUint16(position);
1380
+ },
1381
+ inspectUint24(position_) {
1382
+ const position = position_ ?? this.position;
1383
+ this.assertPosition(position + 2);
1384
+ return (this.dataView.getUint16(position) << 8) + this.dataView.getUint8(position + 2);
1385
+ },
1386
+ inspectUint32(position_) {
1387
+ const position = position_ ?? this.position;
1388
+ this.assertPosition(position + 3);
1389
+ return this.dataView.getUint32(position);
1390
+ },
1391
+ pushByte(byte) {
1392
+ this.assertPosition(this.position);
1393
+ this.bytes[this.position] = byte;
1394
+ this.position++;
1395
+ },
1396
+ pushBytes(bytes) {
1397
+ this.assertPosition(this.position + bytes.length - 1);
1398
+ this.bytes.set(bytes, this.position);
1399
+ this.position += bytes.length;
1400
+ },
1401
+ pushUint8(value) {
1402
+ this.assertPosition(this.position);
1403
+ this.bytes[this.position] = value;
1404
+ this.position++;
1405
+ },
1406
+ pushUint16(value) {
1407
+ this.assertPosition(this.position + 1);
1408
+ this.dataView.setUint16(this.position, value);
1409
+ this.position += 2;
1410
+ },
1411
+ pushUint24(value) {
1412
+ this.assertPosition(this.position + 2);
1413
+ this.dataView.setUint16(this.position, value >> 8);
1414
+ this.dataView.setUint8(this.position + 2, value & 255);
1415
+ this.position += 3;
1416
+ },
1417
+ pushUint32(value) {
1418
+ this.assertPosition(this.position + 3);
1419
+ this.dataView.setUint32(this.position, value);
1420
+ this.position += 4;
1421
+ },
1422
+ readByte() {
1423
+ this.assertReadLimit();
1424
+ this._touch();
1425
+ const value = this.inspectByte();
1426
+ this.position++;
1427
+ return value;
1428
+ },
1429
+ readBytes(length, size) {
1430
+ this.assertReadLimit();
1431
+ this._touch();
1432
+ const value = this.inspectBytes(length);
1433
+ this.position += size ?? length;
1434
+ return value;
1435
+ },
1436
+ readUint8() {
1437
+ this.assertReadLimit();
1438
+ this._touch();
1439
+ const value = this.inspectUint8();
1440
+ this.position += 1;
1441
+ return value;
1442
+ },
1443
+ readUint16() {
1444
+ this.assertReadLimit();
1445
+ this._touch();
1446
+ const value = this.inspectUint16();
1447
+ this.position += 2;
1448
+ return value;
1449
+ },
1450
+ readUint24() {
1451
+ this.assertReadLimit();
1452
+ this._touch();
1453
+ const value = this.inspectUint24();
1454
+ this.position += 3;
1455
+ return value;
1456
+ },
1457
+ readUint32() {
1458
+ this.assertReadLimit();
1459
+ this._touch();
1460
+ const value = this.inspectUint32();
1461
+ this.position += 4;
1462
+ return value;
1463
+ },
1464
+ get remaining() {
1465
+ return this.bytes.length - this.position;
1466
+ },
1467
+ setPosition(position) {
1468
+ const oldPosition = this.position;
1469
+ this.assertPosition(position);
1470
+ this.position = position;
1471
+ return () => this.position = oldPosition;
1472
+ },
1473
+ _touch() {
1474
+ if (this.recursiveReadLimit === Number.POSITIVE_INFINITY) return;
1475
+ const count = this.getReadCount();
1476
+ this.positionReadCount.set(this.position, count + 1);
1477
+ if (count > 0) this.recursiveReadCount++;
1478
+ }
1479
+ };
1480
+ function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
1481
+ const cursor = Object.create(staticCursor);
1482
+ cursor.bytes = bytes;
1483
+ cursor.dataView = new DataView(bytes.buffer ?? bytes, bytes.byteOffset, bytes.byteLength);
1484
+ cursor.positionReadCount = /* @__PURE__ */ new Map();
1485
+ cursor.recursiveReadLimit = recursiveReadLimit;
1486
+ return cursor;
1487
+ }
1488
+ //#endregion
1489
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/stringify.js
1490
+ const stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {
1491
+ const value = typeof value_ === "bigint" ? value_.toString() : value_;
1492
+ return typeof replacer === "function" ? replacer(key, value) : value;
1493
+ }, space);
1494
+ //#endregion
1495
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/unit.js
1496
+ const etherUnits = {
1497
+ gwei: 9,
1498
+ wei: 18
1499
+ };
1500
+ const gweiUnits = {
1501
+ ether: -9,
1502
+ wei: 9
1503
+ };
1504
+ //#endregion
1505
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatUnits.js
1506
+ /**
1507
+ * Divides a number by a given exponent of base 10 (10exponent), and formats it into a string representation of the number..
1508
+ *
1509
+ * - Docs: https://viem.sh/docs/utilities/formatUnits
1510
+ *
1511
+ * @example
1512
+ * import { formatUnits } from 'viem'
1513
+ *
1514
+ * formatUnits(420000000000n, 9)
1515
+ * // '420'
1516
+ */
1517
+ function formatUnits(value, decimals) {
1518
+ let display = value.toString();
1519
+ const negative = display.startsWith("-");
1520
+ if (negative) display = display.slice(1);
1521
+ display = display.padStart(decimals, "0");
1522
+ let [integer, fraction] = [display.slice(0, display.length - decimals), display.slice(display.length - decimals)];
1523
+ fraction = fraction.replace(/(0+)$/, "");
1524
+ return `${negative ? "-" : ""}${integer || "0"}${fraction ? `.${fraction}` : ""}`;
1525
+ }
1526
+ //#endregion
1527
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatEther.js
1528
+ /**
1529
+ * Converts numerical wei to a string representation of ether.
1530
+ *
1531
+ * - Docs: https://viem.sh/docs/utilities/formatEther
1532
+ *
1533
+ * @example
1534
+ * import { formatEther } from 'viem'
1535
+ *
1536
+ * formatEther(1000000000000000000n)
1537
+ * // '1'
1538
+ */
1539
+ function formatEther(wei, unit = "wei") {
1540
+ return formatUnits(wei, etherUnits[unit]);
1541
+ }
1542
+ //#endregion
1543
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatGwei.js
1544
+ /**
1545
+ * Converts numerical wei to a string representation of gwei.
1546
+ *
1547
+ * - Docs: https://viem.sh/docs/utilities/formatGwei
1548
+ *
1549
+ * @example
1550
+ * import { formatGwei } from 'viem'
1551
+ *
1552
+ * formatGwei(1000000000n)
1553
+ * // '1'
1554
+ */
1555
+ function formatGwei(wei, unit = "wei") {
1556
+ return formatUnits(wei, gweiUnits[unit]);
1557
+ }
1558
+ //#endregion
1559
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/transaction.js
1560
+ function prettyPrint(args) {
1561
+ const entries = Object.entries(args).map(([key, value]) => {
1562
+ if (value === void 0 || value === false) return null;
1563
+ return [key, value];
1564
+ }).filter(Boolean);
1565
+ const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);
1566
+ return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join("\n");
1567
+ }
1568
+ var InvalidLegacyVError = class extends BaseError {
1569
+ constructor({ v }) {
1570
+ super(`Invalid \`v\` value "${v}". Expected 27 or 28.`, { name: "InvalidLegacyVError" });
1571
+ }
1572
+ };
1573
+ var InvalidSerializableTransactionError = class extends BaseError {
1574
+ constructor({ transaction }) {
1575
+ super("Cannot infer a transaction type from provided transaction.", {
1576
+ metaMessages: [
1577
+ "Provided Transaction:",
1578
+ "{",
1579
+ prettyPrint(transaction),
1580
+ "}",
1581
+ "",
1582
+ "To infer the type, either provide:",
1583
+ "- a `type` to the Transaction, or",
1584
+ "- an EIP-1559 Transaction with `maxFeePerGas`, or",
1585
+ "- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
1586
+ "- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
1587
+ "- an EIP-7702 Transaction with `authorizationList`, or",
1588
+ "- a Legacy Transaction with `gasPrice`"
1589
+ ],
1590
+ name: "InvalidSerializableTransactionError"
1591
+ });
1592
+ }
1593
+ };
1594
+ var InvalidSerializedTransactionTypeError = class extends BaseError {
1595
+ constructor({ serializedType }) {
1596
+ super(`Serialized transaction type "${serializedType}" is invalid.`, { name: "InvalidSerializedTransactionType" });
1597
+ Object.defineProperty(this, "serializedType", {
1598
+ enumerable: true,
1599
+ configurable: true,
1600
+ writable: true,
1601
+ value: void 0
1602
+ });
1603
+ this.serializedType = serializedType;
1604
+ }
1605
+ };
1606
+ var InvalidSerializedTransactionError = class extends BaseError {
1607
+ constructor({ attributes, serializedTransaction, type }) {
1608
+ const missing = Object.entries(attributes).map(([key, value]) => typeof value === "undefined" ? key : void 0).filter(Boolean);
1609
+ super(`Invalid serialized transaction of type "${type}" was provided.`, {
1610
+ metaMessages: [`Serialized Transaction: "${serializedTransaction}"`, missing.length > 0 ? `Missing Attributes: ${missing.join(", ")}` : ""].filter(Boolean),
1611
+ name: "InvalidSerializedTransactionError"
1612
+ });
1613
+ Object.defineProperty(this, "serializedTransaction", {
1614
+ enumerable: true,
1615
+ configurable: true,
1616
+ writable: true,
1617
+ value: void 0
1618
+ });
1619
+ Object.defineProperty(this, "type", {
1620
+ enumerable: true,
1621
+ configurable: true,
1622
+ writable: true,
1623
+ value: void 0
1624
+ });
1625
+ this.serializedTransaction = serializedTransaction;
1626
+ this.type = type;
1627
+ }
1628
+ };
1629
+ var InvalidStorageKeySizeError = class extends BaseError {
1630
+ constructor({ storageKey }) {
1631
+ super(`Size for storage key "${storageKey}" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
1632
+ }
1633
+ };
1634
+ var TransactionExecutionError = class extends BaseError {
1635
+ constructor(cause, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {
1636
+ const prettyArgs = prettyPrint({
1637
+ chain: chain && `${chain?.name} (id: ${chain?.id})`,
1638
+ from: account?.address,
1639
+ to,
1640
+ value: typeof value !== "undefined" && `${formatEther(value)} ${chain?.nativeCurrency?.symbol || "ETH"}`,
1641
+ data,
1642
+ gas,
1643
+ gasPrice: typeof gasPrice !== "undefined" && `${formatGwei(gasPrice)} gwei`,
1644
+ maxFeePerGas: typeof maxFeePerGas !== "undefined" && `${formatGwei(maxFeePerGas)} gwei`,
1645
+ maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== "undefined" && `${formatGwei(maxPriorityFeePerGas)} gwei`,
1646
+ nonce
1647
+ });
1648
+ super(cause.shortMessage, {
1649
+ cause,
1650
+ docsPath,
1651
+ metaMessages: [
1652
+ ...cause.metaMessages ? [...cause.metaMessages, " "] : [],
1653
+ "Request Arguments:",
1654
+ prettyArgs
1655
+ ].filter(Boolean),
1656
+ name: "TransactionExecutionError"
1657
+ });
1658
+ Object.defineProperty(this, "cause", {
1659
+ enumerable: true,
1660
+ configurable: true,
1661
+ writable: true,
1662
+ value: void 0
1663
+ });
1664
+ this.cause = cause;
1665
+ }
1666
+ };
1667
+ var TransactionReceiptRevertedError = class extends BaseError {
1668
+ constructor({ receipt }) {
1669
+ super(`Transaction with hash "${receipt.transactionHash}" reverted.`, {
1670
+ metaMessages: [
1671
+ "The receipt marked the transaction as \"reverted\". This could mean that the function on the contract you are trying to call threw an error.",
1672
+ " ",
1673
+ "You can attempt to extract the revert reason by:",
1674
+ "- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract",
1675
+ "- using the `call` Action with raw `data`"
1676
+ ],
1677
+ name: "TransactionReceiptRevertedError"
1678
+ });
1679
+ Object.defineProperty(this, "receipt", {
1680
+ enumerable: true,
1681
+ configurable: true,
1682
+ writable: true,
1683
+ value: void 0
1684
+ });
1685
+ this.receipt = receipt;
1686
+ }
1687
+ };
1688
+ //#endregion
1689
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/node.js
1690
+ var ExecutionRevertedError = class extends BaseError {
1691
+ constructor({ cause, message } = {}) {
1692
+ const reason = message?.replace("execution reverted: ", "")?.replace("execution reverted", "");
1693
+ super(`Execution reverted ${reason ? `with reason: ${reason}` : "for an unknown reason"}.`, {
1694
+ cause,
1695
+ name: "ExecutionRevertedError"
1696
+ });
1697
+ }
1698
+ };
1699
+ Object.defineProperty(ExecutionRevertedError, "code", {
1700
+ enumerable: true,
1701
+ configurable: true,
1702
+ writable: true,
1703
+ value: 3
1704
+ });
1705
+ Object.defineProperty(ExecutionRevertedError, "nodeMessage", {
1706
+ enumerable: true,
1707
+ configurable: true,
1708
+ writable: true,
1709
+ value: /execution reverted|gas required exceeds allowance/
1710
+ });
1711
+ var FeeCapTooHighError = class extends BaseError {
1712
+ constructor({ cause, maxFeePerGas } = {}) {
1713
+ super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ""}) cannot be higher than the maximum allowed value (2^256-1).`, {
1714
+ cause,
1715
+ name: "FeeCapTooHighError"
1716
+ });
1717
+ }
1718
+ };
1719
+ Object.defineProperty(FeeCapTooHighError, "nodeMessage", {
1720
+ enumerable: true,
1721
+ configurable: true,
1722
+ writable: true,
1723
+ value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/
1724
+ });
1725
+ var FeeCapTooLowError = class extends BaseError {
1726
+ constructor({ cause, maxFeePerGas } = {}) {
1727
+ super(`The fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ""} gwei) cannot be lower than the block base fee.`, {
1728
+ cause,
1729
+ name: "FeeCapTooLowError"
1730
+ });
1731
+ }
1732
+ };
1733
+ Object.defineProperty(FeeCapTooLowError, "nodeMessage", {
1734
+ enumerable: true,
1735
+ configurable: true,
1736
+ writable: true,
1737
+ value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/
1738
+ });
1739
+ var NonceTooHighError = class extends BaseError {
1740
+ constructor({ cause, nonce } = {}) {
1741
+ super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}is higher than the next one expected.`, {
1742
+ cause,
1743
+ name: "NonceTooHighError"
1744
+ });
1745
+ }
1746
+ };
1747
+ Object.defineProperty(NonceTooHighError, "nodeMessage", {
1748
+ enumerable: true,
1749
+ configurable: true,
1750
+ writable: true,
1751
+ value: /nonce too high/
1752
+ });
1753
+ var NonceTooLowError = class extends BaseError {
1754
+ constructor({ cause, nonce } = {}) {
1755
+ super([`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}is lower than the current nonce of the account.`, "Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"), {
1756
+ cause,
1757
+ name: "NonceTooLowError"
1758
+ });
1759
+ }
1760
+ };
1761
+ Object.defineProperty(NonceTooLowError, "nodeMessage", {
1762
+ enumerable: true,
1763
+ configurable: true,
1764
+ writable: true,
1765
+ value: /nonce too low|transaction already imported|already known/
1766
+ });
1767
+ var NonceMaxValueError = class extends BaseError {
1768
+ constructor({ cause, nonce } = {}) {
1769
+ super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ""}exceeds the maximum allowed nonce.`, {
1770
+ cause,
1771
+ name: "NonceMaxValueError"
1772
+ });
1773
+ }
1774
+ };
1775
+ Object.defineProperty(NonceMaxValueError, "nodeMessage", {
1776
+ enumerable: true,
1777
+ configurable: true,
1778
+ writable: true,
1779
+ value: /nonce has max value/
1780
+ });
1781
+ var InsufficientFundsError = class extends BaseError {
1782
+ constructor({ cause } = {}) {
1783
+ super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"), {
1784
+ cause,
1785
+ metaMessages: [
1786
+ "This error could arise when the account does not have enough funds to:",
1787
+ " - pay for the total gas fee,",
1788
+ " - pay for the value to send.",
1789
+ " ",
1790
+ "The cost of the transaction is calculated as `gas * gas fee + value`, where:",
1791
+ " - `gas` is the amount of gas needed for transaction to execute,",
1792
+ " - `gas fee` is the gas fee,",
1793
+ " - `value` is the amount of ether to send to the recipient."
1794
+ ],
1795
+ name: "InsufficientFundsError"
1796
+ });
1797
+ }
1798
+ };
1799
+ Object.defineProperty(InsufficientFundsError, "nodeMessage", {
1800
+ enumerable: true,
1801
+ configurable: true,
1802
+ writable: true,
1803
+ value: /insufficient funds|exceeds transaction sender account balance/
1804
+ });
1805
+ var IntrinsicGasTooHighError = class extends BaseError {
1806
+ constructor({ cause, gas } = {}) {
1807
+ super(`The amount of gas ${gas ? `(${gas}) ` : ""}provided for the transaction exceeds the limit allowed for the block.`, {
1808
+ cause,
1809
+ name: "IntrinsicGasTooHighError"
1810
+ });
1811
+ }
1812
+ };
1813
+ Object.defineProperty(IntrinsicGasTooHighError, "nodeMessage", {
1814
+ enumerable: true,
1815
+ configurable: true,
1816
+ writable: true,
1817
+ value: /intrinsic gas too high|gas limit reached/
1818
+ });
1819
+ var IntrinsicGasTooLowError = class extends BaseError {
1820
+ constructor({ cause, gas } = {}) {
1821
+ super(`The amount of gas ${gas ? `(${gas}) ` : ""}provided for the transaction is too low.`, {
1822
+ cause,
1823
+ name: "IntrinsicGasTooLowError"
1824
+ });
1825
+ }
1826
+ };
1827
+ Object.defineProperty(IntrinsicGasTooLowError, "nodeMessage", {
1828
+ enumerable: true,
1829
+ configurable: true,
1830
+ writable: true,
1831
+ value: /intrinsic gas too low/
1832
+ });
1833
+ var TransactionTypeNotSupportedError = class extends BaseError {
1834
+ constructor({ cause }) {
1835
+ super("The transaction type is not supported for this chain.", {
1836
+ cause,
1837
+ name: "TransactionTypeNotSupportedError"
1838
+ });
1839
+ }
1840
+ };
1841
+ Object.defineProperty(TransactionTypeNotSupportedError, "nodeMessage", {
1842
+ enumerable: true,
1843
+ configurable: true,
1844
+ writable: true,
1845
+ value: /transaction type not valid/
1846
+ });
1847
+ var TipAboveFeeCapError = class extends BaseError {
1848
+ constructor({ cause, maxPriorityFeePerGas, maxFeePerGas } = {}) {
1849
+ super([`The provided tip (\`maxPriorityFeePerGas\`${maxPriorityFeePerGas ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei` : ""}) cannot be higher than the fee cap (\`maxFeePerGas\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ""}).`].join("\n"), {
1850
+ cause,
1851
+ name: "TipAboveFeeCapError"
1852
+ });
1853
+ }
1854
+ };
1855
+ Object.defineProperty(TipAboveFeeCapError, "nodeMessage", {
1856
+ enumerable: true,
1857
+ configurable: true,
1858
+ writable: true,
1859
+ value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
1860
+ });
1861
+ var UnknownNodeError = class extends BaseError {
1862
+ constructor({ cause }) {
1863
+ super(`An error occurred while executing: ${cause?.shortMessage}`, {
1864
+ cause,
1865
+ name: "UnknownNodeError"
1866
+ });
1867
+ }
1868
+ };
1869
+ 2n ** (8n - 1n) - 1n;
1870
+ 2n ** (16n - 1n) - 1n;
1871
+ 2n ** (24n - 1n) - 1n;
1872
+ 2n ** (32n - 1n) - 1n;
1873
+ 2n ** (40n - 1n) - 1n;
1874
+ 2n ** (48n - 1n) - 1n;
1875
+ 2n ** (56n - 1n) - 1n;
1876
+ 2n ** (64n - 1n) - 1n;
1877
+ 2n ** (72n - 1n) - 1n;
1878
+ 2n ** (80n - 1n) - 1n;
1879
+ 2n ** (88n - 1n) - 1n;
1880
+ 2n ** (96n - 1n) - 1n;
1881
+ 2n ** (104n - 1n) - 1n;
1882
+ 2n ** (112n - 1n) - 1n;
1883
+ 2n ** (120n - 1n) - 1n;
1884
+ 2n ** (128n - 1n) - 1n;
1885
+ 2n ** (136n - 1n) - 1n;
1886
+ 2n ** (144n - 1n) - 1n;
1887
+ 2n ** (152n - 1n) - 1n;
1888
+ 2n ** (160n - 1n) - 1n;
1889
+ 2n ** (168n - 1n) - 1n;
1890
+ 2n ** (176n - 1n) - 1n;
1891
+ 2n ** (184n - 1n) - 1n;
1892
+ 2n ** (192n - 1n) - 1n;
1893
+ 2n ** (200n - 1n) - 1n;
1894
+ 2n ** (208n - 1n) - 1n;
1895
+ 2n ** (216n - 1n) - 1n;
1896
+ 2n ** (224n - 1n) - 1n;
1897
+ 2n ** (232n - 1n) - 1n;
1898
+ 2n ** (240n - 1n) - 1n;
1899
+ 2n ** (248n - 1n) - 1n;
1900
+ 2n ** (256n - 1n) - 1n;
1901
+ -(2n ** (8n - 1n));
1902
+ -(2n ** (16n - 1n));
1903
+ -(2n ** (24n - 1n));
1904
+ -(2n ** (32n - 1n));
1905
+ -(2n ** (40n - 1n));
1906
+ -(2n ** (48n - 1n));
1907
+ -(2n ** (56n - 1n));
1908
+ -(2n ** (64n - 1n));
1909
+ -(2n ** (72n - 1n));
1910
+ -(2n ** (80n - 1n));
1911
+ -(2n ** (88n - 1n));
1912
+ -(2n ** (96n - 1n));
1913
+ -(2n ** (104n - 1n));
1914
+ -(2n ** (112n - 1n));
1915
+ -(2n ** (120n - 1n));
1916
+ -(2n ** (128n - 1n));
1917
+ -(2n ** (136n - 1n));
1918
+ -(2n ** (144n - 1n));
1919
+ -(2n ** (152n - 1n));
1920
+ -(2n ** (160n - 1n));
1921
+ -(2n ** (168n - 1n));
1922
+ -(2n ** (176n - 1n));
1923
+ -(2n ** (184n - 1n));
1924
+ -(2n ** (192n - 1n));
1925
+ -(2n ** (200n - 1n));
1926
+ -(2n ** (208n - 1n));
1927
+ -(2n ** (216n - 1n));
1928
+ -(2n ** (224n - 1n));
1929
+ -(2n ** (232n - 1n));
1930
+ -(2n ** (240n - 1n));
1931
+ -(2n ** (248n - 1n));
1932
+ -(2n ** (256n - 1n));
1933
+ const maxUint256 = 2n ** 256n - 1n;
1934
+ //#endregion
1935
+ //#region node_modules/.pnpm/viem@2.47.6_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/chain.js
1936
+ var ChainDoesNotSupportContract = class extends BaseError {
1937
+ constructor({ blockNumber, chain, contract }) {
1938
+ super(`Chain "${chain.name}" does not support contract "${contract.name}".`, {
1939
+ metaMessages: ["This could be due to any of the following:", ...blockNumber && contract.blockCreated && contract.blockCreated > blockNumber ? [`- The contract "${contract.name}" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`] : [`- The chain does not have the contract "${contract.name}" configured.`]],
1940
+ name: "ChainDoesNotSupportContract"
1941
+ });
1942
+ }
1943
+ };
1944
+ var ChainMismatchError = class extends BaseError {
1945
+ constructor({ chain, currentChainId }) {
1946
+ super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain.id} – ${chain.name}).`, {
1947
+ metaMessages: [`Current Chain ID: ${currentChainId}`, `Expected Chain ID: ${chain.id} – ${chain.name}`],
1948
+ name: "ChainMismatchError"
1949
+ });
1950
+ }
1951
+ };
1952
+ var ChainNotFoundError = class extends BaseError {
1953
+ constructor() {
1954
+ super(["No chain was provided to the request.", "Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n"), { name: "ChainNotFoundError" });
1955
+ }
1956
+ };
1957
+ var ClientChainNotConfiguredError = class extends BaseError {
1958
+ constructor() {
1959
+ super("No chain was provided to the Client.", { name: "ClientChainNotConfiguredError" });
1960
+ }
1961
+ };
1962
+ var InvalidChainIdError = class extends BaseError {
1963
+ constructor({ chainId }) {
1964
+ super(typeof chainId === "number" ? `Chain ID "${chainId}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
1965
+ }
1966
+ };
1967
+ //#endregion
1968
+ export { toHex as $, createCursor as A, formatAbiItem as At, concat as B, InvalidStorageKeySizeError as C, DecodeLogDataMismatch as Ct, formatGwei as D, BaseError as Dt, prettyPrint as E, InvalidArrayError as Et, bytesRegex as F, LruMap as G, isAddress as H, integerRegex as I, hexToBytes as J, InvalidAddressError as K, slice as L, parseAccount as M, encodeAbiParameters as N, formatEther as O, size as Ot, getArrayComponents as P, stringToHex as Q, sliceBytes as R, InvalidSerializedTransactionTypeError as S, BytesSizeMismatchError as St, TransactionReceiptRevertedError as T, InvalidAbiDecodingTypeError as Tt, checksumAddress as U, concatHex as V, getAddress as W, bytesToHex as X, toBytes as Y, numberToHex as Z, TransactionTypeNotSupportedError as _, AbiEventSignatureNotFoundError as _t, InvalidChainIdError as a, InvalidBytesBooleanError as at, InvalidSerializableTransactionError as b, AbiFunctionSignatureNotFoundError as bt, FeeCapTooHighError as c, InvalidBytesLengthError as ct, IntrinsicGasTooHighError as d, AbiDecodingDataSizeTooSmallError as dt, assertSize as et, IntrinsicGasTooLowError as f, AbiDecodingZeroDataError as ft, TipAboveFeeCapError as g, AbiEventSignatureEmptyTopicsError as gt, NonceTooLowError as h, AbiErrorSignatureNotFoundError as ht, ClientChainNotConfiguredError as i, trim as it, PositionOutOfBoundsError as j, stringify as k, isHex as kt, FeeCapTooLowError as l, AbiConstructorNotFoundError as lt, NonceTooHighError as m, AbiErrorNotFoundError as mt, ChainMismatchError as n, hexToBool as nt, maxUint256 as o, InvalidHexValueError as ot, NonceMaxValueError as p, AbiErrorInputsNotFoundError as pt, keccak256 as q, ChainNotFoundError as r, hexToNumber as rt, ExecutionRevertedError as s, padHex as st, ChainDoesNotSupportContract as t, hexToBigInt as tt, InsufficientFundsError as u, AbiConstructorParamsNotFoundError as ut, UnknownNodeError as v, AbiFunctionNotFoundError as vt, TransactionExecutionError as w, DecodeLogTopicsMismatch as wt, InvalidSerializedTransactionError as x, AbiItemAmbiguityError as xt, InvalidLegacyVError as y, AbiFunctionOutputsNotFoundError as yt, sliceHex as z };