@namehash/namehash-ui 1.13.1 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/index.cjs +548 -164
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +720 -23
- package/dist/index.d.ts +720 -23
- package/dist/index.js +543 -150
- package/dist/index.js.map +1 -1
- package/package.json +10 -9
package/dist/index.js
CHANGED
|
@@ -3,16 +3,16 @@ var __esm = (fn, res) => function __init() {
|
|
|
3
3
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
4
4
|
};
|
|
5
5
|
|
|
6
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
6
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/version.js
|
|
7
7
|
var version;
|
|
8
8
|
var init_version = __esm({
|
|
9
|
-
"../../node_modules/.pnpm/viem@2.
|
|
9
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/version.js"() {
|
|
10
10
|
"use strict";
|
|
11
|
-
version = "2.
|
|
11
|
+
version = "2.50.3";
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
15
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/base.js
|
|
16
16
|
function walk(err, fn) {
|
|
17
17
|
if (fn?.(err))
|
|
18
18
|
return err;
|
|
@@ -22,7 +22,7 @@ function walk(err, fn) {
|
|
|
22
22
|
}
|
|
23
23
|
var errorConfig, BaseError;
|
|
24
24
|
var init_base = __esm({
|
|
25
|
-
"../../node_modules/.pnpm/viem@2.
|
|
25
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/base.js"() {
|
|
26
26
|
"use strict";
|
|
27
27
|
init_version();
|
|
28
28
|
errorConfig = {
|
|
@@ -103,10 +103,10 @@ var init_base = __esm({
|
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
106
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/encoding.js
|
|
107
107
|
var IntegerOutOfRangeError, SizeOverflowError;
|
|
108
108
|
var init_encoding = __esm({
|
|
109
|
-
"../../node_modules/.pnpm/viem@2.
|
|
109
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/encoding.js"() {
|
|
110
110
|
"use strict";
|
|
111
111
|
init_base();
|
|
112
112
|
IntegerOutOfRangeError = class extends BaseError {
|
|
@@ -122,7 +122,7 @@ var init_encoding = __esm({
|
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
|
|
125
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
125
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/isHex.js
|
|
126
126
|
function isHex(value, { strict = true } = {}) {
|
|
127
127
|
if (!value)
|
|
128
128
|
return false;
|
|
@@ -131,25 +131,25 @@ function isHex(value, { strict = true } = {}) {
|
|
|
131
131
|
return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
|
|
132
132
|
}
|
|
133
133
|
var init_isHex = __esm({
|
|
134
|
-
"../../node_modules/.pnpm/viem@2.
|
|
134
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/isHex.js"() {
|
|
135
135
|
"use strict";
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
|
|
139
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
139
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/size.js
|
|
140
140
|
function size(value) {
|
|
141
141
|
if (isHex(value, { strict: false }))
|
|
142
142
|
return Math.ceil((value.length - 2) / 2);
|
|
143
143
|
return value.length;
|
|
144
144
|
}
|
|
145
145
|
var init_size = __esm({
|
|
146
|
-
"../../node_modules/.pnpm/viem@2.
|
|
146
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/size.js"() {
|
|
147
147
|
"use strict";
|
|
148
148
|
init_isHex();
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
152
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/trim.js
|
|
153
153
|
function trim(hexOrBytes, { dir = "left" } = {}) {
|
|
154
154
|
let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
|
|
155
155
|
let sliceLength = 0;
|
|
@@ -168,15 +168,15 @@ function trim(hexOrBytes, { dir = "left" } = {}) {
|
|
|
168
168
|
return data;
|
|
169
169
|
}
|
|
170
170
|
var init_trim = __esm({
|
|
171
|
-
"../../node_modules/.pnpm/viem@2.
|
|
171
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/trim.js"() {
|
|
172
172
|
"use strict";
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
|
|
176
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
176
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/data.js
|
|
177
177
|
var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError;
|
|
178
178
|
var init_data = __esm({
|
|
179
|
-
"../../node_modules/.pnpm/viem@2.
|
|
179
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/data.js"() {
|
|
180
180
|
"use strict";
|
|
181
181
|
init_base();
|
|
182
182
|
SliceOffsetOutOfBoundsError = class extends BaseError {
|
|
@@ -192,7 +192,7 @@ var init_data = __esm({
|
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
194
|
|
|
195
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
195
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/pad.js
|
|
196
196
|
function pad(hexOrBytes, { dir, size: size2 = 32 } = {}) {
|
|
197
197
|
if (typeof hexOrBytes === "string")
|
|
198
198
|
return padHex(hexOrBytes, { dir, size: size2 });
|
|
@@ -227,13 +227,13 @@ function padBytes(bytes, { dir, size: size2 = 32 } = {}) {
|
|
|
227
227
|
return paddedBytes;
|
|
228
228
|
}
|
|
229
229
|
var init_pad = __esm({
|
|
230
|
-
"../../node_modules/.pnpm/viem@2.
|
|
230
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/pad.js"() {
|
|
231
231
|
"use strict";
|
|
232
232
|
init_data();
|
|
233
233
|
}
|
|
234
234
|
});
|
|
235
235
|
|
|
236
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
236
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toHex.js
|
|
237
237
|
function toHex(value, opts = {}) {
|
|
238
238
|
if (typeof value === "number" || typeof value === "bigint")
|
|
239
239
|
return numberToHex(value, opts);
|
|
@@ -298,7 +298,7 @@ function stringToHex(value_, opts = {}) {
|
|
|
298
298
|
}
|
|
299
299
|
var hexes, encoder;
|
|
300
300
|
var init_toHex = __esm({
|
|
301
|
-
"../../node_modules/.pnpm/viem@2.
|
|
301
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toHex.js"() {
|
|
302
302
|
"use strict";
|
|
303
303
|
init_encoding();
|
|
304
304
|
init_pad();
|
|
@@ -308,7 +308,7 @@ var init_toHex = __esm({
|
|
|
308
308
|
}
|
|
309
309
|
});
|
|
310
310
|
|
|
311
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
311
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toBytes.js
|
|
312
312
|
function toBytes(value, opts = {}) {
|
|
313
313
|
if (typeof value === "number" || typeof value === "bigint")
|
|
314
314
|
return numberToBytes(value, opts);
|
|
@@ -371,7 +371,7 @@ function stringToBytes(value, opts = {}) {
|
|
|
371
371
|
}
|
|
372
372
|
var encoder2, charCodeMap;
|
|
373
373
|
var init_toBytes = __esm({
|
|
374
|
-
"../../node_modules/.pnpm/viem@2.
|
|
374
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toBytes.js"() {
|
|
375
375
|
"use strict";
|
|
376
376
|
init_base();
|
|
377
377
|
init_isHex();
|
|
@@ -390,7 +390,7 @@ var init_toBytes = __esm({
|
|
|
390
390
|
}
|
|
391
391
|
});
|
|
392
392
|
|
|
393
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
393
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/fromHex.js
|
|
394
394
|
function assertSize(hexOrBytes, { size: size2 }) {
|
|
395
395
|
if (size(hexOrBytes) > size2)
|
|
396
396
|
throw new SizeOverflowError({
|
|
@@ -412,17 +412,27 @@ function hexToBigInt(hex, opts = {}) {
|
|
|
412
412
|
return value - BigInt(`0x${"f".padStart(size2 * 2, "f")}`) - 1n;
|
|
413
413
|
}
|
|
414
414
|
function hexToNumber(hex, opts = {}) {
|
|
415
|
-
|
|
415
|
+
const value = hexToBigInt(hex, opts);
|
|
416
|
+
const number = Number(value);
|
|
417
|
+
if (!Number.isSafeInteger(number))
|
|
418
|
+
throw new IntegerOutOfRangeError({
|
|
419
|
+
max: `${Number.MAX_SAFE_INTEGER}`,
|
|
420
|
+
min: `${Number.MIN_SAFE_INTEGER}`,
|
|
421
|
+
signed: opts.signed,
|
|
422
|
+
size: opts.size,
|
|
423
|
+
value: `${value}n`
|
|
424
|
+
});
|
|
425
|
+
return number;
|
|
416
426
|
}
|
|
417
427
|
var init_fromHex = __esm({
|
|
418
|
-
"../../node_modules/.pnpm/viem@2.
|
|
428
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/fromHex.js"() {
|
|
419
429
|
"use strict";
|
|
420
430
|
init_encoding();
|
|
421
431
|
init_size();
|
|
422
432
|
}
|
|
423
433
|
});
|
|
424
434
|
|
|
425
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
435
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/formatter.js
|
|
426
436
|
function defineFormatter(type, format) {
|
|
427
437
|
return ({ exclude, format: overrides }) => {
|
|
428
438
|
return {
|
|
@@ -444,12 +454,12 @@ function defineFormatter(type, format) {
|
|
|
444
454
|
};
|
|
445
455
|
}
|
|
446
456
|
var init_formatter = __esm({
|
|
447
|
-
"../../node_modules/.pnpm/viem@2.
|
|
457
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/formatter.js"() {
|
|
448
458
|
"use strict";
|
|
449
459
|
}
|
|
450
460
|
});
|
|
451
461
|
|
|
452
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
462
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/transactionRequest.js
|
|
453
463
|
function formatTransactionRequest(request, _) {
|
|
454
464
|
const rpcRequest = {};
|
|
455
465
|
if (typeof request.authorizationList !== "undefined")
|
|
@@ -503,7 +513,7 @@ function formatAuthorizationList2(authorizationList) {
|
|
|
503
513
|
}
|
|
504
514
|
var rpcTransactionType;
|
|
505
515
|
var init_transactionRequest = __esm({
|
|
506
|
-
"../../node_modules/.pnpm/viem@2.
|
|
516
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/transactionRequest.js"() {
|
|
507
517
|
"use strict";
|
|
508
518
|
init_toHex();
|
|
509
519
|
rpcTransactionType = {
|
|
@@ -516,10 +526,10 @@ var init_transactionRequest = __esm({
|
|
|
516
526
|
}
|
|
517
527
|
});
|
|
518
528
|
|
|
519
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
529
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/number.js
|
|
520
530
|
var maxInt8, maxInt16, maxInt24, maxInt32, maxInt40, maxInt48, maxInt56, maxInt64, maxInt72, maxInt80, maxInt88, maxInt96, maxInt104, maxInt112, maxInt120, maxInt128, maxInt136, maxInt144, maxInt152, maxInt160, maxInt168, maxInt176, maxInt184, maxInt192, maxInt200, maxInt208, maxInt216, maxInt224, maxInt232, maxInt240, maxInt248, maxInt256, minInt8, minInt16, minInt24, minInt32, minInt40, minInt48, minInt56, minInt64, minInt72, minInt80, minInt88, minInt96, minInt104, minInt112, minInt120, minInt128, minInt136, minInt144, minInt152, minInt160, minInt168, minInt176, minInt184, minInt192, minInt200, minInt208, minInt216, minInt224, minInt232, minInt240, minInt248, minInt256, maxUint8, maxUint16, maxUint24, maxUint32, maxUint40, maxUint48, maxUint56, maxUint64, maxUint72, maxUint80, maxUint88, maxUint96, maxUint104, maxUint112, maxUint120, maxUint128, maxUint136, maxUint144, maxUint152, maxUint160, maxUint168, maxUint176, maxUint184, maxUint192, maxUint200, maxUint208, maxUint216, maxUint224, maxUint232, maxUint240, maxUint248, maxUint256;
|
|
521
531
|
var init_number = __esm({
|
|
522
|
-
"../../node_modules/.pnpm/viem@2.
|
|
532
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/number.js"() {
|
|
523
533
|
"use strict";
|
|
524
534
|
maxInt8 = 2n ** (8n - 1n) - 1n;
|
|
525
535
|
maxInt16 = 2n ** (16n - 1n) - 1n;
|
|
@@ -620,20 +630,20 @@ var init_number = __esm({
|
|
|
620
630
|
}
|
|
621
631
|
});
|
|
622
632
|
|
|
623
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
633
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/concat.js
|
|
624
634
|
function concatHex(values) {
|
|
625
635
|
return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
|
626
636
|
}
|
|
627
637
|
var init_concat = __esm({
|
|
628
|
-
"../../node_modules/.pnpm/viem@2.
|
|
638
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/concat.js"() {
|
|
629
639
|
"use strict";
|
|
630
640
|
}
|
|
631
641
|
});
|
|
632
642
|
|
|
633
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
643
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/cursor.js
|
|
634
644
|
var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;
|
|
635
645
|
var init_cursor = __esm({
|
|
636
|
-
"../../node_modules/.pnpm/viem@2.
|
|
646
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/cursor.js"() {
|
|
637
647
|
"use strict";
|
|
638
648
|
init_base();
|
|
639
649
|
NegativeOffsetError = class extends BaseError {
|
|
@@ -656,18 +666,18 @@ var init_cursor = __esm({
|
|
|
656
666
|
}
|
|
657
667
|
});
|
|
658
668
|
|
|
659
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
669
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/cursor.js
|
|
660
670
|
function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
|
661
671
|
const cursor = Object.create(staticCursor);
|
|
662
672
|
cursor.bytes = bytes;
|
|
663
|
-
cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
673
|
+
cursor.dataView = new DataView(bytes.buffer ?? bytes, bytes.byteOffset, bytes.byteLength);
|
|
664
674
|
cursor.positionReadCount = /* @__PURE__ */ new Map();
|
|
665
675
|
cursor.recursiveReadLimit = recursiveReadLimit;
|
|
666
676
|
return cursor;
|
|
667
677
|
}
|
|
668
678
|
var staticCursor;
|
|
669
679
|
var init_cursor2 = __esm({
|
|
670
|
-
"../../node_modules/.pnpm/viem@2.
|
|
680
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/cursor.js"() {
|
|
671
681
|
"use strict";
|
|
672
682
|
init_cursor();
|
|
673
683
|
staticCursor = {
|
|
@@ -832,10 +842,10 @@ var init_cursor2 = __esm({
|
|
|
832
842
|
}
|
|
833
843
|
});
|
|
834
844
|
|
|
835
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
845
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/unit.js
|
|
836
846
|
var etherUnits, gweiUnits;
|
|
837
847
|
var init_unit = __esm({
|
|
838
|
-
"../../node_modules/.pnpm/viem@2.
|
|
848
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/unit.js"() {
|
|
839
849
|
"use strict";
|
|
840
850
|
etherUnits = {
|
|
841
851
|
gwei: 9,
|
|
@@ -848,7 +858,7 @@ var init_unit = __esm({
|
|
|
848
858
|
}
|
|
849
859
|
});
|
|
850
860
|
|
|
851
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
861
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatUnits.js
|
|
852
862
|
function formatUnits(value, decimals) {
|
|
853
863
|
let display = value.toString();
|
|
854
864
|
const negative = display.startsWith("-");
|
|
@@ -863,36 +873,36 @@ function formatUnits(value, decimals) {
|
|
|
863
873
|
return `${negative ? "-" : ""}${integer || "0"}${fraction ? `.${fraction}` : ""}`;
|
|
864
874
|
}
|
|
865
875
|
var init_formatUnits = __esm({
|
|
866
|
-
"../../node_modules/.pnpm/viem@2.
|
|
876
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatUnits.js"() {
|
|
867
877
|
"use strict";
|
|
868
878
|
}
|
|
869
879
|
});
|
|
870
880
|
|
|
871
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
881
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatEther.js
|
|
872
882
|
function formatEther(wei, unit = "wei") {
|
|
873
883
|
return formatUnits(wei, etherUnits[unit]);
|
|
874
884
|
}
|
|
875
885
|
var init_formatEther = __esm({
|
|
876
|
-
"../../node_modules/.pnpm/viem@2.
|
|
886
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatEther.js"() {
|
|
877
887
|
"use strict";
|
|
878
888
|
init_unit();
|
|
879
889
|
init_formatUnits();
|
|
880
890
|
}
|
|
881
891
|
});
|
|
882
892
|
|
|
883
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
893
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatGwei.js
|
|
884
894
|
function formatGwei(wei, unit = "wei") {
|
|
885
895
|
return formatUnits(wei, gweiUnits[unit]);
|
|
886
896
|
}
|
|
887
897
|
var init_formatGwei = __esm({
|
|
888
|
-
"../../node_modules/.pnpm/viem@2.
|
|
898
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatGwei.js"() {
|
|
889
899
|
"use strict";
|
|
890
900
|
init_unit();
|
|
891
901
|
init_formatUnits();
|
|
892
902
|
}
|
|
893
903
|
});
|
|
894
904
|
|
|
895
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
905
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/transaction.js
|
|
896
906
|
function prettyPrint(args) {
|
|
897
907
|
const entries = Object.entries(args).map(([key, value]) => {
|
|
898
908
|
if (value === void 0 || value === false)
|
|
@@ -902,19 +912,11 @@ function prettyPrint(args) {
|
|
|
902
912
|
const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);
|
|
903
913
|
return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join("\n");
|
|
904
914
|
}
|
|
905
|
-
var
|
|
915
|
+
var InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError;
|
|
906
916
|
var init_transaction = __esm({
|
|
907
|
-
"../../node_modules/.pnpm/viem@2.
|
|
917
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/transaction.js"() {
|
|
908
918
|
"use strict";
|
|
909
919
|
init_base();
|
|
910
|
-
FeeConflictError = class extends BaseError {
|
|
911
|
-
constructor() {
|
|
912
|
-
super([
|
|
913
|
-
"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.",
|
|
914
|
-
"Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."
|
|
915
|
-
].join("\n"), { name: "FeeConflictError" });
|
|
916
|
-
}
|
|
917
|
-
};
|
|
918
920
|
InvalidLegacyVError = class extends BaseError {
|
|
919
921
|
constructor({ v }) {
|
|
920
922
|
super(`Invalid \`v\` value "${v}". Expected 27 or 28.`, {
|
|
@@ -1335,10 +1337,10 @@ var init_sha2 = __esm({
|
|
|
1335
1337
|
}
|
|
1336
1338
|
});
|
|
1337
1339
|
|
|
1338
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1340
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/address.js
|
|
1339
1341
|
var InvalidAddressError;
|
|
1340
1342
|
var init_address = __esm({
|
|
1341
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1343
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/address.js"() {
|
|
1342
1344
|
"use strict";
|
|
1343
1345
|
init_base();
|
|
1344
1346
|
InvalidAddressError = class extends BaseError {
|
|
@@ -1355,10 +1357,10 @@ var init_address = __esm({
|
|
|
1355
1357
|
}
|
|
1356
1358
|
});
|
|
1357
1359
|
|
|
1358
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1360
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/chain.js
|
|
1359
1361
|
var InvalidChainIdError;
|
|
1360
1362
|
var init_chain = __esm({
|
|
1361
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1363
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/chain.js"() {
|
|
1362
1364
|
"use strict";
|
|
1363
1365
|
init_base();
|
|
1364
1366
|
InvalidChainIdError = class extends BaseError {
|
|
@@ -1369,10 +1371,10 @@ var init_chain = __esm({
|
|
|
1369
1371
|
}
|
|
1370
1372
|
});
|
|
1371
1373
|
|
|
1372
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1374
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/node.js
|
|
1373
1375
|
var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError, UnknownNodeError;
|
|
1374
1376
|
var init_node = __esm({
|
|
1375
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1377
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/node.js"() {
|
|
1376
1378
|
"use strict";
|
|
1377
1379
|
init_formatGwei();
|
|
1378
1380
|
init_base();
|
|
@@ -1395,7 +1397,7 @@ var init_node = __esm({
|
|
|
1395
1397
|
enumerable: true,
|
|
1396
1398
|
configurable: true,
|
|
1397
1399
|
writable: true,
|
|
1398
|
-
value: /execution reverted/
|
|
1400
|
+
value: /execution reverted|gas required exceeds allowance/
|
|
1399
1401
|
});
|
|
1400
1402
|
FeeCapTooHighError = class extends BaseError {
|
|
1401
1403
|
constructor({ cause, maxFeePerGas } = {}) {
|
|
@@ -1556,10 +1558,10 @@ var init_node = __esm({
|
|
|
1556
1558
|
}
|
|
1557
1559
|
});
|
|
1558
1560
|
|
|
1559
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1561
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/lru.js
|
|
1560
1562
|
var LruMap;
|
|
1561
1563
|
var init_lru = __esm({
|
|
1562
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1564
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/lru.js"() {
|
|
1563
1565
|
"use strict";
|
|
1564
1566
|
LruMap = class extends Map {
|
|
1565
1567
|
constructor(size2) {
|
|
@@ -1574,18 +1576,20 @@ var init_lru = __esm({
|
|
|
1574
1576
|
}
|
|
1575
1577
|
get(key) {
|
|
1576
1578
|
const value = super.get(key);
|
|
1577
|
-
if (super.has(key)
|
|
1578
|
-
|
|
1579
|
+
if (super.has(key)) {
|
|
1580
|
+
super.delete(key);
|
|
1579
1581
|
super.set(key, value);
|
|
1580
1582
|
}
|
|
1581
1583
|
return value;
|
|
1582
1584
|
}
|
|
1583
1585
|
set(key, value) {
|
|
1586
|
+
if (super.has(key))
|
|
1587
|
+
super.delete(key);
|
|
1584
1588
|
super.set(key, value);
|
|
1585
1589
|
if (this.maxSize && this.size > this.maxSize) {
|
|
1586
|
-
const firstKey =
|
|
1587
|
-
if (firstKey)
|
|
1588
|
-
|
|
1590
|
+
const firstKey = super.keys().next().value;
|
|
1591
|
+
if (firstKey !== void 0)
|
|
1592
|
+
super.delete(firstKey);
|
|
1589
1593
|
}
|
|
1590
1594
|
return this;
|
|
1591
1595
|
}
|
|
@@ -1782,7 +1786,7 @@ var init_sha3 = __esm({
|
|
|
1782
1786
|
}
|
|
1783
1787
|
});
|
|
1784
1788
|
|
|
1785
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1789
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/keccak256.js
|
|
1786
1790
|
function keccak256(value, to_) {
|
|
1787
1791
|
const to = to_ || "hex";
|
|
1788
1792
|
const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
|
|
@@ -1791,7 +1795,7 @@ function keccak256(value, to_) {
|
|
|
1791
1795
|
return toHex(bytes);
|
|
1792
1796
|
}
|
|
1793
1797
|
var init_keccak256 = __esm({
|
|
1794
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1798
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/keccak256.js"() {
|
|
1795
1799
|
"use strict";
|
|
1796
1800
|
init_sha3();
|
|
1797
1801
|
init_isHex();
|
|
@@ -1800,7 +1804,7 @@ var init_keccak256 = __esm({
|
|
|
1800
1804
|
}
|
|
1801
1805
|
});
|
|
1802
1806
|
|
|
1803
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1807
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/getAddress.js
|
|
1804
1808
|
function checksumAddress(address_, chainId) {
|
|
1805
1809
|
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
|
1806
1810
|
return checksumAddressCache.get(`${address_}.${chainId}`);
|
|
@@ -1826,7 +1830,7 @@ function getAddress(address, chainId) {
|
|
|
1826
1830
|
}
|
|
1827
1831
|
var checksumAddressCache;
|
|
1828
1832
|
var init_getAddress = __esm({
|
|
1829
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1833
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/getAddress.js"() {
|
|
1830
1834
|
"use strict";
|
|
1831
1835
|
init_address();
|
|
1832
1836
|
init_toBytes();
|
|
@@ -1837,7 +1841,7 @@ var init_getAddress = __esm({
|
|
|
1837
1841
|
}
|
|
1838
1842
|
});
|
|
1839
1843
|
|
|
1840
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1844
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/isAddress.js
|
|
1841
1845
|
function isAddress(address, options) {
|
|
1842
1846
|
const { strict = true } = options ?? {};
|
|
1843
1847
|
const cacheKey = `${address}.${strict}`;
|
|
@@ -1857,7 +1861,7 @@ function isAddress(address, options) {
|
|
|
1857
1861
|
}
|
|
1858
1862
|
var addressRegex, isAddressCache;
|
|
1859
1863
|
var init_isAddress = __esm({
|
|
1860
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1864
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/isAddress.js"() {
|
|
1861
1865
|
"use strict";
|
|
1862
1866
|
init_lru();
|
|
1863
1867
|
init_getAddress();
|
|
@@ -1866,7 +1870,7 @@ var init_isAddress = __esm({
|
|
|
1866
1870
|
}
|
|
1867
1871
|
});
|
|
1868
1872
|
|
|
1869
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1873
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/slice.js
|
|
1870
1874
|
function slice(value, start, end, { strict } = {}) {
|
|
1871
1875
|
if (isHex(value, { strict: false }))
|
|
1872
1876
|
return sliceHex(value, start, end, {
|
|
@@ -1908,7 +1912,7 @@ function sliceHex(value_, start, end, { strict } = {}) {
|
|
|
1908
1912
|
return value;
|
|
1909
1913
|
}
|
|
1910
1914
|
var init_slice = __esm({
|
|
1911
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1915
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/slice.js"() {
|
|
1912
1916
|
"use strict";
|
|
1913
1917
|
init_data();
|
|
1914
1918
|
init_isHex();
|
|
@@ -1916,19 +1920,19 @@ var init_slice = __esm({
|
|
|
1916
1920
|
}
|
|
1917
1921
|
});
|
|
1918
1922
|
|
|
1919
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1923
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/accounts/utils/parseAccount.js
|
|
1920
1924
|
function parseAccount(account) {
|
|
1921
1925
|
if (typeof account === "string")
|
|
1922
1926
|
return { address: account, type: "json-rpc" };
|
|
1923
1927
|
return account;
|
|
1924
1928
|
}
|
|
1925
1929
|
var init_parseAccount = __esm({
|
|
1926
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1930
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/accounts/utils/parseAccount.js"() {
|
|
1927
1931
|
"use strict";
|
|
1928
1932
|
}
|
|
1929
1933
|
});
|
|
1930
1934
|
|
|
1931
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1935
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/stateOverride.js
|
|
1932
1936
|
function prettyStateMapping(stateMapping) {
|
|
1933
1937
|
return stateMapping.reduce((pretty, { slot, value }) => {
|
|
1934
1938
|
return `${pretty} ${slot}: ${value}
|
|
@@ -1960,15 +1964,15 @@ function prettyStateOverride(stateOverride) {
|
|
|
1960
1964
|
}, " State Override:\n").slice(0, -1);
|
|
1961
1965
|
}
|
|
1962
1966
|
var init_stateOverride = __esm({
|
|
1963
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1967
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/stateOverride.js"() {
|
|
1964
1968
|
"use strict";
|
|
1965
1969
|
}
|
|
1966
1970
|
});
|
|
1967
1971
|
|
|
1968
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1972
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/contract.js
|
|
1969
1973
|
var CallExecutionError;
|
|
1970
1974
|
var init_contract = __esm({
|
|
1971
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1975
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/contract.js"() {
|
|
1972
1976
|
"use strict";
|
|
1973
1977
|
init_parseAccount();
|
|
1974
1978
|
init_formatEther();
|
|
@@ -2016,7 +2020,7 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
2016
2020
|
}
|
|
2017
2021
|
});
|
|
2018
2022
|
|
|
2019
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2023
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/errors/getNodeError.js
|
|
2020
2024
|
function getNodeError(err, args) {
|
|
2021
2025
|
const message = (err.details || "").toLowerCase();
|
|
2022
2026
|
const executionRevertedError = err instanceof BaseError ? err.walk((e) => e?.code === ExecutionRevertedError.code) : err;
|
|
@@ -2065,14 +2069,14 @@ function getNodeError(err, args) {
|
|
|
2065
2069
|
});
|
|
2066
2070
|
}
|
|
2067
2071
|
var init_getNodeError = __esm({
|
|
2068
|
-
"../../node_modules/.pnpm/viem@2.
|
|
2072
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/errors/getNodeError.js"() {
|
|
2069
2073
|
"use strict";
|
|
2070
2074
|
init_base();
|
|
2071
2075
|
init_node();
|
|
2072
2076
|
}
|
|
2073
2077
|
});
|
|
2074
2078
|
|
|
2075
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2079
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/errors/getCallError.js
|
|
2076
2080
|
function getCallError(err, { docsPath, ...args }) {
|
|
2077
2081
|
const cause = (() => {
|
|
2078
2082
|
const cause2 = getNodeError(err, args);
|
|
@@ -2086,7 +2090,7 @@ function getCallError(err, { docsPath, ...args }) {
|
|
|
2086
2090
|
});
|
|
2087
2091
|
}
|
|
2088
2092
|
var init_getCallError = __esm({
|
|
2089
|
-
"../../node_modules/.pnpm/viem@2.
|
|
2093
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/errors/getCallError.js"() {
|
|
2090
2094
|
"use strict";
|
|
2091
2095
|
init_contract();
|
|
2092
2096
|
init_node();
|
|
@@ -2094,7 +2098,7 @@ var init_getCallError = __esm({
|
|
|
2094
2098
|
}
|
|
2095
2099
|
});
|
|
2096
2100
|
|
|
2097
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2101
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/extract.js
|
|
2098
2102
|
function extract(value_, { format }) {
|
|
2099
2103
|
if (!format)
|
|
2100
2104
|
return {};
|
|
@@ -2113,52 +2117,59 @@ function extract(value_, { format }) {
|
|
|
2113
2117
|
return value;
|
|
2114
2118
|
}
|
|
2115
2119
|
var init_extract = __esm({
|
|
2116
|
-
"../../node_modules/.pnpm/viem@2.
|
|
2120
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/extract.js"() {
|
|
2117
2121
|
"use strict";
|
|
2118
2122
|
}
|
|
2119
2123
|
});
|
|
2120
2124
|
|
|
2121
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2125
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/assertRequest.js
|
|
2122
2126
|
function assertRequest(args) {
|
|
2123
|
-
const { account: account_,
|
|
2127
|
+
const { account: account_, maxFeePerGas, maxPriorityFeePerGas, to } = args;
|
|
2124
2128
|
const account = account_ ? parseAccount(account_) : void 0;
|
|
2125
2129
|
if (account && !isAddress(account.address))
|
|
2126
2130
|
throw new InvalidAddressError({ address: account.address });
|
|
2127
2131
|
if (to && !isAddress(to))
|
|
2128
2132
|
throw new InvalidAddressError({ address: to });
|
|
2129
|
-
if (typeof gasPrice !== "undefined" && (typeof maxFeePerGas !== "undefined" || typeof maxPriorityFeePerGas !== "undefined"))
|
|
2130
|
-
throw new FeeConflictError();
|
|
2131
2133
|
if (maxFeePerGas && maxFeePerGas > maxUint256)
|
|
2132
2134
|
throw new FeeCapTooHighError({ maxFeePerGas });
|
|
2133
2135
|
if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)
|
|
2134
2136
|
throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
|
|
2135
2137
|
}
|
|
2136
2138
|
var init_assertRequest = __esm({
|
|
2137
|
-
"../../node_modules/.pnpm/viem@2.
|
|
2139
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/assertRequest.js"() {
|
|
2138
2140
|
"use strict";
|
|
2139
2141
|
init_parseAccount();
|
|
2140
2142
|
init_number();
|
|
2141
2143
|
init_address();
|
|
2142
2144
|
init_node();
|
|
2143
|
-
init_transaction();
|
|
2144
2145
|
init_isAddress();
|
|
2145
2146
|
}
|
|
2146
2147
|
});
|
|
2147
2148
|
|
|
2148
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2149
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/chain/defineChain.js
|
|
2149
2150
|
function defineChain(chain) {
|
|
2150
|
-
|
|
2151
|
+
const chainInstance = {
|
|
2151
2152
|
formatters: void 0,
|
|
2152
2153
|
fees: void 0,
|
|
2153
2154
|
serializers: void 0,
|
|
2154
2155
|
...chain
|
|
2155
2156
|
};
|
|
2157
|
+
function extend(base2) {
|
|
2158
|
+
return (fnOrExtended) => {
|
|
2159
|
+
const properties = typeof fnOrExtended === "function" ? fnOrExtended(base2) : fnOrExtended;
|
|
2160
|
+
const combined = { ...base2, ...properties };
|
|
2161
|
+
return Object.assign(combined, { extend: extend(combined) });
|
|
2162
|
+
};
|
|
2163
|
+
}
|
|
2164
|
+
return Object.assign(chainInstance, {
|
|
2165
|
+
extend: extend(chainInstance)
|
|
2166
|
+
});
|
|
2156
2167
|
}
|
|
2157
2168
|
|
|
2158
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2169
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/block.js
|
|
2159
2170
|
init_formatter();
|
|
2160
2171
|
|
|
2161
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2172
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/transaction.js
|
|
2162
2173
|
init_fromHex();
|
|
2163
2174
|
init_formatter();
|
|
2164
2175
|
var transactionType = {
|
|
@@ -2173,6 +2184,9 @@ function formatTransaction(transaction, _) {
|
|
|
2173
2184
|
...transaction,
|
|
2174
2185
|
blockHash: transaction.blockHash ? transaction.blockHash : null,
|
|
2175
2186
|
blockNumber: transaction.blockNumber ? BigInt(transaction.blockNumber) : null,
|
|
2187
|
+
...transaction.blockTimestamp != null && {
|
|
2188
|
+
blockTimestamp: BigInt(transaction.blockTimestamp)
|
|
2189
|
+
},
|
|
2176
2190
|
chainId: transaction.chainId ? hexToNumber(transaction.chainId) : void 0,
|
|
2177
2191
|
gas: transaction.gas ? BigInt(transaction.gas) : void 0,
|
|
2178
2192
|
gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : void 0,
|
|
@@ -2214,9 +2228,8 @@ function formatTransaction(transaction, _) {
|
|
|
2214
2228
|
delete transaction_.maxFeePerGas;
|
|
2215
2229
|
delete transaction_.maxPriorityFeePerGas;
|
|
2216
2230
|
}
|
|
2217
|
-
if (transaction_.type === "eip1559")
|
|
2231
|
+
if (transaction_.type === "eip1559")
|
|
2218
2232
|
delete transaction_.maxFeePerBlobGas;
|
|
2219
|
-
}
|
|
2220
2233
|
return transaction_;
|
|
2221
2234
|
}
|
|
2222
2235
|
var defineTransaction = /* @__PURE__ */ defineFormatter("transaction", formatTransaction);
|
|
@@ -2231,7 +2244,7 @@ function formatAuthorizationList(authorizationList) {
|
|
|
2231
2244
|
}));
|
|
2232
2245
|
}
|
|
2233
2246
|
|
|
2234
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2247
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/block.js
|
|
2235
2248
|
function formatBlock(block, _) {
|
|
2236
2249
|
const transactions = (block.transactions ?? []).map((transaction) => {
|
|
2237
2250
|
if (typeof transaction === "string")
|
|
@@ -2258,12 +2271,13 @@ function formatBlock(block, _) {
|
|
|
2258
2271
|
}
|
|
2259
2272
|
var defineBlock = /* @__PURE__ */ defineFormatter("block", formatBlock);
|
|
2260
2273
|
|
|
2261
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2274
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/log.js
|
|
2262
2275
|
function formatLog(log, { args, eventName } = {}) {
|
|
2263
2276
|
return {
|
|
2264
2277
|
...log,
|
|
2265
2278
|
blockHash: log.blockHash ? log.blockHash : null,
|
|
2266
2279
|
blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,
|
|
2280
|
+
blockTimestamp: log.blockTimestamp ? BigInt(log.blockTimestamp) : log.blockTimestamp === null ? null : void 0,
|
|
2267
2281
|
logIndex: log.logIndex ? Number(log.logIndex) : null,
|
|
2268
2282
|
transactionHash: log.transactionHash ? log.transactionHash : null,
|
|
2269
2283
|
transactionIndex: log.transactionIndex ? Number(log.transactionIndex) : null,
|
|
@@ -2271,7 +2285,7 @@ function formatLog(log, { args, eventName } = {}) {
|
|
|
2271
2285
|
};
|
|
2272
2286
|
}
|
|
2273
2287
|
|
|
2274
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2288
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/transactionReceipt.js
|
|
2275
2289
|
init_fromHex();
|
|
2276
2290
|
init_formatter();
|
|
2277
2291
|
var receiptStatuses = {
|
|
@@ -2300,7 +2314,7 @@ function formatTransactionReceipt(transactionReceipt, _) {
|
|
|
2300
2314
|
}
|
|
2301
2315
|
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
|
2302
2316
|
|
|
2303
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2317
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toRlp.js
|
|
2304
2318
|
init_base();
|
|
2305
2319
|
init_cursor2();
|
|
2306
2320
|
init_toBytes();
|
|
@@ -2393,10 +2407,10 @@ function getSizeOfLength(length) {
|
|
|
2393
2407
|
throw new BaseError("Length is too large.");
|
|
2394
2408
|
}
|
|
2395
2409
|
|
|
2396
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2410
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
|
2397
2411
|
init_transaction();
|
|
2398
2412
|
|
|
2399
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2413
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
|
2400
2414
|
init_toHex();
|
|
2401
2415
|
function serializeAuthorizationList(authorizationList) {
|
|
2402
2416
|
if (!authorizationList || authorizationList.length === 0)
|
|
@@ -2415,7 +2429,7 @@ function serializeAuthorizationList(authorizationList) {
|
|
|
2415
2429
|
return serializedAuthorizationList;
|
|
2416
2430
|
}
|
|
2417
2431
|
|
|
2418
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2432
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
|
2419
2433
|
init_toBytes();
|
|
2420
2434
|
init_toHex();
|
|
2421
2435
|
function blobsToCommitments(parameters) {
|
|
@@ -2428,7 +2442,7 @@ function blobsToCommitments(parameters) {
|
|
|
2428
2442
|
return to === "bytes" ? commitments : commitments.map((x) => bytesToHex(x));
|
|
2429
2443
|
}
|
|
2430
2444
|
|
|
2431
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2445
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
|
2432
2446
|
init_toBytes();
|
|
2433
2447
|
init_toHex();
|
|
2434
2448
|
function blobsToProofs(parameters) {
|
|
@@ -2445,14 +2459,14 @@ function blobsToProofs(parameters) {
|
|
|
2445
2459
|
return to === "bytes" ? proofs : proofs.map((x) => bytesToHex(x));
|
|
2446
2460
|
}
|
|
2447
2461
|
|
|
2448
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2462
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
|
2449
2463
|
init_toHex();
|
|
2450
2464
|
|
|
2451
2465
|
// ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js
|
|
2452
2466
|
init_sha2();
|
|
2453
2467
|
var sha2562 = sha256;
|
|
2454
2468
|
|
|
2455
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2469
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/sha256.js
|
|
2456
2470
|
init_isHex();
|
|
2457
2471
|
init_toBytes();
|
|
2458
2472
|
init_toHex();
|
|
@@ -2464,7 +2478,7 @@ function sha2563(value, to_) {
|
|
|
2464
2478
|
return toHex(bytes);
|
|
2465
2479
|
}
|
|
2466
2480
|
|
|
2467
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2481
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
|
2468
2482
|
function commitmentToVersionedHash(parameters) {
|
|
2469
2483
|
const { commitment, version: version2 = 1 } = parameters;
|
|
2470
2484
|
const to = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
|
|
@@ -2473,7 +2487,7 @@ function commitmentToVersionedHash(parameters) {
|
|
|
2473
2487
|
return to === "bytes" ? versionedHash : bytesToHex(versionedHash);
|
|
2474
2488
|
}
|
|
2475
2489
|
|
|
2476
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2490
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
|
2477
2491
|
function commitmentsToVersionedHashes(parameters) {
|
|
2478
2492
|
const { commitments, version: version2 } = parameters;
|
|
2479
2493
|
const to = parameters.to ?? (typeof commitments[0] === "string" ? "hex" : "bytes");
|
|
@@ -2488,7 +2502,7 @@ function commitmentsToVersionedHashes(parameters) {
|
|
|
2488
2502
|
return hashes;
|
|
2489
2503
|
}
|
|
2490
2504
|
|
|
2491
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2505
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/blob.js
|
|
2492
2506
|
var blobsPerTransaction = 6;
|
|
2493
2507
|
var bytesPerFieldElement = 32;
|
|
2494
2508
|
var fieldElementsPerBlob = 4096;
|
|
@@ -2497,10 +2511,10 @@ var maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - // terminator
|
|
|
2497
2511
|
1 - // zero byte (0x00) appended to each field element.
|
|
2498
2512
|
1 * fieldElementsPerBlob * blobsPerTransaction;
|
|
2499
2513
|
|
|
2500
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2514
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/kzg.js
|
|
2501
2515
|
var versionedHashVersionKzg = 1;
|
|
2502
2516
|
|
|
2503
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2517
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/blob.js
|
|
2504
2518
|
init_base();
|
|
2505
2519
|
var BlobSizeTooLargeError = class extends BaseError {
|
|
2506
2520
|
constructor({ maxSize, size: size2 }) {
|
|
@@ -2535,7 +2549,7 @@ var InvalidVersionedHashVersionError = class extends BaseError {
|
|
|
2535
2549
|
}
|
|
2536
2550
|
};
|
|
2537
2551
|
|
|
2538
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2552
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/toBlobs.js
|
|
2539
2553
|
init_cursor2();
|
|
2540
2554
|
init_size();
|
|
2541
2555
|
init_toBytes();
|
|
@@ -2574,7 +2588,7 @@ function toBlobs(parameters) {
|
|
|
2574
2588
|
return to === "bytes" ? blobs.map((x) => x.bytes) : blobs.map((x) => bytesToHex(x.bytes));
|
|
2575
2589
|
}
|
|
2576
2590
|
|
|
2577
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2591
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
|
2578
2592
|
function toBlobSidecars(parameters) {
|
|
2579
2593
|
const { data, kzg, to } = parameters;
|
|
2580
2594
|
const blobs = parameters.blobs ?? toBlobs({ data, to });
|
|
@@ -2590,12 +2604,12 @@ function toBlobSidecars(parameters) {
|
|
|
2590
2604
|
return sidecars;
|
|
2591
2605
|
}
|
|
2592
2606
|
|
|
2593
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2607
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
|
2594
2608
|
init_concat();
|
|
2595
2609
|
init_trim();
|
|
2596
2610
|
init_toHex();
|
|
2597
2611
|
|
|
2598
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2612
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
|
2599
2613
|
init_number();
|
|
2600
2614
|
init_address();
|
|
2601
2615
|
init_base();
|
|
@@ -2672,7 +2686,7 @@ function assertTransactionLegacy(transaction) {
|
|
|
2672
2686
|
throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
|
|
2673
2687
|
}
|
|
2674
2688
|
|
|
2675
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2689
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
|
2676
2690
|
init_transaction();
|
|
2677
2691
|
function getTransactionType(transaction) {
|
|
2678
2692
|
if (transaction.type)
|
|
@@ -2692,7 +2706,7 @@ function getTransactionType(transaction) {
|
|
|
2692
2706
|
throw new InvalidSerializableTransactionError({ transaction });
|
|
2693
2707
|
}
|
|
2694
2708
|
|
|
2695
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2709
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
|
2696
2710
|
init_address();
|
|
2697
2711
|
init_transaction();
|
|
2698
2712
|
init_isAddress();
|
|
@@ -2715,7 +2729,7 @@ function serializeAccessList(accessList) {
|
|
|
2715
2729
|
return serializedAccessList;
|
|
2716
2730
|
}
|
|
2717
2731
|
|
|
2718
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2732
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
|
2719
2733
|
function serializeTransaction(transaction, signature) {
|
|
2720
2734
|
const type = getTransactionType(transaction);
|
|
2721
2735
|
if (type === "eip1559")
|
|
@@ -2915,7 +2929,7 @@ function toYParitySignatureArray(transaction, signature_) {
|
|
|
2915
2929
|
return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
|
|
2916
2930
|
}
|
|
2917
2931
|
|
|
2918
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2932
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/contracts.js
|
|
2919
2933
|
var contracts = {
|
|
2920
2934
|
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
2921
2935
|
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
@@ -2929,7 +2943,7 @@ var contracts = {
|
|
|
2929
2943
|
}
|
|
2930
2944
|
};
|
|
2931
2945
|
|
|
2932
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2946
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/formatters.js
|
|
2933
2947
|
init_fromHex();
|
|
2934
2948
|
var formatters = {
|
|
2935
2949
|
block: /* @__PURE__ */ defineBlock({
|
|
@@ -2976,7 +2990,7 @@ var formatters = {
|
|
|
2976
2990
|
})
|
|
2977
2991
|
};
|
|
2978
2992
|
|
|
2979
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2993
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/serializers.js
|
|
2980
2994
|
init_address();
|
|
2981
2995
|
init_isAddress();
|
|
2982
2996
|
init_concat();
|
|
@@ -3022,7 +3036,7 @@ function assertTransactionDeposit(transaction) {
|
|
|
3022
3036
|
throw new InvalidAddressError({ address: to });
|
|
3023
3037
|
}
|
|
3024
3038
|
|
|
3025
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3039
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/chainConfig.js
|
|
3026
3040
|
var chainConfig = {
|
|
3027
3041
|
blockTime: 2e3,
|
|
3028
3042
|
contracts,
|
|
@@ -3030,7 +3044,7 @@ var chainConfig = {
|
|
|
3030
3044
|
serializers
|
|
3031
3045
|
};
|
|
3032
3046
|
|
|
3033
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3047
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/arbitrum.js
|
|
3034
3048
|
var arbitrum = /* @__PURE__ */ defineChain({
|
|
3035
3049
|
id: 42161,
|
|
3036
3050
|
name: "Arbitrum One",
|
|
@@ -3056,7 +3070,7 @@ var arbitrum = /* @__PURE__ */ defineChain({
|
|
|
3056
3070
|
}
|
|
3057
3071
|
});
|
|
3058
3072
|
|
|
3059
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3073
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js
|
|
3060
3074
|
var arbitrumSepolia = /* @__PURE__ */ defineChain({
|
|
3061
3075
|
id: 421614,
|
|
3062
3076
|
name: "Arbitrum Sepolia",
|
|
@@ -3087,7 +3101,7 @@ var arbitrumSepolia = /* @__PURE__ */ defineChain({
|
|
|
3087
3101
|
testnet: true
|
|
3088
3102
|
});
|
|
3089
3103
|
|
|
3090
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3104
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/base.js
|
|
3091
3105
|
var sourceId = 1;
|
|
3092
3106
|
var base = /* @__PURE__ */ defineChain({
|
|
3093
3107
|
...chainConfig,
|
|
@@ -3147,7 +3161,7 @@ var basePreconf = /* @__PURE__ */ defineChain({
|
|
|
3147
3161
|
}
|
|
3148
3162
|
});
|
|
3149
3163
|
|
|
3150
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3164
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/baseSepolia.js
|
|
3151
3165
|
var sourceId2 = 11155111;
|
|
3152
3166
|
var baseSepolia = /* @__PURE__ */ defineChain({
|
|
3153
3167
|
...chainConfig,
|
|
@@ -3209,10 +3223,10 @@ var baseSepoliaPreconf = /* @__PURE__ */ defineChain({
|
|
|
3209
3223
|
}
|
|
3210
3224
|
});
|
|
3211
3225
|
|
|
3212
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3226
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/linea/actions/estimateGas.js
|
|
3213
3227
|
init_parseAccount();
|
|
3214
3228
|
|
|
3215
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3229
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/account.js
|
|
3216
3230
|
init_base();
|
|
3217
3231
|
var AccountNotFoundError = class extends BaseError {
|
|
3218
3232
|
constructor({ docsPath } = {}) {
|
|
@@ -3227,7 +3241,7 @@ var AccountNotFoundError = class extends BaseError {
|
|
|
3227
3241
|
}
|
|
3228
3242
|
};
|
|
3229
3243
|
|
|
3230
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3244
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/linea/actions/estimateGas.js
|
|
3231
3245
|
init_toHex();
|
|
3232
3246
|
init_getCallError();
|
|
3233
3247
|
init_extract();
|
|
@@ -3277,7 +3291,7 @@ async function estimateGas(client, args) {
|
|
|
3277
3291
|
}
|
|
3278
3292
|
}
|
|
3279
3293
|
|
|
3280
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3294
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/linea/chainConfig.js
|
|
3281
3295
|
var chainConfig2 = {
|
|
3282
3296
|
fees: {
|
|
3283
3297
|
estimateFeesPerGas,
|
|
@@ -3315,7 +3329,7 @@ async function estimateFeesPerGas({ client, multiply, request, type }) {
|
|
|
3315
3329
|
}
|
|
3316
3330
|
}
|
|
3317
3331
|
|
|
3318
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3332
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/linea.js
|
|
3319
3333
|
var linea = /* @__PURE__ */ defineChain({
|
|
3320
3334
|
...chainConfig2,
|
|
3321
3335
|
id: 59144,
|
|
@@ -3353,7 +3367,7 @@ var linea = /* @__PURE__ */ defineChain({
|
|
|
3353
3367
|
testnet: false
|
|
3354
3368
|
});
|
|
3355
3369
|
|
|
3356
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3370
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/lineaSepolia.js
|
|
3357
3371
|
var lineaSepolia = /* @__PURE__ */ defineChain({
|
|
3358
3372
|
...chainConfig2,
|
|
3359
3373
|
id: 59141,
|
|
@@ -3390,7 +3404,7 @@ var lineaSepolia = /* @__PURE__ */ defineChain({
|
|
|
3390
3404
|
testnet: true
|
|
3391
3405
|
});
|
|
3392
3406
|
|
|
3393
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3407
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/mainnet.js
|
|
3394
3408
|
var mainnet = /* @__PURE__ */ defineChain({
|
|
3395
3409
|
id: 1,
|
|
3396
3410
|
name: "Ethereum",
|
|
@@ -3420,7 +3434,7 @@ var mainnet = /* @__PURE__ */ defineChain({
|
|
|
3420
3434
|
}
|
|
3421
3435
|
});
|
|
3422
3436
|
|
|
3423
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3437
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/optimism.js
|
|
3424
3438
|
var sourceId3 = 1;
|
|
3425
3439
|
var optimism = /* @__PURE__ */ defineChain({
|
|
3426
3440
|
...chainConfig,
|
|
@@ -3469,7 +3483,7 @@ var optimism = /* @__PURE__ */ defineChain({
|
|
|
3469
3483
|
sourceId: sourceId3
|
|
3470
3484
|
});
|
|
3471
3485
|
|
|
3472
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3486
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/optimismSepolia.js
|
|
3473
3487
|
var sourceId4 = 11155111;
|
|
3474
3488
|
var optimismSepolia = /* @__PURE__ */ defineChain({
|
|
3475
3489
|
...chainConfig,
|
|
@@ -3519,7 +3533,7 @@ var optimismSepolia = /* @__PURE__ */ defineChain({
|
|
|
3519
3533
|
sourceId: sourceId4
|
|
3520
3534
|
});
|
|
3521
3535
|
|
|
3522
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3536
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/scroll.js
|
|
3523
3537
|
var scroll = /* @__PURE__ */ defineChain({
|
|
3524
3538
|
id: 534352,
|
|
3525
3539
|
name: "Scroll",
|
|
@@ -3547,7 +3561,7 @@ var scroll = /* @__PURE__ */ defineChain({
|
|
|
3547
3561
|
testnet: false
|
|
3548
3562
|
});
|
|
3549
3563
|
|
|
3550
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3564
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/scrollSepolia.js
|
|
3551
3565
|
var scrollSepolia = /* @__PURE__ */ defineChain({
|
|
3552
3566
|
id: 534351,
|
|
3553
3567
|
name: "Scroll Sepolia",
|
|
@@ -3573,7 +3587,7 @@ var scrollSepolia = /* @__PURE__ */ defineChain({
|
|
|
3573
3587
|
testnet: true
|
|
3574
3588
|
});
|
|
3575
3589
|
|
|
3576
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3590
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/sepolia.js
|
|
3577
3591
|
var sepolia = /* @__PURE__ */ defineChain({
|
|
3578
3592
|
id: 11155111,
|
|
3579
3593
|
name: "Sepolia",
|
|
@@ -5128,10 +5142,10 @@ var InfoIcon = (props) => /* @__PURE__ */ jsxs23(
|
|
|
5128
5142
|
}
|
|
5129
5143
|
);
|
|
5130
5144
|
|
|
5131
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
5145
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/address.js
|
|
5132
5146
|
var zeroAddress = "0x0000000000000000000000000000000000000000";
|
|
5133
5147
|
|
|
5134
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
5148
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/index.js
|
|
5135
5149
|
init_getAddress();
|
|
5136
5150
|
|
|
5137
5151
|
// src/components/identity/Address.tsx
|
|
@@ -5514,13 +5528,371 @@ function NameDisplay({ name, className = "nhui:font-medium" }) {
|
|
|
5514
5528
|
}
|
|
5515
5529
|
|
|
5516
5530
|
// src/components/identity/ResolveAndDisplayIdentity.tsx
|
|
5517
|
-
import { useResolvedIdentity } from "@ensnode/ensnode-react";
|
|
5518
5531
|
import {
|
|
5519
5532
|
isResolvedIdentity as isResolvedIdentity2,
|
|
5520
|
-
ResolutionStatusIds as
|
|
5533
|
+
ResolutionStatusIds as ResolutionStatusIds3,
|
|
5521
5534
|
translateDefaultableChainIdToChainId as translateDefaultableChainIdToChainId2
|
|
5522
5535
|
} from "@ensnode/ensnode-sdk";
|
|
5523
5536
|
|
|
5537
|
+
// src/ensnode/context.ts
|
|
5538
|
+
import { createContext } from "react";
|
|
5539
|
+
var EnsNodeContext = createContext(void 0);
|
|
5540
|
+
EnsNodeContext.displayName = "EnsNodeContext";
|
|
5541
|
+
|
|
5542
|
+
// src/ensnode/hooks/useEnsNodeProviderOptions.ts
|
|
5543
|
+
import { useContext } from "react";
|
|
5544
|
+
function useEnsNodeProviderOptions(options) {
|
|
5545
|
+
const contextOptions = useContext(EnsNodeContext);
|
|
5546
|
+
const resolvedOptions = options ?? contextOptions;
|
|
5547
|
+
if (!resolvedOptions) {
|
|
5548
|
+
throw new Error(
|
|
5549
|
+
"useEnsNodeProviderOptions must be used within an EnsNodeProvider or you must pass the options parameter"
|
|
5550
|
+
);
|
|
5551
|
+
}
|
|
5552
|
+
return resolvedOptions;
|
|
5553
|
+
}
|
|
5554
|
+
|
|
5555
|
+
// src/ensnode/hooks/useIndexingStatus.ts
|
|
5556
|
+
import { useQuery } from "@tanstack/react-query";
|
|
5557
|
+
|
|
5558
|
+
// src/ensnode/query.ts
|
|
5559
|
+
import { skipToken } from "@tanstack/react-query";
|
|
5560
|
+
import {
|
|
5561
|
+
EnsNodeClient
|
|
5562
|
+
} from "@ensnode/ensnode-sdk";
|
|
5563
|
+
var ASSUME_IMMUTABLE_QUERY = {
|
|
5564
|
+
staleTime: Infinity,
|
|
5565
|
+
gcTime: Infinity,
|
|
5566
|
+
refetchOnWindowFocus: false,
|
|
5567
|
+
refetchOnReconnect: false,
|
|
5568
|
+
refetchOnMount: false
|
|
5569
|
+
};
|
|
5570
|
+
var DISABLED_QUERY = {
|
|
5571
|
+
queryKey: ["disabled"],
|
|
5572
|
+
queryFn: skipToken
|
|
5573
|
+
};
|
|
5574
|
+
var queryKeys = {
|
|
5575
|
+
base: (url) => ["ensnode", url],
|
|
5576
|
+
resolve: (url) => [...queryKeys.base(url), "resolve"],
|
|
5577
|
+
records: (url, args) => [...queryKeys.resolve(url), "records", args],
|
|
5578
|
+
primaryName: (url, args) => [...queryKeys.resolve(url), "primary-name", args],
|
|
5579
|
+
primaryNames: (url, args) => [...queryKeys.resolve(url), "primary-names", args],
|
|
5580
|
+
indexingStatus: (url) => [...queryKeys.base(url), "indexing-status"],
|
|
5581
|
+
registrarActions: (url, args) => [...queryKeys.base(url), "registrar-actions", args],
|
|
5582
|
+
nameTokens: (url, args) => [...queryKeys.base(url), "name-tokens", args]
|
|
5583
|
+
};
|
|
5584
|
+
function createRecordsQueryOptions(config, args) {
|
|
5585
|
+
return {
|
|
5586
|
+
enabled: true,
|
|
5587
|
+
queryKey: queryKeys.records(config.client.url.href, args),
|
|
5588
|
+
queryFn: async () => {
|
|
5589
|
+
const client = new EnsNodeClient(config.client);
|
|
5590
|
+
return client.resolveRecords(args.name, args.selection, args);
|
|
5591
|
+
}
|
|
5592
|
+
};
|
|
5593
|
+
}
|
|
5594
|
+
function createPrimaryNameQueryOptions(config, args) {
|
|
5595
|
+
return {
|
|
5596
|
+
enabled: true,
|
|
5597
|
+
queryKey: queryKeys.primaryName(config.client.url.href, args),
|
|
5598
|
+
queryFn: async () => {
|
|
5599
|
+
const client = new EnsNodeClient(config.client);
|
|
5600
|
+
return client.resolvePrimaryName(args.address, args.chainId, args);
|
|
5601
|
+
}
|
|
5602
|
+
};
|
|
5603
|
+
}
|
|
5604
|
+
function createPrimaryNamesQueryOptions(config, args) {
|
|
5605
|
+
return {
|
|
5606
|
+
enabled: true,
|
|
5607
|
+
queryKey: queryKeys.primaryNames(config.client.url.href, args),
|
|
5608
|
+
queryFn: async () => {
|
|
5609
|
+
const client = new EnsNodeClient(config.client);
|
|
5610
|
+
return client.resolvePrimaryNames(args.address, args);
|
|
5611
|
+
}
|
|
5612
|
+
};
|
|
5613
|
+
}
|
|
5614
|
+
function createIndexingStatusQueryOptions(config) {
|
|
5615
|
+
return {
|
|
5616
|
+
enabled: true,
|
|
5617
|
+
queryKey: queryKeys.indexingStatus(config.client.url.href),
|
|
5618
|
+
queryFn: async () => {
|
|
5619
|
+
const client = new EnsNodeClient(config.client);
|
|
5620
|
+
return client.indexingStatus();
|
|
5621
|
+
}
|
|
5622
|
+
};
|
|
5623
|
+
}
|
|
5624
|
+
function createRegistrarActionsQueryOptions(config, args) {
|
|
5625
|
+
return {
|
|
5626
|
+
enabled: true,
|
|
5627
|
+
queryKey: queryKeys.registrarActions(config.client.url.href, args),
|
|
5628
|
+
queryFn: async () => {
|
|
5629
|
+
const client = new EnsNodeClient(config.client);
|
|
5630
|
+
return client.registrarActions(args);
|
|
5631
|
+
}
|
|
5632
|
+
};
|
|
5633
|
+
}
|
|
5634
|
+
function createNameTokensQueryOptions(config, args) {
|
|
5635
|
+
return {
|
|
5636
|
+
enabled: true,
|
|
5637
|
+
queryKey: queryKeys.nameTokens(config.client.url.href, args),
|
|
5638
|
+
queryFn: async () => {
|
|
5639
|
+
const client = new EnsNodeClient(config.client);
|
|
5640
|
+
return client.nameTokens(args);
|
|
5641
|
+
}
|
|
5642
|
+
};
|
|
5643
|
+
}
|
|
5644
|
+
|
|
5645
|
+
// src/ensnode/hooks/useIndexingStatus.ts
|
|
5646
|
+
function useIndexingStatus(parameters = {}) {
|
|
5647
|
+
const { options, query = {} } = parameters;
|
|
5648
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5649
|
+
const queryOptions = createIndexingStatusQueryOptions(providerOptions);
|
|
5650
|
+
return useQuery({
|
|
5651
|
+
...queryOptions,
|
|
5652
|
+
refetchInterval: 10 * 1e3,
|
|
5653
|
+
// 10 seconds - indexing status changes frequently
|
|
5654
|
+
...query,
|
|
5655
|
+
enabled: query.enabled ?? queryOptions.enabled
|
|
5656
|
+
});
|
|
5657
|
+
}
|
|
5658
|
+
|
|
5659
|
+
// src/ensnode/hooks/useNameTokens.ts
|
|
5660
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
5661
|
+
function useNameTokens(parameters) {
|
|
5662
|
+
const { options, query = {}, ...request } = parameters;
|
|
5663
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5664
|
+
const queryOptions = createNameTokensQueryOptions(providerOptions, request);
|
|
5665
|
+
return useQuery2({
|
|
5666
|
+
...queryOptions,
|
|
5667
|
+
refetchInterval: false,
|
|
5668
|
+
// no refetching - assume data is immutable until a full page refresh
|
|
5669
|
+
...query,
|
|
5670
|
+
enabled: query.enabled ?? queryOptions.enabled
|
|
5671
|
+
});
|
|
5672
|
+
}
|
|
5673
|
+
|
|
5674
|
+
// src/ensnode/hooks/usePrimaryName.ts
|
|
5675
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
5676
|
+
function usePrimaryName(parameters) {
|
|
5677
|
+
const { options, query = {}, address, ...args } = parameters;
|
|
5678
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5679
|
+
const canEnable = address !== null;
|
|
5680
|
+
const queryOptions = canEnable ? createPrimaryNameQueryOptions(providerOptions, { ...args, address }) : DISABLED_QUERY;
|
|
5681
|
+
return useQuery3({
|
|
5682
|
+
...queryOptions,
|
|
5683
|
+
...query,
|
|
5684
|
+
enabled: canEnable && (query.enabled ?? true)
|
|
5685
|
+
});
|
|
5686
|
+
}
|
|
5687
|
+
|
|
5688
|
+
// src/ensnode/hooks/usePrimaryNames.ts
|
|
5689
|
+
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
5690
|
+
function usePrimaryNames(parameters) {
|
|
5691
|
+
const { options, query = {}, address, ...args } = parameters;
|
|
5692
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5693
|
+
const canEnable = address !== null;
|
|
5694
|
+
const queryOptions = canEnable ? createPrimaryNamesQueryOptions(providerOptions, { ...args, address }) : DISABLED_QUERY;
|
|
5695
|
+
return useQuery4({
|
|
5696
|
+
...queryOptions,
|
|
5697
|
+
...query,
|
|
5698
|
+
enabled: canEnable && (query.enabled ?? true)
|
|
5699
|
+
});
|
|
5700
|
+
}
|
|
5701
|
+
|
|
5702
|
+
// src/ensnode/hooks/useRecords.ts
|
|
5703
|
+
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
5704
|
+
function useRecords(parameters) {
|
|
5705
|
+
const { options, query = {}, name, ...args } = parameters;
|
|
5706
|
+
const _config = useEnsNodeProviderOptions(options);
|
|
5707
|
+
const canEnable = name !== null;
|
|
5708
|
+
const queryOptions = canEnable ? createRecordsQueryOptions(_config, { ...args, name }) : DISABLED_QUERY;
|
|
5709
|
+
return useQuery5({
|
|
5710
|
+
...queryOptions,
|
|
5711
|
+
...query,
|
|
5712
|
+
enabled: canEnable && (query.enabled ?? true)
|
|
5713
|
+
});
|
|
5714
|
+
}
|
|
5715
|
+
|
|
5716
|
+
// src/ensnode/hooks/useRegistrarActions.ts
|
|
5717
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
5718
|
+
function useRegistrarActions(parameters = {}) {
|
|
5719
|
+
const { options, query = {}, ...request } = parameters;
|
|
5720
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5721
|
+
const queryOptions = createRegistrarActionsQueryOptions(providerOptions, request);
|
|
5722
|
+
return useQuery6({
|
|
5723
|
+
...queryOptions,
|
|
5724
|
+
refetchInterval: 10 * 1e3,
|
|
5725
|
+
// 10 seconds - latest registrar actions change frequently
|
|
5726
|
+
...query,
|
|
5727
|
+
enabled: query.enabled ?? queryOptions.enabled
|
|
5728
|
+
});
|
|
5729
|
+
}
|
|
5730
|
+
|
|
5731
|
+
// src/ensnode/hooks/useResolvedIdentity.ts
|
|
5732
|
+
import {
|
|
5733
|
+
ENSNamespaceIds as ENSNamespaceIds3,
|
|
5734
|
+
getResolvePrimaryNameChainIdParam,
|
|
5735
|
+
ResolutionStatusIds as ResolutionStatusIds2
|
|
5736
|
+
} from "@ensnode/ensnode-sdk";
|
|
5737
|
+
function useResolvedIdentity(parameters) {
|
|
5738
|
+
const { identity, namespace, accelerate, query: _query = {} } = parameters;
|
|
5739
|
+
const {
|
|
5740
|
+
data: primaryNameData,
|
|
5741
|
+
status,
|
|
5742
|
+
...query
|
|
5743
|
+
} = usePrimaryName({
|
|
5744
|
+
address: identity.address,
|
|
5745
|
+
chainId: getResolvePrimaryNameChainIdParam(
|
|
5746
|
+
identity.chainId,
|
|
5747
|
+
// NOTE: defaulting here for typechecking, but enabled prevents fetching before namespace is known
|
|
5748
|
+
namespace ?? ENSNamespaceIds3.Mainnet
|
|
5749
|
+
),
|
|
5750
|
+
accelerate,
|
|
5751
|
+
// NOTE: Overriding `gcTime` to prevent unbounded memory growth
|
|
5752
|
+
// in long-running sessions with many identities.
|
|
5753
|
+
query: {
|
|
5754
|
+
...ASSUME_IMMUTABLE_QUERY,
|
|
5755
|
+
// identity changes very rarely
|
|
5756
|
+
gcTime: 60 * 60 * 1e3,
|
|
5757
|
+
// 1 hour
|
|
5758
|
+
refetchInterval: false,
|
|
5759
|
+
// not covered by ASSUME_IMMUTABLE_QUERY
|
|
5760
|
+
..._query,
|
|
5761
|
+
enabled: (_query.enabled ?? true) && namespace !== void 0
|
|
5762
|
+
}
|
|
5763
|
+
});
|
|
5764
|
+
let result;
|
|
5765
|
+
if (status === "pending") {
|
|
5766
|
+
result = identity;
|
|
5767
|
+
} else if (status === "error") {
|
|
5768
|
+
result = {
|
|
5769
|
+
resolutionStatus: ResolutionStatusIds2.Unknown,
|
|
5770
|
+
chainId: identity.chainId,
|
|
5771
|
+
address: identity.address
|
|
5772
|
+
};
|
|
5773
|
+
} else if (primaryNameData.name === null) {
|
|
5774
|
+
result = {
|
|
5775
|
+
resolutionStatus: ResolutionStatusIds2.Unnamed,
|
|
5776
|
+
chainId: identity.chainId,
|
|
5777
|
+
address: identity.address,
|
|
5778
|
+
name: null
|
|
5779
|
+
};
|
|
5780
|
+
} else {
|
|
5781
|
+
result = {
|
|
5782
|
+
resolutionStatus: ResolutionStatusIds2.Named,
|
|
5783
|
+
chainId: identity.chainId,
|
|
5784
|
+
address: identity.address,
|
|
5785
|
+
name: primaryNameData.name
|
|
5786
|
+
};
|
|
5787
|
+
}
|
|
5788
|
+
return {
|
|
5789
|
+
...query,
|
|
5790
|
+
identity: result
|
|
5791
|
+
};
|
|
5792
|
+
}
|
|
5793
|
+
|
|
5794
|
+
// src/ensnode/hooks/useSwrQuery.ts
|
|
5795
|
+
import {
|
|
5796
|
+
useQuery as useQuery7,
|
|
5797
|
+
useQueryClient
|
|
5798
|
+
} from "@tanstack/react-query";
|
|
5799
|
+
import { useMemo } from "react";
|
|
5800
|
+
function useSwrQuery(options, queryClient) {
|
|
5801
|
+
const queryClientFromContext = useQueryClient();
|
|
5802
|
+
const derivedQueryClient = queryClient ?? queryClientFromContext;
|
|
5803
|
+
const cachedSuccessfulResult = derivedQueryClient.getQueryData(options.queryKey);
|
|
5804
|
+
const queryResult = useQuery7(
|
|
5805
|
+
{
|
|
5806
|
+
...options,
|
|
5807
|
+
// cached result can never be stale
|
|
5808
|
+
staleTime: cachedSuccessfulResult ? Infinity : void 0,
|
|
5809
|
+
// cached result can never be removed by garbage collector
|
|
5810
|
+
gcTime: cachedSuccessfulResult ? Infinity : void 0
|
|
5811
|
+
},
|
|
5812
|
+
queryClient
|
|
5813
|
+
);
|
|
5814
|
+
const memoizedQueryResult = useMemo(() => {
|
|
5815
|
+
if (queryResult.isError && cachedSuccessfulResult) {
|
|
5816
|
+
return {
|
|
5817
|
+
...queryResult,
|
|
5818
|
+
// set error props
|
|
5819
|
+
isError: false,
|
|
5820
|
+
error: null,
|
|
5821
|
+
isRefetchError: false,
|
|
5822
|
+
isLoadingError: false,
|
|
5823
|
+
// st success props
|
|
5824
|
+
isSuccess: true,
|
|
5825
|
+
status: "success",
|
|
5826
|
+
data: cachedSuccessfulResult
|
|
5827
|
+
};
|
|
5828
|
+
}
|
|
5829
|
+
return queryResult;
|
|
5830
|
+
}, [queryResult, cachedSuccessfulResult]);
|
|
5831
|
+
return memoizedQueryResult;
|
|
5832
|
+
}
|
|
5833
|
+
|
|
5834
|
+
// src/ensnode/provider.tsx
|
|
5835
|
+
import { QueryClient, QueryClientProvider, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
|
|
5836
|
+
import { createElement, useMemo as useMemo2 } from "react";
|
|
5837
|
+
import { EnsNodeClient as EnsNodeClient2 } from "@ensnode/ensnode-sdk";
|
|
5838
|
+
function EnsNodeInternalProvider({
|
|
5839
|
+
children,
|
|
5840
|
+
options
|
|
5841
|
+
}) {
|
|
5842
|
+
return createElement(EnsNodeContext.Provider, { value: options }, children);
|
|
5843
|
+
}
|
|
5844
|
+
function EnsNodeProvider(parameters) {
|
|
5845
|
+
const { children, options, queryClient, queryClientOptions } = parameters;
|
|
5846
|
+
let hasExistingQueryClient = false;
|
|
5847
|
+
try {
|
|
5848
|
+
hasExistingQueryClient = Boolean(useQueryClient2());
|
|
5849
|
+
} catch {
|
|
5850
|
+
hasExistingQueryClient = false;
|
|
5851
|
+
}
|
|
5852
|
+
if (queryClient) {
|
|
5853
|
+
if (!hasExistingQueryClient) {
|
|
5854
|
+
throw new Error(
|
|
5855
|
+
"When providing a custom queryClient, you must wrap your app with QueryClientProvider. Either remove the queryClient prop to use auto-managed setup, or wrap with QueryClientProvider."
|
|
5856
|
+
);
|
|
5857
|
+
}
|
|
5858
|
+
return createElement(EnsNodeInternalProvider, { options, children });
|
|
5859
|
+
}
|
|
5860
|
+
if (hasExistingQueryClient) {
|
|
5861
|
+
return createElement(EnsNodeInternalProvider, { options, children });
|
|
5862
|
+
}
|
|
5863
|
+
const defaultQueryClient = useMemo2(
|
|
5864
|
+
() => new QueryClient({
|
|
5865
|
+
defaultOptions: {
|
|
5866
|
+
queries: {
|
|
5867
|
+
retry: 3,
|
|
5868
|
+
staleTime: 1e3 * 60 * 5,
|
|
5869
|
+
// 5 minutes
|
|
5870
|
+
gcTime: 1e3 * 60 * 30,
|
|
5871
|
+
// 30 minutes
|
|
5872
|
+
refetchInterval: 1e3 * 10
|
|
5873
|
+
// 10 seconds
|
|
5874
|
+
}
|
|
5875
|
+
},
|
|
5876
|
+
...queryClientOptions
|
|
5877
|
+
}),
|
|
5878
|
+
[queryClientOptions]
|
|
5879
|
+
);
|
|
5880
|
+
return createElement(
|
|
5881
|
+
QueryClientProvider,
|
|
5882
|
+
{ client: defaultQueryClient },
|
|
5883
|
+
createElement(EnsNodeInternalProvider, { options, children })
|
|
5884
|
+
);
|
|
5885
|
+
}
|
|
5886
|
+
function createEnsNodeProviderOptions(options) {
|
|
5887
|
+
const url = options?.url ? new URL(options.url) : EnsNodeClient2.defaultOptions().url;
|
|
5888
|
+
return {
|
|
5889
|
+
client: {
|
|
5890
|
+
...EnsNodeClient2.defaultOptions(),
|
|
5891
|
+
url
|
|
5892
|
+
}
|
|
5893
|
+
};
|
|
5894
|
+
}
|
|
5895
|
+
|
|
5524
5896
|
// src/hooks/useIsMobile.tsx
|
|
5525
5897
|
import * as React5 from "react";
|
|
5526
5898
|
var MOBILE_BREAKPOINT = 640;
|
|
@@ -5615,7 +5987,7 @@ function DisplayIdentity({
|
|
|
5615
5987
|
)
|
|
5616
5988
|
}
|
|
5617
5989
|
);
|
|
5618
|
-
} else if (identity.resolutionStatus ===
|
|
5990
|
+
} else if (identity.resolutionStatus === ResolutionStatusIds3.Unnamed || identity.resolutionStatus === ResolutionStatusIds3.Unknown) {
|
|
5619
5991
|
avatar = /* @__PURE__ */ jsx40(
|
|
5620
5992
|
"div",
|
|
5621
5993
|
{
|
|
@@ -6043,18 +6415,22 @@ function useNow(props) {
|
|
|
6043
6415
|
return throttledClock;
|
|
6044
6416
|
}
|
|
6045
6417
|
export {
|
|
6418
|
+
ASSUME_IMMUTABLE_QUERY,
|
|
6046
6419
|
AbsoluteTime,
|
|
6047
6420
|
AddressDisplay,
|
|
6048
6421
|
ChainExplorerIcon,
|
|
6049
6422
|
ChainIcon,
|
|
6050
6423
|
ChainName,
|
|
6051
6424
|
CopyButton,
|
|
6425
|
+
DISABLED_QUERY,
|
|
6052
6426
|
DisplayDuration,
|
|
6053
6427
|
DisplayIdentity,
|
|
6054
6428
|
EfpIcon,
|
|
6055
6429
|
EmailIcon,
|
|
6056
6430
|
EnsAvatar,
|
|
6057
6431
|
EnsIcon,
|
|
6432
|
+
EnsNodeContext,
|
|
6433
|
+
EnsNodeProvider,
|
|
6058
6434
|
EnsServiceProviderIcon,
|
|
6059
6435
|
FarcasterIcon,
|
|
6060
6436
|
Footer,
|
|
@@ -6072,6 +6448,13 @@ export {
|
|
|
6072
6448
|
SUPPORTED_CHAINS,
|
|
6073
6449
|
TelegramIcon,
|
|
6074
6450
|
TwitterIcon,
|
|
6451
|
+
createEnsNodeProviderOptions,
|
|
6452
|
+
createIndexingStatusQueryOptions,
|
|
6453
|
+
createNameTokensQueryOptions,
|
|
6454
|
+
createPrimaryNameQueryOptions,
|
|
6455
|
+
createPrimaryNamesQueryOptions,
|
|
6456
|
+
createRecordsQueryOptions,
|
|
6457
|
+
createRegistrarActionsQueryOptions,
|
|
6075
6458
|
formatRelativeTime,
|
|
6076
6459
|
getBlockExplorerAddressDetailsUrl,
|
|
6077
6460
|
getBlockExplorerBlockUrl,
|
|
@@ -6082,8 +6465,18 @@ export {
|
|
|
6082
6465
|
getEnsManagerNameDetailsUrl,
|
|
6083
6466
|
getEnsManagerUrl,
|
|
6084
6467
|
getEnsMetadataServiceAvatarUrl,
|
|
6468
|
+
queryKeys,
|
|
6469
|
+
useEnsNodeProviderOptions,
|
|
6470
|
+
useIndexingStatus,
|
|
6085
6471
|
useIsMobile,
|
|
6086
|
-
|
|
6472
|
+
useNameTokens,
|
|
6473
|
+
useNow,
|
|
6474
|
+
usePrimaryName,
|
|
6475
|
+
usePrimaryNames,
|
|
6476
|
+
useRecords,
|
|
6477
|
+
useRegistrarActions,
|
|
6478
|
+
useResolvedIdentity,
|
|
6479
|
+
useSwrQuery
|
|
6087
6480
|
};
|
|
6088
6481
|
/*! Bundled license information:
|
|
6089
6482
|
|