@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.cjs
CHANGED
|
@@ -30,16 +30,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
33
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/version.js
|
|
34
34
|
var version;
|
|
35
35
|
var init_version = __esm({
|
|
36
|
-
"../../node_modules/.pnpm/viem@2.
|
|
36
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/version.js"() {
|
|
37
37
|
"use strict";
|
|
38
|
-
version = "2.
|
|
38
|
+
version = "2.50.3";
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
42
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/base.js
|
|
43
43
|
function walk(err, fn) {
|
|
44
44
|
if (fn?.(err))
|
|
45
45
|
return err;
|
|
@@ -49,7 +49,7 @@ function walk(err, fn) {
|
|
|
49
49
|
}
|
|
50
50
|
var errorConfig, BaseError;
|
|
51
51
|
var init_base = __esm({
|
|
52
|
-
"../../node_modules/.pnpm/viem@2.
|
|
52
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/base.js"() {
|
|
53
53
|
"use strict";
|
|
54
54
|
init_version();
|
|
55
55
|
errorConfig = {
|
|
@@ -130,10 +130,10 @@ var init_base = __esm({
|
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
|
|
133
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
133
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/encoding.js
|
|
134
134
|
var IntegerOutOfRangeError, SizeOverflowError;
|
|
135
135
|
var init_encoding = __esm({
|
|
136
|
-
"../../node_modules/.pnpm/viem@2.
|
|
136
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/encoding.js"() {
|
|
137
137
|
"use strict";
|
|
138
138
|
init_base();
|
|
139
139
|
IntegerOutOfRangeError = class extends BaseError {
|
|
@@ -149,7 +149,7 @@ var init_encoding = __esm({
|
|
|
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/isHex.js
|
|
153
153
|
function isHex(value, { strict = true } = {}) {
|
|
154
154
|
if (!value)
|
|
155
155
|
return false;
|
|
@@ -158,25 +158,25 @@ function isHex(value, { strict = true } = {}) {
|
|
|
158
158
|
return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
|
|
159
159
|
}
|
|
160
160
|
var init_isHex = __esm({
|
|
161
|
-
"../../node_modules/.pnpm/viem@2.
|
|
161
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/isHex.js"() {
|
|
162
162
|
"use strict";
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
166
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/size.js
|
|
167
167
|
function size(value) {
|
|
168
168
|
if (isHex(value, { strict: false }))
|
|
169
169
|
return Math.ceil((value.length - 2) / 2);
|
|
170
170
|
return value.length;
|
|
171
171
|
}
|
|
172
172
|
var init_size = __esm({
|
|
173
|
-
"../../node_modules/.pnpm/viem@2.
|
|
173
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/size.js"() {
|
|
174
174
|
"use strict";
|
|
175
175
|
init_isHex();
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
178
|
|
|
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/utils/data/trim.js
|
|
180
180
|
function trim(hexOrBytes, { dir = "left" } = {}) {
|
|
181
181
|
let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
|
|
182
182
|
let sliceLength = 0;
|
|
@@ -195,15 +195,15 @@ function trim(hexOrBytes, { dir = "left" } = {}) {
|
|
|
195
195
|
return data;
|
|
196
196
|
}
|
|
197
197
|
var init_trim = __esm({
|
|
198
|
-
"../../node_modules/.pnpm/viem@2.
|
|
198
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/trim.js"() {
|
|
199
199
|
"use strict";
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
202
|
|
|
203
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
203
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/data.js
|
|
204
204
|
var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError;
|
|
205
205
|
var init_data = __esm({
|
|
206
|
-
"../../node_modules/.pnpm/viem@2.
|
|
206
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/data.js"() {
|
|
207
207
|
"use strict";
|
|
208
208
|
init_base();
|
|
209
209
|
SliceOffsetOutOfBoundsError = class extends BaseError {
|
|
@@ -219,7 +219,7 @@ var init_data = __esm({
|
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
221
|
|
|
222
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
222
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/pad.js
|
|
223
223
|
function pad(hexOrBytes, { dir, size: size2 = 32 } = {}) {
|
|
224
224
|
if (typeof hexOrBytes === "string")
|
|
225
225
|
return padHex(hexOrBytes, { dir, size: size2 });
|
|
@@ -254,13 +254,13 @@ function padBytes(bytes, { dir, size: size2 = 32 } = {}) {
|
|
|
254
254
|
return paddedBytes;
|
|
255
255
|
}
|
|
256
256
|
var init_pad = __esm({
|
|
257
|
-
"../../node_modules/.pnpm/viem@2.
|
|
257
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/pad.js"() {
|
|
258
258
|
"use strict";
|
|
259
259
|
init_data();
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
|
|
263
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
263
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toHex.js
|
|
264
264
|
function toHex(value, opts = {}) {
|
|
265
265
|
if (typeof value === "number" || typeof value === "bigint")
|
|
266
266
|
return numberToHex(value, opts);
|
|
@@ -325,7 +325,7 @@ function stringToHex(value_, opts = {}) {
|
|
|
325
325
|
}
|
|
326
326
|
var hexes, encoder;
|
|
327
327
|
var init_toHex = __esm({
|
|
328
|
-
"../../node_modules/.pnpm/viem@2.
|
|
328
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toHex.js"() {
|
|
329
329
|
"use strict";
|
|
330
330
|
init_encoding();
|
|
331
331
|
init_pad();
|
|
@@ -335,7 +335,7 @@ var init_toHex = __esm({
|
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
337
|
|
|
338
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
338
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toBytes.js
|
|
339
339
|
function toBytes(value, opts = {}) {
|
|
340
340
|
if (typeof value === "number" || typeof value === "bigint")
|
|
341
341
|
return numberToBytes(value, opts);
|
|
@@ -398,7 +398,7 @@ function stringToBytes(value, opts = {}) {
|
|
|
398
398
|
}
|
|
399
399
|
var encoder2, charCodeMap;
|
|
400
400
|
var init_toBytes = __esm({
|
|
401
|
-
"../../node_modules/.pnpm/viem@2.
|
|
401
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toBytes.js"() {
|
|
402
402
|
"use strict";
|
|
403
403
|
init_base();
|
|
404
404
|
init_isHex();
|
|
@@ -417,7 +417,7 @@ var init_toBytes = __esm({
|
|
|
417
417
|
}
|
|
418
418
|
});
|
|
419
419
|
|
|
420
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
420
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/fromHex.js
|
|
421
421
|
function assertSize(hexOrBytes, { size: size2 }) {
|
|
422
422
|
if (size(hexOrBytes) > size2)
|
|
423
423
|
throw new SizeOverflowError({
|
|
@@ -439,17 +439,27 @@ function hexToBigInt(hex, opts = {}) {
|
|
|
439
439
|
return value - BigInt(`0x${"f".padStart(size2 * 2, "f")}`) - 1n;
|
|
440
440
|
}
|
|
441
441
|
function hexToNumber(hex, opts = {}) {
|
|
442
|
-
|
|
442
|
+
const value = hexToBigInt(hex, opts);
|
|
443
|
+
const number = Number(value);
|
|
444
|
+
if (!Number.isSafeInteger(number))
|
|
445
|
+
throw new IntegerOutOfRangeError({
|
|
446
|
+
max: `${Number.MAX_SAFE_INTEGER}`,
|
|
447
|
+
min: `${Number.MIN_SAFE_INTEGER}`,
|
|
448
|
+
signed: opts.signed,
|
|
449
|
+
size: opts.size,
|
|
450
|
+
value: `${value}n`
|
|
451
|
+
});
|
|
452
|
+
return number;
|
|
443
453
|
}
|
|
444
454
|
var init_fromHex = __esm({
|
|
445
|
-
"../../node_modules/.pnpm/viem@2.
|
|
455
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/fromHex.js"() {
|
|
446
456
|
"use strict";
|
|
447
457
|
init_encoding();
|
|
448
458
|
init_size();
|
|
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/formatter.js
|
|
453
463
|
function defineFormatter(type, format) {
|
|
454
464
|
return ({ exclude, format: overrides }) => {
|
|
455
465
|
return {
|
|
@@ -471,12 +481,12 @@ function defineFormatter(type, format) {
|
|
|
471
481
|
};
|
|
472
482
|
}
|
|
473
483
|
var init_formatter = __esm({
|
|
474
|
-
"../../node_modules/.pnpm/viem@2.
|
|
484
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/formatter.js"() {
|
|
475
485
|
"use strict";
|
|
476
486
|
}
|
|
477
487
|
});
|
|
478
488
|
|
|
479
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
489
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/transactionRequest.js
|
|
480
490
|
function formatTransactionRequest(request, _) {
|
|
481
491
|
const rpcRequest = {};
|
|
482
492
|
if (typeof request.authorizationList !== "undefined")
|
|
@@ -530,7 +540,7 @@ function formatAuthorizationList2(authorizationList) {
|
|
|
530
540
|
}
|
|
531
541
|
var rpcTransactionType;
|
|
532
542
|
var init_transactionRequest = __esm({
|
|
533
|
-
"../../node_modules/.pnpm/viem@2.
|
|
543
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/transactionRequest.js"() {
|
|
534
544
|
"use strict";
|
|
535
545
|
init_toHex();
|
|
536
546
|
rpcTransactionType = {
|
|
@@ -543,10 +553,10 @@ var init_transactionRequest = __esm({
|
|
|
543
553
|
}
|
|
544
554
|
});
|
|
545
555
|
|
|
546
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
556
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/number.js
|
|
547
557
|
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;
|
|
548
558
|
var init_number = __esm({
|
|
549
|
-
"../../node_modules/.pnpm/viem@2.
|
|
559
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/number.js"() {
|
|
550
560
|
"use strict";
|
|
551
561
|
maxInt8 = 2n ** (8n - 1n) - 1n;
|
|
552
562
|
maxInt16 = 2n ** (16n - 1n) - 1n;
|
|
@@ -647,20 +657,20 @@ var init_number = __esm({
|
|
|
647
657
|
}
|
|
648
658
|
});
|
|
649
659
|
|
|
650
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
660
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/concat.js
|
|
651
661
|
function concatHex(values) {
|
|
652
662
|
return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
|
653
663
|
}
|
|
654
664
|
var init_concat = __esm({
|
|
655
|
-
"../../node_modules/.pnpm/viem@2.
|
|
665
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/concat.js"() {
|
|
656
666
|
"use strict";
|
|
657
667
|
}
|
|
658
668
|
});
|
|
659
669
|
|
|
660
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
670
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/cursor.js
|
|
661
671
|
var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;
|
|
662
672
|
var init_cursor = __esm({
|
|
663
|
-
"../../node_modules/.pnpm/viem@2.
|
|
673
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/cursor.js"() {
|
|
664
674
|
"use strict";
|
|
665
675
|
init_base();
|
|
666
676
|
NegativeOffsetError = class extends BaseError {
|
|
@@ -683,18 +693,18 @@ var init_cursor = __esm({
|
|
|
683
693
|
}
|
|
684
694
|
});
|
|
685
695
|
|
|
686
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
696
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/cursor.js
|
|
687
697
|
function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
|
688
698
|
const cursor = Object.create(staticCursor);
|
|
689
699
|
cursor.bytes = bytes;
|
|
690
|
-
cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
700
|
+
cursor.dataView = new DataView(bytes.buffer ?? bytes, bytes.byteOffset, bytes.byteLength);
|
|
691
701
|
cursor.positionReadCount = /* @__PURE__ */ new Map();
|
|
692
702
|
cursor.recursiveReadLimit = recursiveReadLimit;
|
|
693
703
|
return cursor;
|
|
694
704
|
}
|
|
695
705
|
var staticCursor;
|
|
696
706
|
var init_cursor2 = __esm({
|
|
697
|
-
"../../node_modules/.pnpm/viem@2.
|
|
707
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/cursor.js"() {
|
|
698
708
|
"use strict";
|
|
699
709
|
init_cursor();
|
|
700
710
|
staticCursor = {
|
|
@@ -859,10 +869,10 @@ var init_cursor2 = __esm({
|
|
|
859
869
|
}
|
|
860
870
|
});
|
|
861
871
|
|
|
862
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
872
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/unit.js
|
|
863
873
|
var etherUnits, gweiUnits;
|
|
864
874
|
var init_unit = __esm({
|
|
865
|
-
"../../node_modules/.pnpm/viem@2.
|
|
875
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/unit.js"() {
|
|
866
876
|
"use strict";
|
|
867
877
|
etherUnits = {
|
|
868
878
|
gwei: 9,
|
|
@@ -875,7 +885,7 @@ var init_unit = __esm({
|
|
|
875
885
|
}
|
|
876
886
|
});
|
|
877
887
|
|
|
878
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
888
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatUnits.js
|
|
879
889
|
function formatUnits(value, decimals) {
|
|
880
890
|
let display = value.toString();
|
|
881
891
|
const negative = display.startsWith("-");
|
|
@@ -890,36 +900,36 @@ function formatUnits(value, decimals) {
|
|
|
890
900
|
return `${negative ? "-" : ""}${integer || "0"}${fraction ? `.${fraction}` : ""}`;
|
|
891
901
|
}
|
|
892
902
|
var init_formatUnits = __esm({
|
|
893
|
-
"../../node_modules/.pnpm/viem@2.
|
|
903
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatUnits.js"() {
|
|
894
904
|
"use strict";
|
|
895
905
|
}
|
|
896
906
|
});
|
|
897
907
|
|
|
898
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
908
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatEther.js
|
|
899
909
|
function formatEther(wei, unit = "wei") {
|
|
900
910
|
return formatUnits(wei, etherUnits[unit]);
|
|
901
911
|
}
|
|
902
912
|
var init_formatEther = __esm({
|
|
903
|
-
"../../node_modules/.pnpm/viem@2.
|
|
913
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatEther.js"() {
|
|
904
914
|
"use strict";
|
|
905
915
|
init_unit();
|
|
906
916
|
init_formatUnits();
|
|
907
917
|
}
|
|
908
918
|
});
|
|
909
919
|
|
|
910
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
920
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatGwei.js
|
|
911
921
|
function formatGwei(wei, unit = "wei") {
|
|
912
922
|
return formatUnits(wei, gweiUnits[unit]);
|
|
913
923
|
}
|
|
914
924
|
var init_formatGwei = __esm({
|
|
915
|
-
"../../node_modules/.pnpm/viem@2.
|
|
925
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/unit/formatGwei.js"() {
|
|
916
926
|
"use strict";
|
|
917
927
|
init_unit();
|
|
918
928
|
init_formatUnits();
|
|
919
929
|
}
|
|
920
930
|
});
|
|
921
931
|
|
|
922
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
932
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/transaction.js
|
|
923
933
|
function prettyPrint(args) {
|
|
924
934
|
const entries = Object.entries(args).map(([key, value]) => {
|
|
925
935
|
if (value === void 0 || value === false)
|
|
@@ -929,19 +939,11 @@ function prettyPrint(args) {
|
|
|
929
939
|
const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);
|
|
930
940
|
return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join("\n");
|
|
931
941
|
}
|
|
932
|
-
var
|
|
942
|
+
var InvalidLegacyVError, InvalidSerializableTransactionError, InvalidStorageKeySizeError;
|
|
933
943
|
var init_transaction = __esm({
|
|
934
|
-
"../../node_modules/.pnpm/viem@2.
|
|
944
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/transaction.js"() {
|
|
935
945
|
"use strict";
|
|
936
946
|
init_base();
|
|
937
|
-
FeeConflictError = class extends BaseError {
|
|
938
|
-
constructor() {
|
|
939
|
-
super([
|
|
940
|
-
"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.",
|
|
941
|
-
"Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."
|
|
942
|
-
].join("\n"), { name: "FeeConflictError" });
|
|
943
|
-
}
|
|
944
|
-
};
|
|
945
947
|
InvalidLegacyVError = class extends BaseError {
|
|
946
948
|
constructor({ v }) {
|
|
947
949
|
super(`Invalid \`v\` value "${v}". Expected 27 or 28.`, {
|
|
@@ -1362,10 +1364,10 @@ var init_sha2 = __esm({
|
|
|
1362
1364
|
}
|
|
1363
1365
|
});
|
|
1364
1366
|
|
|
1365
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1367
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/address.js
|
|
1366
1368
|
var InvalidAddressError;
|
|
1367
1369
|
var init_address = __esm({
|
|
1368
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1370
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/address.js"() {
|
|
1369
1371
|
"use strict";
|
|
1370
1372
|
init_base();
|
|
1371
1373
|
InvalidAddressError = class extends BaseError {
|
|
@@ -1382,10 +1384,10 @@ var init_address = __esm({
|
|
|
1382
1384
|
}
|
|
1383
1385
|
});
|
|
1384
1386
|
|
|
1385
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1387
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/chain.js
|
|
1386
1388
|
var InvalidChainIdError;
|
|
1387
1389
|
var init_chain = __esm({
|
|
1388
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1390
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/chain.js"() {
|
|
1389
1391
|
"use strict";
|
|
1390
1392
|
init_base();
|
|
1391
1393
|
InvalidChainIdError = class extends BaseError {
|
|
@@ -1396,10 +1398,10 @@ var init_chain = __esm({
|
|
|
1396
1398
|
}
|
|
1397
1399
|
});
|
|
1398
1400
|
|
|
1399
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1401
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/node.js
|
|
1400
1402
|
var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError, UnknownNodeError;
|
|
1401
1403
|
var init_node = __esm({
|
|
1402
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1404
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/node.js"() {
|
|
1403
1405
|
"use strict";
|
|
1404
1406
|
init_formatGwei();
|
|
1405
1407
|
init_base();
|
|
@@ -1422,7 +1424,7 @@ var init_node = __esm({
|
|
|
1422
1424
|
enumerable: true,
|
|
1423
1425
|
configurable: true,
|
|
1424
1426
|
writable: true,
|
|
1425
|
-
value: /execution reverted/
|
|
1427
|
+
value: /execution reverted|gas required exceeds allowance/
|
|
1426
1428
|
});
|
|
1427
1429
|
FeeCapTooHighError = class extends BaseError {
|
|
1428
1430
|
constructor({ cause, maxFeePerGas } = {}) {
|
|
@@ -1583,10 +1585,10 @@ var init_node = __esm({
|
|
|
1583
1585
|
}
|
|
1584
1586
|
});
|
|
1585
1587
|
|
|
1586
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1588
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/lru.js
|
|
1587
1589
|
var LruMap;
|
|
1588
1590
|
var init_lru = __esm({
|
|
1589
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1591
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/lru.js"() {
|
|
1590
1592
|
"use strict";
|
|
1591
1593
|
LruMap = class extends Map {
|
|
1592
1594
|
constructor(size2) {
|
|
@@ -1601,18 +1603,20 @@ var init_lru = __esm({
|
|
|
1601
1603
|
}
|
|
1602
1604
|
get(key) {
|
|
1603
1605
|
const value = super.get(key);
|
|
1604
|
-
if (super.has(key)
|
|
1605
|
-
|
|
1606
|
+
if (super.has(key)) {
|
|
1607
|
+
super.delete(key);
|
|
1606
1608
|
super.set(key, value);
|
|
1607
1609
|
}
|
|
1608
1610
|
return value;
|
|
1609
1611
|
}
|
|
1610
1612
|
set(key, value) {
|
|
1613
|
+
if (super.has(key))
|
|
1614
|
+
super.delete(key);
|
|
1611
1615
|
super.set(key, value);
|
|
1612
1616
|
if (this.maxSize && this.size > this.maxSize) {
|
|
1613
|
-
const firstKey =
|
|
1614
|
-
if (firstKey)
|
|
1615
|
-
|
|
1617
|
+
const firstKey = super.keys().next().value;
|
|
1618
|
+
if (firstKey !== void 0)
|
|
1619
|
+
super.delete(firstKey);
|
|
1616
1620
|
}
|
|
1617
1621
|
return this;
|
|
1618
1622
|
}
|
|
@@ -1809,7 +1813,7 @@ var init_sha3 = __esm({
|
|
|
1809
1813
|
}
|
|
1810
1814
|
});
|
|
1811
1815
|
|
|
1812
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1816
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/keccak256.js
|
|
1813
1817
|
function keccak256(value, to_) {
|
|
1814
1818
|
const to = to_ || "hex";
|
|
1815
1819
|
const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
|
|
@@ -1818,7 +1822,7 @@ function keccak256(value, to_) {
|
|
|
1818
1822
|
return toHex(bytes);
|
|
1819
1823
|
}
|
|
1820
1824
|
var init_keccak256 = __esm({
|
|
1821
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1825
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/keccak256.js"() {
|
|
1822
1826
|
"use strict";
|
|
1823
1827
|
init_sha3();
|
|
1824
1828
|
init_isHex();
|
|
@@ -1827,7 +1831,7 @@ var init_keccak256 = __esm({
|
|
|
1827
1831
|
}
|
|
1828
1832
|
});
|
|
1829
1833
|
|
|
1830
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1834
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/getAddress.js
|
|
1831
1835
|
function checksumAddress(address_, chainId) {
|
|
1832
1836
|
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
|
1833
1837
|
return checksumAddressCache.get(`${address_}.${chainId}`);
|
|
@@ -1853,7 +1857,7 @@ function getAddress(address, chainId) {
|
|
|
1853
1857
|
}
|
|
1854
1858
|
var checksumAddressCache;
|
|
1855
1859
|
var init_getAddress = __esm({
|
|
1856
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1860
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/getAddress.js"() {
|
|
1857
1861
|
"use strict";
|
|
1858
1862
|
init_address();
|
|
1859
1863
|
init_toBytes();
|
|
@@ -1864,7 +1868,7 @@ var init_getAddress = __esm({
|
|
|
1864
1868
|
}
|
|
1865
1869
|
});
|
|
1866
1870
|
|
|
1867
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1871
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/isAddress.js
|
|
1868
1872
|
function isAddress(address, options) {
|
|
1869
1873
|
const { strict = true } = options ?? {};
|
|
1870
1874
|
const cacheKey = `${address}.${strict}`;
|
|
@@ -1884,7 +1888,7 @@ function isAddress(address, options) {
|
|
|
1884
1888
|
}
|
|
1885
1889
|
var addressRegex, isAddressCache;
|
|
1886
1890
|
var init_isAddress = __esm({
|
|
1887
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1891
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/address/isAddress.js"() {
|
|
1888
1892
|
"use strict";
|
|
1889
1893
|
init_lru();
|
|
1890
1894
|
init_getAddress();
|
|
@@ -1893,7 +1897,7 @@ var init_isAddress = __esm({
|
|
|
1893
1897
|
}
|
|
1894
1898
|
});
|
|
1895
1899
|
|
|
1896
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1900
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/slice.js
|
|
1897
1901
|
function slice(value, start, end, { strict } = {}) {
|
|
1898
1902
|
if (isHex(value, { strict: false }))
|
|
1899
1903
|
return sliceHex(value, start, end, {
|
|
@@ -1935,7 +1939,7 @@ function sliceHex(value_, start, end, { strict } = {}) {
|
|
|
1935
1939
|
return value;
|
|
1936
1940
|
}
|
|
1937
1941
|
var init_slice = __esm({
|
|
1938
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1942
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/data/slice.js"() {
|
|
1939
1943
|
"use strict";
|
|
1940
1944
|
init_data();
|
|
1941
1945
|
init_isHex();
|
|
@@ -1943,19 +1947,19 @@ var init_slice = __esm({
|
|
|
1943
1947
|
}
|
|
1944
1948
|
});
|
|
1945
1949
|
|
|
1946
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1950
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/accounts/utils/parseAccount.js
|
|
1947
1951
|
function parseAccount(account) {
|
|
1948
1952
|
if (typeof account === "string")
|
|
1949
1953
|
return { address: account, type: "json-rpc" };
|
|
1950
1954
|
return account;
|
|
1951
1955
|
}
|
|
1952
1956
|
var init_parseAccount = __esm({
|
|
1953
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1957
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/accounts/utils/parseAccount.js"() {
|
|
1954
1958
|
"use strict";
|
|
1955
1959
|
}
|
|
1956
1960
|
});
|
|
1957
1961
|
|
|
1958
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1962
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/stateOverride.js
|
|
1959
1963
|
function prettyStateMapping(stateMapping) {
|
|
1960
1964
|
return stateMapping.reduce((pretty, { slot, value }) => {
|
|
1961
1965
|
return `${pretty} ${slot}: ${value}
|
|
@@ -1987,15 +1991,15 @@ function prettyStateOverride(stateOverride) {
|
|
|
1987
1991
|
}, " State Override:\n").slice(0, -1);
|
|
1988
1992
|
}
|
|
1989
1993
|
var init_stateOverride = __esm({
|
|
1990
|
-
"../../node_modules/.pnpm/viem@2.
|
|
1994
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/stateOverride.js"() {
|
|
1991
1995
|
"use strict";
|
|
1992
1996
|
}
|
|
1993
1997
|
});
|
|
1994
1998
|
|
|
1995
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
1999
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/contract.js
|
|
1996
2000
|
var CallExecutionError;
|
|
1997
2001
|
var init_contract = __esm({
|
|
1998
|
-
"../../node_modules/.pnpm/viem@2.
|
|
2002
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/contract.js"() {
|
|
1999
2003
|
"use strict";
|
|
2000
2004
|
init_parseAccount();
|
|
2001
2005
|
init_formatEther();
|
|
@@ -2043,7 +2047,7 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
2043
2047
|
}
|
|
2044
2048
|
});
|
|
2045
2049
|
|
|
2046
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2050
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/errors/getNodeError.js
|
|
2047
2051
|
function getNodeError(err, args) {
|
|
2048
2052
|
const message = (err.details || "").toLowerCase();
|
|
2049
2053
|
const executionRevertedError = err instanceof BaseError ? err.walk((e) => e?.code === ExecutionRevertedError.code) : err;
|
|
@@ -2092,14 +2096,14 @@ function getNodeError(err, args) {
|
|
|
2092
2096
|
});
|
|
2093
2097
|
}
|
|
2094
2098
|
var init_getNodeError = __esm({
|
|
2095
|
-
"../../node_modules/.pnpm/viem@2.
|
|
2099
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/errors/getNodeError.js"() {
|
|
2096
2100
|
"use strict";
|
|
2097
2101
|
init_base();
|
|
2098
2102
|
init_node();
|
|
2099
2103
|
}
|
|
2100
2104
|
});
|
|
2101
2105
|
|
|
2102
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2106
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/errors/getCallError.js
|
|
2103
2107
|
function getCallError(err, { docsPath, ...args }) {
|
|
2104
2108
|
const cause = (() => {
|
|
2105
2109
|
const cause2 = getNodeError(err, args);
|
|
@@ -2113,7 +2117,7 @@ function getCallError(err, { docsPath, ...args }) {
|
|
|
2113
2117
|
});
|
|
2114
2118
|
}
|
|
2115
2119
|
var init_getCallError = __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/errors/getCallError.js"() {
|
|
2117
2121
|
"use strict";
|
|
2118
2122
|
init_contract();
|
|
2119
2123
|
init_node();
|
|
@@ -2121,7 +2125,7 @@ var init_getCallError = __esm({
|
|
|
2121
2125
|
}
|
|
2122
2126
|
});
|
|
2123
2127
|
|
|
2124
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2128
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/extract.js
|
|
2125
2129
|
function extract(value_, { format }) {
|
|
2126
2130
|
if (!format)
|
|
2127
2131
|
return {};
|
|
@@ -2140,34 +2144,31 @@ function extract(value_, { format }) {
|
|
|
2140
2144
|
return value;
|
|
2141
2145
|
}
|
|
2142
2146
|
var init_extract = __esm({
|
|
2143
|
-
"../../node_modules/.pnpm/viem@2.
|
|
2147
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/extract.js"() {
|
|
2144
2148
|
"use strict";
|
|
2145
2149
|
}
|
|
2146
2150
|
});
|
|
2147
2151
|
|
|
2148
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2152
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/assertRequest.js
|
|
2149
2153
|
function assertRequest(args) {
|
|
2150
|
-
const { account: account_,
|
|
2154
|
+
const { account: account_, maxFeePerGas, maxPriorityFeePerGas, to } = args;
|
|
2151
2155
|
const account = account_ ? parseAccount(account_) : void 0;
|
|
2152
2156
|
if (account && !isAddress(account.address))
|
|
2153
2157
|
throw new InvalidAddressError({ address: account.address });
|
|
2154
2158
|
if (to && !isAddress(to))
|
|
2155
2159
|
throw new InvalidAddressError({ address: to });
|
|
2156
|
-
if (typeof gasPrice !== "undefined" && (typeof maxFeePerGas !== "undefined" || typeof maxPriorityFeePerGas !== "undefined"))
|
|
2157
|
-
throw new FeeConflictError();
|
|
2158
2160
|
if (maxFeePerGas && maxFeePerGas > maxUint256)
|
|
2159
2161
|
throw new FeeCapTooHighError({ maxFeePerGas });
|
|
2160
2162
|
if (maxPriorityFeePerGas && maxFeePerGas && maxPriorityFeePerGas > maxFeePerGas)
|
|
2161
2163
|
throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });
|
|
2162
2164
|
}
|
|
2163
2165
|
var init_assertRequest = __esm({
|
|
2164
|
-
"../../node_modules/.pnpm/viem@2.
|
|
2166
|
+
"../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/assertRequest.js"() {
|
|
2165
2167
|
"use strict";
|
|
2166
2168
|
init_parseAccount();
|
|
2167
2169
|
init_number();
|
|
2168
2170
|
init_address();
|
|
2169
2171
|
init_node();
|
|
2170
|
-
init_transaction();
|
|
2171
2172
|
init_isAddress();
|
|
2172
2173
|
}
|
|
2173
2174
|
});
|
|
@@ -2175,18 +2176,22 @@ var init_assertRequest = __esm({
|
|
|
2175
2176
|
// src/index.ts
|
|
2176
2177
|
var index_exports = {};
|
|
2177
2178
|
__export(index_exports, {
|
|
2179
|
+
ASSUME_IMMUTABLE_QUERY: () => ASSUME_IMMUTABLE_QUERY,
|
|
2178
2180
|
AbsoluteTime: () => AbsoluteTime,
|
|
2179
2181
|
AddressDisplay: () => AddressDisplay,
|
|
2180
2182
|
ChainExplorerIcon: () => ChainExplorerIcon,
|
|
2181
2183
|
ChainIcon: () => ChainIcon,
|
|
2182
2184
|
ChainName: () => ChainName,
|
|
2183
2185
|
CopyButton: () => CopyButton,
|
|
2186
|
+
DISABLED_QUERY: () => DISABLED_QUERY,
|
|
2184
2187
|
DisplayDuration: () => DisplayDuration,
|
|
2185
2188
|
DisplayIdentity: () => DisplayIdentity,
|
|
2186
2189
|
EfpIcon: () => EfpIcon,
|
|
2187
2190
|
EmailIcon: () => EmailIcon,
|
|
2188
2191
|
EnsAvatar: () => EnsAvatar,
|
|
2189
2192
|
EnsIcon: () => EnsIcon,
|
|
2193
|
+
EnsNodeContext: () => EnsNodeContext,
|
|
2194
|
+
EnsNodeProvider: () => EnsNodeProvider,
|
|
2190
2195
|
EnsServiceProviderIcon: () => EnsServiceProviderIcon,
|
|
2191
2196
|
FarcasterIcon: () => FarcasterIcon,
|
|
2192
2197
|
Footer: () => Footer,
|
|
@@ -2204,6 +2209,13 @@ __export(index_exports, {
|
|
|
2204
2209
|
SUPPORTED_CHAINS: () => SUPPORTED_CHAINS,
|
|
2205
2210
|
TelegramIcon: () => TelegramIcon,
|
|
2206
2211
|
TwitterIcon: () => TwitterIcon,
|
|
2212
|
+
createEnsNodeProviderOptions: () => createEnsNodeProviderOptions,
|
|
2213
|
+
createIndexingStatusQueryOptions: () => createIndexingStatusQueryOptions,
|
|
2214
|
+
createNameTokensQueryOptions: () => createNameTokensQueryOptions,
|
|
2215
|
+
createPrimaryNameQueryOptions: () => createPrimaryNameQueryOptions,
|
|
2216
|
+
createPrimaryNamesQueryOptions: () => createPrimaryNamesQueryOptions,
|
|
2217
|
+
createRecordsQueryOptions: () => createRecordsQueryOptions,
|
|
2218
|
+
createRegistrarActionsQueryOptions: () => createRegistrarActionsQueryOptions,
|
|
2207
2219
|
formatRelativeTime: () => formatRelativeTime,
|
|
2208
2220
|
getBlockExplorerAddressDetailsUrl: () => getBlockExplorerAddressDetailsUrl,
|
|
2209
2221
|
getBlockExplorerBlockUrl: () => getBlockExplorerBlockUrl,
|
|
@@ -2214,25 +2226,45 @@ __export(index_exports, {
|
|
|
2214
2226
|
getEnsManagerNameDetailsUrl: () => getEnsManagerNameDetailsUrl,
|
|
2215
2227
|
getEnsManagerUrl: () => getEnsManagerUrl,
|
|
2216
2228
|
getEnsMetadataServiceAvatarUrl: () => getEnsMetadataServiceAvatarUrl,
|
|
2229
|
+
queryKeys: () => queryKeys,
|
|
2230
|
+
useEnsNodeProviderOptions: () => useEnsNodeProviderOptions,
|
|
2231
|
+
useIndexingStatus: () => useIndexingStatus,
|
|
2217
2232
|
useIsMobile: () => useIsMobile,
|
|
2218
|
-
|
|
2233
|
+
useNameTokens: () => useNameTokens,
|
|
2234
|
+
useNow: () => useNow,
|
|
2235
|
+
usePrimaryName: () => usePrimaryName,
|
|
2236
|
+
usePrimaryNames: () => usePrimaryNames,
|
|
2237
|
+
useRecords: () => useRecords,
|
|
2238
|
+
useRegistrarActions: () => useRegistrarActions,
|
|
2239
|
+
useResolvedIdentity: () => useResolvedIdentity,
|
|
2240
|
+
useSwrQuery: () => useSwrQuery
|
|
2219
2241
|
});
|
|
2220
2242
|
module.exports = __toCommonJS(index_exports);
|
|
2221
2243
|
|
|
2222
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2244
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/chain/defineChain.js
|
|
2223
2245
|
function defineChain(chain) {
|
|
2224
|
-
|
|
2246
|
+
const chainInstance = {
|
|
2225
2247
|
formatters: void 0,
|
|
2226
2248
|
fees: void 0,
|
|
2227
2249
|
serializers: void 0,
|
|
2228
2250
|
...chain
|
|
2229
2251
|
};
|
|
2252
|
+
function extend(base2) {
|
|
2253
|
+
return (fnOrExtended) => {
|
|
2254
|
+
const properties = typeof fnOrExtended === "function" ? fnOrExtended(base2) : fnOrExtended;
|
|
2255
|
+
const combined = { ...base2, ...properties };
|
|
2256
|
+
return Object.assign(combined, { extend: extend(combined) });
|
|
2257
|
+
};
|
|
2258
|
+
}
|
|
2259
|
+
return Object.assign(chainInstance, {
|
|
2260
|
+
extend: extend(chainInstance)
|
|
2261
|
+
});
|
|
2230
2262
|
}
|
|
2231
2263
|
|
|
2232
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2264
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/block.js
|
|
2233
2265
|
init_formatter();
|
|
2234
2266
|
|
|
2235
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2267
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/transaction.js
|
|
2236
2268
|
init_fromHex();
|
|
2237
2269
|
init_formatter();
|
|
2238
2270
|
var transactionType = {
|
|
@@ -2247,6 +2279,9 @@ function formatTransaction(transaction, _) {
|
|
|
2247
2279
|
...transaction,
|
|
2248
2280
|
blockHash: transaction.blockHash ? transaction.blockHash : null,
|
|
2249
2281
|
blockNumber: transaction.blockNumber ? BigInt(transaction.blockNumber) : null,
|
|
2282
|
+
...transaction.blockTimestamp != null && {
|
|
2283
|
+
blockTimestamp: BigInt(transaction.blockTimestamp)
|
|
2284
|
+
},
|
|
2250
2285
|
chainId: transaction.chainId ? hexToNumber(transaction.chainId) : void 0,
|
|
2251
2286
|
gas: transaction.gas ? BigInt(transaction.gas) : void 0,
|
|
2252
2287
|
gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : void 0,
|
|
@@ -2288,9 +2323,8 @@ function formatTransaction(transaction, _) {
|
|
|
2288
2323
|
delete transaction_.maxFeePerGas;
|
|
2289
2324
|
delete transaction_.maxPriorityFeePerGas;
|
|
2290
2325
|
}
|
|
2291
|
-
if (transaction_.type === "eip1559")
|
|
2326
|
+
if (transaction_.type === "eip1559")
|
|
2292
2327
|
delete transaction_.maxFeePerBlobGas;
|
|
2293
|
-
}
|
|
2294
2328
|
return transaction_;
|
|
2295
2329
|
}
|
|
2296
2330
|
var defineTransaction = /* @__PURE__ */ defineFormatter("transaction", formatTransaction);
|
|
@@ -2305,7 +2339,7 @@ function formatAuthorizationList(authorizationList) {
|
|
|
2305
2339
|
}));
|
|
2306
2340
|
}
|
|
2307
2341
|
|
|
2308
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2342
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/block.js
|
|
2309
2343
|
function formatBlock(block, _) {
|
|
2310
2344
|
const transactions = (block.transactions ?? []).map((transaction) => {
|
|
2311
2345
|
if (typeof transaction === "string")
|
|
@@ -2332,12 +2366,13 @@ function formatBlock(block, _) {
|
|
|
2332
2366
|
}
|
|
2333
2367
|
var defineBlock = /* @__PURE__ */ defineFormatter("block", formatBlock);
|
|
2334
2368
|
|
|
2335
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2369
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/log.js
|
|
2336
2370
|
function formatLog(log, { args, eventName } = {}) {
|
|
2337
2371
|
return {
|
|
2338
2372
|
...log,
|
|
2339
2373
|
blockHash: log.blockHash ? log.blockHash : null,
|
|
2340
2374
|
blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,
|
|
2375
|
+
blockTimestamp: log.blockTimestamp ? BigInt(log.blockTimestamp) : log.blockTimestamp === null ? null : void 0,
|
|
2341
2376
|
logIndex: log.logIndex ? Number(log.logIndex) : null,
|
|
2342
2377
|
transactionHash: log.transactionHash ? log.transactionHash : null,
|
|
2343
2378
|
transactionIndex: log.transactionIndex ? Number(log.transactionIndex) : null,
|
|
@@ -2345,7 +2380,7 @@ function formatLog(log, { args, eventName } = {}) {
|
|
|
2345
2380
|
};
|
|
2346
2381
|
}
|
|
2347
2382
|
|
|
2348
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2383
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/formatters/transactionReceipt.js
|
|
2349
2384
|
init_fromHex();
|
|
2350
2385
|
init_formatter();
|
|
2351
2386
|
var receiptStatuses = {
|
|
@@ -2374,7 +2409,7 @@ function formatTransactionReceipt(transactionReceipt, _) {
|
|
|
2374
2409
|
}
|
|
2375
2410
|
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
|
2376
2411
|
|
|
2377
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2412
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/encoding/toRlp.js
|
|
2378
2413
|
init_base();
|
|
2379
2414
|
init_cursor2();
|
|
2380
2415
|
init_toBytes();
|
|
@@ -2467,10 +2502,10 @@ function getSizeOfLength(length) {
|
|
|
2467
2502
|
throw new BaseError("Length is too large.");
|
|
2468
2503
|
}
|
|
2469
2504
|
|
|
2470
|
-
// ../../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/utils/transaction/serializeTransaction.js
|
|
2471
2506
|
init_transaction();
|
|
2472
2507
|
|
|
2473
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2508
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
|
2474
2509
|
init_toHex();
|
|
2475
2510
|
function serializeAuthorizationList(authorizationList) {
|
|
2476
2511
|
if (!authorizationList || authorizationList.length === 0)
|
|
@@ -2489,7 +2524,7 @@ function serializeAuthorizationList(authorizationList) {
|
|
|
2489
2524
|
return serializedAuthorizationList;
|
|
2490
2525
|
}
|
|
2491
2526
|
|
|
2492
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2527
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
|
2493
2528
|
init_toBytes();
|
|
2494
2529
|
init_toHex();
|
|
2495
2530
|
function blobsToCommitments(parameters) {
|
|
@@ -2502,7 +2537,7 @@ function blobsToCommitments(parameters) {
|
|
|
2502
2537
|
return to === "bytes" ? commitments : commitments.map((x) => bytesToHex(x));
|
|
2503
2538
|
}
|
|
2504
2539
|
|
|
2505
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2540
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
|
2506
2541
|
init_toBytes();
|
|
2507
2542
|
init_toHex();
|
|
2508
2543
|
function blobsToProofs(parameters) {
|
|
@@ -2519,14 +2554,14 @@ function blobsToProofs(parameters) {
|
|
|
2519
2554
|
return to === "bytes" ? proofs : proofs.map((x) => bytesToHex(x));
|
|
2520
2555
|
}
|
|
2521
2556
|
|
|
2522
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2557
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
|
2523
2558
|
init_toHex();
|
|
2524
2559
|
|
|
2525
2560
|
// ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js
|
|
2526
2561
|
init_sha2();
|
|
2527
2562
|
var sha2562 = sha256;
|
|
2528
2563
|
|
|
2529
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2564
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/hash/sha256.js
|
|
2530
2565
|
init_isHex();
|
|
2531
2566
|
init_toBytes();
|
|
2532
2567
|
init_toHex();
|
|
@@ -2538,7 +2573,7 @@ function sha2563(value, to_) {
|
|
|
2538
2573
|
return toHex(bytes);
|
|
2539
2574
|
}
|
|
2540
2575
|
|
|
2541
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2576
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
|
2542
2577
|
function commitmentToVersionedHash(parameters) {
|
|
2543
2578
|
const { commitment, version: version2 = 1 } = parameters;
|
|
2544
2579
|
const to = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
|
|
@@ -2547,7 +2582,7 @@ function commitmentToVersionedHash(parameters) {
|
|
|
2547
2582
|
return to === "bytes" ? versionedHash : bytesToHex(versionedHash);
|
|
2548
2583
|
}
|
|
2549
2584
|
|
|
2550
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2585
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
|
2551
2586
|
function commitmentsToVersionedHashes(parameters) {
|
|
2552
2587
|
const { commitments, version: version2 } = parameters;
|
|
2553
2588
|
const to = parameters.to ?? (typeof commitments[0] === "string" ? "hex" : "bytes");
|
|
@@ -2562,7 +2597,7 @@ function commitmentsToVersionedHashes(parameters) {
|
|
|
2562
2597
|
return hashes;
|
|
2563
2598
|
}
|
|
2564
2599
|
|
|
2565
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2600
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/blob.js
|
|
2566
2601
|
var blobsPerTransaction = 6;
|
|
2567
2602
|
var bytesPerFieldElement = 32;
|
|
2568
2603
|
var fieldElementsPerBlob = 4096;
|
|
@@ -2571,10 +2606,10 @@ var maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - // terminator
|
|
|
2571
2606
|
1 - // zero byte (0x00) appended to each field element.
|
|
2572
2607
|
1 * fieldElementsPerBlob * blobsPerTransaction;
|
|
2573
2608
|
|
|
2574
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2609
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/kzg.js
|
|
2575
2610
|
var versionedHashVersionKzg = 1;
|
|
2576
2611
|
|
|
2577
|
-
// ../../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/errors/blob.js
|
|
2578
2613
|
init_base();
|
|
2579
2614
|
var BlobSizeTooLargeError = class extends BaseError {
|
|
2580
2615
|
constructor({ maxSize, size: size2 }) {
|
|
@@ -2609,7 +2644,7 @@ var InvalidVersionedHashVersionError = class extends BaseError {
|
|
|
2609
2644
|
}
|
|
2610
2645
|
};
|
|
2611
2646
|
|
|
2612
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2647
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/toBlobs.js
|
|
2613
2648
|
init_cursor2();
|
|
2614
2649
|
init_size();
|
|
2615
2650
|
init_toBytes();
|
|
@@ -2648,7 +2683,7 @@ function toBlobs(parameters) {
|
|
|
2648
2683
|
return to === "bytes" ? blobs.map((x) => x.bytes) : blobs.map((x) => bytesToHex(x.bytes));
|
|
2649
2684
|
}
|
|
2650
2685
|
|
|
2651
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2686
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
|
2652
2687
|
function toBlobSidecars(parameters) {
|
|
2653
2688
|
const { data, kzg, to } = parameters;
|
|
2654
2689
|
const blobs = parameters.blobs ?? toBlobs({ data, to });
|
|
@@ -2664,12 +2699,12 @@ function toBlobSidecars(parameters) {
|
|
|
2664
2699
|
return sidecars;
|
|
2665
2700
|
}
|
|
2666
2701
|
|
|
2667
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2702
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
|
2668
2703
|
init_concat();
|
|
2669
2704
|
init_trim();
|
|
2670
2705
|
init_toHex();
|
|
2671
2706
|
|
|
2672
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2707
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
|
2673
2708
|
init_number();
|
|
2674
2709
|
init_address();
|
|
2675
2710
|
init_base();
|
|
@@ -2746,7 +2781,7 @@ function assertTransactionLegacy(transaction) {
|
|
|
2746
2781
|
throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
|
|
2747
2782
|
}
|
|
2748
2783
|
|
|
2749
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2784
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
|
2750
2785
|
init_transaction();
|
|
2751
2786
|
function getTransactionType(transaction) {
|
|
2752
2787
|
if (transaction.type)
|
|
@@ -2766,7 +2801,7 @@ function getTransactionType(transaction) {
|
|
|
2766
2801
|
throw new InvalidSerializableTransactionError({ transaction });
|
|
2767
2802
|
}
|
|
2768
2803
|
|
|
2769
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2804
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
|
2770
2805
|
init_address();
|
|
2771
2806
|
init_transaction();
|
|
2772
2807
|
init_isAddress();
|
|
@@ -2789,7 +2824,7 @@ function serializeAccessList(accessList) {
|
|
|
2789
2824
|
return serializedAccessList;
|
|
2790
2825
|
}
|
|
2791
2826
|
|
|
2792
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
2827
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
|
2793
2828
|
function serializeTransaction(transaction, signature) {
|
|
2794
2829
|
const type = getTransactionType(transaction);
|
|
2795
2830
|
if (type === "eip1559")
|
|
@@ -2989,7 +3024,7 @@ function toYParitySignatureArray(transaction, signature_) {
|
|
|
2989
3024
|
return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
|
|
2990
3025
|
}
|
|
2991
3026
|
|
|
2992
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3027
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/contracts.js
|
|
2993
3028
|
var contracts = {
|
|
2994
3029
|
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
2995
3030
|
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
@@ -3003,7 +3038,7 @@ var contracts = {
|
|
|
3003
3038
|
}
|
|
3004
3039
|
};
|
|
3005
3040
|
|
|
3006
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3041
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/formatters.js
|
|
3007
3042
|
init_fromHex();
|
|
3008
3043
|
var formatters = {
|
|
3009
3044
|
block: /* @__PURE__ */ defineBlock({
|
|
@@ -3050,7 +3085,7 @@ var formatters = {
|
|
|
3050
3085
|
})
|
|
3051
3086
|
};
|
|
3052
3087
|
|
|
3053
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3088
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/serializers.js
|
|
3054
3089
|
init_address();
|
|
3055
3090
|
init_isAddress();
|
|
3056
3091
|
init_concat();
|
|
@@ -3096,7 +3131,7 @@ function assertTransactionDeposit(transaction) {
|
|
|
3096
3131
|
throw new InvalidAddressError({ address: to });
|
|
3097
3132
|
}
|
|
3098
3133
|
|
|
3099
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3134
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/op-stack/chainConfig.js
|
|
3100
3135
|
var chainConfig = {
|
|
3101
3136
|
blockTime: 2e3,
|
|
3102
3137
|
contracts,
|
|
@@ -3104,7 +3139,7 @@ var chainConfig = {
|
|
|
3104
3139
|
serializers
|
|
3105
3140
|
};
|
|
3106
3141
|
|
|
3107
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3142
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/arbitrum.js
|
|
3108
3143
|
var arbitrum = /* @__PURE__ */ defineChain({
|
|
3109
3144
|
id: 42161,
|
|
3110
3145
|
name: "Arbitrum One",
|
|
@@ -3130,7 +3165,7 @@ var arbitrum = /* @__PURE__ */ defineChain({
|
|
|
3130
3165
|
}
|
|
3131
3166
|
});
|
|
3132
3167
|
|
|
3133
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3168
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js
|
|
3134
3169
|
var arbitrumSepolia = /* @__PURE__ */ defineChain({
|
|
3135
3170
|
id: 421614,
|
|
3136
3171
|
name: "Arbitrum Sepolia",
|
|
@@ -3161,7 +3196,7 @@ var arbitrumSepolia = /* @__PURE__ */ defineChain({
|
|
|
3161
3196
|
testnet: true
|
|
3162
3197
|
});
|
|
3163
3198
|
|
|
3164
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3199
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/base.js
|
|
3165
3200
|
var sourceId = 1;
|
|
3166
3201
|
var base = /* @__PURE__ */ defineChain({
|
|
3167
3202
|
...chainConfig,
|
|
@@ -3221,7 +3256,7 @@ var basePreconf = /* @__PURE__ */ defineChain({
|
|
|
3221
3256
|
}
|
|
3222
3257
|
});
|
|
3223
3258
|
|
|
3224
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3259
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/baseSepolia.js
|
|
3225
3260
|
var sourceId2 = 11155111;
|
|
3226
3261
|
var baseSepolia = /* @__PURE__ */ defineChain({
|
|
3227
3262
|
...chainConfig,
|
|
@@ -3283,10 +3318,10 @@ var baseSepoliaPreconf = /* @__PURE__ */ defineChain({
|
|
|
3283
3318
|
}
|
|
3284
3319
|
});
|
|
3285
3320
|
|
|
3286
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3321
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/linea/actions/estimateGas.js
|
|
3287
3322
|
init_parseAccount();
|
|
3288
3323
|
|
|
3289
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3324
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/errors/account.js
|
|
3290
3325
|
init_base();
|
|
3291
3326
|
var AccountNotFoundError = class extends BaseError {
|
|
3292
3327
|
constructor({ docsPath } = {}) {
|
|
@@ -3301,7 +3336,7 @@ var AccountNotFoundError = class extends BaseError {
|
|
|
3301
3336
|
}
|
|
3302
3337
|
};
|
|
3303
3338
|
|
|
3304
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3339
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/linea/actions/estimateGas.js
|
|
3305
3340
|
init_toHex();
|
|
3306
3341
|
init_getCallError();
|
|
3307
3342
|
init_extract();
|
|
@@ -3351,7 +3386,7 @@ async function estimateGas(client, args) {
|
|
|
3351
3386
|
}
|
|
3352
3387
|
}
|
|
3353
3388
|
|
|
3354
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3389
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/linea/chainConfig.js
|
|
3355
3390
|
var chainConfig2 = {
|
|
3356
3391
|
fees: {
|
|
3357
3392
|
estimateFeesPerGas,
|
|
@@ -3389,7 +3424,7 @@ async function estimateFeesPerGas({ client, multiply, request, type }) {
|
|
|
3389
3424
|
}
|
|
3390
3425
|
}
|
|
3391
3426
|
|
|
3392
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3427
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/linea.js
|
|
3393
3428
|
var linea = /* @__PURE__ */ defineChain({
|
|
3394
3429
|
...chainConfig2,
|
|
3395
3430
|
id: 59144,
|
|
@@ -3427,7 +3462,7 @@ var linea = /* @__PURE__ */ defineChain({
|
|
|
3427
3462
|
testnet: false
|
|
3428
3463
|
});
|
|
3429
3464
|
|
|
3430
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3465
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/lineaSepolia.js
|
|
3431
3466
|
var lineaSepolia = /* @__PURE__ */ defineChain({
|
|
3432
3467
|
...chainConfig2,
|
|
3433
3468
|
id: 59141,
|
|
@@ -3464,7 +3499,7 @@ var lineaSepolia = /* @__PURE__ */ defineChain({
|
|
|
3464
3499
|
testnet: true
|
|
3465
3500
|
});
|
|
3466
3501
|
|
|
3467
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3502
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/mainnet.js
|
|
3468
3503
|
var mainnet = /* @__PURE__ */ defineChain({
|
|
3469
3504
|
id: 1,
|
|
3470
3505
|
name: "Ethereum",
|
|
@@ -3494,7 +3529,7 @@ var mainnet = /* @__PURE__ */ defineChain({
|
|
|
3494
3529
|
}
|
|
3495
3530
|
});
|
|
3496
3531
|
|
|
3497
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3532
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/optimism.js
|
|
3498
3533
|
var sourceId3 = 1;
|
|
3499
3534
|
var optimism = /* @__PURE__ */ defineChain({
|
|
3500
3535
|
...chainConfig,
|
|
@@ -3543,7 +3578,7 @@ var optimism = /* @__PURE__ */ defineChain({
|
|
|
3543
3578
|
sourceId: sourceId3
|
|
3544
3579
|
});
|
|
3545
3580
|
|
|
3546
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3581
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/optimismSepolia.js
|
|
3547
3582
|
var sourceId4 = 11155111;
|
|
3548
3583
|
var optimismSepolia = /* @__PURE__ */ defineChain({
|
|
3549
3584
|
...chainConfig,
|
|
@@ -3593,7 +3628,7 @@ var optimismSepolia = /* @__PURE__ */ defineChain({
|
|
|
3593
3628
|
sourceId: sourceId4
|
|
3594
3629
|
});
|
|
3595
3630
|
|
|
3596
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3631
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/scroll.js
|
|
3597
3632
|
var scroll = /* @__PURE__ */ defineChain({
|
|
3598
3633
|
id: 534352,
|
|
3599
3634
|
name: "Scroll",
|
|
@@ -3621,7 +3656,7 @@ var scroll = /* @__PURE__ */ defineChain({
|
|
|
3621
3656
|
testnet: false
|
|
3622
3657
|
});
|
|
3623
3658
|
|
|
3624
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3659
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/scrollSepolia.js
|
|
3625
3660
|
var scrollSepolia = /* @__PURE__ */ defineChain({
|
|
3626
3661
|
id: 534351,
|
|
3627
3662
|
name: "Scroll Sepolia",
|
|
@@ -3647,7 +3682,7 @@ var scrollSepolia = /* @__PURE__ */ defineChain({
|
|
|
3647
3682
|
testnet: true
|
|
3648
3683
|
});
|
|
3649
3684
|
|
|
3650
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
3685
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/chains/definitions/sepolia.js
|
|
3651
3686
|
var sepolia = /* @__PURE__ */ defineChain({
|
|
3652
3687
|
id: 11155111,
|
|
3653
3688
|
name: "Sepolia",
|
|
@@ -5202,10 +5237,10 @@ var InfoIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
|
5202
5237
|
}
|
|
5203
5238
|
);
|
|
5204
5239
|
|
|
5205
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
5240
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/constants/address.js
|
|
5206
5241
|
var zeroAddress = "0x0000000000000000000000000000000000000000";
|
|
5207
5242
|
|
|
5208
|
-
// ../../node_modules/.pnpm/viem@2.
|
|
5243
|
+
// ../../node_modules/.pnpm/viem@2.50.3_typescript@5.9.3_zod@4.3.6/node_modules/viem/_esm/index.js
|
|
5209
5244
|
init_getAddress();
|
|
5210
5245
|
|
|
5211
5246
|
// src/components/identity/Address.tsx
|
|
@@ -5584,8 +5619,357 @@ function NameDisplay({ name, className = "nhui:font-medium" }) {
|
|
|
5584
5619
|
}
|
|
5585
5620
|
|
|
5586
5621
|
// src/components/identity/ResolveAndDisplayIdentity.tsx
|
|
5587
|
-
var
|
|
5622
|
+
var import_ensnode_sdk7 = require("@ensnode/ensnode-sdk");
|
|
5623
|
+
|
|
5624
|
+
// src/ensnode/context.ts
|
|
5625
|
+
var import_react4 = require("react");
|
|
5626
|
+
var EnsNodeContext = (0, import_react4.createContext)(void 0);
|
|
5627
|
+
EnsNodeContext.displayName = "EnsNodeContext";
|
|
5628
|
+
|
|
5629
|
+
// src/ensnode/hooks/useEnsNodeProviderOptions.ts
|
|
5630
|
+
var import_react5 = require("react");
|
|
5631
|
+
function useEnsNodeProviderOptions(options) {
|
|
5632
|
+
const contextOptions = (0, import_react5.useContext)(EnsNodeContext);
|
|
5633
|
+
const resolvedOptions = options ?? contextOptions;
|
|
5634
|
+
if (!resolvedOptions) {
|
|
5635
|
+
throw new Error(
|
|
5636
|
+
"useEnsNodeProviderOptions must be used within an EnsNodeProvider or you must pass the options parameter"
|
|
5637
|
+
);
|
|
5638
|
+
}
|
|
5639
|
+
return resolvedOptions;
|
|
5640
|
+
}
|
|
5641
|
+
|
|
5642
|
+
// src/ensnode/hooks/useIndexingStatus.ts
|
|
5643
|
+
var import_react_query2 = require("@tanstack/react-query");
|
|
5644
|
+
|
|
5645
|
+
// src/ensnode/query.ts
|
|
5646
|
+
var import_react_query = require("@tanstack/react-query");
|
|
5588
5647
|
var import_ensnode_sdk4 = require("@ensnode/ensnode-sdk");
|
|
5648
|
+
var ASSUME_IMMUTABLE_QUERY = {
|
|
5649
|
+
staleTime: Infinity,
|
|
5650
|
+
gcTime: Infinity,
|
|
5651
|
+
refetchOnWindowFocus: false,
|
|
5652
|
+
refetchOnReconnect: false,
|
|
5653
|
+
refetchOnMount: false
|
|
5654
|
+
};
|
|
5655
|
+
var DISABLED_QUERY = {
|
|
5656
|
+
queryKey: ["disabled"],
|
|
5657
|
+
queryFn: import_react_query.skipToken
|
|
5658
|
+
};
|
|
5659
|
+
var queryKeys = {
|
|
5660
|
+
base: (url) => ["ensnode", url],
|
|
5661
|
+
resolve: (url) => [...queryKeys.base(url), "resolve"],
|
|
5662
|
+
records: (url, args) => [...queryKeys.resolve(url), "records", args],
|
|
5663
|
+
primaryName: (url, args) => [...queryKeys.resolve(url), "primary-name", args],
|
|
5664
|
+
primaryNames: (url, args) => [...queryKeys.resolve(url), "primary-names", args],
|
|
5665
|
+
indexingStatus: (url) => [...queryKeys.base(url), "indexing-status"],
|
|
5666
|
+
registrarActions: (url, args) => [...queryKeys.base(url), "registrar-actions", args],
|
|
5667
|
+
nameTokens: (url, args) => [...queryKeys.base(url), "name-tokens", args]
|
|
5668
|
+
};
|
|
5669
|
+
function createRecordsQueryOptions(config, args) {
|
|
5670
|
+
return {
|
|
5671
|
+
enabled: true,
|
|
5672
|
+
queryKey: queryKeys.records(config.client.url.href, args),
|
|
5673
|
+
queryFn: async () => {
|
|
5674
|
+
const client = new import_ensnode_sdk4.EnsNodeClient(config.client);
|
|
5675
|
+
return client.resolveRecords(args.name, args.selection, args);
|
|
5676
|
+
}
|
|
5677
|
+
};
|
|
5678
|
+
}
|
|
5679
|
+
function createPrimaryNameQueryOptions(config, args) {
|
|
5680
|
+
return {
|
|
5681
|
+
enabled: true,
|
|
5682
|
+
queryKey: queryKeys.primaryName(config.client.url.href, args),
|
|
5683
|
+
queryFn: async () => {
|
|
5684
|
+
const client = new import_ensnode_sdk4.EnsNodeClient(config.client);
|
|
5685
|
+
return client.resolvePrimaryName(args.address, args.chainId, args);
|
|
5686
|
+
}
|
|
5687
|
+
};
|
|
5688
|
+
}
|
|
5689
|
+
function createPrimaryNamesQueryOptions(config, args) {
|
|
5690
|
+
return {
|
|
5691
|
+
enabled: true,
|
|
5692
|
+
queryKey: queryKeys.primaryNames(config.client.url.href, args),
|
|
5693
|
+
queryFn: async () => {
|
|
5694
|
+
const client = new import_ensnode_sdk4.EnsNodeClient(config.client);
|
|
5695
|
+
return client.resolvePrimaryNames(args.address, args);
|
|
5696
|
+
}
|
|
5697
|
+
};
|
|
5698
|
+
}
|
|
5699
|
+
function createIndexingStatusQueryOptions(config) {
|
|
5700
|
+
return {
|
|
5701
|
+
enabled: true,
|
|
5702
|
+
queryKey: queryKeys.indexingStatus(config.client.url.href),
|
|
5703
|
+
queryFn: async () => {
|
|
5704
|
+
const client = new import_ensnode_sdk4.EnsNodeClient(config.client);
|
|
5705
|
+
return client.indexingStatus();
|
|
5706
|
+
}
|
|
5707
|
+
};
|
|
5708
|
+
}
|
|
5709
|
+
function createRegistrarActionsQueryOptions(config, args) {
|
|
5710
|
+
return {
|
|
5711
|
+
enabled: true,
|
|
5712
|
+
queryKey: queryKeys.registrarActions(config.client.url.href, args),
|
|
5713
|
+
queryFn: async () => {
|
|
5714
|
+
const client = new import_ensnode_sdk4.EnsNodeClient(config.client);
|
|
5715
|
+
return client.registrarActions(args);
|
|
5716
|
+
}
|
|
5717
|
+
};
|
|
5718
|
+
}
|
|
5719
|
+
function createNameTokensQueryOptions(config, args) {
|
|
5720
|
+
return {
|
|
5721
|
+
enabled: true,
|
|
5722
|
+
queryKey: queryKeys.nameTokens(config.client.url.href, args),
|
|
5723
|
+
queryFn: async () => {
|
|
5724
|
+
const client = new import_ensnode_sdk4.EnsNodeClient(config.client);
|
|
5725
|
+
return client.nameTokens(args);
|
|
5726
|
+
}
|
|
5727
|
+
};
|
|
5728
|
+
}
|
|
5729
|
+
|
|
5730
|
+
// src/ensnode/hooks/useIndexingStatus.ts
|
|
5731
|
+
function useIndexingStatus(parameters = {}) {
|
|
5732
|
+
const { options, query = {} } = parameters;
|
|
5733
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5734
|
+
const queryOptions = createIndexingStatusQueryOptions(providerOptions);
|
|
5735
|
+
return (0, import_react_query2.useQuery)({
|
|
5736
|
+
...queryOptions,
|
|
5737
|
+
refetchInterval: 10 * 1e3,
|
|
5738
|
+
// 10 seconds - indexing status changes frequently
|
|
5739
|
+
...query,
|
|
5740
|
+
enabled: query.enabled ?? queryOptions.enabled
|
|
5741
|
+
});
|
|
5742
|
+
}
|
|
5743
|
+
|
|
5744
|
+
// src/ensnode/hooks/useNameTokens.ts
|
|
5745
|
+
var import_react_query3 = require("@tanstack/react-query");
|
|
5746
|
+
function useNameTokens(parameters) {
|
|
5747
|
+
const { options, query = {}, ...request } = parameters;
|
|
5748
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5749
|
+
const queryOptions = createNameTokensQueryOptions(providerOptions, request);
|
|
5750
|
+
return (0, import_react_query3.useQuery)({
|
|
5751
|
+
...queryOptions,
|
|
5752
|
+
refetchInterval: false,
|
|
5753
|
+
// no refetching - assume data is immutable until a full page refresh
|
|
5754
|
+
...query,
|
|
5755
|
+
enabled: query.enabled ?? queryOptions.enabled
|
|
5756
|
+
});
|
|
5757
|
+
}
|
|
5758
|
+
|
|
5759
|
+
// src/ensnode/hooks/usePrimaryName.ts
|
|
5760
|
+
var import_react_query4 = require("@tanstack/react-query");
|
|
5761
|
+
function usePrimaryName(parameters) {
|
|
5762
|
+
const { options, query = {}, address, ...args } = parameters;
|
|
5763
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5764
|
+
const canEnable = address !== null;
|
|
5765
|
+
const queryOptions = canEnable ? createPrimaryNameQueryOptions(providerOptions, { ...args, address }) : DISABLED_QUERY;
|
|
5766
|
+
return (0, import_react_query4.useQuery)({
|
|
5767
|
+
...queryOptions,
|
|
5768
|
+
...query,
|
|
5769
|
+
enabled: canEnable && (query.enabled ?? true)
|
|
5770
|
+
});
|
|
5771
|
+
}
|
|
5772
|
+
|
|
5773
|
+
// src/ensnode/hooks/usePrimaryNames.ts
|
|
5774
|
+
var import_react_query5 = require("@tanstack/react-query");
|
|
5775
|
+
function usePrimaryNames(parameters) {
|
|
5776
|
+
const { options, query = {}, address, ...args } = parameters;
|
|
5777
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5778
|
+
const canEnable = address !== null;
|
|
5779
|
+
const queryOptions = canEnable ? createPrimaryNamesQueryOptions(providerOptions, { ...args, address }) : DISABLED_QUERY;
|
|
5780
|
+
return (0, import_react_query5.useQuery)({
|
|
5781
|
+
...queryOptions,
|
|
5782
|
+
...query,
|
|
5783
|
+
enabled: canEnable && (query.enabled ?? true)
|
|
5784
|
+
});
|
|
5785
|
+
}
|
|
5786
|
+
|
|
5787
|
+
// src/ensnode/hooks/useRecords.ts
|
|
5788
|
+
var import_react_query6 = require("@tanstack/react-query");
|
|
5789
|
+
function useRecords(parameters) {
|
|
5790
|
+
const { options, query = {}, name, ...args } = parameters;
|
|
5791
|
+
const _config = useEnsNodeProviderOptions(options);
|
|
5792
|
+
const canEnable = name !== null;
|
|
5793
|
+
const queryOptions = canEnable ? createRecordsQueryOptions(_config, { ...args, name }) : DISABLED_QUERY;
|
|
5794
|
+
return (0, import_react_query6.useQuery)({
|
|
5795
|
+
...queryOptions,
|
|
5796
|
+
...query,
|
|
5797
|
+
enabled: canEnable && (query.enabled ?? true)
|
|
5798
|
+
});
|
|
5799
|
+
}
|
|
5800
|
+
|
|
5801
|
+
// src/ensnode/hooks/useRegistrarActions.ts
|
|
5802
|
+
var import_react_query7 = require("@tanstack/react-query");
|
|
5803
|
+
function useRegistrarActions(parameters = {}) {
|
|
5804
|
+
const { options, query = {}, ...request } = parameters;
|
|
5805
|
+
const providerOptions = useEnsNodeProviderOptions(options);
|
|
5806
|
+
const queryOptions = createRegistrarActionsQueryOptions(providerOptions, request);
|
|
5807
|
+
return (0, import_react_query7.useQuery)({
|
|
5808
|
+
...queryOptions,
|
|
5809
|
+
refetchInterval: 10 * 1e3,
|
|
5810
|
+
// 10 seconds - latest registrar actions change frequently
|
|
5811
|
+
...query,
|
|
5812
|
+
enabled: query.enabled ?? queryOptions.enabled
|
|
5813
|
+
});
|
|
5814
|
+
}
|
|
5815
|
+
|
|
5816
|
+
// src/ensnode/hooks/useResolvedIdentity.ts
|
|
5817
|
+
var import_ensnode_sdk5 = require("@ensnode/ensnode-sdk");
|
|
5818
|
+
function useResolvedIdentity(parameters) {
|
|
5819
|
+
const { identity, namespace, accelerate, query: _query = {} } = parameters;
|
|
5820
|
+
const {
|
|
5821
|
+
data: primaryNameData,
|
|
5822
|
+
status,
|
|
5823
|
+
...query
|
|
5824
|
+
} = usePrimaryName({
|
|
5825
|
+
address: identity.address,
|
|
5826
|
+
chainId: (0, import_ensnode_sdk5.getResolvePrimaryNameChainIdParam)(
|
|
5827
|
+
identity.chainId,
|
|
5828
|
+
// NOTE: defaulting here for typechecking, but enabled prevents fetching before namespace is known
|
|
5829
|
+
namespace ?? import_ensnode_sdk5.ENSNamespaceIds.Mainnet
|
|
5830
|
+
),
|
|
5831
|
+
accelerate,
|
|
5832
|
+
// NOTE: Overriding `gcTime` to prevent unbounded memory growth
|
|
5833
|
+
// in long-running sessions with many identities.
|
|
5834
|
+
query: {
|
|
5835
|
+
...ASSUME_IMMUTABLE_QUERY,
|
|
5836
|
+
// identity changes very rarely
|
|
5837
|
+
gcTime: 60 * 60 * 1e3,
|
|
5838
|
+
// 1 hour
|
|
5839
|
+
refetchInterval: false,
|
|
5840
|
+
// not covered by ASSUME_IMMUTABLE_QUERY
|
|
5841
|
+
..._query,
|
|
5842
|
+
enabled: (_query.enabled ?? true) && namespace !== void 0
|
|
5843
|
+
}
|
|
5844
|
+
});
|
|
5845
|
+
let result;
|
|
5846
|
+
if (status === "pending") {
|
|
5847
|
+
result = identity;
|
|
5848
|
+
} else if (status === "error") {
|
|
5849
|
+
result = {
|
|
5850
|
+
resolutionStatus: import_ensnode_sdk5.ResolutionStatusIds.Unknown,
|
|
5851
|
+
chainId: identity.chainId,
|
|
5852
|
+
address: identity.address
|
|
5853
|
+
};
|
|
5854
|
+
} else if (primaryNameData.name === null) {
|
|
5855
|
+
result = {
|
|
5856
|
+
resolutionStatus: import_ensnode_sdk5.ResolutionStatusIds.Unnamed,
|
|
5857
|
+
chainId: identity.chainId,
|
|
5858
|
+
address: identity.address,
|
|
5859
|
+
name: null
|
|
5860
|
+
};
|
|
5861
|
+
} else {
|
|
5862
|
+
result = {
|
|
5863
|
+
resolutionStatus: import_ensnode_sdk5.ResolutionStatusIds.Named,
|
|
5864
|
+
chainId: identity.chainId,
|
|
5865
|
+
address: identity.address,
|
|
5866
|
+
name: primaryNameData.name
|
|
5867
|
+
};
|
|
5868
|
+
}
|
|
5869
|
+
return {
|
|
5870
|
+
...query,
|
|
5871
|
+
identity: result
|
|
5872
|
+
};
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5875
|
+
// src/ensnode/hooks/useSwrQuery.ts
|
|
5876
|
+
var import_react_query8 = require("@tanstack/react-query");
|
|
5877
|
+
var import_react6 = require("react");
|
|
5878
|
+
function useSwrQuery(options, queryClient) {
|
|
5879
|
+
const queryClientFromContext = (0, import_react_query8.useQueryClient)();
|
|
5880
|
+
const derivedQueryClient = queryClient ?? queryClientFromContext;
|
|
5881
|
+
const cachedSuccessfulResult = derivedQueryClient.getQueryData(options.queryKey);
|
|
5882
|
+
const queryResult = (0, import_react_query8.useQuery)(
|
|
5883
|
+
{
|
|
5884
|
+
...options,
|
|
5885
|
+
// cached result can never be stale
|
|
5886
|
+
staleTime: cachedSuccessfulResult ? Infinity : void 0,
|
|
5887
|
+
// cached result can never be removed by garbage collector
|
|
5888
|
+
gcTime: cachedSuccessfulResult ? Infinity : void 0
|
|
5889
|
+
},
|
|
5890
|
+
queryClient
|
|
5891
|
+
);
|
|
5892
|
+
const memoizedQueryResult = (0, import_react6.useMemo)(() => {
|
|
5893
|
+
if (queryResult.isError && cachedSuccessfulResult) {
|
|
5894
|
+
return {
|
|
5895
|
+
...queryResult,
|
|
5896
|
+
// set error props
|
|
5897
|
+
isError: false,
|
|
5898
|
+
error: null,
|
|
5899
|
+
isRefetchError: false,
|
|
5900
|
+
isLoadingError: false,
|
|
5901
|
+
// st success props
|
|
5902
|
+
isSuccess: true,
|
|
5903
|
+
status: "success",
|
|
5904
|
+
data: cachedSuccessfulResult
|
|
5905
|
+
};
|
|
5906
|
+
}
|
|
5907
|
+
return queryResult;
|
|
5908
|
+
}, [queryResult, cachedSuccessfulResult]);
|
|
5909
|
+
return memoizedQueryResult;
|
|
5910
|
+
}
|
|
5911
|
+
|
|
5912
|
+
// src/ensnode/provider.tsx
|
|
5913
|
+
var import_react_query9 = require("@tanstack/react-query");
|
|
5914
|
+
var import_react7 = require("react");
|
|
5915
|
+
var import_ensnode_sdk6 = require("@ensnode/ensnode-sdk");
|
|
5916
|
+
function EnsNodeInternalProvider({
|
|
5917
|
+
children,
|
|
5918
|
+
options
|
|
5919
|
+
}) {
|
|
5920
|
+
return (0, import_react7.createElement)(EnsNodeContext.Provider, { value: options }, children);
|
|
5921
|
+
}
|
|
5922
|
+
function EnsNodeProvider(parameters) {
|
|
5923
|
+
const { children, options, queryClient, queryClientOptions } = parameters;
|
|
5924
|
+
let hasExistingQueryClient = false;
|
|
5925
|
+
try {
|
|
5926
|
+
hasExistingQueryClient = Boolean((0, import_react_query9.useQueryClient)());
|
|
5927
|
+
} catch {
|
|
5928
|
+
hasExistingQueryClient = false;
|
|
5929
|
+
}
|
|
5930
|
+
if (queryClient) {
|
|
5931
|
+
if (!hasExistingQueryClient) {
|
|
5932
|
+
throw new Error(
|
|
5933
|
+
"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."
|
|
5934
|
+
);
|
|
5935
|
+
}
|
|
5936
|
+
return (0, import_react7.createElement)(EnsNodeInternalProvider, { options, children });
|
|
5937
|
+
}
|
|
5938
|
+
if (hasExistingQueryClient) {
|
|
5939
|
+
return (0, import_react7.createElement)(EnsNodeInternalProvider, { options, children });
|
|
5940
|
+
}
|
|
5941
|
+
const defaultQueryClient = (0, import_react7.useMemo)(
|
|
5942
|
+
() => new import_react_query9.QueryClient({
|
|
5943
|
+
defaultOptions: {
|
|
5944
|
+
queries: {
|
|
5945
|
+
retry: 3,
|
|
5946
|
+
staleTime: 1e3 * 60 * 5,
|
|
5947
|
+
// 5 minutes
|
|
5948
|
+
gcTime: 1e3 * 60 * 30,
|
|
5949
|
+
// 30 minutes
|
|
5950
|
+
refetchInterval: 1e3 * 10
|
|
5951
|
+
// 10 seconds
|
|
5952
|
+
}
|
|
5953
|
+
},
|
|
5954
|
+
...queryClientOptions
|
|
5955
|
+
}),
|
|
5956
|
+
[queryClientOptions]
|
|
5957
|
+
);
|
|
5958
|
+
return (0, import_react7.createElement)(
|
|
5959
|
+
import_react_query9.QueryClientProvider,
|
|
5960
|
+
{ client: defaultQueryClient },
|
|
5961
|
+
(0, import_react7.createElement)(EnsNodeInternalProvider, { options, children })
|
|
5962
|
+
);
|
|
5963
|
+
}
|
|
5964
|
+
function createEnsNodeProviderOptions(options) {
|
|
5965
|
+
const url = options?.url ? new URL(options.url) : import_ensnode_sdk6.EnsNodeClient.defaultOptions().url;
|
|
5966
|
+
return {
|
|
5967
|
+
client: {
|
|
5968
|
+
...import_ensnode_sdk6.EnsNodeClient.defaultOptions(),
|
|
5969
|
+
url
|
|
5970
|
+
}
|
|
5971
|
+
};
|
|
5972
|
+
}
|
|
5589
5973
|
|
|
5590
5974
|
// src/hooks/useIsMobile.tsx
|
|
5591
5975
|
var React5 = __toESM(require("react"), 1);
|
|
@@ -5630,7 +6014,7 @@ function ResolveAndDisplayIdentity({
|
|
|
5630
6014
|
withIdentifier = true,
|
|
5631
6015
|
className
|
|
5632
6016
|
}) {
|
|
5633
|
-
const { identity: identityResult } =
|
|
6017
|
+
const { identity: identityResult } = useResolvedIdentity({
|
|
5634
6018
|
identity,
|
|
5635
6019
|
accelerate,
|
|
5636
6020
|
namespace: namespaceId
|
|
@@ -5662,7 +6046,7 @@ function DisplayIdentity({
|
|
|
5662
6046
|
let avatar;
|
|
5663
6047
|
let identifier;
|
|
5664
6048
|
const isMobile = useIsMobile();
|
|
5665
|
-
if (!(0,
|
|
6049
|
+
if (!(0, import_ensnode_sdk7.isResolvedIdentity)(identity)) {
|
|
5666
6050
|
avatar = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5667
6051
|
Skeleton,
|
|
5668
6052
|
{
|
|
@@ -5681,7 +6065,7 @@ function DisplayIdentity({
|
|
|
5681
6065
|
)
|
|
5682
6066
|
}
|
|
5683
6067
|
);
|
|
5684
|
-
} else if (identity.resolutionStatus ===
|
|
6068
|
+
} else if (identity.resolutionStatus === import_ensnode_sdk7.ResolutionStatusIds.Unnamed || identity.resolutionStatus === import_ensnode_sdk7.ResolutionStatusIds.Unknown) {
|
|
5685
6069
|
avatar = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5686
6070
|
"div",
|
|
5687
6071
|
{
|
|
@@ -5692,7 +6076,7 @@ function DisplayIdentity({
|
|
|
5692
6076
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5693
6077
|
ChainIcon,
|
|
5694
6078
|
{
|
|
5695
|
-
chainId: (0,
|
|
6079
|
+
chainId: (0, import_ensnode_sdk7.translateDefaultableChainIdToChainId)(identity.chainId, namespaceId),
|
|
5696
6080
|
height: isMobile && withIdentifier ? 16 : 24,
|
|
5697
6081
|
width: isMobile && withIdentifier ? 16 : 24
|
|
5698
6082
|
}
|
|
@@ -5754,8 +6138,8 @@ function DisplayIdentity({
|
|
|
5754
6138
|
|
|
5755
6139
|
// src/components/registrar-actions/RegistrarActionCard.tsx
|
|
5756
6140
|
var import_lucide_react2 = require("lucide-react");
|
|
5757
|
-
var
|
|
5758
|
-
var
|
|
6141
|
+
var import_react8 = require("react");
|
|
6142
|
+
var import_ensnode_sdk8 = require("@ensnode/ensnode-sdk");
|
|
5759
6143
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5760
6144
|
function LabeledField({
|
|
5761
6145
|
fieldLabel,
|
|
@@ -5788,7 +6172,7 @@ function ResolveAndDisplayReferrerIdentity({
|
|
|
5788
6172
|
withIdentifier = true,
|
|
5789
6173
|
className
|
|
5790
6174
|
}) {
|
|
5791
|
-
if (!(0,
|
|
6175
|
+
if (!(0, import_ensnode_sdk8.isRegistrarActionReferralAvailable)(referral) || referral.encodedReferrer === import_ensnode_sdk8.ZERO_ENCODED_REFERRER) {
|
|
5792
6176
|
return withAvatar && !withIdentifier ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "nhui:w-10 nhui:h-10" }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "nhui:h-[21px]", children: "-" });
|
|
5793
6177
|
}
|
|
5794
6178
|
if (referral.decodedReferrer === zeroAddress) {
|
|
@@ -5823,7 +6207,7 @@ function ResolveAndDisplayReferrerIdentity({
|
|
|
5823
6207
|
] })
|
|
5824
6208
|
] });
|
|
5825
6209
|
}
|
|
5826
|
-
const referrerIdentity = (0,
|
|
6210
|
+
const referrerIdentity = (0, import_ensnode_sdk8.buildUnresolvedIdentity)(referral.decodedReferrer, namespaceId, chainId);
|
|
5827
6211
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5828
6212
|
ResolveAndDisplayIdentity,
|
|
5829
6213
|
{
|
|
@@ -5902,7 +6286,7 @@ function RegistrarActionCard({
|
|
|
5902
6286
|
}
|
|
5903
6287
|
) : children
|
|
5904
6288
|
);
|
|
5905
|
-
const registrantIdentity = (0,
|
|
6289
|
+
const registrantIdentity = (0, import_ensnode_sdk8.buildUnresolvedIdentity)(registrant, namespaceId, chainId);
|
|
5906
6290
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5907
6291
|
"div",
|
|
5908
6292
|
{
|
|
@@ -5920,7 +6304,7 @@ function RegistrarActionCard({
|
|
|
5920
6304
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5921
6305
|
LabeledField,
|
|
5922
6306
|
{
|
|
5923
|
-
fieldLabel: type ===
|
|
6307
|
+
fieldLabel: type === import_ensnode_sdk8.RegistrarActionTypes.Registration ? "Registered" : "Renewed",
|
|
5924
6308
|
className: "nhui:w-[15%] nhui:min-w-[110px]",
|
|
5925
6309
|
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "nhui:h-[21px] nhui:font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5926
6310
|
RelativeTime,
|
|
@@ -5990,14 +6374,14 @@ function RegistrarActionCard({
|
|
|
5990
6374
|
}
|
|
5991
6375
|
);
|
|
5992
6376
|
}
|
|
5993
|
-
var RegistrarActionCardMemo = (0,
|
|
6377
|
+
var RegistrarActionCardMemo = (0, import_react8.memo)(RegistrarActionCard);
|
|
5994
6378
|
|
|
5995
6379
|
// src/hooks/useNow.ts
|
|
5996
|
-
var
|
|
6380
|
+
var import_react10 = require("react");
|
|
5997
6381
|
|
|
5998
6382
|
// src/hooks/useSystemClock.ts
|
|
5999
6383
|
var import_date_fns4 = require("date-fns");
|
|
6000
|
-
var
|
|
6384
|
+
var import_react9 = require("react");
|
|
6001
6385
|
|
|
6002
6386
|
// src/utils/syncedClock.ts
|
|
6003
6387
|
var DEFAULT_TICK_RATE = 16;
|
|
@@ -6086,7 +6470,7 @@ function useSystemClock() {
|
|
|
6086
6470
|
};
|
|
6087
6471
|
const getSnapshot = () => (0, import_date_fns4.getUnixTime)(new Date(systemClock.currentTime));
|
|
6088
6472
|
const getServerSnapshot = () => (0, import_date_fns4.getUnixTime)(/* @__PURE__ */ new Date());
|
|
6089
|
-
const syncedSystemClock = (0,
|
|
6473
|
+
const syncedSystemClock = (0, import_react9.useSyncExternalStore)(subscribe, getSnapshot, getServerSnapshot);
|
|
6090
6474
|
return syncedSystemClock ?? getSnapshot();
|
|
6091
6475
|
}
|
|
6092
6476
|
|
|
@@ -6094,9 +6478,9 @@ function useSystemClock() {
|
|
|
6094
6478
|
var DEFAULT_TIME_TO_REFRESH = 1;
|
|
6095
6479
|
function useNow(props) {
|
|
6096
6480
|
const clock = useSystemClock();
|
|
6097
|
-
const [throttledClock, setThrottledClock] = (0,
|
|
6481
|
+
const [throttledClock, setThrottledClock] = (0, import_react10.useState)(clock);
|
|
6098
6482
|
const { timeToRefresh = DEFAULT_TIME_TO_REFRESH } = props || {};
|
|
6099
|
-
(0,
|
|
6483
|
+
(0, import_react10.useEffect)(() => {
|
|
6100
6484
|
if (clock - throttledClock >= timeToRefresh) {
|
|
6101
6485
|
setThrottledClock(clock);
|
|
6102
6486
|
}
|