@thenamespace/ens-components 1.1.1 → 1.1.3
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/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +39 -561
- package/dist/index.js +737 -1833
- package/dist/index.js.map +1 -1
- package/dist/types/components/atoms/icon/Icon.d.ts +1 -1
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/offchain-subname-form/FormHeader.d.ts +3 -1
- package/dist/types/components/offchain-subname-form/OffchainSubnameForm.d.ts +16 -6
- package/dist/types/components/subname-mint-form/SubnameMintForm.d.ts +3 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -5,12 +5,13 @@ import * as crypto$5 from 'crypto';
|
|
|
5
5
|
import * as net from 'net';
|
|
6
6
|
import * as viem from 'viem';
|
|
7
7
|
import { ContractFunctionExecutionError, parseAbi, namehash as namehash$1, encodeFunctionData, toHex, toBytes as toBytes$1, pad, isAddress as isAddress$1, keccak256, formatEther, zeroAddress, zeroHash } from 'viem';
|
|
8
|
-
import * as chains$
|
|
8
|
+
import * as chains$1 from 'viem/chains';
|
|
9
9
|
import { baseSepolia, sepolia, mainnet, optimism, base as base$3, zoraSepolia, zora, celoAlfajores, celo, polygonMumbai, polygon, arbitrumSepolia, arbitrum, optimismSepolia } from 'viem/chains';
|
|
10
10
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import React__default, { forwardRef, createElement, useState, useRef, useEffect, useCallback, useLayoutEffect, useMemo, createContext, useContext } from 'react';
|
|
13
13
|
import { useAccount, useSwitchChain, usePublicClient, useWalletClient } from 'wagmi';
|
|
14
|
+
import { createOffchainClient, ChainName, getCoinType } from '@thenamespace/offchain-manager';
|
|
14
15
|
import { normalize } from 'viem/ens';
|
|
15
16
|
|
|
16
17
|
const sizeToClass = {
|
|
@@ -308,7 +309,7 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
308
309
|
*/
|
|
309
310
|
|
|
310
311
|
|
|
311
|
-
const __iconNode$
|
|
312
|
+
const __iconNode$r = [
|
|
312
313
|
[
|
|
313
314
|
"path",
|
|
314
315
|
{
|
|
@@ -317,7 +318,7 @@ const __iconNode$q = [
|
|
|
317
318
|
}
|
|
318
319
|
]
|
|
319
320
|
];
|
|
320
|
-
const Book = createLucideIcon("book", __iconNode$
|
|
321
|
+
const Book = createLucideIcon("book", __iconNode$r);
|
|
321
322
|
|
|
322
323
|
/**
|
|
323
324
|
* @license lucide-react v0.563.0 - ISC
|
|
@@ -327,7 +328,7 @@ const Book = createLucideIcon("book", __iconNode$q);
|
|
|
327
328
|
*/
|
|
328
329
|
|
|
329
330
|
|
|
330
|
-
const __iconNode$
|
|
331
|
+
const __iconNode$q = [
|
|
331
332
|
[
|
|
332
333
|
"path",
|
|
333
334
|
{
|
|
@@ -338,7 +339,7 @@ const __iconNode$p = [
|
|
|
338
339
|
["path", { d: "m3.3 7 8.7 5 8.7-5", key: "g66t2b" }],
|
|
339
340
|
["path", { d: "M12 22V12", key: "d0xqtd" }]
|
|
340
341
|
];
|
|
341
|
-
const Box = createLucideIcon("box", __iconNode$
|
|
342
|
+
const Box = createLucideIcon("box", __iconNode$q);
|
|
342
343
|
|
|
343
344
|
/**
|
|
344
345
|
* @license lucide-react v0.563.0 - ISC
|
|
@@ -348,8 +349,8 @@ const Box = createLucideIcon("box", __iconNode$p);
|
|
|
348
349
|
*/
|
|
349
350
|
|
|
350
351
|
|
|
351
|
-
const __iconNode$
|
|
352
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
352
|
+
const __iconNode$p = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
353
|
+
const Check = createLucideIcon("check", __iconNode$p);
|
|
353
354
|
|
|
354
355
|
/**
|
|
355
356
|
* @license lucide-react v0.563.0 - ISC
|
|
@@ -359,8 +360,8 @@ const Check = createLucideIcon("check", __iconNode$o);
|
|
|
359
360
|
*/
|
|
360
361
|
|
|
361
362
|
|
|
362
|
-
const __iconNode$
|
|
363
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
363
|
+
const __iconNode$o = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
364
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$o);
|
|
364
365
|
|
|
365
366
|
/**
|
|
366
367
|
* @license lucide-react v0.563.0 - ISC
|
|
@@ -370,8 +371,8 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$n);
|
|
|
370
371
|
*/
|
|
371
372
|
|
|
372
373
|
|
|
373
|
-
const __iconNode$
|
|
374
|
-
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$
|
|
374
|
+
const __iconNode$n = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
375
|
+
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$n);
|
|
375
376
|
|
|
376
377
|
/**
|
|
377
378
|
* @license lucide-react v0.563.0 - ISC
|
|
@@ -381,8 +382,8 @@ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$m);
|
|
|
381
382
|
*/
|
|
382
383
|
|
|
383
384
|
|
|
384
|
-
const __iconNode$
|
|
385
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$
|
|
385
|
+
const __iconNode$m = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
386
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$m);
|
|
386
387
|
|
|
387
388
|
/**
|
|
388
389
|
* @license lucide-react v0.563.0 - ISC
|
|
@@ -392,12 +393,12 @@ const ChevronUp = createLucideIcon("chevron-up", __iconNode$l);
|
|
|
392
393
|
*/
|
|
393
394
|
|
|
394
395
|
|
|
395
|
-
const __iconNode$
|
|
396
|
+
const __iconNode$l = [
|
|
396
397
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
397
398
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
398
399
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
399
400
|
];
|
|
400
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
401
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$l);
|
|
401
402
|
|
|
402
403
|
/**
|
|
403
404
|
* @license lucide-react v0.563.0 - ISC
|
|
@@ -407,11 +408,11 @@ const CircleAlert = createLucideIcon("circle-alert", __iconNode$k);
|
|
|
407
408
|
*/
|
|
408
409
|
|
|
409
410
|
|
|
410
|
-
const __iconNode$
|
|
411
|
+
const __iconNode$k = [
|
|
411
412
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
412
413
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
413
414
|
];
|
|
414
|
-
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$
|
|
415
|
+
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$k);
|
|
415
416
|
|
|
416
417
|
/**
|
|
417
418
|
* @license lucide-react v0.563.0 - ISC
|
|
@@ -421,7 +422,7 @@ const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$j);
|
|
|
421
422
|
*/
|
|
422
423
|
|
|
423
424
|
|
|
424
|
-
const __iconNode$
|
|
425
|
+
const __iconNode$j = [
|
|
425
426
|
["path", { d: "M12 2a10 10 0 0 1 7.38 16.75", key: "175t95" }],
|
|
426
427
|
["path", { d: "M12 8v8", key: "napkw2" }],
|
|
427
428
|
["path", { d: "M16 12H8", key: "1fr5h0" }],
|
|
@@ -430,7 +431,22 @@ const __iconNode$i = [
|
|
|
430
431
|
["path", { d: "M4.636 5.235a10 10 0 0 1 .891-.857", key: "1szpfk" }],
|
|
431
432
|
["path", { d: "M8.644 21.42a10 10 0 0 0 7.631-.38", key: "9yhvd4" }]
|
|
432
433
|
];
|
|
433
|
-
const CircleFadingPlus = createLucideIcon("circle-fading-plus", __iconNode$
|
|
434
|
+
const CircleFadingPlus = createLucideIcon("circle-fading-plus", __iconNode$j);
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* @license lucide-react v0.563.0 - ISC
|
|
438
|
+
*
|
|
439
|
+
* This source code is licensed under the ISC license.
|
|
440
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
441
|
+
*/
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
const __iconNode$i = [
|
|
445
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
446
|
+
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
447
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
448
|
+
];
|
|
449
|
+
const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$i);
|
|
434
450
|
|
|
435
451
|
/**
|
|
436
452
|
* @license lucide-react v0.563.0 - ISC
|
|
@@ -863,7 +879,8 @@ const icons$1 = {
|
|
|
863
879
|
xSocial: XIcon,
|
|
864
880
|
"chevron-up": ChevronUp,
|
|
865
881
|
"chevron-down": ChevronDown,
|
|
866
|
-
"chevron-left": ChevronLeft
|
|
882
|
+
"chevron-left": ChevronLeft,
|
|
883
|
+
"circle-help": CircleQuestionMark
|
|
867
884
|
};
|
|
868
885
|
const Icon = ({
|
|
869
886
|
name,
|
|
@@ -6177,7 +6194,7 @@ function checksum(len, fn) {
|
|
|
6177
6194
|
};
|
|
6178
6195
|
}
|
|
6179
6196
|
// prettier-ignore
|
|
6180
|
-
const utils$
|
|
6197
|
+
const utils$a = {
|
|
6181
6198
|
alphabet: alphabet$2, chain, checksum, convertRadix, convertRadix2, radix, radix2, join, padding: padding$1,
|
|
6182
6199
|
};
|
|
6183
6200
|
/**
|
|
@@ -6418,7 +6435,7 @@ const createBase58VersionedDecoder = (p2pkhVersions, p2shVersions) => (source) =
|
|
|
6418
6435
|
throw new Error("Unrecognised address format");
|
|
6419
6436
|
};
|
|
6420
6437
|
|
|
6421
|
-
const eosChecksum = utils$
|
|
6438
|
+
const eosChecksum = utils$a.checksum(4, ripemd160$3);
|
|
6422
6439
|
const createEosEncoder = (prefix) => (source) => {
|
|
6423
6440
|
const point = secp256k1$2.ProjectivePoint.fromHex(source);
|
|
6424
6441
|
const checksummed = eosChecksum.encode(point.toRawBytes(true));
|
|
@@ -7206,14 +7223,14 @@ const sha512_256 = sha512_256$1;
|
|
|
7206
7223
|
|
|
7207
7224
|
const base32Encode = base32$4.encode;
|
|
7208
7225
|
const base32Decode = base32$4.decode;
|
|
7209
|
-
const base32Unpadded = utils$
|
|
7226
|
+
const base32Unpadded = utils$a.chain(utils$a.radix2(5), utils$a.alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), utils$a.join(""));
|
|
7210
7227
|
const base32UnpaddedEncode = base32Unpadded.encode;
|
|
7211
7228
|
const base32UnpaddedDecode = base32Unpadded.decode;
|
|
7212
7229
|
const base32CrockfordNormalise = (source) => source.toUpperCase().replace(/O/g, "0").replace(/[IL]/g, "1");
|
|
7213
7230
|
|
|
7214
7231
|
const name$1P = "algo";
|
|
7215
7232
|
const coinType$1P = 283;
|
|
7216
|
-
const algoChecksum = utils$
|
|
7233
|
+
const algoChecksum = utils$a.checksum(4, (data) => sha512_256(data).slice(-4));
|
|
7217
7234
|
const encodeAlgoAddress = (source) => {
|
|
7218
7235
|
const checksum = algoChecksum.encode(source);
|
|
7219
7236
|
return base32UnpaddedEncode(checksum);
|
|
@@ -7417,8 +7434,8 @@ const prefix$7 = "bitcoincash";
|
|
|
7417
7434
|
const prefixBytes = new Uint8Array([2, 9, 20, 3, 15, 9, 14, 3, 1, 19, 8, 0]); // bitcoincash + 0x00
|
|
7418
7435
|
const hashSize = [160, 192, 224, 256, 320, 384, 448, 512];
|
|
7419
7436
|
const hashSizeLookup = Object.fromEntries(hashSize.map((size, index) => [size, index]));
|
|
7420
|
-
const radix5 = utils$
|
|
7421
|
-
const bchBase32 = utils$
|
|
7437
|
+
const radix5 = utils$a.radix2(5);
|
|
7438
|
+
const bchBase32 = utils$a.chain(utils$a.alphabet("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), utils$a.join(""));
|
|
7422
7439
|
const checksumToUint5Array = (checksum) => {
|
|
7423
7440
|
const result = new Uint8Array(8);
|
|
7424
7441
|
for (let i = 0; i < 8; i++) {
|
|
@@ -7766,7 +7783,7 @@ const xmr$1 = {
|
|
|
7766
7783
|
|
|
7767
7784
|
const name$1G = "bcn";
|
|
7768
7785
|
const coinType$1G = 204;
|
|
7769
|
-
const bcnChecksum = utils$
|
|
7786
|
+
const bcnChecksum = utils$a.checksum(4, keccak_256);
|
|
7770
7787
|
const encodeBcnAddress = (source) => {
|
|
7771
7788
|
const checksum = keccak_256(source).slice(0, 4);
|
|
7772
7789
|
return encodeXmrAddress(concatBytes(source, checksum));
|
|
@@ -8528,7 +8545,7 @@ const eth$1 = {
|
|
|
8528
8545
|
const name$1h = "etn";
|
|
8529
8546
|
const coinType$1h = 415;
|
|
8530
8547
|
const type$1 = 18;
|
|
8531
|
-
const etnChecksum = utils$
|
|
8548
|
+
const etnChecksum = utils$a.checksum(4, keccak_256);
|
|
8532
8549
|
const encodeEtnAddress = (source) => {
|
|
8533
8550
|
const sourceWithType = concatBytes(new Uint8Array([type$1]), source);
|
|
8534
8551
|
const checksummed = etnChecksum.encode(sourceWithType);
|
|
@@ -9258,7 +9275,7 @@ const radixNano = {
|
|
|
9258
9275
|
return Uint8Array.from(result);
|
|
9259
9276
|
},
|
|
9260
9277
|
};
|
|
9261
|
-
const base32Nano = utils$
|
|
9278
|
+
const base32Nano = utils$a.chain(radixNano, utils$a.alphabet("13456789abcdefghijkmnopqrstuwxyz"), utils$a.join(""));
|
|
9262
9279
|
const encodeNanoAddress = (source) => {
|
|
9263
9280
|
const encoded = base32Nano.encode(source);
|
|
9264
9281
|
const checksum = blake2b$1(source, { dkLen: 5 }).reverse();
|
|
@@ -9278,7 +9295,7 @@ const nano$1 = {
|
|
|
9278
9295
|
|
|
9279
9296
|
const name$N = "nas";
|
|
9280
9297
|
const coinType$N = 2718;
|
|
9281
|
-
const nasChecksum = utils$
|
|
9298
|
+
const nasChecksum = utils$a.checksum(4, sha3_256);
|
|
9282
9299
|
const encodeNasAddress = (source) => {
|
|
9283
9300
|
const checksummed = nasChecksum.encode(source);
|
|
9284
9301
|
return base58UncheckedEncode(checksummed);
|
|
@@ -9365,7 +9382,7 @@ const ibanCheck = (data) => {
|
|
|
9365
9382
|
const nimChecksum = (source) => {
|
|
9366
9383
|
return ("00" + (98 - ibanCheck(source + CCODE + "00"))).slice(-2);
|
|
9367
9384
|
};
|
|
9368
|
-
const base32Nim = utils$
|
|
9385
|
+
const base32Nim = utils$a.chain(utils$a.radix2(5), utils$a.alphabet("0123456789ABCDEFGHJKLMNPQRSTUVXY"), utils$a.padding(5), utils$a.join(""));
|
|
9369
9386
|
const encodeNimAddress = (source) => {
|
|
9370
9387
|
const base32Part = base32Nim.encode(source);
|
|
9371
9388
|
const checksummed = nimChecksum(base32Part);
|
|
@@ -9773,7 +9790,7 @@ const convertRadixStx = (data, from, to, padding) => {
|
|
|
9773
9790
|
res.unshift(carry >>> 0);
|
|
9774
9791
|
return res;
|
|
9775
9792
|
};
|
|
9776
|
-
const base32Stx = utils$
|
|
9793
|
+
const base32Stx = utils$a.chain(radixStx, utils$a.alphabet("0123456789ABCDEFGHJKMNPQRSTVWXYZ"), utils$a.join(""));
|
|
9777
9794
|
const stxChecksum = (data) => sha256$2(sha256$2(data)).slice(0, checkumLength);
|
|
9778
9795
|
const encodeStxAddress = (source) => {
|
|
9779
9796
|
if (source.length !== length$2 + checkumLength)
|
|
@@ -10046,7 +10063,7 @@ const name$b = "waves";
|
|
|
10046
10063
|
const coinType$b = 5741564;
|
|
10047
10064
|
const checksumFn = (source) => keccak_256(blake2b$1(source, { dkLen: 32 }));
|
|
10048
10065
|
const checksumLength = 4;
|
|
10049
|
-
const wavesChecksum = utils$
|
|
10066
|
+
const wavesChecksum = utils$a.checksum(checksumLength, checksumFn);
|
|
10050
10067
|
const encodeWavesAddress = base58UncheckedEncode;
|
|
10051
10068
|
const decodeWavesAddress = (source) => {
|
|
10052
10069
|
const decoded = base58UncheckedDecode(source);
|
|
@@ -10169,7 +10186,7 @@ const xlm$1 = {
|
|
|
10169
10186
|
|
|
10170
10187
|
const name$5 = "xrp";
|
|
10171
10188
|
const coinType$5 = 144;
|
|
10172
|
-
const base58XrpCheck = utils$
|
|
10189
|
+
const base58XrpCheck = utils$a.chain(utils$a.checksum(4, (data) => sha256$2(sha256$2(data))), base58xrp);
|
|
10173
10190
|
const encodeXrpAddress = base58XrpCheck.encode;
|
|
10174
10191
|
const decodeXrpAddress = base58XrpCheck.decode;
|
|
10175
10192
|
const xrp$1 = {
|
|
@@ -10676,14 +10693,14 @@ const base58btc$1 = createMultibaseCoder({
|
|
|
10676
10693
|
encode: base58$3.encode,
|
|
10677
10694
|
decode: base58$3.decode,
|
|
10678
10695
|
});
|
|
10679
|
-
const customBase32 = utils$
|
|
10696
|
+
const customBase32 = utils$a.chain(utils$a.radix2(5), utils$a.alphabet("abcdefghijklmnopqrstuvwxyz234567"), utils$a.join(""));
|
|
10680
10697
|
const base32$3 = createMultibaseCoder({
|
|
10681
10698
|
name: "base32",
|
|
10682
10699
|
prefix: "b",
|
|
10683
10700
|
encode: (bytes) => customBase32.encode(bytes),
|
|
10684
10701
|
decode: (multibase) => customBase32.decode(multibase),
|
|
10685
10702
|
});
|
|
10686
|
-
const base36Chain = utils$
|
|
10703
|
+
const base36Chain = utils$a.chain(utils$a.radix(36), utils$a.alphabet("0123456789abcdefghijklmnopqrstuvwxyz"), utils$a.join(""));
|
|
10687
10704
|
const base36$2 = createMultibaseCoder({
|
|
10688
10705
|
name: "base36",
|
|
10689
10706
|
prefix: "k",
|
|
@@ -11881,6 +11898,8 @@ const PricingDisplay = ({
|
|
|
11881
11898
|
] });
|
|
11882
11899
|
};
|
|
11883
11900
|
|
|
11901
|
+
const SUPPORTED_KEY_SET = new Set(supportedTexts.map((t) => t.key));
|
|
11902
|
+
const genDraftId = () => `${Date.now()}-${Math.random()}`;
|
|
11884
11903
|
const TextRecords = ({
|
|
11885
11904
|
texts,
|
|
11886
11905
|
onTextsChanged,
|
|
@@ -11898,7 +11917,64 @@ const TextRecords = ({
|
|
|
11898
11917
|
return map;
|
|
11899
11918
|
}, [texts]);
|
|
11900
11919
|
const [lastAddedKey, setLastAddedKey] = useState(null);
|
|
11920
|
+
const [customDrafts, setCustomDrafts] = useState([]);
|
|
11901
11921
|
const inputRefs = useRef({});
|
|
11922
|
+
const draftKeys = useMemo(
|
|
11923
|
+
() => new Set(customDrafts.map((d) => d.key).filter(Boolean)),
|
|
11924
|
+
[customDrafts]
|
|
11925
|
+
);
|
|
11926
|
+
const committedCustomTexts = useMemo(
|
|
11927
|
+
() => texts.filter((t) => !SUPPORTED_KEY_SET.has(t.key) && !draftKeys.has(t.key)),
|
|
11928
|
+
[texts, draftKeys]
|
|
11929
|
+
);
|
|
11930
|
+
const isValidDraftKey = (key, draftId) => {
|
|
11931
|
+
if (!key.trim()) return false;
|
|
11932
|
+
if (SUPPORTED_KEY_SET.has(key)) return false;
|
|
11933
|
+
if (committedCustomTexts.some((t) => t.key === key)) return false;
|
|
11934
|
+
if (customDrafts.some((d) => d.id !== draftId && d.key === key)) return false;
|
|
11935
|
+
return true;
|
|
11936
|
+
};
|
|
11937
|
+
const handleAddCustomDraft = () => {
|
|
11938
|
+
setCustomDrafts((prev) => [...prev, { id: genDraftId(), key: "", value: "" }]);
|
|
11939
|
+
};
|
|
11940
|
+
const handleCustomDraftKeyChange = (draftId, newKey) => {
|
|
11941
|
+
const draft = customDrafts.find((d) => d.id === draftId);
|
|
11942
|
+
const oldKey = draft.key;
|
|
11943
|
+
const updatedDrafts = customDrafts.map(
|
|
11944
|
+
(d) => d.id === draftId ? { ...d, key: newKey } : d
|
|
11945
|
+
);
|
|
11946
|
+
setCustomDrafts(updatedDrafts);
|
|
11947
|
+
let newTexts = oldKey ? texts.filter((t) => t.key !== oldKey) : [...texts];
|
|
11948
|
+
const isValid = newKey.trim() && !SUPPORTED_KEY_SET.has(newKey) && !newTexts.filter((t) => !SUPPORTED_KEY_SET.has(t.key)).some((t) => t.key === newKey) && updatedDrafts.filter((d) => d.id !== draftId).every((d) => d.key !== newKey);
|
|
11949
|
+
if (isValid) {
|
|
11950
|
+
newTexts = [...newTexts, { key: newKey, value: draft.value }];
|
|
11951
|
+
}
|
|
11952
|
+
onTextsChanged(newTexts);
|
|
11953
|
+
};
|
|
11954
|
+
const handleCustomDraftValueChange = (draftId, newValue) => {
|
|
11955
|
+
const draft = customDrafts.find((d) => d.id === draftId);
|
|
11956
|
+
setCustomDrafts(
|
|
11957
|
+
(prev) => prev.map((d) => d.id === draftId ? { ...d, value: newValue } : d)
|
|
11958
|
+
);
|
|
11959
|
+
if (draft.key && texts.some((t) => t.key === draft.key)) {
|
|
11960
|
+
onTextsChanged(
|
|
11961
|
+
texts.map((t) => t.key === draft.key ? { ...t, value: newValue } : t)
|
|
11962
|
+
);
|
|
11963
|
+
}
|
|
11964
|
+
};
|
|
11965
|
+
const handleRemoveCustomDraft = (draftId) => {
|
|
11966
|
+
const draft = customDrafts.find((d) => d.id === draftId);
|
|
11967
|
+
setCustomDrafts((prev) => prev.filter((d) => d.id !== draftId));
|
|
11968
|
+
if (draft.key && texts.some((t) => t.key === draft.key)) {
|
|
11969
|
+
onTextsChanged(texts.filter((t) => t.key !== draft.key));
|
|
11970
|
+
}
|
|
11971
|
+
};
|
|
11972
|
+
const handleCommittedCustomValueChange = (key, value) => {
|
|
11973
|
+
onTextsChanged(texts.map((t) => t.key === key ? { ...t, value } : t));
|
|
11974
|
+
};
|
|
11975
|
+
const handleRemoveCommittedCustom = (key) => {
|
|
11976
|
+
onTextsChanged(texts.filter((t) => t.key !== key));
|
|
11977
|
+
};
|
|
11902
11978
|
useEffect(() => {
|
|
11903
11979
|
if (lastAddedKey && inputRefs.current[lastAddedKey]) {
|
|
11904
11980
|
inputRefs.current[lastAddedKey]?.scrollIntoView({
|
|
@@ -11965,7 +12041,9 @@ const TextRecords = ({
|
|
|
11965
12041
|
(record) => filterSuggestions(record) && shownTextCategory.includes(record.category)
|
|
11966
12042
|
);
|
|
11967
12043
|
}, [searchFilter]);
|
|
11968
|
-
|
|
12044
|
+
const isGeneralCategory = category === TextRecordCategory.General;
|
|
12045
|
+
const hasCustomContent = isGeneralCategory && (committedCustomTexts.length > 0 || customDrafts.length > 0);
|
|
12046
|
+
if (filteredItems.length === 0 && !hasCustomContent) {
|
|
11969
12047
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
11970
12048
|
}
|
|
11971
12049
|
return /* @__PURE__ */ jsxs("div", { className: "ns-text-records", children: [
|
|
@@ -12031,19 +12109,92 @@ const TextRecords = ({
|
|
|
12031
12109
|
)
|
|
12032
12110
|
] }, record.key);
|
|
12033
12111
|
}),
|
|
12034
|
-
/* @__PURE__ */
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
}
|
|
12046
|
-
|
|
12112
|
+
isGeneralCategory && committedCustomTexts.map((custom) => /* @__PURE__ */ jsxs("div", { style: { marginBottom: 10 }, children: [
|
|
12113
|
+
/* @__PURE__ */ jsx(
|
|
12114
|
+
Text,
|
|
12115
|
+
{
|
|
12116
|
+
style: { marginBottom: "4px" },
|
|
12117
|
+
color: "grey",
|
|
12118
|
+
size: "xs",
|
|
12119
|
+
weight: "medium",
|
|
12120
|
+
children: custom.key
|
|
12121
|
+
}
|
|
12122
|
+
),
|
|
12123
|
+
/* @__PURE__ */ jsxs("div", { style: { width: "100%" }, className: "d-flex align-items-center", children: [
|
|
12124
|
+
/* @__PURE__ */ jsx(
|
|
12125
|
+
Input,
|
|
12126
|
+
{
|
|
12127
|
+
style: { width: "100%" },
|
|
12128
|
+
onChange: (e) => handleCommittedCustomValueChange(custom.key, e.target.value),
|
|
12129
|
+
prefix: /* @__PURE__ */ jsx(Icon, { name: "edit", size: 18, color: "grey" }),
|
|
12130
|
+
value: custom.value,
|
|
12131
|
+
placeholder: "Value"
|
|
12132
|
+
}
|
|
12133
|
+
),
|
|
12134
|
+
/* @__PURE__ */ jsx(
|
|
12135
|
+
"div",
|
|
12136
|
+
{
|
|
12137
|
+
onClick: () => handleRemoveCommittedCustom(custom.key),
|
|
12138
|
+
className: "ns-close-icon ns-ms-1",
|
|
12139
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: 18 })
|
|
12140
|
+
}
|
|
12141
|
+
)
|
|
12142
|
+
] })
|
|
12143
|
+
] }, custom.key)),
|
|
12144
|
+
isGeneralCategory && customDrafts.map((draft) => {
|
|
12145
|
+
const keyIsInvalid = draft.key.trim().length > 0 && !isValidDraftKey(draft.key, draft.id);
|
|
12146
|
+
return /* @__PURE__ */ jsxs("div", { style: { marginBottom: 10 }, children: [
|
|
12147
|
+
/* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center", style: { gap: 6 }, children: [
|
|
12148
|
+
/* @__PURE__ */ jsx(
|
|
12149
|
+
Input,
|
|
12150
|
+
{
|
|
12151
|
+
style: { flex: 1 },
|
|
12152
|
+
value: draft.key,
|
|
12153
|
+
onChange: (e) => handleCustomDraftKeyChange(draft.id, e.target.value),
|
|
12154
|
+
placeholder: "Key (e.g. custom.record)",
|
|
12155
|
+
error: keyIsInvalid
|
|
12156
|
+
}
|
|
12157
|
+
),
|
|
12158
|
+
/* @__PURE__ */ jsx(
|
|
12159
|
+
Input,
|
|
12160
|
+
{
|
|
12161
|
+
style: { flex: 1 },
|
|
12162
|
+
value: draft.value,
|
|
12163
|
+
onChange: (e) => handleCustomDraftValueChange(draft.id, e.target.value),
|
|
12164
|
+
placeholder: "Value"
|
|
12165
|
+
}
|
|
12166
|
+
),
|
|
12167
|
+
/* @__PURE__ */ jsx(
|
|
12168
|
+
"div",
|
|
12169
|
+
{
|
|
12170
|
+
onClick: () => handleRemoveCustomDraft(draft.id),
|
|
12171
|
+
className: "ns-close-icon",
|
|
12172
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: 18 })
|
|
12173
|
+
}
|
|
12174
|
+
)
|
|
12175
|
+
] }),
|
|
12176
|
+
keyIsInvalid && /* @__PURE__ */ jsx(Text, { size: "xs", color: "grey", style: { marginTop: 4 }, children: "Key is reserved or already in use" })
|
|
12177
|
+
] }, draft.id);
|
|
12178
|
+
}),
|
|
12179
|
+
/* @__PURE__ */ jsxs("div", { className: "row g-2", children: [
|
|
12180
|
+
filteredItems.filter(
|
|
12181
|
+
(record) => existingTextsMap[record.key] === void 0 && record.category !== TextRecordCategory.Image && filterSuggestions(record)
|
|
12182
|
+
).map((record) => /* @__PURE__ */ jsx("div", { className: "col col-lg-3 col-sm-6 col-6", children: /* @__PURE__ */ jsxs(
|
|
12183
|
+
"div",
|
|
12184
|
+
{
|
|
12185
|
+
className: "ns-text-suggestion",
|
|
12186
|
+
onClick: () => handleTextAdded(record.key),
|
|
12187
|
+
children: [
|
|
12188
|
+
/* @__PURE__ */ jsx(Icon, { size: 18, color: "grey", name: record.icon }),
|
|
12189
|
+
/* @__PURE__ */ jsx(Text, { className: "ns-mt-1", size: "xs", weight: "medium", children: record.label })
|
|
12190
|
+
]
|
|
12191
|
+
}
|
|
12192
|
+
) }, record.key)),
|
|
12193
|
+
isGeneralCategory && /* @__PURE__ */ jsx("div", { className: "col col-lg-3 col-sm-6 col-6", children: /* @__PURE__ */ jsxs("div", { className: "ns-text-suggestion", onClick: handleAddCustomDraft, children: [
|
|
12194
|
+
/* @__PURE__ */ jsx(Icon, { size: 18, color: "grey", name: "circle-help" }),
|
|
12195
|
+
/* @__PURE__ */ jsx(Text, { className: "ns-mt-1", size: "xs", weight: "medium", children: "Custom" })
|
|
12196
|
+
] }) })
|
|
12197
|
+
] })
|
|
12047
12198
|
] });
|
|
12048
12199
|
};
|
|
12049
12200
|
|
|
@@ -14014,7 +14165,7 @@ var Cropper = /** @class */function (_super) {
|
|
|
14014
14165
|
return Cropper;
|
|
14015
14166
|
}(React.Component);
|
|
14016
14167
|
|
|
14017
|
-
var dist$
|
|
14168
|
+
var dist$3 = {};
|
|
14018
14169
|
|
|
14019
14170
|
var client$1 = {};
|
|
14020
14171
|
|
|
@@ -18006,13 +18157,13 @@ function requireAxios () {
|
|
|
18006
18157
|
return axios_1;
|
|
18007
18158
|
}
|
|
18008
18159
|
|
|
18009
|
-
var errors$
|
|
18160
|
+
var errors$1 = {};
|
|
18010
18161
|
|
|
18011
|
-
var hasRequiredErrors$
|
|
18162
|
+
var hasRequiredErrors$1;
|
|
18012
18163
|
|
|
18013
|
-
function requireErrors$
|
|
18014
|
-
if (hasRequiredErrors$
|
|
18015
|
-
hasRequiredErrors$
|
|
18164
|
+
function requireErrors$1 () {
|
|
18165
|
+
if (hasRequiredErrors$1) return errors$1;
|
|
18166
|
+
hasRequiredErrors$1 = 1;
|
|
18016
18167
|
(function (exports$1) {
|
|
18017
18168
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
18018
18169
|
exports$1.createError = exports$1.ErrorCodes = exports$1.AvatarSDKError = void 0;
|
|
@@ -18082,17 +18233,17 @@ function requireErrors$2 () {
|
|
|
18082
18233
|
deleteFailed: (originalError) => new AvatarSDKError('Delete failed. Please try again.', exports$1.ErrorCodes.DELETE_FAILED, originalError),
|
|
18083
18234
|
};
|
|
18084
18235
|
|
|
18085
|
-
} (errors$
|
|
18086
|
-
return errors$
|
|
18236
|
+
} (errors$1));
|
|
18237
|
+
return errors$1;
|
|
18087
18238
|
}
|
|
18088
18239
|
|
|
18089
|
-
var validation
|
|
18240
|
+
var validation = {};
|
|
18090
18241
|
|
|
18091
|
-
var hasRequiredValidation
|
|
18242
|
+
var hasRequiredValidation;
|
|
18092
18243
|
|
|
18093
|
-
function requireValidation
|
|
18094
|
-
if (hasRequiredValidation
|
|
18095
|
-
hasRequiredValidation
|
|
18244
|
+
function requireValidation () {
|
|
18245
|
+
if (hasRequiredValidation) return validation;
|
|
18246
|
+
hasRequiredValidation = 1;
|
|
18096
18247
|
(function (exports$1) {
|
|
18097
18248
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
18098
18249
|
exports$1.ALLOWED_FORMATS = exports$1.HEADER_MAX_SIZE = exports$1.AVATAR_MAX_SIZE = void 0;
|
|
@@ -18100,7 +18251,7 @@ function requireValidation$1 () {
|
|
|
18100
18251
|
exports$1.validateSubname = validateSubname;
|
|
18101
18252
|
exports$1.validateAddress = validateAddress;
|
|
18102
18253
|
exports$1.validateSIWEOptionsResolved = validateSIWEOptionsResolved;
|
|
18103
|
-
const errors_1 = requireErrors$
|
|
18254
|
+
const errors_1 = requireErrors$1();
|
|
18104
18255
|
/**
|
|
18105
18256
|
* File size limits
|
|
18106
18257
|
*/
|
|
@@ -18203,8 +18354,8 @@ function requireValidation$1 () {
|
|
|
18203
18354
|
}
|
|
18204
18355
|
}
|
|
18205
18356
|
|
|
18206
|
-
} (validation
|
|
18207
|
-
return validation
|
|
18357
|
+
} (validation));
|
|
18358
|
+
return validation;
|
|
18208
18359
|
}
|
|
18209
18360
|
|
|
18210
18361
|
var siwe$1 = {};
|
|
@@ -27281,7 +27432,7 @@ function requireNodeExports () {
|
|
|
27281
27432
|
return nodeExports;
|
|
27282
27433
|
}
|
|
27283
27434
|
|
|
27284
|
-
var utils$
|
|
27435
|
+
var utils$9 = {};
|
|
27285
27436
|
|
|
27286
27437
|
var sha3$1 = {};
|
|
27287
27438
|
|
|
@@ -27384,7 +27535,7 @@ function require_u64$1 () {
|
|
|
27384
27535
|
return _u64$1;
|
|
27385
27536
|
}
|
|
27386
27537
|
|
|
27387
|
-
var utils$
|
|
27538
|
+
var utils$8 = {};
|
|
27388
27539
|
|
|
27389
27540
|
var crypto$3 = {};
|
|
27390
27541
|
|
|
@@ -27400,11 +27551,11 @@ function requireCrypto$3 () {
|
|
|
27400
27551
|
return crypto$3;
|
|
27401
27552
|
}
|
|
27402
27553
|
|
|
27403
|
-
var hasRequiredUtils$
|
|
27554
|
+
var hasRequiredUtils$9;
|
|
27404
27555
|
|
|
27405
|
-
function requireUtils$
|
|
27406
|
-
if (hasRequiredUtils$
|
|
27407
|
-
hasRequiredUtils$
|
|
27556
|
+
function requireUtils$9 () {
|
|
27557
|
+
if (hasRequiredUtils$9) return utils$8;
|
|
27558
|
+
hasRequiredUtils$9 = 1;
|
|
27408
27559
|
(function (exports$1) {
|
|
27409
27560
|
/**
|
|
27410
27561
|
* Utilities for hex, bytes, CSPRNG.
|
|
@@ -27718,8 +27869,8 @@ function requireUtils$a () {
|
|
|
27718
27869
|
throw new Error('crypto.getRandomValues must be defined');
|
|
27719
27870
|
}
|
|
27720
27871
|
|
|
27721
|
-
} (utils$
|
|
27722
|
-
return utils$
|
|
27872
|
+
} (utils$8));
|
|
27873
|
+
return utils$8;
|
|
27723
27874
|
}
|
|
27724
27875
|
|
|
27725
27876
|
var hasRequiredSha3$1;
|
|
@@ -27743,7 +27894,7 @@ function requireSha3$1 () {
|
|
|
27743
27894
|
*/
|
|
27744
27895
|
const _u64_ts_1 = require_u64$1();
|
|
27745
27896
|
// prettier-ignore
|
|
27746
|
-
const utils_ts_1 = /*@__PURE__*/ requireUtils$
|
|
27897
|
+
const utils_ts_1 = /*@__PURE__*/ requireUtils$9();
|
|
27747
27898
|
// No __PURE__ annotations in sha3 header:
|
|
27748
27899
|
// EVERYTHING is in fact used on every export.
|
|
27749
27900
|
// Various per round constants calculations
|
|
@@ -27968,15 +28119,15 @@ function requireSha3$1 () {
|
|
|
27968
28119
|
return sha3$1;
|
|
27969
28120
|
}
|
|
27970
28121
|
|
|
27971
|
-
var hasRequiredUtils$
|
|
28122
|
+
var hasRequiredUtils$8;
|
|
27972
28123
|
|
|
27973
|
-
function requireUtils$
|
|
27974
|
-
if (hasRequiredUtils$
|
|
27975
|
-
hasRequiredUtils$
|
|
27976
|
-
Object.defineProperty(utils$
|
|
27977
|
-
utils$
|
|
28124
|
+
function requireUtils$8 () {
|
|
28125
|
+
if (hasRequiredUtils$8) return utils$9;
|
|
28126
|
+
hasRequiredUtils$8 = 1;
|
|
28127
|
+
Object.defineProperty(utils$9, "__esModule", { value: true });
|
|
28128
|
+
utils$9.parseIntegerNumber = utils$9.isEIP55Address = void 0;
|
|
27978
28129
|
const sha3_1 = /*@__PURE__*/ requireSha3$1();
|
|
27979
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
28130
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
27980
28131
|
/**
|
|
27981
28132
|
* This method is supposed to check if an address is conforming to EIP-55.
|
|
27982
28133
|
* @param address Address to be checked if conforms with EIP-55.
|
|
@@ -27999,7 +28150,7 @@ function requireUtils$9 () {
|
|
|
27999
28150
|
}
|
|
28000
28151
|
return address === ret;
|
|
28001
28152
|
};
|
|
28002
|
-
utils$
|
|
28153
|
+
utils$9.isEIP55Address = isEIP55Address;
|
|
28003
28154
|
const parseIntegerNumber = (number) => {
|
|
28004
28155
|
const parsed = parseInt(number);
|
|
28005
28156
|
if (isNaN(parsed))
|
|
@@ -28008,8 +28159,8 @@ function requireUtils$9 () {
|
|
|
28008
28159
|
throw new Error("Invalid number.");
|
|
28009
28160
|
return parsed;
|
|
28010
28161
|
};
|
|
28011
|
-
utils$
|
|
28012
|
-
return utils$
|
|
28162
|
+
utils$9.parseIntegerNumber = parseIntegerNumber;
|
|
28163
|
+
return utils$9;
|
|
28013
28164
|
}
|
|
28014
28165
|
|
|
28015
28166
|
var hasRequiredCallbacks;
|
|
@@ -28025,7 +28176,7 @@ function requireCallbacks () {
|
|
|
28025
28176
|
const node_exports_1 = __importDefault(requireNodeExports());
|
|
28026
28177
|
const utils = node_exports_1.default.utils;
|
|
28027
28178
|
const id = node_exports_1.default.ids;
|
|
28028
|
-
const utils_1 = requireUtils$
|
|
28179
|
+
const utils_1 = requireUtils$8();
|
|
28029
28180
|
/* copied from siwe/lib/utils.ts */
|
|
28030
28181
|
const ISO8601 = /^(?<date>[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]))[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/;
|
|
28031
28182
|
const isValidISO8601Date = (inputDate) => {
|
|
@@ -28616,7 +28767,7 @@ function requireParsers () {
|
|
|
28616
28767
|
Object.defineProperty(exports$1, "ParsedMessage", { enumerable: true, get: function () { return abnf_1.ParsedMessage; } });
|
|
28617
28768
|
const abnf_2 = requireAbnf();
|
|
28618
28769
|
Object.defineProperty(exports$1, "isUri", { enumerable: true, get: function () { return abnf_2.isUri; } });
|
|
28619
|
-
__exportStar(requireUtils$
|
|
28770
|
+
__exportStar(requireUtils$8(), exports$1);
|
|
28620
28771
|
} (parsers));
|
|
28621
28772
|
return parsers;
|
|
28622
28773
|
}
|
|
@@ -29059,13 +29210,13 @@ var abi$1 = {};
|
|
|
29059
29210
|
|
|
29060
29211
|
var abiCoder = {};
|
|
29061
29212
|
|
|
29062
|
-
var utils$
|
|
29213
|
+
var utils$7 = {};
|
|
29063
29214
|
|
|
29064
29215
|
var base58$2 = {};
|
|
29065
29216
|
|
|
29066
29217
|
var data = {};
|
|
29067
29218
|
|
|
29068
|
-
var errors
|
|
29219
|
+
var errors = {};
|
|
29069
29220
|
|
|
29070
29221
|
var properties = {};
|
|
29071
29222
|
|
|
@@ -29135,11 +29286,11 @@ function requireProperties () {
|
|
|
29135
29286
|
return properties;
|
|
29136
29287
|
}
|
|
29137
29288
|
|
|
29138
|
-
var hasRequiredErrors
|
|
29289
|
+
var hasRequiredErrors;
|
|
29139
29290
|
|
|
29140
|
-
function requireErrors
|
|
29141
|
-
if (hasRequiredErrors
|
|
29142
|
-
hasRequiredErrors
|
|
29291
|
+
function requireErrors () {
|
|
29292
|
+
if (hasRequiredErrors) return errors;
|
|
29293
|
+
hasRequiredErrors = 1;
|
|
29143
29294
|
/**
|
|
29144
29295
|
* All errors in ethers include properties to ensure they are both
|
|
29145
29296
|
* human-readable (i.e. ``.message``) and machine-readable (i.e. ``.code``).
|
|
@@ -29149,8 +29300,8 @@ function requireErrors$1 () {
|
|
|
29149
29300
|
*
|
|
29150
29301
|
* @_section: api/utils/errors:Errors [about-errors]
|
|
29151
29302
|
*/
|
|
29152
|
-
Object.defineProperty(errors
|
|
29153
|
-
errors
|
|
29303
|
+
Object.defineProperty(errors, "__esModule", { value: true });
|
|
29304
|
+
errors.assertPrivate = errors.assertNormalize = errors.assertArgumentCount = errors.assertArgument = errors.assert = errors.makeError = errors.isCallException = errors.isError = void 0;
|
|
29154
29305
|
const _version_js_1 = require_version();
|
|
29155
29306
|
const properties_js_1 = requireProperties();
|
|
29156
29307
|
function stringify(value, seen) {
|
|
@@ -29220,14 +29371,14 @@ function requireErrors$1 () {
|
|
|
29220
29371
|
function isError(error, code) {
|
|
29221
29372
|
return (error && error.code === code);
|
|
29222
29373
|
}
|
|
29223
|
-
errors
|
|
29374
|
+
errors.isError = isError;
|
|
29224
29375
|
/**
|
|
29225
29376
|
* Returns true if %%error%% is a [[CallExceptionError].
|
|
29226
29377
|
*/
|
|
29227
29378
|
function isCallException(error) {
|
|
29228
29379
|
return isError(error, "CALL_EXCEPTION");
|
|
29229
29380
|
}
|
|
29230
|
-
errors
|
|
29381
|
+
errors.isCallException = isCallException;
|
|
29231
29382
|
/**
|
|
29232
29383
|
* Returns a new Error configured to the format ethers emits errors, with
|
|
29233
29384
|
* the %%message%%, [[api:ErrorCode]] %%code%% and additional properties
|
|
@@ -29286,7 +29437,7 @@ function requireErrors$1 () {
|
|
|
29286
29437
|
}
|
|
29287
29438
|
return error;
|
|
29288
29439
|
}
|
|
29289
|
-
errors
|
|
29440
|
+
errors.makeError = makeError;
|
|
29290
29441
|
/**
|
|
29291
29442
|
* Throws an EthersError with %%message%%, %%code%% and additional error
|
|
29292
29443
|
* %%info%% when %%check%% is falsish..
|
|
@@ -29298,7 +29449,7 @@ function requireErrors$1 () {
|
|
|
29298
29449
|
throw makeError(message, code, info);
|
|
29299
29450
|
}
|
|
29300
29451
|
}
|
|
29301
|
-
errors
|
|
29452
|
+
errors.assert = assert;
|
|
29302
29453
|
/**
|
|
29303
29454
|
* A simple helper to simply ensuring provided arguments match expected
|
|
29304
29455
|
* constraints, throwing if not.
|
|
@@ -29309,7 +29460,7 @@ function requireErrors$1 () {
|
|
|
29309
29460
|
function assertArgument(check, message, name, value) {
|
|
29310
29461
|
assert(check, message, "INVALID_ARGUMENT", { argument: name, value: value });
|
|
29311
29462
|
}
|
|
29312
|
-
errors
|
|
29463
|
+
errors.assertArgument = assertArgument;
|
|
29313
29464
|
function assertArgumentCount(count, expectedCount, message) {
|
|
29314
29465
|
if (message == null) {
|
|
29315
29466
|
message = "";
|
|
@@ -29326,7 +29477,7 @@ function requireErrors$1 () {
|
|
|
29326
29477
|
expectedCount: expectedCount
|
|
29327
29478
|
});
|
|
29328
29479
|
}
|
|
29329
|
-
errors
|
|
29480
|
+
errors.assertArgumentCount = assertArgumentCount;
|
|
29330
29481
|
const _normalizeForms = ["NFD", "NFC", "NFKD", "NFKC"].reduce((accum, form) => {
|
|
29331
29482
|
try {
|
|
29332
29483
|
// General test for normalize
|
|
@@ -29358,7 +29509,7 @@ function requireErrors$1 () {
|
|
|
29358
29509
|
operation: "String.prototype.normalize", info: { form }
|
|
29359
29510
|
});
|
|
29360
29511
|
}
|
|
29361
|
-
errors
|
|
29512
|
+
errors.assertNormalize = assertNormalize;
|
|
29362
29513
|
/**
|
|
29363
29514
|
* Many classes use file-scoped values to guard the constructor,
|
|
29364
29515
|
* making it effectively private. This facilitates that pattern
|
|
@@ -29380,9 +29531,9 @@ function requireErrors$1 () {
|
|
|
29380
29531
|
});
|
|
29381
29532
|
}
|
|
29382
29533
|
}
|
|
29383
|
-
errors
|
|
29534
|
+
errors.assertPrivate = assertPrivate;
|
|
29384
29535
|
|
|
29385
|
-
return errors
|
|
29536
|
+
return errors;
|
|
29386
29537
|
}
|
|
29387
29538
|
|
|
29388
29539
|
var hasRequiredData;
|
|
@@ -29398,7 +29549,7 @@ function requireData () {
|
|
|
29398
29549
|
*
|
|
29399
29550
|
* @_subsection api/utils:Data Helpers [about-data]
|
|
29400
29551
|
*/
|
|
29401
|
-
const errors_js_1 = requireErrors
|
|
29552
|
+
const errors_js_1 = requireErrors();
|
|
29402
29553
|
function _getBytes(value, name, copy) {
|
|
29403
29554
|
if (value instanceof Uint8Array) {
|
|
29404
29555
|
if (copy) {
|
|
@@ -29592,7 +29743,7 @@ function requireMaths () {
|
|
|
29592
29743
|
* @_subsection: api/utils:Math Helpers [about-maths]
|
|
29593
29744
|
*/
|
|
29594
29745
|
const data_js_1 = requireData();
|
|
29595
|
-
const errors_js_1 = requireErrors
|
|
29746
|
+
const errors_js_1 = requireErrors();
|
|
29596
29747
|
const BN_0 = BigInt(0);
|
|
29597
29748
|
const BN_1 = BigInt(1);
|
|
29598
29749
|
//const BN_Max256 = (BN_1 << BigInt(256)) - BN_1;
|
|
@@ -29852,7 +30003,7 @@ function requireBase58$1 () {
|
|
|
29852
30003
|
Object.defineProperty(base58$2, "__esModule", { value: true });
|
|
29853
30004
|
base58$2.decodeBase58 = base58$2.encodeBase58 = void 0;
|
|
29854
30005
|
const data_js_1 = requireData();
|
|
29855
|
-
const errors_js_1 = requireErrors
|
|
30006
|
+
const errors_js_1 = requireErrors();
|
|
29856
30007
|
const maths_js_1 = requireMaths();
|
|
29857
30008
|
const Alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
29858
30009
|
let Lookup = null;
|
|
@@ -30048,7 +30199,7 @@ function requireUtf8 () {
|
|
|
30048
30199
|
* @_subsection api/utils:Strings and UTF-8 [about-strings]
|
|
30049
30200
|
*/
|
|
30050
30201
|
const data_js_1 = requireData();
|
|
30051
|
-
const errors_js_1 = requireErrors
|
|
30202
|
+
const errors_js_1 = requireErrors();
|
|
30052
30203
|
function errorFunc(reason, offset, bytes, output, badCodepoint) {
|
|
30053
30204
|
(0, errors_js_1.assertArgument)(false, `invalid codepoint at offset ${offset}; ${reason}`, "bytes", bytes);
|
|
30054
30205
|
}
|
|
@@ -30278,7 +30429,7 @@ function requireGeturl () {
|
|
|
30278
30429
|
const http_1 = tslib_1.__importDefault(http);
|
|
30279
30430
|
const https_1 = tslib_1.__importDefault(https);
|
|
30280
30431
|
const zlib_1 = zlib;
|
|
30281
|
-
const errors_js_1 = requireErrors
|
|
30432
|
+
const errors_js_1 = requireErrors();
|
|
30282
30433
|
const data_js_1 = requireData();
|
|
30283
30434
|
/**
|
|
30284
30435
|
* @_ignore:
|
|
@@ -30429,7 +30580,7 @@ function requireFetch () {
|
|
|
30429
30580
|
*/
|
|
30430
30581
|
const base64_js_1 = requireBase64$1();
|
|
30431
30582
|
const data_js_1 = requireData();
|
|
30432
|
-
const errors_js_1 = requireErrors
|
|
30583
|
+
const errors_js_1 = requireErrors();
|
|
30433
30584
|
const properties_js_1 = requireProperties();
|
|
30434
30585
|
const utf8_js_1 = requireUtf8();
|
|
30435
30586
|
const geturl_js_1 = requireGeturl();
|
|
@@ -31283,7 +31434,7 @@ function requireFixednumber () {
|
|
|
31283
31434
|
* @_section: api/utils/fixed-point-math:Fixed-Point Maths [about-fixed-point-math]
|
|
31284
31435
|
*/
|
|
31285
31436
|
const data_js_1 = requireData();
|
|
31286
|
-
const errors_js_1 = requireErrors
|
|
31437
|
+
const errors_js_1 = requireErrors();
|
|
31287
31438
|
const maths_js_1 = requireMaths();
|
|
31288
31439
|
const properties_js_1 = requireProperties();
|
|
31289
31440
|
const BN_N1 = BigInt(-1);
|
|
@@ -31811,7 +31962,7 @@ function requireRlpDecode () {
|
|
|
31811
31962
|
Object.defineProperty(rlpDecode, "__esModule", { value: true });
|
|
31812
31963
|
rlpDecode.decodeRlp = void 0;
|
|
31813
31964
|
const data_js_1 = requireData();
|
|
31814
|
-
const errors_js_1 = requireErrors
|
|
31965
|
+
const errors_js_1 = requireErrors();
|
|
31815
31966
|
const data_js_2 = requireData();
|
|
31816
31967
|
function hexlifyByte(value) {
|
|
31817
31968
|
let result = value.toString(16);
|
|
@@ -31984,7 +32135,7 @@ function requireUnits () {
|
|
|
31984
32135
|
*
|
|
31985
32136
|
* @_subsection api/utils:Unit Conversion [about-units]
|
|
31986
32137
|
*/
|
|
31987
|
-
const errors_js_1 = requireErrors
|
|
32138
|
+
const errors_js_1 = requireErrors();
|
|
31988
32139
|
const fixednumber_js_1 = requireFixednumber();
|
|
31989
32140
|
const maths_js_1 = requireMaths();
|
|
31990
32141
|
const names = [
|
|
@@ -32096,11 +32247,11 @@ function requireUuid () {
|
|
|
32096
32247
|
return uuid;
|
|
32097
32248
|
}
|
|
32098
32249
|
|
|
32099
|
-
var hasRequiredUtils$
|
|
32250
|
+
var hasRequiredUtils$7;
|
|
32100
32251
|
|
|
32101
|
-
function requireUtils$
|
|
32102
|
-
if (hasRequiredUtils$
|
|
32103
|
-
hasRequiredUtils$
|
|
32252
|
+
function requireUtils$7 () {
|
|
32253
|
+
if (hasRequiredUtils$7) return utils$7;
|
|
32254
|
+
hasRequiredUtils$7 = 1;
|
|
32104
32255
|
(function (exports$1) {
|
|
32105
32256
|
/**
|
|
32106
32257
|
* There are many simple utilities required to interact with
|
|
@@ -32130,7 +32281,7 @@ function requireUtils$8 () {
|
|
|
32130
32281
|
Object.defineProperty(exports$1, "stripZerosLeft", { enumerable: true, get: function () { return data_js_1.stripZerosLeft; } });
|
|
32131
32282
|
Object.defineProperty(exports$1, "zeroPadValue", { enumerable: true, get: function () { return data_js_1.zeroPadValue; } });
|
|
32132
32283
|
Object.defineProperty(exports$1, "zeroPadBytes", { enumerable: true, get: function () { return data_js_1.zeroPadBytes; } });
|
|
32133
|
-
var errors_js_1 = requireErrors
|
|
32284
|
+
var errors_js_1 = requireErrors();
|
|
32134
32285
|
Object.defineProperty(exports$1, "isCallException", { enumerable: true, get: function () { return errors_js_1.isCallException; } });
|
|
32135
32286
|
Object.defineProperty(exports$1, "isError", { enumerable: true, get: function () { return errors_js_1.isError; } });
|
|
32136
32287
|
Object.defineProperty(exports$1, "assert", { enumerable: true, get: function () { return errors_js_1.assert; } });
|
|
@@ -32179,8 +32330,8 @@ function requireUtils$8 () {
|
|
|
32179
32330
|
var uuid_js_1 = requireUuid();
|
|
32180
32331
|
Object.defineProperty(exports$1, "uuidV4", { enumerable: true, get: function () { return uuid_js_1.uuidV4; } });
|
|
32181
32332
|
|
|
32182
|
-
} (utils$
|
|
32183
|
-
return utils$
|
|
32333
|
+
} (utils$7));
|
|
32334
|
+
return utils$7;
|
|
32184
32335
|
}
|
|
32185
32336
|
|
|
32186
32337
|
var abstractCoder = {};
|
|
@@ -32193,7 +32344,7 @@ function requireAbstractCoder () {
|
|
|
32193
32344
|
(function (exports$1) {
|
|
32194
32345
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
32195
32346
|
exports$1.Reader = exports$1.Writer = exports$1.Coder = exports$1.checkResultErrors = exports$1.Result = exports$1.WordSize = void 0;
|
|
32196
|
-
const index_js_1 = requireUtils$
|
|
32347
|
+
const index_js_1 = requireUtils$7();
|
|
32197
32348
|
/**
|
|
32198
32349
|
* @_ignore:
|
|
32199
32350
|
*/
|
|
@@ -32712,7 +32863,7 @@ function requireHmac$2 () {
|
|
|
32712
32863
|
* @_subsection: api/crypto:HMAC [about-hmac]
|
|
32713
32864
|
*/
|
|
32714
32865
|
const crypto_js_1 = requireCrypto$2();
|
|
32715
|
-
const index_js_1 = requireUtils$
|
|
32866
|
+
const index_js_1 = requireUtils$7();
|
|
32716
32867
|
let locked = false;
|
|
32717
32868
|
const _computeHmac = function (algorithm, key, data) {
|
|
32718
32869
|
return (0, crypto_js_1.createHmac)(algorithm, key).update(data).digest();
|
|
@@ -32906,7 +33057,7 @@ function require_u64 () {
|
|
|
32906
33057
|
return _u64;
|
|
32907
33058
|
}
|
|
32908
33059
|
|
|
32909
|
-
var utils$
|
|
33060
|
+
var utils$6 = {};
|
|
32910
33061
|
|
|
32911
33062
|
var crypto = {};
|
|
32912
33063
|
|
|
@@ -32922,11 +33073,11 @@ function requireCrypto$1 () {
|
|
|
32922
33073
|
return crypto;
|
|
32923
33074
|
}
|
|
32924
33075
|
|
|
32925
|
-
var hasRequiredUtils$
|
|
33076
|
+
var hasRequiredUtils$6;
|
|
32926
33077
|
|
|
32927
|
-
function requireUtils$
|
|
32928
|
-
if (hasRequiredUtils$
|
|
32929
|
-
hasRequiredUtils$
|
|
33078
|
+
function requireUtils$6 () {
|
|
33079
|
+
if (hasRequiredUtils$6) return utils$6;
|
|
33080
|
+
hasRequiredUtils$6 = 1;
|
|
32930
33081
|
(function (exports$1) {
|
|
32931
33082
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
32932
33083
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
@@ -33101,8 +33252,8 @@ function requireUtils$7 () {
|
|
|
33101
33252
|
}
|
|
33102
33253
|
exports$1.randomBytes = randomBytes;
|
|
33103
33254
|
|
|
33104
|
-
} (utils$
|
|
33105
|
-
return utils$
|
|
33255
|
+
} (utils$6));
|
|
33256
|
+
return utils$6;
|
|
33106
33257
|
}
|
|
33107
33258
|
|
|
33108
33259
|
var hasRequiredSha3;
|
|
@@ -33114,7 +33265,7 @@ function requireSha3 () {
|
|
|
33114
33265
|
sha3.shake256 = sha3.shake128 = sha3.keccak_512 = sha3.keccak_384 = sha3.keccak_256 = sha3.keccak_224 = sha3.sha3_512 = sha3.sha3_384 = sha3.sha3_256 = sha3.sha3_224 = sha3.Keccak = sha3.keccakP = void 0;
|
|
33115
33266
|
const _assert_js_1 = require_assert();
|
|
33116
33267
|
const _u64_js_1 = require_u64();
|
|
33117
|
-
const utils_js_1 = requireUtils$
|
|
33268
|
+
const utils_js_1 = requireUtils$6();
|
|
33118
33269
|
// SHA3 (keccak) is based on a new design: basically, the internal state is bigger than output size.
|
|
33119
33270
|
// It's called a sponge function.
|
|
33120
33271
|
// Various per round constants calculations
|
|
@@ -33338,7 +33489,7 @@ function requireKeccak () {
|
|
|
33338
33489
|
Object.defineProperty(keccak, "__esModule", { value: true });
|
|
33339
33490
|
keccak.keccak256 = void 0;
|
|
33340
33491
|
const sha3_1 = /*@__PURE__*/ requireSha3();
|
|
33341
|
-
const index_js_1 = requireUtils$
|
|
33492
|
+
const index_js_1 = requireUtils$7();
|
|
33342
33493
|
let locked = false;
|
|
33343
33494
|
const _keccak256 = function (data) {
|
|
33344
33495
|
return (0, sha3_1.keccak_256)(data);
|
|
@@ -33398,7 +33549,7 @@ function require_sha2 () {
|
|
|
33398
33549
|
Object.defineProperty(_sha2, "__esModule", { value: true });
|
|
33399
33550
|
_sha2.SHA2 = void 0;
|
|
33400
33551
|
const _assert_js_1 = require_assert();
|
|
33401
|
-
const utils_js_1 = requireUtils$
|
|
33552
|
+
const utils_js_1 = requireUtils$6();
|
|
33402
33553
|
// Polyfill for Safari 14
|
|
33403
33554
|
function setBigUint64(view, byteOffset, value, isLE) {
|
|
33404
33555
|
if (typeof view.setBigUint64 === 'function')
|
|
@@ -33523,7 +33674,7 @@ function requireRipemd160$2 () {
|
|
|
33523
33674
|
Object.defineProperty(ripemd160$1, "__esModule", { value: true });
|
|
33524
33675
|
ripemd160$1.ripemd160 = ripemd160$1.RIPEMD160 = void 0;
|
|
33525
33676
|
const _sha2_js_1 = require_sha2();
|
|
33526
|
-
const utils_js_1 = requireUtils$
|
|
33677
|
+
const utils_js_1 = requireUtils$6();
|
|
33527
33678
|
// https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
|
|
33528
33679
|
// https://homes.esat.kuleuven.be/~bosselae/ripemd160/pdf/AB-9601/AB-9601.pdf
|
|
33529
33680
|
const Rho = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]);
|
|
@@ -33638,7 +33789,7 @@ function requireRipemd160$1 () {
|
|
|
33638
33789
|
Object.defineProperty(ripemd160$2, "__esModule", { value: true });
|
|
33639
33790
|
ripemd160$2.ripemd160 = void 0;
|
|
33640
33791
|
const ripemd160_1 = /*@__PURE__*/ requireRipemd160$2();
|
|
33641
|
-
const index_js_1 = requireUtils$
|
|
33792
|
+
const index_js_1 = requireUtils$7();
|
|
33642
33793
|
let locked = false;
|
|
33643
33794
|
const _ripemd160 = function (data) {
|
|
33644
33795
|
return (0, ripemd160_1.ripemd160)(data);
|
|
@@ -33696,7 +33847,7 @@ function requirePbkdf2$1 () {
|
|
|
33696
33847
|
Object.defineProperty(pbkdf2$1, "__esModule", { value: true });
|
|
33697
33848
|
pbkdf2$1.pbkdf2 = void 0;
|
|
33698
33849
|
const crypto_js_1 = requireCrypto$2();
|
|
33699
|
-
const index_js_1 = requireUtils$
|
|
33850
|
+
const index_js_1 = requireUtils$7();
|
|
33700
33851
|
let locked = false;
|
|
33701
33852
|
const _pbkdf2 = function (password, salt, iterations, keylen, algo) {
|
|
33702
33853
|
return (0, crypto_js_1.pbkdf2Sync)(password, salt, iterations, keylen, algo);
|
|
@@ -33802,7 +33953,7 @@ function requireSha256$1 () {
|
|
|
33802
33953
|
Object.defineProperty(sha256$1, "__esModule", { value: true });
|
|
33803
33954
|
sha256$1.sha224 = sha256$1.sha256 = void 0;
|
|
33804
33955
|
const _sha2_js_1 = require_sha2();
|
|
33805
|
-
const utils_js_1 = requireUtils$
|
|
33956
|
+
const utils_js_1 = requireUtils$6();
|
|
33806
33957
|
// SHA2-256 need to try 2^128 hashes to execute birthday attack.
|
|
33807
33958
|
// BTC network is doing 2^67 hashes/sec as per early 2023.
|
|
33808
33959
|
// Choice: a ? b : c
|
|
@@ -33943,7 +34094,7 @@ function requireHmac$1 () {
|
|
|
33943
34094
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
33944
34095
|
exports$1.hmac = exports$1.HMAC = void 0;
|
|
33945
34096
|
const _assert_js_1 = require_assert();
|
|
33946
|
-
const utils_js_1 = requireUtils$
|
|
34097
|
+
const utils_js_1 = requireUtils$6();
|
|
33947
34098
|
// HMAC (RFC 2104)
|
|
33948
34099
|
class HMAC extends utils_js_1.Hash {
|
|
33949
34100
|
constructor(hash, _key) {
|
|
@@ -34034,7 +34185,7 @@ function requirePbkdf2 () {
|
|
|
34034
34185
|
pbkdf2.pbkdf2Async = pbkdf2.pbkdf2 = void 0;
|
|
34035
34186
|
const _assert_js_1 = require_assert();
|
|
34036
34187
|
const hmac_js_1 = requireHmac$1();
|
|
34037
|
-
const utils_js_1 = requireUtils$
|
|
34188
|
+
const utils_js_1 = requireUtils$6();
|
|
34038
34189
|
// Common prologue and epilogue for sync/async functions
|
|
34039
34190
|
function pbkdf2Init(hash, _password, _salt, _opts) {
|
|
34040
34191
|
(0, _assert_js_1.hash)(hash);
|
|
@@ -34133,7 +34284,7 @@ function requireScrypt$1 () {
|
|
|
34133
34284
|
const _assert_js_1 = require_assert();
|
|
34134
34285
|
const sha256_js_1 = requireSha256$1();
|
|
34135
34286
|
const pbkdf2_js_1 = requirePbkdf2();
|
|
34136
|
-
const utils_js_1 = requireUtils$
|
|
34287
|
+
const utils_js_1 = requireUtils$6();
|
|
34137
34288
|
// RFC 7914 Scrypt KDF
|
|
34138
34289
|
// Left rotate for uint32
|
|
34139
34290
|
const rotl = (a, b) => (a << b) | (a >>> (32 - b));
|
|
@@ -34361,7 +34512,7 @@ function requireScrypt () {
|
|
|
34361
34512
|
Object.defineProperty(scrypt$1, "__esModule", { value: true });
|
|
34362
34513
|
scrypt$1.scryptSync = scrypt$1.scrypt = void 0;
|
|
34363
34514
|
const scrypt_1 = /*@__PURE__*/ requireScrypt$1();
|
|
34364
|
-
const index_js_1 = requireUtils$
|
|
34515
|
+
const index_js_1 = requireUtils$7();
|
|
34365
34516
|
let lockedSync = false, lockedAsync = false;
|
|
34366
34517
|
const _scryptAsync = async function (passwd, salt, N, r, p, dkLen, onProgress) {
|
|
34367
34518
|
return await (0, scrypt_1.scryptAsync)(passwd, salt, { N, r, p, dkLen, onProgress });
|
|
@@ -34474,7 +34625,7 @@ function requireSha2$1 () {
|
|
|
34474
34625
|
Object.defineProperty(sha2$1, "__esModule", { value: true });
|
|
34475
34626
|
sha2$1.sha512 = sha2$1.sha256 = void 0;
|
|
34476
34627
|
const crypto_js_1 = requireCrypto$2();
|
|
34477
|
-
const index_js_1 = requireUtils$
|
|
34628
|
+
const index_js_1 = requireUtils$7();
|
|
34478
34629
|
const _sha256 = function (data) {
|
|
34479
34630
|
return (0, crypto_js_1.createHash)("sha256").update(data).digest();
|
|
34480
34631
|
};
|
|
@@ -34555,15 +34706,15 @@ var secp256k1$1 = {};
|
|
|
34555
34706
|
|
|
34556
34707
|
var modular$1 = {};
|
|
34557
34708
|
|
|
34558
|
-
var utils$
|
|
34709
|
+
var utils$5 = {};
|
|
34559
34710
|
|
|
34560
|
-
var hasRequiredUtils$
|
|
34711
|
+
var hasRequiredUtils$5;
|
|
34561
34712
|
|
|
34562
|
-
function requireUtils$
|
|
34563
|
-
if (hasRequiredUtils$
|
|
34564
|
-
hasRequiredUtils$
|
|
34565
|
-
Object.defineProperty(utils$
|
|
34566
|
-
utils$
|
|
34713
|
+
function requireUtils$5 () {
|
|
34714
|
+
if (hasRequiredUtils$5) return utils$5;
|
|
34715
|
+
hasRequiredUtils$5 = 1;
|
|
34716
|
+
Object.defineProperty(utils$5, "__esModule", { value: true });
|
|
34717
|
+
utils$5.validateObject = utils$5.createHmacDrbg = utils$5.bitMask = utils$5.bitSet = utils$5.bitGet = utils$5.bitLen = utils$5.utf8ToBytes = utils$5.equalBytes = utils$5.concatBytes = utils$5.ensureBytes = utils$5.numberToVarBytesBE = utils$5.numberToBytesLE = utils$5.numberToBytesBE = utils$5.bytesToNumberLE = utils$5.bytesToNumberBE = utils$5.hexToBytes = utils$5.hexToNumber = utils$5.numberToHexUnpadded = utils$5.bytesToHex = void 0;
|
|
34567
34718
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
34568
34719
|
// 100 lines of code in the file are duplicated from noble-hashes (utils).
|
|
34569
34720
|
// This is OK: `abstract` directory does not use noble-hashes.
|
|
@@ -34587,19 +34738,19 @@ function requireUtils$6 () {
|
|
|
34587
34738
|
}
|
|
34588
34739
|
return hex;
|
|
34589
34740
|
}
|
|
34590
|
-
utils$
|
|
34741
|
+
utils$5.bytesToHex = bytesToHex;
|
|
34591
34742
|
function numberToHexUnpadded(num) {
|
|
34592
34743
|
const hex = num.toString(16);
|
|
34593
34744
|
return hex.length & 1 ? `0${hex}` : hex;
|
|
34594
34745
|
}
|
|
34595
|
-
utils$
|
|
34746
|
+
utils$5.numberToHexUnpadded = numberToHexUnpadded;
|
|
34596
34747
|
function hexToNumber(hex) {
|
|
34597
34748
|
if (typeof hex !== 'string')
|
|
34598
34749
|
throw new Error('hex string expected, got ' + typeof hex);
|
|
34599
34750
|
// Big Endian
|
|
34600
34751
|
return BigInt(hex === '' ? '0' : `0x${hex}`);
|
|
34601
34752
|
}
|
|
34602
|
-
utils$
|
|
34753
|
+
utils$5.hexToNumber = hexToNumber;
|
|
34603
34754
|
/**
|
|
34604
34755
|
* @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
|
|
34605
34756
|
*/
|
|
@@ -34620,31 +34771,31 @@ function requireUtils$6 () {
|
|
|
34620
34771
|
}
|
|
34621
34772
|
return array;
|
|
34622
34773
|
}
|
|
34623
|
-
utils$
|
|
34774
|
+
utils$5.hexToBytes = hexToBytes;
|
|
34624
34775
|
// BE: Big Endian, LE: Little Endian
|
|
34625
34776
|
function bytesToNumberBE(bytes) {
|
|
34626
34777
|
return hexToNumber(bytesToHex(bytes));
|
|
34627
34778
|
}
|
|
34628
|
-
utils$
|
|
34779
|
+
utils$5.bytesToNumberBE = bytesToNumberBE;
|
|
34629
34780
|
function bytesToNumberLE(bytes) {
|
|
34630
34781
|
if (!u8a(bytes))
|
|
34631
34782
|
throw new Error('Uint8Array expected');
|
|
34632
34783
|
return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));
|
|
34633
34784
|
}
|
|
34634
|
-
utils$
|
|
34785
|
+
utils$5.bytesToNumberLE = bytesToNumberLE;
|
|
34635
34786
|
function numberToBytesBE(n, len) {
|
|
34636
34787
|
return hexToBytes(n.toString(16).padStart(len * 2, '0'));
|
|
34637
34788
|
}
|
|
34638
|
-
utils$
|
|
34789
|
+
utils$5.numberToBytesBE = numberToBytesBE;
|
|
34639
34790
|
function numberToBytesLE(n, len) {
|
|
34640
34791
|
return numberToBytesBE(n, len).reverse();
|
|
34641
34792
|
}
|
|
34642
|
-
utils$
|
|
34793
|
+
utils$5.numberToBytesLE = numberToBytesLE;
|
|
34643
34794
|
// Unpadded, rarely used
|
|
34644
34795
|
function numberToVarBytesBE(n) {
|
|
34645
34796
|
return hexToBytes(numberToHexUnpadded(n));
|
|
34646
34797
|
}
|
|
34647
|
-
utils$
|
|
34798
|
+
utils$5.numberToVarBytesBE = numberToVarBytesBE;
|
|
34648
34799
|
/**
|
|
34649
34800
|
* Takes hex string or Uint8Array, converts to Uint8Array.
|
|
34650
34801
|
* Validates output length.
|
|
@@ -34677,7 +34828,7 @@ function requireUtils$6 () {
|
|
|
34677
34828
|
throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);
|
|
34678
34829
|
return res;
|
|
34679
34830
|
}
|
|
34680
|
-
utils$
|
|
34831
|
+
utils$5.ensureBytes = ensureBytes;
|
|
34681
34832
|
/**
|
|
34682
34833
|
* Copies several Uint8Arrays into one.
|
|
34683
34834
|
*/
|
|
@@ -34692,7 +34843,7 @@ function requireUtils$6 () {
|
|
|
34692
34843
|
});
|
|
34693
34844
|
return r;
|
|
34694
34845
|
}
|
|
34695
|
-
utils$
|
|
34846
|
+
utils$5.concatBytes = concatBytes;
|
|
34696
34847
|
function equalBytes(b1, b2) {
|
|
34697
34848
|
// We don't care about timing attacks here
|
|
34698
34849
|
if (b1.length !== b2.length)
|
|
@@ -34702,7 +34853,7 @@ function requireUtils$6 () {
|
|
|
34702
34853
|
return false;
|
|
34703
34854
|
return true;
|
|
34704
34855
|
}
|
|
34705
|
-
utils$
|
|
34856
|
+
utils$5.equalBytes = equalBytes;
|
|
34706
34857
|
/**
|
|
34707
34858
|
* @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])
|
|
34708
34859
|
*/
|
|
@@ -34711,7 +34862,7 @@ function requireUtils$6 () {
|
|
|
34711
34862
|
throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
|
|
34712
34863
|
return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809
|
|
34713
34864
|
}
|
|
34714
|
-
utils$
|
|
34865
|
+
utils$5.utf8ToBytes = utf8ToBytes;
|
|
34715
34866
|
// Bit operations
|
|
34716
34867
|
/**
|
|
34717
34868
|
* Calculates amount of bits in a bigint.
|
|
@@ -34723,7 +34874,7 @@ function requireUtils$6 () {
|
|
|
34723
34874
|
;
|
|
34724
34875
|
return len;
|
|
34725
34876
|
}
|
|
34726
|
-
utils$
|
|
34877
|
+
utils$5.bitLen = bitLen;
|
|
34727
34878
|
/**
|
|
34728
34879
|
* Gets single bit at position.
|
|
34729
34880
|
* NOTE: first bit position is 0 (same as arrays)
|
|
@@ -34732,20 +34883,20 @@ function requireUtils$6 () {
|
|
|
34732
34883
|
function bitGet(n, pos) {
|
|
34733
34884
|
return (n >> BigInt(pos)) & _1n;
|
|
34734
34885
|
}
|
|
34735
|
-
utils$
|
|
34886
|
+
utils$5.bitGet = bitGet;
|
|
34736
34887
|
/**
|
|
34737
34888
|
* Sets single bit at position.
|
|
34738
34889
|
*/
|
|
34739
34890
|
const bitSet = (n, pos, value) => {
|
|
34740
34891
|
return n | ((value ? _1n : _0n) << BigInt(pos));
|
|
34741
34892
|
};
|
|
34742
|
-
utils$
|
|
34893
|
+
utils$5.bitSet = bitSet;
|
|
34743
34894
|
/**
|
|
34744
34895
|
* Calculate mask for N bits. Not using ** operator with bigints because of old engines.
|
|
34745
34896
|
* Same as BigInt(`0b${Array(i).fill('1').join('')}`)
|
|
34746
34897
|
*/
|
|
34747
34898
|
const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;
|
|
34748
|
-
utils$
|
|
34899
|
+
utils$5.bitMask = bitMask;
|
|
34749
34900
|
// DRBG
|
|
34750
34901
|
const u8n = (data) => new Uint8Array(data); // creates Uint8Array
|
|
34751
34902
|
const u8fr = (arr) => Uint8Array.from(arr); // another shortcut
|
|
@@ -34807,7 +34958,7 @@ function requireUtils$6 () {
|
|
|
34807
34958
|
};
|
|
34808
34959
|
return genUntil;
|
|
34809
34960
|
}
|
|
34810
|
-
utils$
|
|
34961
|
+
utils$5.createHmacDrbg = createHmacDrbg;
|
|
34811
34962
|
// Validating curves and fields
|
|
34812
34963
|
const validatorFns = {
|
|
34813
34964
|
bigint: (val) => typeof val === 'bigint',
|
|
@@ -34839,7 +34990,7 @@ function requireUtils$6 () {
|
|
|
34839
34990
|
checkField(fieldName, type, true);
|
|
34840
34991
|
return object;
|
|
34841
34992
|
}
|
|
34842
|
-
utils$
|
|
34993
|
+
utils$5.validateObject = validateObject;
|
|
34843
34994
|
// validate type tests
|
|
34844
34995
|
// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };
|
|
34845
34996
|
// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!
|
|
@@ -34849,7 +35000,7 @@ function requireUtils$6 () {
|
|
|
34849
35000
|
// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });
|
|
34850
35001
|
// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });
|
|
34851
35002
|
|
|
34852
|
-
return utils$
|
|
35003
|
+
return utils$5;
|
|
34853
35004
|
}
|
|
34854
35005
|
|
|
34855
35006
|
var hasRequiredModular$1;
|
|
@@ -34861,7 +35012,7 @@ function requireModular$1 () {
|
|
|
34861
35012
|
modular$1.mapHashToField = modular$1.getMinHashLength = modular$1.getFieldBytesLength = modular$1.hashToPrivateScalar = modular$1.FpSqrtEven = modular$1.FpSqrtOdd = modular$1.Field = modular$1.nLength = modular$1.FpIsSquare = modular$1.FpDiv = modular$1.FpInvertBatch = modular$1.FpPow = modular$1.validateField = modular$1.isNegativeLE = modular$1.FpSqrt = modular$1.tonelliShanks = modular$1.invert = modular$1.pow2 = modular$1.pow = modular$1.mod = void 0;
|
|
34862
35013
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
34863
35014
|
// Utilities for modular arithmetics and finite fields
|
|
34864
|
-
const utils_js_1 = requireUtils$
|
|
35015
|
+
const utils_js_1 = requireUtils$5();
|
|
34865
35016
|
// prettier-ignore
|
|
34866
35017
|
const _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);
|
|
34867
35018
|
// prettier-ignore
|
|
@@ -35289,7 +35440,7 @@ function requireCurve$1 () {
|
|
|
35289
35440
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
35290
35441
|
// Abelian group utilities
|
|
35291
35442
|
const modular_js_1 = requireModular$1();
|
|
35292
|
-
const utils_js_1 = requireUtils$
|
|
35443
|
+
const utils_js_1 = requireUtils$5();
|
|
35293
35444
|
const _0n = BigInt(0);
|
|
35294
35445
|
const _1n = BigInt(1);
|
|
35295
35446
|
// Elliptic curve multiplication of Point by scalar. Fragile.
|
|
@@ -35458,8 +35609,8 @@ function requireWeierstrass$1 () {
|
|
|
35458
35609
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
35459
35610
|
// Short Weierstrass curve. The formula is: y² = x³ + ax + b
|
|
35460
35611
|
const mod = requireModular$1();
|
|
35461
|
-
const ut = requireUtils$
|
|
35462
|
-
const utils_js_1 = requireUtils$
|
|
35612
|
+
const ut = requireUtils$5();
|
|
35613
|
+
const utils_js_1 = requireUtils$5();
|
|
35463
35614
|
const curve_js_1 = requireCurve$1();
|
|
35464
35615
|
function validatePointOpts(curve) {
|
|
35465
35616
|
const opts = (0, curve_js_1.validateBasic)(curve);
|
|
@@ -36529,7 +36680,7 @@ function requireHashToCurve$1 () {
|
|
|
36529
36680
|
Object.defineProperty(hashToCurve$1, "__esModule", { value: true });
|
|
36530
36681
|
hashToCurve$1.createHasher = hashToCurve$1.isogenyMap = hashToCurve$1.hash_to_field = hashToCurve$1.expand_message_xof = hashToCurve$1.expand_message_xmd = void 0;
|
|
36531
36682
|
const modular_js_1 = requireModular$1();
|
|
36532
|
-
const utils_js_1 = requireUtils$
|
|
36683
|
+
const utils_js_1 = requireUtils$5();
|
|
36533
36684
|
function validateDST(dst) {
|
|
36534
36685
|
if (dst instanceof Uint8Array)
|
|
36535
36686
|
return dst;
|
|
@@ -36720,7 +36871,7 @@ function require_shortw_utils$1 () {
|
|
|
36720
36871
|
_shortw_utils$1.createCurve = _shortw_utils$1.getHash = void 0;
|
|
36721
36872
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
36722
36873
|
const hmac_1 = requireHmac$1();
|
|
36723
|
-
const utils_1 = requireUtils$
|
|
36874
|
+
const utils_1 = requireUtils$6();
|
|
36724
36875
|
const weierstrass_js_1 = requireWeierstrass$1();
|
|
36725
36876
|
// connects noble-curves to noble-hashes
|
|
36726
36877
|
function getHash(hash) {
|
|
@@ -36750,10 +36901,10 @@ function requireSecp256k1$1 () {
|
|
|
36750
36901
|
exports$1.encodeToCurve = exports$1.hashToCurve = exports$1.schnorr = exports$1.secp256k1 = void 0;
|
|
36751
36902
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
36752
36903
|
const sha256_1 = requireSha256$1();
|
|
36753
|
-
const utils_1 = requireUtils$
|
|
36904
|
+
const utils_1 = requireUtils$6();
|
|
36754
36905
|
const modular_js_1 = requireModular$1();
|
|
36755
36906
|
const weierstrass_js_1 = requireWeierstrass$1();
|
|
36756
|
-
const utils_js_1 = requireUtils$
|
|
36907
|
+
const utils_js_1 = requireUtils$5();
|
|
36757
36908
|
const hash_to_curve_js_1 = requireHashToCurve$1();
|
|
36758
36909
|
const _shortw_utils_js_1 = require_shortw_utils$1();
|
|
36759
36910
|
const secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');
|
|
@@ -37156,7 +37307,7 @@ function requireSignature () {
|
|
|
37156
37307
|
Object.defineProperty(signature, "__esModule", { value: true });
|
|
37157
37308
|
signature.Signature = void 0;
|
|
37158
37309
|
const index_js_1 = requireConstants$4();
|
|
37159
|
-
const index_js_2 = requireUtils$
|
|
37310
|
+
const index_js_2 = requireUtils$7();
|
|
37160
37311
|
// Constants
|
|
37161
37312
|
const BN_0 = BigInt(0);
|
|
37162
37313
|
const BN_1 = BigInt(1);
|
|
@@ -37517,7 +37668,7 @@ function requireSigningKey () {
|
|
|
37517
37668
|
Object.defineProperty(signingKey, "__esModule", { value: true });
|
|
37518
37669
|
signingKey.SigningKey = void 0;
|
|
37519
37670
|
const secp256k1_1 = /*@__PURE__*/ requireSecp256k1$1();
|
|
37520
|
-
const index_js_1 = requireUtils$
|
|
37671
|
+
const index_js_1 = requireUtils$7();
|
|
37521
37672
|
const signature_js_1 = requireSignature();
|
|
37522
37673
|
/**
|
|
37523
37674
|
* A **SigningKey** provides high-level access to the elliptic curve
|
|
@@ -37746,7 +37897,7 @@ function requireAddress$3 () {
|
|
|
37746
37897
|
Object.defineProperty(address$1, "__esModule", { value: true });
|
|
37747
37898
|
address$1.getIcapAddress = address$1.getAddress = void 0;
|
|
37748
37899
|
const index_js_1 = requireCrypto();
|
|
37749
|
-
const index_js_2 = requireUtils$
|
|
37900
|
+
const index_js_2 = requireUtils$7();
|
|
37750
37901
|
const BN_0 = BigInt(0);
|
|
37751
37902
|
const BN_36 = BigInt(36);
|
|
37752
37903
|
function getChecksumAddress(address) {
|
|
@@ -37914,7 +38065,7 @@ function requireContractAddress () {
|
|
|
37914
38065
|
Object.defineProperty(contractAddress, "__esModule", { value: true });
|
|
37915
38066
|
contractAddress.getCreate2Address = contractAddress.getCreateAddress = void 0;
|
|
37916
38067
|
const index_js_1 = requireCrypto();
|
|
37917
|
-
const index_js_2 = requireUtils$
|
|
38068
|
+
const index_js_2 = requireUtils$7();
|
|
37918
38069
|
const address_js_1 = requireAddress$3();
|
|
37919
38070
|
// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed
|
|
37920
38071
|
/**
|
|
@@ -37996,7 +38147,7 @@ function requireChecks () {
|
|
|
37996
38147
|
hasRequiredChecks = 1;
|
|
37997
38148
|
Object.defineProperty(checks, "__esModule", { value: true });
|
|
37998
38149
|
checks.resolveAddress = checks.isAddress = checks.isAddressable = void 0;
|
|
37999
|
-
const index_js_1 = requireUtils$
|
|
38150
|
+
const index_js_1 = requireUtils$7();
|
|
38000
38151
|
const address_js_1 = requireAddress$3();
|
|
38001
38152
|
/**
|
|
38002
38153
|
* Returns true if %%value%% is an object which implements the
|
|
@@ -38176,7 +38327,7 @@ function requireTyped () {
|
|
|
38176
38327
|
*/
|
|
38177
38328
|
Object.defineProperty(typed, "__esModule", { value: true });
|
|
38178
38329
|
typed.Typed = void 0;
|
|
38179
|
-
const index_js_1 = requireUtils$
|
|
38330
|
+
const index_js_1 = requireUtils$7();
|
|
38180
38331
|
const _gaurd = {};
|
|
38181
38332
|
function n(value, width) {
|
|
38182
38333
|
let signed = false;
|
|
@@ -38851,7 +39002,7 @@ function requireArray () {
|
|
|
38851
39002
|
hasRequiredArray = 1;
|
|
38852
39003
|
Object.defineProperty(array, "__esModule", { value: true });
|
|
38853
39004
|
array.ArrayCoder = array.unpack = array.pack = void 0;
|
|
38854
|
-
const index_js_1 = requireUtils$
|
|
39005
|
+
const index_js_1 = requireUtils$7();
|
|
38855
39006
|
const typed_js_1 = requireTyped();
|
|
38856
39007
|
const abstract_coder_js_1 = requireAbstractCoder();
|
|
38857
39008
|
const anonymous_js_1 = requireAnonymous();
|
|
@@ -39059,7 +39210,7 @@ function requireBytes$1 () {
|
|
|
39059
39210
|
hasRequiredBytes$1 = 1;
|
|
39060
39211
|
Object.defineProperty(bytes$1, "__esModule", { value: true });
|
|
39061
39212
|
bytes$1.BytesCoder = bytes$1.DynamicBytesCoder = void 0;
|
|
39062
|
-
const index_js_1 = requireUtils$
|
|
39213
|
+
const index_js_1 = requireUtils$7();
|
|
39063
39214
|
const abstract_coder_js_1 = requireAbstractCoder();
|
|
39064
39215
|
/**
|
|
39065
39216
|
* @_ignore
|
|
@@ -39107,7 +39258,7 @@ function requireFixedBytes () {
|
|
|
39107
39258
|
hasRequiredFixedBytes = 1;
|
|
39108
39259
|
Object.defineProperty(fixedBytes, "__esModule", { value: true });
|
|
39109
39260
|
fixedBytes.FixedBytesCoder = void 0;
|
|
39110
|
-
const index_js_1 = requireUtils$
|
|
39261
|
+
const index_js_1 = requireUtils$7();
|
|
39111
39262
|
const typed_js_1 = requireTyped();
|
|
39112
39263
|
const abstract_coder_js_1 = requireAbstractCoder();
|
|
39113
39264
|
/**
|
|
@@ -39185,7 +39336,7 @@ function requireNumber () {
|
|
|
39185
39336
|
hasRequiredNumber = 1;
|
|
39186
39337
|
Object.defineProperty(number, "__esModule", { value: true });
|
|
39187
39338
|
number.NumberCoder = void 0;
|
|
39188
|
-
const index_js_1 = requireUtils$
|
|
39339
|
+
const index_js_1 = requireUtils$7();
|
|
39189
39340
|
const typed_js_1 = requireTyped();
|
|
39190
39341
|
const abstract_coder_js_1 = requireAbstractCoder();
|
|
39191
39342
|
const BN_0 = BigInt(0);
|
|
@@ -39362,7 +39513,7 @@ function requireAccesslist () {
|
|
|
39362
39513
|
Object.defineProperty(accesslist, "__esModule", { value: true });
|
|
39363
39514
|
accesslist.accessListify = void 0;
|
|
39364
39515
|
const index_js_1 = requireAddress$2();
|
|
39365
|
-
const index_js_2 = requireUtils$
|
|
39516
|
+
const index_js_2 = requireUtils$7();
|
|
39366
39517
|
function accessSetify(addr, storageKeys) {
|
|
39367
39518
|
return {
|
|
39368
39519
|
address: (0, index_js_1.getAddress)(addr),
|
|
@@ -39413,7 +39564,7 @@ function requireAuthorization$1 () {
|
|
|
39413
39564
|
authorization.authorizationify = void 0;
|
|
39414
39565
|
const index_js_1 = requireAddress$2();
|
|
39415
39566
|
const index_js_2 = requireCrypto();
|
|
39416
|
-
const index_js_3 = requireUtils$
|
|
39567
|
+
const index_js_3 = requireUtils$7();
|
|
39417
39568
|
function authorizationify(auth) {
|
|
39418
39569
|
return {
|
|
39419
39570
|
address: (0, index_js_1.getAddress)(auth.address),
|
|
@@ -39478,7 +39629,7 @@ function requireTransaction$1 () {
|
|
|
39478
39629
|
const index_js_1 = requireAddress$2();
|
|
39479
39630
|
const addresses_js_1 = requireAddresses$1();
|
|
39480
39631
|
const index_js_2 = requireCrypto();
|
|
39481
|
-
const index_js_3 = requireUtils$
|
|
39632
|
+
const index_js_3 = requireUtils$7();
|
|
39482
39633
|
const accesslist_js_1 = requireAccesslist();
|
|
39483
39634
|
const authorization_js_1 = requireAuthorization$1();
|
|
39484
39635
|
const address_js_1 = requireAddress();
|
|
@@ -40805,7 +40956,7 @@ function requireAuthorization () {
|
|
|
40805
40956
|
const index_js_1 = requireAddress$2();
|
|
40806
40957
|
const index_js_2 = requireCrypto();
|
|
40807
40958
|
const index_js_3 = requireTransaction();
|
|
40808
|
-
const index_js_4 = requireUtils$
|
|
40959
|
+
const index_js_4 = requireUtils$7();
|
|
40809
40960
|
/**
|
|
40810
40961
|
* Computes the [[link-eip-7702]] authorization digest to sign.
|
|
40811
40962
|
*/
|
|
@@ -40842,7 +40993,7 @@ function requireId () {
|
|
|
40842
40993
|
Object.defineProperty(id, "__esModule", { value: true });
|
|
40843
40994
|
id.id = void 0;
|
|
40844
40995
|
const index_js_1 = requireCrypto();
|
|
40845
|
-
const index_js_2 = requireUtils$
|
|
40996
|
+
const index_js_2 = requireUtils$7();
|
|
40846
40997
|
/**
|
|
40847
40998
|
* A simple hashing function which operates on UTF-8 strings to
|
|
40848
40999
|
* compute an 32-byte identifier.
|
|
@@ -40864,13 +41015,13 @@ function requireId () {
|
|
|
40864
41015
|
|
|
40865
41016
|
var namehash = {};
|
|
40866
41017
|
|
|
40867
|
-
var dist$
|
|
41018
|
+
var dist$2 = {};
|
|
40868
41019
|
|
|
40869
|
-
var hasRequiredDist$
|
|
41020
|
+
var hasRequiredDist$3;
|
|
40870
41021
|
|
|
40871
|
-
function requireDist$
|
|
40872
|
-
if (hasRequiredDist$
|
|
40873
|
-
hasRequiredDist$
|
|
41022
|
+
function requireDist$3 () {
|
|
41023
|
+
if (hasRequiredDist$3) return dist$2;
|
|
41024
|
+
hasRequiredDist$3 = 1;
|
|
40874
41025
|
|
|
40875
41026
|
// created 2023-09-25T01:01:55.148Z
|
|
40876
41027
|
// compressed base64-encoded blob for include-ens data
|
|
@@ -42111,18 +42262,18 @@ function requireDist$4 () {
|
|
|
42111
42262
|
return tokens;
|
|
42112
42263
|
}
|
|
42113
42264
|
|
|
42114
|
-
dist$
|
|
42115
|
-
dist$
|
|
42116
|
-
dist$
|
|
42117
|
-
dist$
|
|
42118
|
-
dist$
|
|
42119
|
-
dist$
|
|
42120
|
-
dist$
|
|
42121
|
-
dist$
|
|
42122
|
-
dist$
|
|
42123
|
-
dist$
|
|
42124
|
-
dist$
|
|
42125
|
-
return dist$
|
|
42265
|
+
dist$2.ens_beautify = ens_beautify;
|
|
42266
|
+
dist$2.ens_emoji = ens_emoji;
|
|
42267
|
+
dist$2.ens_normalize = ens_normalize;
|
|
42268
|
+
dist$2.ens_normalize_fragment = ens_normalize_fragment;
|
|
42269
|
+
dist$2.ens_split = ens_split;
|
|
42270
|
+
dist$2.ens_tokenize = ens_tokenize;
|
|
42271
|
+
dist$2.is_combining_mark = is_combining_mark;
|
|
42272
|
+
dist$2.nfc = nfc;
|
|
42273
|
+
dist$2.nfd = nfd;
|
|
42274
|
+
dist$2.safe_str_from_cps = safe_str_from_cps;
|
|
42275
|
+
dist$2.should_escape = should_escape;
|
|
42276
|
+
return dist$2;
|
|
42126
42277
|
}
|
|
42127
42278
|
|
|
42128
42279
|
var hasRequiredNamehash;
|
|
@@ -42133,8 +42284,8 @@ function requireNamehash () {
|
|
|
42133
42284
|
Object.defineProperty(namehash, "__esModule", { value: true });
|
|
42134
42285
|
namehash.dnsEncode = namehash.namehash = namehash.isValidName = namehash.ensNormalize = void 0;
|
|
42135
42286
|
const index_js_1 = requireCrypto();
|
|
42136
|
-
const index_js_2 = requireUtils$
|
|
42137
|
-
const ens_normalize_1 = requireDist$
|
|
42287
|
+
const index_js_2 = requireUtils$7();
|
|
42288
|
+
const ens_normalize_1 = requireDist$3();
|
|
42138
42289
|
const Zeros = new Uint8Array(32);
|
|
42139
42290
|
Zeros.fill(0);
|
|
42140
42291
|
function checkComponent(comp) {
|
|
@@ -42235,7 +42386,7 @@ function requireMessage () {
|
|
|
42235
42386
|
const index_js_1 = requireCrypto();
|
|
42236
42387
|
const index_js_2 = requireConstants$4();
|
|
42237
42388
|
const index_js_3 = requireTransaction();
|
|
42238
|
-
const index_js_4 = requireUtils$
|
|
42389
|
+
const index_js_4 = requireUtils$7();
|
|
42239
42390
|
/**
|
|
42240
42391
|
* Computes the [[link-eip-191]] personal-sign message digest to sign.
|
|
42241
42392
|
*
|
|
@@ -42299,7 +42450,7 @@ function requireSolidity () {
|
|
|
42299
42450
|
solidity.solidityPackedSha256 = solidity.solidityPackedKeccak256 = solidity.solidityPacked = void 0;
|
|
42300
42451
|
const index_js_1 = requireAddress$2();
|
|
42301
42452
|
const index_js_2 = requireCrypto();
|
|
42302
|
-
const index_js_3 = requireUtils$
|
|
42453
|
+
const index_js_3 = requireUtils$7();
|
|
42303
42454
|
const regexBytes = new RegExp("^bytes([0-9]+)$");
|
|
42304
42455
|
const regexNumber = new RegExp("^(u?int)([0-9]*)$");
|
|
42305
42456
|
const regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$");
|
|
@@ -42419,7 +42570,7 @@ function requireTypedData () {
|
|
|
42419
42570
|
const index_js_1 = requireAddress$2();
|
|
42420
42571
|
const index_js_2 = requireCrypto();
|
|
42421
42572
|
const index_js_3 = requireTransaction();
|
|
42422
|
-
const index_js_4 = requireUtils$
|
|
42573
|
+
const index_js_4 = requireUtils$7();
|
|
42423
42574
|
const id_js_1 = requireId();
|
|
42424
42575
|
const padding = new Uint8Array(32);
|
|
42425
42576
|
padding.fill(0);
|
|
@@ -42994,7 +43145,7 @@ function requireFragments () {
|
|
|
42994
43145
|
*/
|
|
42995
43146
|
Object.defineProperty(fragments, "__esModule", { value: true });
|
|
42996
43147
|
fragments.StructFragment = fragments.FunctionFragment = fragments.FallbackFragment = fragments.ConstructorFragment = fragments.EventFragment = fragments.ErrorFragment = fragments.NamedFragment = fragments.Fragment = fragments.ParamType = void 0;
|
|
42997
|
-
const index_js_1 = requireUtils$
|
|
43148
|
+
const index_js_1 = requireUtils$7();
|
|
42998
43149
|
const index_js_2 = requireHash();
|
|
42999
43150
|
// [ "a", "b" ] => { "a": 1, "b": 1 }
|
|
43000
43151
|
function setify(items) {
|
|
@@ -44333,7 +44484,7 @@ function requireAbiCoder () {
|
|
|
44333
44484
|
Object.defineProperty(abiCoder, "__esModule", { value: true });
|
|
44334
44485
|
abiCoder.AbiCoder = void 0;
|
|
44335
44486
|
// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI
|
|
44336
|
-
const index_js_1 = requireUtils$
|
|
44487
|
+
const index_js_1 = requireUtils$7();
|
|
44337
44488
|
const abstract_coder_js_1 = requireAbstractCoder();
|
|
44338
44489
|
const address_js_1 = requireAddress$1();
|
|
44339
44490
|
const array_js_1 = requireArray();
|
|
@@ -44346,7 +44497,7 @@ function requireAbiCoder () {
|
|
|
44346
44497
|
const tuple_js_1 = requireTuple();
|
|
44347
44498
|
const fragments_js_1 = requireFragments();
|
|
44348
44499
|
const index_js_2 = requireAddress$2();
|
|
44349
|
-
const index_js_3 = requireUtils$
|
|
44500
|
+
const index_js_3 = requireUtils$7();
|
|
44350
44501
|
// https://docs.soliditylang.org/en/v0.8.17/control-structures.html
|
|
44351
44502
|
const PanicReasons = new Map();
|
|
44352
44503
|
PanicReasons.set(0x00, "GENERIC_PANIC");
|
|
@@ -44544,7 +44695,7 @@ function requireBytes32 () {
|
|
|
44544
44695
|
*/
|
|
44545
44696
|
Object.defineProperty(bytes32, "__esModule", { value: true });
|
|
44546
44697
|
bytes32.decodeBytes32String = bytes32.encodeBytes32String = void 0;
|
|
44547
|
-
const index_js_1 = requireUtils$
|
|
44698
|
+
const index_js_1 = requireUtils$7();
|
|
44548
44699
|
/**
|
|
44549
44700
|
* Encodes %%text%% as a Bytes32 string.
|
|
44550
44701
|
*/
|
|
@@ -44607,7 +44758,7 @@ function require_interface () {
|
|
|
44607
44758
|
exports$1.Interface = exports$1.Indexed = exports$1.ErrorDescription = exports$1.TransactionDescription = exports$1.LogDescription = exports$1.Result = exports$1.checkResultErrors = void 0;
|
|
44608
44759
|
const index_js_1 = requireCrypto();
|
|
44609
44760
|
const index_js_2 = requireHash();
|
|
44610
|
-
const index_js_3 = requireUtils$
|
|
44761
|
+
const index_js_3 = requireUtils$7();
|
|
44611
44762
|
const abi_coder_js_1 = requireAbiCoder();
|
|
44612
44763
|
const abstract_coder_js_1 = requireAbstractCoder();
|
|
44613
44764
|
Object.defineProperty(exports$1, "checkResultErrors", { enumerable: true, get: function () { return abstract_coder_js_1.checkResultErrors; } });
|
|
@@ -45768,7 +45919,7 @@ function requireProvider () {
|
|
|
45768
45919
|
Object.defineProperty(provider, "__esModule", { value: true });
|
|
45769
45920
|
provider.TransactionResponse = provider.TransactionReceipt = provider.Log = provider.Block = provider.copyRequest = provider.FeeData = void 0;
|
|
45770
45921
|
//import { resolveAddress } from "@ethersproject/address";
|
|
45771
|
-
const index_js_1 = requireUtils$
|
|
45922
|
+
const index_js_1 = requireUtils$7();
|
|
45772
45923
|
const index_js_2 = requireTransaction();
|
|
45773
45924
|
const BN_0 = BigInt(0);
|
|
45774
45925
|
// -----------------------
|
|
@@ -47102,7 +47253,7 @@ function requireWrappers () {
|
|
|
47102
47253
|
// import from provider.ts instead of index.ts to prevent circular dep
|
|
47103
47254
|
// from EtherscanProvider
|
|
47104
47255
|
const provider_js_1 = requireProvider();
|
|
47105
|
-
const index_js_1 = requireUtils$
|
|
47256
|
+
const index_js_1 = requireUtils$7();
|
|
47106
47257
|
/**
|
|
47107
47258
|
* An **EventLog** contains additional properties parsed from the [[Log]].
|
|
47108
47259
|
*/
|
|
@@ -47297,7 +47448,7 @@ function requireContract$1 () {
|
|
|
47297
47448
|
// import from provider.ts instead of index.ts to prevent circular dep
|
|
47298
47449
|
// from EtherscanProvider
|
|
47299
47450
|
const provider_js_1 = requireProvider();
|
|
47300
|
-
const index_js_3 = requireUtils$
|
|
47451
|
+
const index_js_3 = requireUtils$7();
|
|
47301
47452
|
const wrappers_js_1 = requireWrappers();
|
|
47302
47453
|
const BN_0 = BigInt(0);
|
|
47303
47454
|
function canCall(value) {
|
|
@@ -48263,7 +48414,7 @@ function requireFactory () {
|
|
|
48263
48414
|
factory.ContractFactory = void 0;
|
|
48264
48415
|
const index_js_1 = requireAbi$1();
|
|
48265
48416
|
const index_js_2 = requireAddress$2();
|
|
48266
|
-
const index_js_3 = requireUtils$
|
|
48417
|
+
const index_js_3 = requireUtils$7();
|
|
48267
48418
|
const contract_js_1 = requireContract$1();
|
|
48268
48419
|
// A = Arguments to the constructor
|
|
48269
48420
|
// I = Interface of deployed contracts
|
|
@@ -48433,7 +48584,7 @@ function requireEnsResolver () {
|
|
|
48433
48584
|
const index_js_2 = requireConstants$4();
|
|
48434
48585
|
const index_js_3 = requireContract();
|
|
48435
48586
|
const index_js_4 = requireHash();
|
|
48436
|
-
const index_js_5 = requireUtils$
|
|
48587
|
+
const index_js_5 = requireUtils$7();
|
|
48437
48588
|
// @TODO: This should use the fetch-data:ipfs gateway
|
|
48438
48589
|
// Trim off the ipfs:// prefix and return the default gateway URL
|
|
48439
48590
|
function getIpfsLink(link) {
|
|
@@ -48938,7 +49089,7 @@ function requireFormat () {
|
|
|
48938
49089
|
const index_js_1 = requireAddress$2();
|
|
48939
49090
|
const index_js_2 = requireCrypto();
|
|
48940
49091
|
const index_js_3 = requireTransaction();
|
|
48941
|
-
const index_js_4 = requireUtils$
|
|
49092
|
+
const index_js_4 = requireUtils$7();
|
|
48942
49093
|
const BN_0 = BigInt(0);
|
|
48943
49094
|
function allowNull(format, nullValue) {
|
|
48944
49095
|
return (function (value) {
|
|
@@ -49256,7 +49407,7 @@ function requirePluginsNetwork () {
|
|
|
49256
49407
|
Object.defineProperty(pluginsNetwork, "__esModule", { value: true });
|
|
49257
49408
|
pluginsNetwork.FetchUrlFeeDataNetworkPlugin = pluginsNetwork.FeeDataNetworkPlugin = pluginsNetwork.EnsPlugin = pluginsNetwork.GasCostPlugin = pluginsNetwork.NetworkPlugin = void 0;
|
|
49258
49409
|
const properties_js_1 = requireProperties();
|
|
49259
|
-
const index_js_1 = requireUtils$
|
|
49410
|
+
const index_js_1 = requireUtils$7();
|
|
49260
49411
|
const EnsAddress = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
49261
49412
|
/**
|
|
49262
49413
|
* A **NetworkPlugin** provides additional functionality on a [[Network]].
|
|
@@ -49485,7 +49636,7 @@ function requireNetwork () {
|
|
|
49485
49636
|
Object.defineProperty(network, "__esModule", { value: true });
|
|
49486
49637
|
network.Network = void 0;
|
|
49487
49638
|
const index_js_1 = requireTransaction();
|
|
49488
|
-
const index_js_2 = requireUtils$
|
|
49639
|
+
const index_js_2 = requireUtils$7();
|
|
49489
49640
|
const plugins_network_js_1 = requirePluginsNetwork();
|
|
49490
49641
|
/* * * *
|
|
49491
49642
|
// Networks which operation against an L2 can use this plugin to
|
|
@@ -49856,7 +50007,7 @@ function requireSubscriberPolling () {
|
|
|
49856
50007
|
hasRequiredSubscriberPolling = 1;
|
|
49857
50008
|
Object.defineProperty(subscriberPolling, "__esModule", { value: true });
|
|
49858
50009
|
subscriberPolling.PollingEventSubscriber = subscriberPolling.PollingTransactionSubscriber = subscriberPolling.PollingOrphanSubscriber = subscriberPolling.PollingBlockTagSubscriber = subscriberPolling.OnBlockSubscriber = subscriberPolling.PollingBlockSubscriber = subscriberPolling.getPollingSubscriber = void 0;
|
|
49859
|
-
const index_js_1 = requireUtils$
|
|
50010
|
+
const index_js_1 = requireUtils$7();
|
|
49860
50011
|
function copy(obj) {
|
|
49861
50012
|
return JSON.parse(JSON.stringify(obj));
|
|
49862
50013
|
}
|
|
@@ -50184,7 +50335,7 @@ function requireAbstractProvider () {
|
|
|
50184
50335
|
const index_js_3 = requireContract();
|
|
50185
50336
|
const index_js_4 = requireHash();
|
|
50186
50337
|
const index_js_5 = requireTransaction();
|
|
50187
|
-
const index_js_6 = requireUtils$
|
|
50338
|
+
const index_js_6 = requireUtils$7();
|
|
50188
50339
|
const ens_resolver_js_1 = requireEnsResolver();
|
|
50189
50340
|
const format_js_1 = requireFormat();
|
|
50190
50341
|
const network_js_1 = requireNetwork();
|
|
@@ -51591,7 +51742,7 @@ function requireAbstractSigner () {
|
|
|
51591
51742
|
*/
|
|
51592
51743
|
const index_js_1 = requireAddress$2();
|
|
51593
51744
|
const index_js_2 = requireTransaction();
|
|
51594
|
-
const index_js_3 = requireUtils$
|
|
51745
|
+
const index_js_3 = requireUtils$7();
|
|
51595
51746
|
const provider_js_1 = requireProvider();
|
|
51596
51747
|
function checkProvider(signer, operation) {
|
|
51597
51748
|
if (signer.provider) {
|
|
@@ -51895,7 +52046,7 @@ function requireSubscriberFilterid () {
|
|
|
51895
52046
|
hasRequiredSubscriberFilterid = 1;
|
|
51896
52047
|
Object.defineProperty(subscriberFilterid, "__esModule", { value: true });
|
|
51897
52048
|
subscriberFilterid.FilterIdPendingSubscriber = subscriberFilterid.FilterIdEventSubscriber = subscriberFilterid.FilterIdSubscriber = void 0;
|
|
51898
|
-
const index_js_1 = requireUtils$
|
|
52049
|
+
const index_js_1 = requireUtils$7();
|
|
51899
52050
|
const subscriber_polling_js_1 = requireSubscriberPolling();
|
|
51900
52051
|
function copy(obj) {
|
|
51901
52052
|
return JSON.parse(JSON.stringify(obj));
|
|
@@ -52100,7 +52251,7 @@ function requireProviderJsonrpc () {
|
|
|
52100
52251
|
const index_js_2 = requireAddress$2();
|
|
52101
52252
|
const index_js_3 = requireHash();
|
|
52102
52253
|
const index_js_4 = requireTransaction();
|
|
52103
|
-
const index_js_5 = requireUtils$
|
|
52254
|
+
const index_js_5 = requireUtils$7();
|
|
52104
52255
|
const abstract_provider_js_1 = requireAbstractProvider();
|
|
52105
52256
|
const abstract_signer_js_1 = requireAbstractSigner();
|
|
52106
52257
|
const network_js_1 = requireNetwork();
|
|
@@ -53094,7 +53245,7 @@ function requireProviderAnkr () {
|
|
|
53094
53245
|
*
|
|
53095
53246
|
* @_subsection: api/providers/thirdparty:Ankr [providers-ankr]
|
|
53096
53247
|
*/
|
|
53097
|
-
const index_js_1 = requireUtils$
|
|
53248
|
+
const index_js_1 = requireUtils$7();
|
|
53098
53249
|
const community_js_1 = requireCommunity();
|
|
53099
53250
|
const network_js_1 = requireNetwork();
|
|
53100
53251
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
@@ -53245,7 +53396,7 @@ function requireProviderAlchemy () {
|
|
|
53245
53396
|
*/
|
|
53246
53397
|
Object.defineProperty(providerAlchemy, "__esModule", { value: true });
|
|
53247
53398
|
providerAlchemy.AlchemyProvider = void 0;
|
|
53248
|
-
const index_js_1 = requireUtils$
|
|
53399
|
+
const index_js_1 = requireUtils$7();
|
|
53249
53400
|
const community_js_1 = requireCommunity();
|
|
53250
53401
|
const network_js_1 = requireNetwork();
|
|
53251
53402
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
@@ -53394,7 +53545,7 @@ function requireProviderChainstack () {
|
|
|
53394
53545
|
*
|
|
53395
53546
|
* @_subsection: api/providers/thirdparty:Chainstack [providers-chainstack]
|
|
53396
53547
|
*/
|
|
53397
|
-
const index_js_1 = requireUtils$
|
|
53548
|
+
const index_js_1 = requireUtils$7();
|
|
53398
53549
|
const community_js_1 = requireCommunity();
|
|
53399
53550
|
const network_js_1 = requireNetwork();
|
|
53400
53551
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
@@ -53497,7 +53648,7 @@ function requireProviderCloudflare () {
|
|
|
53497
53648
|
*/
|
|
53498
53649
|
Object.defineProperty(providerCloudflare, "__esModule", { value: true });
|
|
53499
53650
|
providerCloudflare.CloudflareProvider = void 0;
|
|
53500
|
-
const index_js_1 = requireUtils$
|
|
53651
|
+
const index_js_1 = requireUtils$7();
|
|
53501
53652
|
const network_js_1 = requireNetwork();
|
|
53502
53653
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
53503
53654
|
/**
|
|
@@ -53555,7 +53706,7 @@ function requireProviderEtherscan () {
|
|
|
53555
53706
|
const index_js_1 = requireAbi$1();
|
|
53556
53707
|
const index_js_2 = requireContract();
|
|
53557
53708
|
const index_js_3 = requireTransaction();
|
|
53558
|
-
const index_js_4 = requireUtils$
|
|
53709
|
+
const index_js_4 = requireUtils$7();
|
|
53559
53710
|
const abstract_provider_js_1 = requireAbstractProvider();
|
|
53560
53711
|
const network_js_1 = requireNetwork();
|
|
53561
53712
|
const plugins_network_js_1 = requirePluginsNetwork();
|
|
@@ -54129,7 +54280,7 @@ function requireProviderSocket () {
|
|
|
54129
54280
|
Object.defineProperty(providerSocket, "__esModule", { value: true });
|
|
54130
54281
|
providerSocket.SocketProvider = providerSocket.SocketEventSubscriber = providerSocket.SocketPendingSubscriber = providerSocket.SocketBlockSubscriber = providerSocket.SocketSubscriber = void 0;
|
|
54131
54282
|
const abstract_provider_js_1 = requireAbstractProvider();
|
|
54132
|
-
const index_js_1 = requireUtils$
|
|
54283
|
+
const index_js_1 = requireUtils$7();
|
|
54133
54284
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
54134
54285
|
/**
|
|
54135
54286
|
* A **SocketSubscriber** uses a socket transport to handle events and
|
|
@@ -54549,7 +54700,7 @@ function requireProviderInfura () {
|
|
|
54549
54700
|
*
|
|
54550
54701
|
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
|
|
54551
54702
|
*/
|
|
54552
|
-
const index_js_1 = requireUtils$
|
|
54703
|
+
const index_js_1 = requireUtils$7();
|
|
54553
54704
|
const community_js_1 = requireCommunity();
|
|
54554
54705
|
const network_js_1 = requireNetwork();
|
|
54555
54706
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
@@ -54761,7 +54912,7 @@ function requireProviderQuicknode () {
|
|
|
54761
54912
|
*/
|
|
54762
54913
|
Object.defineProperty(providerQuicknode, "__esModule", { value: true });
|
|
54763
54914
|
providerQuicknode.QuickNodeProvider = void 0;
|
|
54764
|
-
const index_js_1 = requireUtils$
|
|
54915
|
+
const index_js_1 = requireUtils$7();
|
|
54765
54916
|
const community_js_1 = requireCommunity();
|
|
54766
54917
|
const network_js_1 = requireNetwork();
|
|
54767
54918
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
@@ -54913,7 +55064,7 @@ function requireProviderFallback () {
|
|
|
54913
55064
|
*
|
|
54914
55065
|
* @_section: api/providers/fallback-provider:Fallback Provider [about-fallback-provider]
|
|
54915
55066
|
*/
|
|
54916
|
-
const index_js_1 = requireUtils$
|
|
55067
|
+
const index_js_1 = requireUtils$7();
|
|
54917
55068
|
const abstract_provider_js_1 = requireAbstractProvider();
|
|
54918
55069
|
const network_js_1 = requireNetwork();
|
|
54919
55070
|
const BN_1 = BigInt("1");
|
|
@@ -55537,7 +55688,7 @@ function requireDefaultProvider () {
|
|
|
55537
55688
|
hasRequiredDefaultProvider = 1;
|
|
55538
55689
|
Object.defineProperty(defaultProvider, "__esModule", { value: true });
|
|
55539
55690
|
defaultProvider.getDefaultProvider = void 0;
|
|
55540
|
-
const index_js_1 = requireUtils$
|
|
55691
|
+
const index_js_1 = requireUtils$7();
|
|
55541
55692
|
const provider_ankr_js_1 = requireProviderAnkr();
|
|
55542
55693
|
const provider_alchemy_js_1 = requireProviderAlchemy();
|
|
55543
55694
|
//import { BlockscoutProvider } from "./provider-blockscout.js";
|
|
@@ -55746,7 +55897,7 @@ function requireSignerNoncemanager () {
|
|
|
55746
55897
|
hasRequiredSignerNoncemanager = 1;
|
|
55747
55898
|
Object.defineProperty(signerNoncemanager, "__esModule", { value: true });
|
|
55748
55899
|
signerNoncemanager.NonceManager = void 0;
|
|
55749
|
-
const index_js_1 = requireUtils$
|
|
55900
|
+
const index_js_1 = requireUtils$7();
|
|
55750
55901
|
const abstract_signer_js_1 = requireAbstractSigner();
|
|
55751
55902
|
/**
|
|
55752
55903
|
* A **NonceManager** wraps another [[Signer]] and automatically manages
|
|
@@ -55833,7 +55984,7 @@ function requireProviderBrowser () {
|
|
|
55833
55984
|
hasRequiredProviderBrowser = 1;
|
|
55834
55985
|
Object.defineProperty(providerBrowser, "__esModule", { value: true });
|
|
55835
55986
|
providerBrowser.BrowserProvider = void 0;
|
|
55836
|
-
const index_js_1 = requireUtils$
|
|
55987
|
+
const index_js_1 = requireUtils$7();
|
|
55837
55988
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
55838
55989
|
/**
|
|
55839
55990
|
* A **BrowserProvider** is intended to wrap an injected provider which
|
|
@@ -56065,7 +56216,7 @@ function requireProviderBlockscout () {
|
|
|
56065
56216
|
*
|
|
56066
56217
|
* @_subsection: api/providers/thirdparty:Blockscout [providers-blockscout]
|
|
56067
56218
|
*/
|
|
56068
|
-
const index_js_1 = requireUtils$
|
|
56219
|
+
const index_js_1 = requireUtils$7();
|
|
56069
56220
|
const network_js_1 = requireNetwork();
|
|
56070
56221
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
56071
56222
|
function getUrl(name) {
|
|
@@ -56212,7 +56363,7 @@ function requireProviderPocket () {
|
|
|
56212
56363
|
*
|
|
56213
56364
|
* @_subsection: api/providers/thirdparty:Pocket [providers-pocket]
|
|
56214
56365
|
*/
|
|
56215
|
-
const index_js_1 = requireUtils$
|
|
56366
|
+
const index_js_1 = requireUtils$7();
|
|
56216
56367
|
const community_js_1 = requireCommunity();
|
|
56217
56368
|
const network_js_1 = requireNetwork();
|
|
56218
56369
|
const provider_jsonrpc_js_1 = requireProviderJsonrpc();
|
|
@@ -56497,7 +56648,7 @@ function requireBaseWallet () {
|
|
|
56497
56648
|
const index_js_2 = requireHash();
|
|
56498
56649
|
const index_js_3 = requireProviders();
|
|
56499
56650
|
const index_js_4 = requireTransaction();
|
|
56500
|
-
const index_js_5 = requireUtils$
|
|
56651
|
+
const index_js_5 = requireUtils$7();
|
|
56501
56652
|
/**
|
|
56502
56653
|
* The **BaseWallet** is a stream-lined implementation of a
|
|
56503
56654
|
* [[Signer]] that operates with a private key.
|
|
@@ -56635,7 +56786,7 @@ function requireDecodeOwl () {
|
|
|
56635
56786
|
hasRequiredDecodeOwl = 1;
|
|
56636
56787
|
Object.defineProperty(decodeOwl, "__esModule", { value: true });
|
|
56637
56788
|
decodeOwl.decodeOwl = decodeOwl.decode = void 0;
|
|
56638
|
-
const index_js_1 = requireUtils$
|
|
56789
|
+
const index_js_1 = requireUtils$7();
|
|
56639
56790
|
const subsChrs = " !#$%&'()*+,-./<=>?@[]^_`{|}~";
|
|
56640
56791
|
const Word = /^[a-z]*$/i;
|
|
56641
56792
|
function unfold(words, sep) {
|
|
@@ -56704,7 +56855,7 @@ function requireWordlist () {
|
|
|
56704
56855
|
hasRequiredWordlist = 1;
|
|
56705
56856
|
Object.defineProperty(wordlist, "__esModule", { value: true });
|
|
56706
56857
|
wordlist.Wordlist = void 0;
|
|
56707
|
-
const index_js_1 = requireUtils$
|
|
56858
|
+
const index_js_1 = requireUtils$7();
|
|
56708
56859
|
/**
|
|
56709
56860
|
* A Wordlist represents a collection of language-specific
|
|
56710
56861
|
* words used to encode and devoce [[link-bip-39]] encoded data
|
|
@@ -56760,7 +56911,7 @@ function requireWordlistOwl () {
|
|
|
56760
56911
|
Object.defineProperty(wordlistOwl, "__esModule", { value: true });
|
|
56761
56912
|
wordlistOwl.WordlistOwl = void 0;
|
|
56762
56913
|
const index_js_1 = requireHash();
|
|
56763
|
-
const index_js_2 = requireUtils$
|
|
56914
|
+
const index_js_2 = requireUtils$7();
|
|
56764
56915
|
const decode_owl_js_1 = requireDecodeOwl();
|
|
56765
56916
|
const wordlist_js_1 = requireWordlist();
|
|
56766
56917
|
/**
|
|
@@ -56879,7 +57030,7 @@ function requireMnemonic () {
|
|
|
56879
57030
|
Object.defineProperty(mnemonic, "__esModule", { value: true });
|
|
56880
57031
|
mnemonic.Mnemonic = void 0;
|
|
56881
57032
|
const index_js_1 = requireCrypto();
|
|
56882
|
-
const index_js_2 = requireUtils$
|
|
57033
|
+
const index_js_2 = requireUtils$7();
|
|
56883
57034
|
const lang_en_js_1 = requireLangEn();
|
|
56884
57035
|
// Returns a byte with the MSB bits set
|
|
56885
57036
|
function getUpperMask(bits) {
|
|
@@ -57729,26 +57880,26 @@ function requireLib_commonjs$1 () {
|
|
|
57729
57880
|
return lib_commonjs;
|
|
57730
57881
|
}
|
|
57731
57882
|
|
|
57732
|
-
var utils$
|
|
57883
|
+
var utils$4 = {};
|
|
57733
57884
|
|
|
57734
|
-
var hasRequiredUtils$
|
|
57885
|
+
var hasRequiredUtils$4;
|
|
57735
57886
|
|
|
57736
|
-
function requireUtils$
|
|
57737
|
-
if (hasRequiredUtils$
|
|
57738
|
-
hasRequiredUtils$
|
|
57887
|
+
function requireUtils$4 () {
|
|
57888
|
+
if (hasRequiredUtils$4) return utils$4;
|
|
57889
|
+
hasRequiredUtils$4 = 1;
|
|
57739
57890
|
/**
|
|
57740
57891
|
* @_ignore
|
|
57741
57892
|
*/
|
|
57742
|
-
Object.defineProperty(utils$
|
|
57743
|
-
utils$
|
|
57744
|
-
const index_js_1 = requireUtils$
|
|
57893
|
+
Object.defineProperty(utils$4, "__esModule", { value: true });
|
|
57894
|
+
utils$4.spelunk = utils$4.getPassword = utils$4.zpad = utils$4.looseArrayify = void 0;
|
|
57895
|
+
const index_js_1 = requireUtils$7();
|
|
57745
57896
|
function looseArrayify(hexString) {
|
|
57746
57897
|
if (typeof (hexString) === "string" && !hexString.startsWith("0x")) {
|
|
57747
57898
|
hexString = "0x" + hexString;
|
|
57748
57899
|
}
|
|
57749
57900
|
return (0, index_js_1.getBytesCopy)(hexString);
|
|
57750
57901
|
}
|
|
57751
|
-
utils$
|
|
57902
|
+
utils$4.looseArrayify = looseArrayify;
|
|
57752
57903
|
function zpad(value, length) {
|
|
57753
57904
|
value = String(value);
|
|
57754
57905
|
while (value.length < length) {
|
|
@@ -57756,14 +57907,14 @@ function requireUtils$5 () {
|
|
|
57756
57907
|
}
|
|
57757
57908
|
return value;
|
|
57758
57909
|
}
|
|
57759
|
-
utils$
|
|
57910
|
+
utils$4.zpad = zpad;
|
|
57760
57911
|
function getPassword(password) {
|
|
57761
57912
|
if (typeof (password) === 'string') {
|
|
57762
57913
|
return (0, index_js_1.toUtf8Bytes)(password, "NFKC");
|
|
57763
57914
|
}
|
|
57764
57915
|
return (0, index_js_1.getBytesCopy)(password);
|
|
57765
57916
|
}
|
|
57766
|
-
utils$
|
|
57917
|
+
utils$4.getPassword = getPassword;
|
|
57767
57918
|
function spelunk(object, _path) {
|
|
57768
57919
|
const match = _path.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);
|
|
57769
57920
|
(0, index_js_1.assertArgument)(match != null, "invalid path", "path", _path);
|
|
@@ -57826,7 +57977,7 @@ function requireUtils$5 () {
|
|
|
57826
57977
|
}
|
|
57827
57978
|
return cur;
|
|
57828
57979
|
}
|
|
57829
|
-
utils$
|
|
57980
|
+
utils$4.spelunk = spelunk;
|
|
57830
57981
|
/*
|
|
57831
57982
|
export function follow(object: any, path: string): null | string {
|
|
57832
57983
|
let currentChild = object;
|
|
@@ -57884,7 +58035,7 @@ function requireUtils$5 () {
|
|
|
57884
58035
|
}
|
|
57885
58036
|
*/
|
|
57886
58037
|
|
|
57887
|
-
return utils$
|
|
58038
|
+
return utils$4;
|
|
57888
58039
|
}
|
|
57889
58040
|
|
|
57890
58041
|
var hasRequiredJsonKeystore;
|
|
@@ -57908,8 +58059,8 @@ function requireJsonKeystore () {
|
|
|
57908
58059
|
const index_js_1 = requireAddress$2();
|
|
57909
58060
|
const index_js_2 = requireCrypto();
|
|
57910
58061
|
const index_js_3 = requireTransaction();
|
|
57911
|
-
const index_js_4 = requireUtils$
|
|
57912
|
-
const utils_js_1 = requireUtils$
|
|
58062
|
+
const index_js_4 = requireUtils$7();
|
|
58063
|
+
const utils_js_1 = requireUtils$4();
|
|
57913
58064
|
const _version_js_1 = require_version();
|
|
57914
58065
|
const defaultPath = "m/44'/60'/0'/0/0";
|
|
57915
58066
|
/**
|
|
@@ -58205,7 +58356,7 @@ function requireHdwallet () {
|
|
|
58205
58356
|
const index_js_1 = requireCrypto();
|
|
58206
58357
|
const index_js_2 = requireProviders();
|
|
58207
58358
|
const index_js_3 = requireTransaction();
|
|
58208
|
-
const index_js_4 = requireUtils$
|
|
58359
|
+
const index_js_4 = requireUtils$7();
|
|
58209
58360
|
const lang_en_js_1 = requireLangEn();
|
|
58210
58361
|
const base_wallet_js_1 = requireBaseWallet();
|
|
58211
58362
|
const mnemonic_js_1 = requireMnemonic();
|
|
@@ -58720,8 +58871,8 @@ function requireJsonCrowdsale () {
|
|
|
58720
58871
|
const index_js_1 = requireAddress$2();
|
|
58721
58872
|
const index_js_2 = requireCrypto();
|
|
58722
58873
|
const index_js_3 = requireHash();
|
|
58723
|
-
const index_js_4 = requireUtils$
|
|
58724
|
-
const utils_js_1 = requireUtils$
|
|
58874
|
+
const index_js_4 = requireUtils$7();
|
|
58875
|
+
const utils_js_1 = requireUtils$4();
|
|
58725
58876
|
/**
|
|
58726
58877
|
* Returns true if %%json%% is a valid JSON Crowdsale wallet.
|
|
58727
58878
|
*/
|
|
@@ -58783,7 +58934,7 @@ function requireWallet$1 () {
|
|
|
58783
58934
|
Object.defineProperty(wallet, "__esModule", { value: true });
|
|
58784
58935
|
wallet.Wallet = void 0;
|
|
58785
58936
|
const index_js_1 = requireCrypto();
|
|
58786
|
-
const index_js_2 = requireUtils$
|
|
58937
|
+
const index_js_2 = requireUtils$7();
|
|
58787
58938
|
const base_wallet_js_1 = requireBaseWallet();
|
|
58788
58939
|
const hdwallet_js_1 = requireHdwallet();
|
|
58789
58940
|
const json_crowdsale_js_1 = requireJsonCrowdsale();
|
|
@@ -59040,7 +59191,7 @@ function requireDecodeOwla () {
|
|
|
59040
59191
|
hasRequiredDecodeOwla = 1;
|
|
59041
59192
|
Object.defineProperty(decodeOwla, "__esModule", { value: true });
|
|
59042
59193
|
decodeOwla.decodeOwlA = void 0;
|
|
59043
|
-
const index_js_1 = requireUtils$
|
|
59194
|
+
const index_js_1 = requireUtils$7();
|
|
59044
59195
|
const bit_reader_js_1 = requireBitReader();
|
|
59045
59196
|
const decode_owl_js_1 = requireDecodeOwl();
|
|
59046
59197
|
/**
|
|
@@ -59265,7 +59416,7 @@ function requireLangJa () {
|
|
|
59265
59416
|
Object.defineProperty(langJa, "__esModule", { value: true });
|
|
59266
59417
|
langJa.LangJa = void 0;
|
|
59267
59418
|
const index_js_1 = requireHash();
|
|
59268
|
-
const index_js_2 = requireUtils$
|
|
59419
|
+
const index_js_2 = requireUtils$7();
|
|
59269
59420
|
const wordlist_js_1 = requireWordlist();
|
|
59270
59421
|
const data = [
|
|
59271
59422
|
// 4-kana words
|
|
@@ -59432,7 +59583,7 @@ function requireLangKo () {
|
|
|
59432
59583
|
Object.defineProperty(langKo, "__esModule", { value: true });
|
|
59433
59584
|
langKo.LangKo = void 0;
|
|
59434
59585
|
const index_js_1 = requireHash();
|
|
59435
|
-
const index_js_2 = requireUtils$
|
|
59586
|
+
const index_js_2 = requireUtils$7();
|
|
59436
59587
|
const wordlist_js_1 = requireWordlist();
|
|
59437
59588
|
const data = [
|
|
59438
59589
|
"OYAa",
|
|
@@ -59622,7 +59773,7 @@ function requireLangZh () {
|
|
|
59622
59773
|
Object.defineProperty(langZh, "__esModule", { value: true });
|
|
59623
59774
|
langZh.LangZh = void 0;
|
|
59624
59775
|
const index_js_1 = requireHash();
|
|
59625
|
-
const index_js_2 = requireUtils$
|
|
59776
|
+
const index_js_2 = requireUtils$7();
|
|
59626
59777
|
const wordlist_js_1 = requireWordlist();
|
|
59627
59778
|
const data = "}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN<di,AM=W5%QO&ka&ua,hM^tm=zV=JA=wR&+X]7P&NB#4J#5L|/b[dA}tJ<Do&6m&u2[U1&Kb.HM&mC=w0&MW<rY,Hq#6M}QG,13&wP}Jp]Ow%ue&Kg<HP<D9~4k~9T&I2_c6$9T#9/[C5~7O~4a=cs&O7=KK=An&l9$6U$8A&uD&QI|/Y&bg}Ux&F2#6b}E2&JN&kW&kp=U/&bb=Xl<Cj}k+~5J#6L&5z&9i}b4&Fo,ho(X0_g3~4O$Fz&QE<HN=Ww]6/%GF-Vw=tj&/D&PN#9g=YO}cL&Of&PI~5I&Ip=vU=IW#9G;0o-wU}ss&QR<BT&R9=tk$PY_dh&Pq-yh]7T,nj.Xu=EP&76=cI&Fs*Xg}z7$Gb&+I=DF,AF=cA}rL#7j=Dz&3y<Aa$52=PQ}b0(iY$Fa}oL&xV#6U=ec=WZ,xh%RY<dp#9N&Fl&44=WH*A7=sh&TB&8P=07;u+&PK}uh}J5#72)V/=xC,AB$k0&f6;1E|+5=1B,3v]6n&wR%b+&xx]7f=Ol}fl;+D^wG]7E;nB;uh^Ir&l5=JL,nS=cf=g5;u6|/Q$Gc=MH%Hg#5d%M6^86=U+$Gz,l/,ir^5y&Ba&/F-IY&FI&be%IZ#77&PW_Nu$kE(Yf&NX]7Z,Jy&FJ(Xo&Nz#/d=y7&MX<Ag}Z+;nE]Dt(iG#4D=13&Pj~4c%v8&Zo%OL&/X#4W<HR&ie~6J_1O(Y2=y5=Ad*cv_eB#6k&PX:BU#7A;uk&Ft&Fx_dD=U2;vB=U5=4F}+O&GN.HH:9s=b0%NV(jO&IH=JT}Z9=VZ<Af,Kx^4m&uJ%c6,6r;9m#+L}cf%Kh&F3~4H=vP}bu,Hz|++,1w]nv}k6;uu$jw*Kl*WX&uM[x7&Fr[m7$NO&QN]hu=JN}nR^8g#/h(ps|KC;vd}xz=V0}p6&FD$G1#7K<bG_4p~8g&cf;u4=tl}+k%5/}fz;uw<cA=u1}gU}VM=LJ=eX&+L&Pr#4U}p2:nC,2K]7H:jF&9x}uX#9O=MB<fz~8X~5m&4D&kN&u5%E/(h7(ZF&VG<de(qM|/e-Wt=3x(a+,/R]f/&ND$Ro&nU}0g=KA%kH&NK$Ke<dS}cB&IX~5g$TN]6m=Uv,Is&Py=Ef%Kz#+/%bi&+A<F4$OG&4C&FL#9V<Zk=2I_eE&6c]nw&kq$HG}y+&A8$P3}OH=XP]70%IS(AJ_gH%GZ&tY&AZ=vb~6y&/r=VI=Wv<Zi=fl=xf&eL}c8}OL=MJ=g8$F7=YT}9u=0+^xC}JH&nL^N0~4T]K2,Cy%OC#6s;vG(AC^xe^cG&MF}Br#9P;wD-7h$O/&xA}Fn^PC]6i]7G&8V$Qs;vl(TB~73~4l<mW&6V=2y&uY&+3)aP}XF;LP&kx$wU=t7;uy<FN&lz)7E=Oo*Y+;wI}9q}le;J6&Ri&4t&Qr#8B=cb&vG=J5|Ql(h5<Yy~4+}QD,Lx=wn%K/&RK=dO&Pw,Q9=co%4u;9u}g0@6a^4I%b0=zo|/c&tX=dQ=OS#+b=yz_AB&wB&Pm=W9$HP_gR=62=AO=ti=hI,oA&jr&dH=tm&b6$P2(x8=zi;nG~7F;05]0n[Ix&3m}rg=Xp=cd&uz]7t;97=cN;vV<jf&FF&F1=6Q&Ik*Kk&P4,2z=fQ]7D&3u,H0=d/}Uw<ZN<7R}Kv;0f$H7,MD]7n$F0#88~9Z%da=by;+T#/u=VF&fO&kr^kf<AB]sU,I5$Ng&Pz;0i&QD&vM=Yl:BM;nJ_xJ]U7&Kf&30,3f|Z9*dC)je_jA&Q4&Kp$NH(Yz#6S&Id%Ib=KX,AD=KV%dP}tW&Pk^+E_Ni=cq,3R}VZ(Si=b+}rv;0j}rZ]uA,/w(Sx&Jv$w9&4d&wE,NJ$Gy=J/]Ls#7k<ZQ<Y/&uj]Ov$PM;v3,2F&+u:up=On&3e,Jv;90=J+&Qm]6q}bK#+d~8Y(h2]hA;99&AS=I/}qB&dQ}yJ-VM}Vl&ui,iB&G3|Dc]7d=eQ%dX%JC_1L~4d^NP;vJ&/1)ZI#7N]9X[bQ&PL=0L(UZ,Lm&kc&IR}n7(iR<AQ<dg=33=vN}ft}au]7I,Ba=x9=dR~6R&Tq=Xi,3d$Nr&Bc}DI&ku&vf]Dn,/F&iD,Ll&Nw=0y&I7=Ls=/A&tU=Qe}Ua&uk&+F=g4=gh=Vj#+1&Qn}Uy*44#5F,Pc&Rz*Xn=oh=5W;0n_Nf(iE<Y7=vr=Zu]oz#5Z%mI=kN=Bv_Jp(T2;vt_Ml<FS&uI=L/&6P]64$M7}86<bo%QX(SI%IY&VK=Al&Ux;vv;ut*E/%uh<ZE|O3,M2(yc]yu=Wk&tp:Ex}hr,Cl&WE)+Z=8U}I2_4Q,hA_si=iw=OM=tM=yZ%Ia=U7;wT}b+;uo=Za}yS!5x}HD}fb#5O_dA;Nv%uB(yB;01(Sf}Fk;v7}Pt#8v<mZ#7L,/r&Pl~4w&f5=Ph$Fw_LF&8m,bL=yJ&BH}p/*Jn}tU~5Q;wB(h6]Df]8p^+B;E4&Wc=d+;Ea&bw$8C&FN,DM=Yf}mP~5w=fT#6V=mC=Fi=AV}jB&AN}lW}aH#/D)dZ;hl;vE}/7,CJ;31&w8,hj%u9_Js=jJ&4M~8k=TN&eC}nL&uc-wi&lX}dj=Mv=e2#6u=cr$uq$6G]8W}Jb:nm=Yg<b3(UA;vX&6n&xF=KT,jC,De&R8&oY=Zv&oB]7/=Z2&Oa}bf,hh(4h^tZ&72&Nx;D2&xL~5h~40)ZG)h+=OJ&RA]Bv$yB=Oq=df,AQ%Jn}OJ;11,3z&Tl&tj;v+^Hv,Dh(id=s+]7N&N3)9Q~8f,S4=uW=w4&uX,LX&3d]CJ&yp&8x<b2_do&lP=y/<cy_dG=Oi=7R(VH(lt_1T,Iq_AA;12^6T%k6#8K[B1{oO<AU[Bt;1b$9S&Ps<8T=St{bY,jB(Zp&63&Uv$9V,PM]6v&Af}zW[bW_oq}sm}nB&Kq&gC&ff_eq_2m&5F&TI}rf}Gf;Zr_z9;ER&jk}iz_sn<BN~+n&vo=Vi%97|ZR=Wc,WE&6t]6z%85(ly#84=KY)6m_5/=aX,N3}Tm&he&6K]tR_B2-I3;u/&hU&lH<AP=iB&IA=XL;/5&Nh=wv<BH#79=vS=zl<AA=0X_RG}Bw&9p$NW,AX&kP_Lp&/Z(Tc]Mu}hs#6I}5B&cI<bq&H9#6m=K9}vH(Y1(Y0#4B&w6,/9&gG<bE,/O=zb}I4_l8<B/;wL%Qo<HO[Mq=XX}0v&BP&F4(mG}0i}nm,EC=9u{I3,xG&/9=JY*DK&hR)BX=EI=cx=b/{6k}yX%A+&wa}Xb=la;wi^lL;0t}jo&Qb=xg=XB}iO<qo{bR=NV&8f=a0&Jy;0v=uK)HK;vN#6h&jB(h/%ud&NI%wY.X7=Pt}Cu-uL&Gs_hl%mH,tm]78=Lb^Q0#7Y=1u<Bt&+Q=Co_RH,w3;1e}ux<aU;ui}U3&Q5%bt]63&UQ|0l&uL}O7&3o,AV&dm|Nj(Xt*5+(Uu&Hh(p7(UF=VR=Bp^Jl&Hd[ix)9/=Iq]C8<67]66}mB%6f}bb}JI]8T$HA}db=YM&pa=2J}tS&Y0=PS&y4=cX$6E,hX,XP&nR;04,FQ&l0&Vm_Dv#5Y~8Z=Bi%MA]6x=JO:+p,Az&9q,Hj~6/}SD=K1:EJ}nA;Qo#/E]9R,Ie&6X%W3]61&v4=xX_MC=0q;06(Xq=fs}IG}Dv=0l}o7$iZ;9v&LH&DP-7a&OY,SZ,Kz,Cv&dh=fx|Nh,F/~7q=XF&w+;9n&Gw;0h}Z7<7O&JK(S7&LS<AD<ac=wo<Dt&zw%4B=4v#8P;9o~6p*vV=Tm,Or&I6=1q}nY=P0=gq&Bl&Uu,Ch%yb}UY=zh}dh}rl(T4_xk(YA#8R*xH,IN}Jn]7V}C4&Ty}j3]7p=cL=3h&wW%Qv<Z3=f0&RI&+S(ic_zq}oN&/Y=z1;Td=LW=0e=OI(Vc,+b^ju(UL;0r:Za%8v=Rp=zw&58&73&wK}qX]6y&8E)a2}WR=wP^ur&nQ<cH}Re=Aq&wk}Q0&+q=PP,Gc|/d^k5,Fw]8Y}Pg]p3=ju=ed}r5_yf&Cs]7z$/G<Cm&Jp&54_1G_gP_Ll}JZ;0u]k8_7k(Sg]65{9i=LN&Sx&WK,iW&fD&Lk{9a}Em-9c#8N&io=sy]8d&nT&IK(lx#7/$lW(Td<s8~49,3o<7Y=MW(T+_Jr&Wd,iL}Ct=xh&5V;v4&8n%Kx=iF&l2_0B{B+,If(J0,Lv;u8=Kx-vB=HC&vS=Z6&fU&vE^xK;3D=4h=MR#45:Jw;0d}iw=LU}I5=I0]gB*im,K9}GU,1k_4U&Tt=Vs(iX&lU(TF#7y,ZO}oA&m5#5P}PN}Uz=hM<B1&FB<aG,e6~7T<tP(UQ_ZT=wu&F8)aQ]iN,1r_Lo&/g:CD}84{J1_Ki&Na&3n$jz&FE=dc;uv;va}in}ll=fv(h1&3h}fp=Cy}BM(+E~8m}lo%v7=hC(T6$cj=BQ=Bw(DR,2j=Ks,NS|F+;00=fU=70}Mb(YU;+G&m7&hr=Sk%Co]t+(X5_Jw}0r}gC(AS-IP&QK<Z2#8Q$WC]WX}T2&pG_Ka,HC=R4&/N;Z+;ch(C7,D4$3p_Mk&B2$8D=n9%Ky#5z(CT&QJ#7B]DC]gW}nf~5M;Iw#80}Tc_1F#4Z-aC}Hl=ph=fz,/3=aW}JM}nn;DG;vm}wn,4P}T3;wx&RG$u+}zK=0b;+J_Ek{re<aZ=AS}yY#5D]7q,Cp}xN=VP*2C}GZ}aG~+m_Cs=OY#6r]6g<GS}LC(UB=3A=Bo}Jy<c4}Is;1P<AG}Op<Z1}ld}nS=1Z,yM&95&98=CJ(4t:2L$Hk=Zo}Vc;+I}np&N1}9y=iv}CO*7p=jL)px]tb^zh&GS&Vl%v/;vR=14=zJ&49|/f]hF}WG;03=8P}o/&Gg&rp;DB,Kv}Ji&Pb;aA^ll(4j%yt}+K$Ht#4y&hY]7Y<F1,eN}bG(Uh%6Z]t5%G7;+F_RE;it}tL=LS&Da=Xx(S+(4f=8G=yI}cJ}WP=37=jS}pX}hd)fp<A8=Jt~+o$HJ=M6}iX=g9}CS=dv=Cj(mP%Kd,xq|+9&LD(4/=Xm&QP=Lc}LX&fL;+K=Op(lu=Qs.qC:+e&L+=Jj#8w;SL]7S(b+#4I=c1&nG_Lf&uH;+R)ZV<bV%B/,TE&0H&Jq&Ah%OF&Ss(p2,Wv&I3=Wl}Vq;1L&lJ#9b_1H=8r=b8=JH(SZ=hD=J2#7U,/U#/X~6P,FU<eL=jx,mG=hG=CE&PU=Se(qX&LY=X6=y4&tk&QQ&tf=4g&xI}W+&mZ=Dc#7w}Lg;DA;wQ_Kb(cJ=hR%yX&Yb,hw{bX_4X;EP;1W_2M}Uc=b5(YF,CM&Tp^OJ{DD]6s=vF=Yo~8q}XH}Fu%P5(SJ=Qt;MO]s8<F3&B3&8T(Ul-BS*dw&dR<87}/8]62$PZ]Lx<Au}9Q]7c=ja=KR,Go,Us&v6(qk}pG&G2=ev^GM%w4&H4]7F&dv]J6}Ew:9w=sj-ZL}Ym$+h(Ut(Um~4n=Xs(U7%eE=Qc_JR<CA#6t<Fv|/I,IS,EG<F2(Xy$/n<Fa(h9}+9_2o&N4#7X<Zq|+f_Dp=dt&na,Ca=NJ)jY=8C=YG=s6&Q+<DO}D3=xB&R1(lw;Qn<bF(Cu|/B}HV=SS&n7,10&u0]Dm%A6^4Q=WR(TD=Xo<GH,Rj(l8)bP&n/=LM&CF,F5&ml=PJ;0k=LG=tq,Rh,D6@4i=1p&+9=YC%er_Mh;nI;0q=Fw]80=xq=FM$Gv;v6&nc;wK%H2&Kj;vs,AA=YP,66}bI(qR~5U=6q~4b$Ni=K5.X3$So&Iu(p+]8G=Cf=RY(TS_O3(iH&57=fE=Dg_Do#9z#7H;FK{qd_2k%JR}en&gh_z8;Rx}9p<cN_Ne,DO;LN_7o~/p=NF=5Y}gN<ce<C1,QE]Wv=3u<BC}GK]yq}DY&u/_hj=II(pz&rC,jV&+Z}ut=NQ;Cg-SR_ZS,+o=u/;Oy_RK_QF(Fx&xP}Wr&TA,Uh&g1=yr{ax[VF$Pg(YB;Ox=Vy;+W(Sp}XV%dd&33(l/]l4#4Y}OE=6c=bw(A7&9t%wd&N/&mo,JH&Qe)fm=Ao}fu=tH";
|
|
59628
59779
|
const deltaData = "FAZDC6BALcLZCA+GBARCW8wNCcDDZ8LVFBOqqDUiou+M42TFAyERXFb7EjhP+vmBFpFrUpfDV2F7eB+eCltCHJFWLFCED+pWTojEIHFXc3aFn4F68zqjEuKidS1QBVPDEhE7NA4mhMF7oThD49ot3FgtzHFCK0acW1x8DH1EmLoIlrWFBLE+y5+NA3Cx65wJHTaEZVaK1mWAmPGxgYCdxwOjTDIt/faOEhTl1vqNsKtJCOhJWuio2g07KLZEQsFBUpNtwEByBgxFslFheFbiEPvi61msDvApxCzB6rBCzox7joYA5UdDc+Cb4FSgIabpXFAj3bjkmFAxCZE+mD/SFf/0ELecYCt3nLoxC6WEZf2tKDB4oZvrEmqFkKk7BwILA7gtYBpsTq//D4jD0F0wEB9pyQ1BD5Ba0oYHDI+sbDFhvrHXdDHfgFEIJLi5r8qercNFBgFLC4bo5ERJtamWBDFy73KCEb6M8VpmEt330ygCTK58EIIFkYgF84gtGA9Uyh3m68iVrFbWFbcbqiCYHZ9J1jeRPbL8yswhMiDbhEhdNoSwFbZrLT740ABEqgCkO8J1BLd1VhKKR4sD1yUo0z+FF59Mvg71CFbyEhbHSFBKEIKyoQNgQppq9T0KAqePu0ZFGrXOHdKJqkoTFhYvpDNyuuznrN84thJbsCoO6Cu6Xlvntvy0QYuAExQEYtTUBf3CoCqwgGFZ4u1HJFzDVwEy3cjcpV4QvsPaBC3rCGyCF23o4K3pp2gberGgFEJEHo4nHICtyKH2ZqyxhN05KBBJIQlKh/Oujv/DH32VrlqFdIFC7Fz9Ct4kaqFME0UETLprnN9kfy+kFmtQBB0+5CFu0N9Ij8l/VvJDh2oq3hT6EzjTHKFN7ZjZwoTsAZ4Exsko6Fpa6WC+sduz8jyrLpegTv2h1EBeYpLpm2czQW0KoCcS0bCVXCmuWJDBjN1nQNLdF58SFJ0h7i3pC3oEOKy/FjBklL70XvBEEIWp2yZ04xObzAWDDJG7f+DbqBEA7LyiR95j7MDVdDViz2RE5vWlBMv5e4+VfhP3aXNPhvLSynb9O2x4uFBV+3jqu6d5pCG28/sETByvmu/+IJ0L3wb4rj9DNOLBF6XPIODr4L19U9RRofAG6Nxydi8Bki8BhGJbBAJKzbJxkZSlF9Q2Cu8oKqggB9hBArwLLqEBWEtFowy8XK8bEyw9snT+BeyFk1ZCSrdmgfEwFePTgCjELBEnIbjaDDPJm36rG9pztcEzT8dGk23SBhXBB1H4z+OWze0ooFzz8pDBYFvp9j9tvFByf9y4EFdVnz026CGR5qMr7fxMHN8UUdlyJAzlTBDRC28k+L4FB8078ljyD91tUj1ocnTs8vdEf7znbzm+GIjEZnoZE5rnLL700Xc7yHfz05nWxy03vBB9YGHYOWxgMQGBCR24CVYNE1hpfKxN0zKnfJDmmMgMmBWqNbjfSyFCBWSCGCgR8yFXiHyEj+VtD1FB3FpC1zI0kFbzifiKTLm9yq5zFmur+q8FHqjoOBWsBPiDbnCC2ErunV6cJ6TygXFYHYp7MKN9RUlSIS8/xBAGYLzeqUnBF4QbsTuUkUqGs6CaiDWKWjQK9EJkjpkTmNCPYXL";
|
|
@@ -59947,7 +60098,7 @@ function requireEthers () {
|
|
|
59947
60098
|
Object.defineProperty(exports$1, "computeAddress", { enumerable: true, get: function () { return index_js_8.computeAddress; } });
|
|
59948
60099
|
Object.defineProperty(exports$1, "recoverAddress", { enumerable: true, get: function () { return index_js_8.recoverAddress; } });
|
|
59949
60100
|
Object.defineProperty(exports$1, "Transaction", { enumerable: true, get: function () { return index_js_8.Transaction; } });
|
|
59950
|
-
var index_js_9 = requireUtils$
|
|
60101
|
+
var index_js_9 = requireUtils$7();
|
|
59951
60102
|
Object.defineProperty(exports$1, "decodeBase58", { enumerable: true, get: function () { return index_js_9.decodeBase58; } });
|
|
59952
60103
|
Object.defineProperty(exports$1, "encodeBase58", { enumerable: true, get: function () { return index_js_9.encodeBase58; } });
|
|
59953
60104
|
Object.defineProperty(exports$1, "decodeBase64", { enumerable: true, get: function () { return index_js_9.decodeBase64; } });
|
|
@@ -60147,7 +60298,7 @@ function requireTypes$1 () {
|
|
|
60147
60298
|
return types$1;
|
|
60148
60299
|
}
|
|
60149
60300
|
|
|
60150
|
-
var utils$
|
|
60301
|
+
var utils$3 = {};
|
|
60151
60302
|
|
|
60152
60303
|
var random = {};
|
|
60153
60304
|
|
|
@@ -60970,13 +61121,13 @@ function requireRandom () {
|
|
|
60970
61121
|
return random;
|
|
60971
61122
|
}
|
|
60972
61123
|
|
|
60973
|
-
var hasRequiredUtils$
|
|
61124
|
+
var hasRequiredUtils$3;
|
|
60974
61125
|
|
|
60975
|
-
function requireUtils$
|
|
60976
|
-
if (hasRequiredUtils$
|
|
60977
|
-
hasRequiredUtils$
|
|
60978
|
-
Object.defineProperty(utils$
|
|
60979
|
-
utils$
|
|
61126
|
+
function requireUtils$3 () {
|
|
61127
|
+
if (hasRequiredUtils$3) return utils$3;
|
|
61128
|
+
hasRequiredUtils$3 = 1;
|
|
61129
|
+
Object.defineProperty(utils$3, "__esModule", { value: true });
|
|
61130
|
+
utils$3.checkInvalidKeys = utils$3.isValidISO8601Date = utils$3.generateNonce = utils$3.checkContractWalletSignature = void 0;
|
|
60980
61131
|
const random_1 = requireRandom();
|
|
60981
61132
|
// @ts-expect-error -- ethers v6 compatibility hack
|
|
60982
61133
|
const ethers_1 = /*@__PURE__*/ requireLib_commonjs();
|
|
@@ -61002,7 +61153,7 @@ function requireUtils$4 () {
|
|
|
61002
61153
|
const res = await walletContract.isValidSignature(hashedMessage, signature);
|
|
61003
61154
|
return res === EIP1271_MAGICVALUE;
|
|
61004
61155
|
};
|
|
61005
|
-
utils$
|
|
61156
|
+
utils$3.checkContractWalletSignature = checkContractWalletSignature;
|
|
61006
61157
|
/**
|
|
61007
61158
|
* This method leverages a native CSPRNG with support for both browser and Node.js
|
|
61008
61159
|
* environments in order generate a cryptographically secure nonce for use in the
|
|
@@ -61021,7 +61172,7 @@ function requireUtils$4 () {
|
|
|
61021
61172
|
}
|
|
61022
61173
|
return nonce;
|
|
61023
61174
|
};
|
|
61024
|
-
utils$
|
|
61175
|
+
utils$3.generateNonce = generateNonce;
|
|
61025
61176
|
/**
|
|
61026
61177
|
* This method matches the given date string against the ISO-8601 regex and also
|
|
61027
61178
|
* performs checks if it's a valid date.
|
|
@@ -61042,7 +61193,7 @@ function requireUtils$4 () {
|
|
|
61042
61193
|
/* Compare remaining fields */
|
|
61043
61194
|
return inputMatch.groups.date === parsedInputMatch.groups.date;
|
|
61044
61195
|
};
|
|
61045
|
-
utils$
|
|
61196
|
+
utils$3.isValidISO8601Date = isValidISO8601Date;
|
|
61046
61197
|
const checkInvalidKeys = (obj, keys) => {
|
|
61047
61198
|
const invalidKeys = [];
|
|
61048
61199
|
Object.keys(obj).forEach(key => {
|
|
@@ -61052,8 +61203,8 @@ function requireUtils$4 () {
|
|
|
61052
61203
|
});
|
|
61053
61204
|
return invalidKeys;
|
|
61054
61205
|
};
|
|
61055
|
-
utils$
|
|
61056
|
-
return utils$
|
|
61206
|
+
utils$3.checkInvalidKeys = checkInvalidKeys;
|
|
61207
|
+
return utils$3;
|
|
61057
61208
|
}
|
|
61058
61209
|
|
|
61059
61210
|
var hasRequiredClient$1;
|
|
@@ -61067,7 +61218,7 @@ function requireClient$1 () {
|
|
|
61067
61218
|
const siwe_parser_1 = requireParsers();
|
|
61068
61219
|
const ethersCompat_1 = requireEthersCompat();
|
|
61069
61220
|
const types_1 = requireTypes$1();
|
|
61070
|
-
const utils_1 = requireUtils$
|
|
61221
|
+
const utils_1 = requireUtils$3();
|
|
61071
61222
|
class SiweMessage {
|
|
61072
61223
|
/**
|
|
61073
61224
|
* Creates a parsed Sign-In with Ethereum Message (EIP-4361) object from a
|
|
@@ -61362,7 +61513,7 @@ function requireSiwe$1 () {
|
|
|
61362
61513
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
61363
61514
|
__exportStar(requireClient$1(), exports$1);
|
|
61364
61515
|
__exportStar(requireTypes$1(), exports$1);
|
|
61365
|
-
__exportStar(requireUtils$
|
|
61516
|
+
__exportStar(requireUtils$3(), exports$1);
|
|
61366
61517
|
} (siwe));
|
|
61367
61518
|
return siwe;
|
|
61368
61519
|
}
|
|
@@ -61380,7 +61531,7 @@ function requireSiwe () {
|
|
|
61380
61531
|
siwe$1.isNonceExpired = isNonceExpired;
|
|
61381
61532
|
siwe$1.getDefaultChainId = getDefaultChainId;
|
|
61382
61533
|
const siwe_1 = requireSiwe$1();
|
|
61383
|
-
const validation_1 = requireValidation
|
|
61534
|
+
const validation_1 = requireValidation();
|
|
61384
61535
|
/**
|
|
61385
61536
|
* Generate SIWE message with resolved options
|
|
61386
61537
|
* @param options - Fully resolved SIWE options with domain guaranteed
|
|
@@ -61619,8 +61770,8 @@ function requireClient () {
|
|
|
61619
61770
|
Object.defineProperty(client$1, "__esModule", { value: true });
|
|
61620
61771
|
client$1.createAvatarClient = createAvatarClient;
|
|
61621
61772
|
const axios_1 = __importStar(/*@__PURE__*/ requireAxios());
|
|
61622
|
-
const errors_1 = requireErrors$
|
|
61623
|
-
const validation_1 = requireValidation
|
|
61773
|
+
const errors_1 = requireErrors$1();
|
|
61774
|
+
const validation_1 = requireValidation();
|
|
61624
61775
|
const siwe_1 = requireSiwe();
|
|
61625
61776
|
const wallet_adapters_1 = requireWalletAdapters();
|
|
61626
61777
|
/**
|
|
@@ -61941,11 +62092,11 @@ function requireClient () {
|
|
|
61941
62092
|
return client$1;
|
|
61942
62093
|
}
|
|
61943
62094
|
|
|
61944
|
-
var hasRequiredDist$
|
|
62095
|
+
var hasRequiredDist$2;
|
|
61945
62096
|
|
|
61946
|
-
function requireDist$
|
|
61947
|
-
if (hasRequiredDist$
|
|
61948
|
-
hasRequiredDist$
|
|
62097
|
+
function requireDist$2 () {
|
|
62098
|
+
if (hasRequiredDist$2) return dist$3;
|
|
62099
|
+
hasRequiredDist$2 = 1;
|
|
61949
62100
|
(function (exports$1) {
|
|
61950
62101
|
/**
|
|
61951
62102
|
* @fileoverview Namespace SDK - ENS Images
|
|
@@ -61989,12 +62140,12 @@ function requireDist$3 () {
|
|
|
61989
62140
|
var client_1 = requireClient();
|
|
61990
62141
|
Object.defineProperty(exports$1, "createAvatarClient", { enumerable: true, get: function () { return client_1.createAvatarClient; } });
|
|
61991
62142
|
// Error exports
|
|
61992
|
-
var errors_1 = requireErrors$
|
|
62143
|
+
var errors_1 = requireErrors$1();
|
|
61993
62144
|
Object.defineProperty(exports$1, "AvatarSDKError", { enumerable: true, get: function () { return errors_1.AvatarSDKError; } });
|
|
61994
62145
|
Object.defineProperty(exports$1, "ErrorCodes", { enumerable: true, get: function () { return errors_1.ErrorCodes; } });
|
|
61995
62146
|
Object.defineProperty(exports$1, "createError", { enumerable: true, get: function () { return errors_1.createError; } });
|
|
61996
62147
|
// Utility exports
|
|
61997
|
-
var validation_1 = requireValidation
|
|
62148
|
+
var validation_1 = requireValidation();
|
|
61998
62149
|
Object.defineProperty(exports$1, "validateFile", { enumerable: true, get: function () { return validation_1.validateFile; } });
|
|
61999
62150
|
Object.defineProperty(exports$1, "validateSubname", { enumerable: true, get: function () { return validation_1.validateSubname; } });
|
|
62000
62151
|
Object.defineProperty(exports$1, "validateAddress", { enumerable: true, get: function () { return validation_1.validateAddress; } });
|
|
@@ -62014,13 +62165,13 @@ function requireDist$3 () {
|
|
|
62014
62165
|
Object.defineProperty(exports$1, "isNonceExpired", { enumerable: true, get: function () { return siwe_1.isNonceExpired; } });
|
|
62015
62166
|
Object.defineProperty(exports$1, "getDefaultChainId", { enumerable: true, get: function () { return siwe_1.getDefaultChainId; } });
|
|
62016
62167
|
|
|
62017
|
-
} (dist$
|
|
62018
|
-
return dist$
|
|
62168
|
+
} (dist$3));
|
|
62169
|
+
return dist$3;
|
|
62019
62170
|
}
|
|
62020
62171
|
|
|
62021
|
-
var distExports$
|
|
62172
|
+
var distExports$2 = requireDist$2();
|
|
62022
62173
|
|
|
62023
|
-
var dist$
|
|
62174
|
+
var dist$1 = {};
|
|
62024
62175
|
|
|
62025
62176
|
var addresses = {};
|
|
62026
62177
|
|
|
@@ -62111,11 +62262,11 @@ function requireAddresses () {
|
|
|
62111
62262
|
return addresses;
|
|
62112
62263
|
}
|
|
62113
62264
|
|
|
62114
|
-
var hasRequiredDist$
|
|
62265
|
+
var hasRequiredDist$1;
|
|
62115
62266
|
|
|
62116
|
-
function requireDist$
|
|
62117
|
-
if (hasRequiredDist$
|
|
62118
|
-
hasRequiredDist$
|
|
62267
|
+
function requireDist$1 () {
|
|
62268
|
+
if (hasRequiredDist$1) return dist$1;
|
|
62269
|
+
hasRequiredDist$1 = 1;
|
|
62119
62270
|
(function (exports$1) {
|
|
62120
62271
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
62121
62272
|
exports$1.getEnsContracts = exports$1.getL2NamespaceContracts = exports$1.getL1NamespaceContracts = void 0;
|
|
@@ -62123,11 +62274,11 @@ function requireDist$2 () {
|
|
|
62123
62274
|
Object.defineProperty(exports$1, "getL1NamespaceContracts", { enumerable: true, get: function () { return addresses_1.getL1NamespaceContracts; } });
|
|
62124
62275
|
Object.defineProperty(exports$1, "getL2NamespaceContracts", { enumerable: true, get: function () { return addresses_1.getL2NamespaceContracts; } });
|
|
62125
62276
|
Object.defineProperty(exports$1, "getEnsContracts", { enumerable: true, get: function () { return addresses_1.getEnsContracts; } });
|
|
62126
|
-
} (dist$
|
|
62127
|
-
return dist$
|
|
62277
|
+
} (dist$1));
|
|
62278
|
+
return dist$1;
|
|
62128
62279
|
}
|
|
62129
62280
|
|
|
62130
|
-
var distExports$
|
|
62281
|
+
var distExports$1 = requireDist$1();
|
|
62131
62282
|
|
|
62132
62283
|
var ETH_REGISTRAR_CONTOLLER = [
|
|
62133
62284
|
{
|
|
@@ -63849,13 +64000,13 @@ const useRegisterENS = ({ isTestnet }) => {
|
|
|
63849
64000
|
};
|
|
63850
64001
|
};
|
|
63851
64002
|
const getEthController = () => {
|
|
63852
|
-
return distExports$
|
|
64003
|
+
return distExports$1.getEnsContracts(isTestnet).ethRegistrarController;
|
|
63853
64004
|
};
|
|
63854
64005
|
const getEnsRegistry = () => {
|
|
63855
|
-
return distExports$
|
|
64006
|
+
return distExports$1.getEnsContracts(isTestnet).ensRegistry;
|
|
63856
64007
|
};
|
|
63857
64008
|
const getPublicResolver = () => {
|
|
63858
|
-
return distExports$
|
|
64009
|
+
return distExports$1.getEnsContracts(isTestnet).publicResolver;
|
|
63859
64010
|
};
|
|
63860
64011
|
const getRegReferrer = (request) => {
|
|
63861
64012
|
const referrerAddress = request.referrer && isAddress$1(request.referrer) ? request.referrer : NAMESPACE_REFERRER_ADDRESS;
|
|
@@ -64001,10 +64152,10 @@ const useENSResolver = ({
|
|
|
64001
64152
|
}
|
|
64002
64153
|
};
|
|
64003
64154
|
const getEnsRegistry = () => {
|
|
64004
|
-
return distExports$
|
|
64155
|
+
return distExports$1.getEnsContracts(isTestnet).ensRegistry;
|
|
64005
64156
|
};
|
|
64006
64157
|
const getEnsPublicResolver = () => {
|
|
64007
|
-
return distExports$
|
|
64158
|
+
return distExports$1.getEnsContracts(isTestnet).publicResolver;
|
|
64008
64159
|
};
|
|
64009
64160
|
return {
|
|
64010
64161
|
getResolverAddress,
|
|
@@ -64013,7 +64164,7 @@ const useENSResolver = ({
|
|
|
64013
64164
|
};
|
|
64014
64165
|
};
|
|
64015
64166
|
|
|
64016
|
-
var dist
|
|
64167
|
+
var dist = {};
|
|
64017
64168
|
|
|
64018
64169
|
var mintClient = {};
|
|
64019
64170
|
|
|
@@ -64039,17 +64190,17 @@ function requireEnv () {
|
|
|
64039
64190
|
return env;
|
|
64040
64191
|
}
|
|
64041
64192
|
|
|
64042
|
-
var chains
|
|
64193
|
+
var chains = {};
|
|
64043
64194
|
|
|
64044
|
-
var hasRequiredChains
|
|
64195
|
+
var hasRequiredChains;
|
|
64045
64196
|
|
|
64046
|
-
function requireChains
|
|
64047
|
-
if (hasRequiredChains
|
|
64048
|
-
hasRequiredChains
|
|
64197
|
+
function requireChains () {
|
|
64198
|
+
if (hasRequiredChains) return chains;
|
|
64199
|
+
hasRequiredChains = 1;
|
|
64049
64200
|
(function (exports$1) {
|
|
64050
64201
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
64051
64202
|
exports$1.getChainName = exports$1.getChain = exports$1.getChainId = exports$1.ListingChain = void 0;
|
|
64052
|
-
const chains_1 = chains$
|
|
64203
|
+
const chains_1 = chains$1;
|
|
64053
64204
|
/**
|
|
64054
64205
|
* Supported networks for listing/minting operations.
|
|
64055
64206
|
*/
|
|
@@ -64090,8 +64241,8 @@ function requireChains$1 () {
|
|
|
64090
64241
|
throw new Error("Unsupported chain provided: " + chainId);
|
|
64091
64242
|
};
|
|
64092
64243
|
exports$1.getChainName = getChainName;
|
|
64093
|
-
} (chains
|
|
64094
|
-
return chains
|
|
64244
|
+
} (chains));
|
|
64245
|
+
return chains;
|
|
64095
64246
|
}
|
|
64096
64247
|
|
|
64097
64248
|
var abi = {};
|
|
@@ -65556,7 +65707,7 @@ function requireAbi () {
|
|
|
65556
65707
|
return abi;
|
|
65557
65708
|
}
|
|
65558
65709
|
|
|
65559
|
-
var utils$
|
|
65710
|
+
var utils$2 = {};
|
|
65560
65711
|
|
|
65561
65712
|
var cjs = {};
|
|
65562
65713
|
|
|
@@ -65586,7 +65737,7 @@ function require_md () {
|
|
|
65586
65737
|
* Internal Merkle-Damgard hash utils.
|
|
65587
65738
|
* @module
|
|
65588
65739
|
*/
|
|
65589
|
-
const utils_ts_1 = /*@__PURE__*/ requireUtils$
|
|
65740
|
+
const utils_ts_1 = /*@__PURE__*/ requireUtils$9();
|
|
65590
65741
|
/** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */
|
|
65591
65742
|
function setBigUint64(view, byteOffset, value, isLE) {
|
|
65592
65743
|
if (typeof view.setBigUint64 === 'function')
|
|
@@ -65757,7 +65908,7 @@ function requireSha2 () {
|
|
|
65757
65908
|
*/
|
|
65758
65909
|
const _md_ts_1 = require_md();
|
|
65759
65910
|
const u64 = require_u64$1();
|
|
65760
|
-
const utils_ts_1 = /*@__PURE__*/ requireUtils$
|
|
65911
|
+
const utils_ts_1 = /*@__PURE__*/ requireUtils$9();
|
|
65761
65912
|
/**
|
|
65762
65913
|
* Round constants:
|
|
65763
65914
|
* First 32 bits of fractional parts of the cube roots of the first 64 primes 2..311)
|
|
@@ -66150,7 +66301,7 @@ function requireHmac () {
|
|
|
66150
66301
|
* HMAC: RFC2104 message authentication code.
|
|
66151
66302
|
* @module
|
|
66152
66303
|
*/
|
|
66153
|
-
const utils_ts_1 = /*@__PURE__*/ requireUtils$
|
|
66304
|
+
const utils_ts_1 = /*@__PURE__*/ requireUtils$9();
|
|
66154
66305
|
class HMAC extends utils_ts_1.Hash {
|
|
66155
66306
|
constructor(hash, _key) {
|
|
66156
66307
|
super();
|
|
@@ -66238,13 +66389,13 @@ function requireHmac () {
|
|
|
66238
66389
|
return hmac;
|
|
66239
66390
|
}
|
|
66240
66391
|
|
|
66241
|
-
var utils$
|
|
66392
|
+
var utils$1 = {};
|
|
66242
66393
|
|
|
66243
|
-
var hasRequiredUtils$
|
|
66394
|
+
var hasRequiredUtils$2;
|
|
66244
66395
|
|
|
66245
|
-
function requireUtils$
|
|
66246
|
-
if (hasRequiredUtils$
|
|
66247
|
-
hasRequiredUtils$
|
|
66396
|
+
function requireUtils$2 () {
|
|
66397
|
+
if (hasRequiredUtils$2) return utils$1;
|
|
66398
|
+
hasRequiredUtils$2 = 1;
|
|
66248
66399
|
(function (exports$1) {
|
|
66249
66400
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
66250
66401
|
exports$1.notImplemented = exports$1.bitMask = exports$1.utf8ToBytes = exports$1.randomBytes = exports$1.isBytes = exports$1.hexToBytes = exports$1.concatBytes = exports$1.bytesToUtf8 = exports$1.bytesToHex = exports$1.anumber = exports$1.abytes = void 0;
|
|
@@ -66277,8 +66428,8 @@ function requireUtils$3 () {
|
|
|
66277
66428
|
* @module
|
|
66278
66429
|
*/
|
|
66279
66430
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
66280
|
-
const utils_js_1 = /*@__PURE__*/ requireUtils$
|
|
66281
|
-
var utils_js_2 = /*@__PURE__*/ requireUtils$
|
|
66431
|
+
const utils_js_1 = /*@__PURE__*/ requireUtils$9();
|
|
66432
|
+
var utils_js_2 = /*@__PURE__*/ requireUtils$9();
|
|
66282
66433
|
Object.defineProperty(exports$1, "abytes", { enumerable: true, get: function () { return utils_js_2.abytes; } });
|
|
66283
66434
|
Object.defineProperty(exports$1, "anumber", { enumerable: true, get: function () { return utils_js_2.anumber; } });
|
|
66284
66435
|
Object.defineProperty(exports$1, "bytesToHex", { enumerable: true, get: function () { return utils_js_2.bytesToHex; } });
|
|
@@ -66605,8 +66756,8 @@ function requireUtils$3 () {
|
|
|
66605
66756
|
};
|
|
66606
66757
|
}
|
|
66607
66758
|
|
|
66608
|
-
} (utils$
|
|
66609
|
-
return utils$
|
|
66759
|
+
} (utils$1));
|
|
66760
|
+
return utils$1;
|
|
66610
66761
|
}
|
|
66611
66762
|
|
|
66612
66763
|
var curve = {};
|
|
@@ -66647,7 +66798,7 @@ function requireModular () {
|
|
|
66647
66798
|
* @module
|
|
66648
66799
|
*/
|
|
66649
66800
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
66650
|
-
const utils_ts_1 = requireUtils$
|
|
66801
|
+
const utils_ts_1 = requireUtils$2();
|
|
66651
66802
|
// prettier-ignore
|
|
66652
66803
|
const _0n = BigInt(0), _1n = BigInt(1), _2n = /* @__PURE__ */ BigInt(2), _3n = /* @__PURE__ */ BigInt(3);
|
|
66653
66804
|
// prettier-ignore
|
|
@@ -67193,7 +67344,7 @@ function requireCurve () {
|
|
|
67193
67344
|
* @module
|
|
67194
67345
|
*/
|
|
67195
67346
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
67196
|
-
const utils_ts_1 = requireUtils$
|
|
67347
|
+
const utils_ts_1 = requireUtils$2();
|
|
67197
67348
|
const modular_ts_1 = requireModular();
|
|
67198
67349
|
const _0n = BigInt(0);
|
|
67199
67350
|
const _1n = BigInt(1);
|
|
@@ -67702,8 +67853,8 @@ function requireWeierstrass () {
|
|
|
67702
67853
|
*/
|
|
67703
67854
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
67704
67855
|
const hmac_js_1 = /*@__PURE__*/ requireHmac();
|
|
67705
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
67706
|
-
const utils_ts_1 = requireUtils$
|
|
67856
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
67857
|
+
const utils_ts_1 = requireUtils$2();
|
|
67707
67858
|
const curve_ts_1 = requireCurve();
|
|
67708
67859
|
const modular_ts_1 = requireModular();
|
|
67709
67860
|
// We construct basis in such way that den is always positive and equals n, but num sign depends on basis (not on secret value)
|
|
@@ -69134,7 +69285,7 @@ function requireHashToCurve () {
|
|
|
69134
69285
|
exports$1.hash_to_field = hash_to_field;
|
|
69135
69286
|
exports$1.isogenyMap = isogenyMap;
|
|
69136
69287
|
exports$1.createHasher = createHasher;
|
|
69137
|
-
const utils_ts_1 = requireUtils$
|
|
69288
|
+
const utils_ts_1 = requireUtils$2();
|
|
69138
69289
|
const modular_ts_1 = requireModular();
|
|
69139
69290
|
// Octet Stream to Integer. "spec" implementation of os2ip is 2.5x slower vs bytesToNumberBE.
|
|
69140
69291
|
const os2ip = utils_ts_1.bytesToNumberBE;
|
|
@@ -69358,12 +69509,12 @@ function requireSecp256k1 () {
|
|
|
69358
69509
|
*/
|
|
69359
69510
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
69360
69511
|
const sha2_js_1 = requireSha2();
|
|
69361
|
-
const utils_js_1 = /*@__PURE__*/ requireUtils$
|
|
69512
|
+
const utils_js_1 = /*@__PURE__*/ requireUtils$9();
|
|
69362
69513
|
const _shortw_utils_ts_1 = require_shortw_utils();
|
|
69363
69514
|
const hash_to_curve_ts_1 = requireHashToCurve();
|
|
69364
69515
|
const modular_ts_1 = requireModular();
|
|
69365
69516
|
const weierstrass_ts_1 = requireWeierstrass();
|
|
69366
|
-
const utils_ts_1 = requireUtils$
|
|
69517
|
+
const utils_ts_1 = requireUtils$2();
|
|
69367
69518
|
// Seems like generator was produced from some seed:
|
|
69368
69519
|
// `Point.BASE.multiply(Point.Fn.inv(2n, N)).toAffine().x`
|
|
69369
69520
|
// // gives short x 0x3b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63n
|
|
@@ -69669,7 +69820,7 @@ function requireLegacy () {
|
|
|
69669
69820
|
* @module
|
|
69670
69821
|
*/
|
|
69671
69822
|
const _md_ts_1 = require_md();
|
|
69672
|
-
const utils_ts_1 = /*@__PURE__*/ requireUtils$
|
|
69823
|
+
const utils_ts_1 = /*@__PURE__*/ requireUtils$9();
|
|
69673
69824
|
/** Initial SHA1 state */
|
|
69674
69825
|
const SHA1_IV = /* @__PURE__ */ Uint32Array.from([
|
|
69675
69826
|
0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0,
|
|
@@ -70735,7 +70886,7 @@ function requireBase58 () {
|
|
|
70735
70886
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
70736
70887
|
exports$1.createBase58VersionedDecoder = exports$1.createBase58VersionedEncoder = exports$1.base58CheckDecode = exports$1.base58CheckEncode = exports$1.base58UncheckedDecode = exports$1.base58UncheckedEncode = void 0;
|
|
70737
70888
|
const sha256_1 = /*@__PURE__*/ requireSha256();
|
|
70738
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
70889
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
70739
70890
|
const base_1 = /*@__PURE__*/ requireLib$1();
|
|
70740
70891
|
const base58Unchecked = base_1.base58;
|
|
70741
70892
|
exports$1.base58UncheckedEncode = base58Unchecked.encode;
|
|
@@ -70846,7 +70997,7 @@ function requireBech32 () {
|
|
|
70846
70997
|
hasRequiredBech32 = 1;
|
|
70847
70998
|
Object.defineProperty(bech32, "__esModule", { value: true });
|
|
70848
70999
|
bech32.createBech32SegwitDecoder = bech32.createBech32SegwitEncoder = bech32.createBech32mDecoder = bech32.createBech32mEncoder = bech32.createBech32Decoder = bech32.createBech32Encoder = void 0;
|
|
70849
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
71000
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
70850
71001
|
const base_1 = /*@__PURE__*/ requireLib$1();
|
|
70851
71002
|
const createInternalBech32Encoder = ({ bechLib, hrp, limit }) => (source) => {
|
|
70852
71003
|
return bechLib.encode(hrp, bechLib.toWords(source), limit);
|
|
@@ -71564,7 +71715,7 @@ function requireAe () {
|
|
|
71564
71715
|
(function (exports$1) {
|
|
71565
71716
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
71566
71717
|
exports$1.ae = exports$1.decodeAeAddress = exports$1.encodeAeAddress = void 0;
|
|
71567
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
71718
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
71568
71719
|
const base58_js_1 = requireBase58();
|
|
71569
71720
|
const name = "ae";
|
|
71570
71721
|
const coinType = 457;
|
|
@@ -71626,7 +71777,7 @@ function requireBytes () {
|
|
|
71626
71777
|
hasRequiredBytes = 1;
|
|
71627
71778
|
Object.defineProperty(bytes, "__esModule", { value: true });
|
|
71628
71779
|
bytes.hexWithoutPrefixToBytes = bytes.bytesToHexWithoutPrefix = bytes.base10ToBytes = bytes.bytesToBase10 = bytes.bytesToHex = bytes.stringToBytes = bytes.bytesToString = bytes.hexToString = bytes.hexToBytes = void 0;
|
|
71629
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
71780
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
71630
71781
|
function hexToBytes(hex_) {
|
|
71631
71782
|
let hex = hex_;
|
|
71632
71783
|
let hexString = hex.slice(2);
|
|
@@ -72123,7 +72274,7 @@ function requireBch$1 () {
|
|
|
72123
72274
|
hasRequiredBch$1 = 1;
|
|
72124
72275
|
Object.defineProperty(bch, "__esModule", { value: true });
|
|
72125
72276
|
bch.decodeBchAddressToTypeAndHash = bch.encodeBchAddressWithVersion = void 0;
|
|
72126
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
72277
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
72127
72278
|
const base_1 = /*@__PURE__*/ requireLib$1();
|
|
72128
72279
|
const prefix = "bitcoincash";
|
|
72129
72280
|
const prefixBytes = new Uint8Array([2, 9, 20, 3, 15, 9, 14, 3, 1, 19, 8, 0]);
|
|
@@ -72217,7 +72368,7 @@ function requireBch () {
|
|
|
72217
72368
|
(function (exports$1) {
|
|
72218
72369
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
72219
72370
|
exports$1.bch = exports$1.decodeBchAddress = exports$1.encodeBchAddress = void 0;
|
|
72220
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
72371
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
72221
72372
|
const base58_js_1 = requireBase58();
|
|
72222
72373
|
const bch_js_1 = requireBch$1();
|
|
72223
72374
|
const name = "bch";
|
|
@@ -72268,86 +72419,86 @@ function requireBch () {
|
|
|
72268
72419
|
|
|
72269
72420
|
var bcn = {};
|
|
72270
72421
|
|
|
72271
|
-
var utils
|
|
72422
|
+
var utils = {};
|
|
72272
72423
|
|
|
72273
|
-
var hasRequiredUtils$
|
|
72424
|
+
var hasRequiredUtils$1;
|
|
72274
72425
|
|
|
72275
|
-
function requireUtils$
|
|
72276
|
-
if (hasRequiredUtils$
|
|
72277
|
-
hasRequiredUtils$
|
|
72278
|
-
Object.defineProperty(utils
|
|
72279
|
-
utils
|
|
72426
|
+
function requireUtils$1 () {
|
|
72427
|
+
if (hasRequiredUtils$1) return utils;
|
|
72428
|
+
hasRequiredUtils$1 = 1;
|
|
72429
|
+
Object.defineProperty(utils, "__esModule", { value: true });
|
|
72430
|
+
utils.isHash = utils.validateObject = utils.memoized = utils.notImplemented = utils.createHmacDrbg = utils.bitMask = utils.bitSet = utils.bitGet = utils.bitLen = utils.aInRange = utils.inRange = utils.asciiToBytes = utils.copyBytes = utils.equalBytes = utils.ensureBytes = utils.numberToVarBytesBE = utils.numberToBytesLE = utils.numberToBytesBE = utils.bytesToNumberLE = utils.bytesToNumberBE = utils.hexToNumber = utils.numberToHexUnpadded = utils.abool = utils.utf8ToBytes = utils.randomBytes = utils.isBytes = utils.hexToBytes = utils.concatBytes = utils.bytesToUtf8 = utils.bytesToHex = utils.anumber = utils.abytes = void 0;
|
|
72280
72431
|
/**
|
|
72281
72432
|
* Deprecated module: moved from curves/abstract/utils.js to curves/utils.js
|
|
72282
72433
|
* @module
|
|
72283
72434
|
*/
|
|
72284
|
-
const u = requireUtils$
|
|
72435
|
+
const u = requireUtils$2();
|
|
72285
72436
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72286
|
-
utils
|
|
72437
|
+
utils.abytes = u.abytes;
|
|
72287
72438
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72288
|
-
utils
|
|
72439
|
+
utils.anumber = u.anumber;
|
|
72289
72440
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72290
|
-
utils
|
|
72441
|
+
utils.bytesToHex = u.bytesToHex;
|
|
72291
72442
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72292
|
-
utils
|
|
72443
|
+
utils.bytesToUtf8 = u.bytesToUtf8;
|
|
72293
72444
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72294
|
-
utils
|
|
72445
|
+
utils.concatBytes = u.concatBytes;
|
|
72295
72446
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72296
|
-
utils
|
|
72447
|
+
utils.hexToBytes = u.hexToBytes;
|
|
72297
72448
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72298
|
-
utils
|
|
72449
|
+
utils.isBytes = u.isBytes;
|
|
72299
72450
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72300
|
-
utils
|
|
72451
|
+
utils.randomBytes = u.randomBytes;
|
|
72301
72452
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72302
|
-
utils
|
|
72453
|
+
utils.utf8ToBytes = u.utf8ToBytes;
|
|
72303
72454
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72304
|
-
utils
|
|
72455
|
+
utils.abool = u.abool;
|
|
72305
72456
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72306
|
-
utils
|
|
72457
|
+
utils.numberToHexUnpadded = u.numberToHexUnpadded;
|
|
72307
72458
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72308
|
-
utils
|
|
72459
|
+
utils.hexToNumber = u.hexToNumber;
|
|
72309
72460
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72310
|
-
utils
|
|
72461
|
+
utils.bytesToNumberBE = u.bytesToNumberBE;
|
|
72311
72462
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72312
|
-
utils
|
|
72463
|
+
utils.bytesToNumberLE = u.bytesToNumberLE;
|
|
72313
72464
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72314
|
-
utils
|
|
72465
|
+
utils.numberToBytesBE = u.numberToBytesBE;
|
|
72315
72466
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72316
|
-
utils
|
|
72467
|
+
utils.numberToBytesLE = u.numberToBytesLE;
|
|
72317
72468
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72318
|
-
utils
|
|
72469
|
+
utils.numberToVarBytesBE = u.numberToVarBytesBE;
|
|
72319
72470
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72320
|
-
utils
|
|
72471
|
+
utils.ensureBytes = u.ensureBytes;
|
|
72321
72472
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72322
|
-
utils
|
|
72473
|
+
utils.equalBytes = u.equalBytes;
|
|
72323
72474
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72324
|
-
utils
|
|
72475
|
+
utils.copyBytes = u.copyBytes;
|
|
72325
72476
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72326
|
-
utils
|
|
72477
|
+
utils.asciiToBytes = u.asciiToBytes;
|
|
72327
72478
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72328
|
-
utils
|
|
72479
|
+
utils.inRange = u.inRange;
|
|
72329
72480
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72330
|
-
utils
|
|
72481
|
+
utils.aInRange = u.aInRange;
|
|
72331
72482
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72332
|
-
utils
|
|
72483
|
+
utils.bitLen = u.bitLen;
|
|
72333
72484
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72334
|
-
utils
|
|
72485
|
+
utils.bitGet = u.bitGet;
|
|
72335
72486
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72336
|
-
utils
|
|
72487
|
+
utils.bitSet = u.bitSet;
|
|
72337
72488
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72338
|
-
utils
|
|
72489
|
+
utils.bitMask = u.bitMask;
|
|
72339
72490
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72340
|
-
utils
|
|
72491
|
+
utils.createHmacDrbg = u.createHmacDrbg;
|
|
72341
72492
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72342
|
-
utils
|
|
72493
|
+
utils.notImplemented = u.notImplemented;
|
|
72343
72494
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72344
|
-
utils
|
|
72495
|
+
utils.memoized = u.memoized;
|
|
72345
72496
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72346
|
-
utils
|
|
72497
|
+
utils.validateObject = u.validateObject;
|
|
72347
72498
|
/** @deprecated moved to `@noble/curves/utils.js` */
|
|
72348
|
-
utils
|
|
72499
|
+
utils.isHash = u.isHash;
|
|
72349
72500
|
|
|
72350
|
-
return utils
|
|
72501
|
+
return utils;
|
|
72351
72502
|
}
|
|
72352
72503
|
|
|
72353
72504
|
var xmr = {};
|
|
@@ -72384,9 +72535,9 @@ function requireBcn () {
|
|
|
72384
72535
|
(function (exports$1) {
|
|
72385
72536
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
72386
72537
|
exports$1.bcn = exports$1.decodeBcnAddress = exports$1.encodeBcnAddress = void 0;
|
|
72387
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
72538
|
+
const utils_1 = /*@__PURE__*/ requireUtils$1();
|
|
72388
72539
|
const sha3_1 = /*@__PURE__*/ requireSha3$1();
|
|
72389
|
-
const utils_2 = /*@__PURE__*/ requireUtils$
|
|
72540
|
+
const utils_2 = /*@__PURE__*/ requireUtils$9();
|
|
72390
72541
|
const base_1 = /*@__PURE__*/ requireLib$1();
|
|
72391
72542
|
const xmr_js_1 = requireXmr();
|
|
72392
72543
|
const name = "bcn";
|
|
@@ -72509,7 +72660,7 @@ function requireBsv () {
|
|
|
72509
72660
|
(function (exports$1) {
|
|
72510
72661
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
72511
72662
|
exports$1.bsv = exports$1.decodeBsvAddress = exports$1.encodeBsvAddress = void 0;
|
|
72512
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
72663
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
72513
72664
|
const base58_js_1 = requireBase58();
|
|
72514
72665
|
const name = "bsv";
|
|
72515
72666
|
const coinType = 236;
|
|
@@ -73044,7 +73195,7 @@ function require_blake () {
|
|
|
73044
73195
|
* Internal helpers for blake hash.
|
|
73045
73196
|
* @module
|
|
73046
73197
|
*/
|
|
73047
|
-
const utils_ts_1 = /*@__PURE__*/ requireUtils$
|
|
73198
|
+
const utils_ts_1 = /*@__PURE__*/ requireUtils$9();
|
|
73048
73199
|
/**
|
|
73049
73200
|
* Internal blake variable.
|
|
73050
73201
|
* For BLAKE2b, the two extra permutations for rounds 10 and 11 are SIGMA[10..11] = SIGMA[0..1].
|
|
@@ -73105,7 +73256,7 @@ function requireBlake2 () {
|
|
|
73105
73256
|
const _md_ts_1 = require_md();
|
|
73106
73257
|
const u64 = require_u64$1();
|
|
73107
73258
|
// prettier-ignore
|
|
73108
|
-
const utils_ts_1 = /*@__PURE__*/ requireUtils$
|
|
73259
|
+
const utils_ts_1 = /*@__PURE__*/ requireUtils$9();
|
|
73109
73260
|
// Same as SHA512_IV, but swapped endianness: LE instead of BE. iv[1] is iv[0], etc.
|
|
73110
73261
|
const B2B_IV = /* @__PURE__ */ Uint32Array.from([
|
|
73111
73262
|
0xf3bcc908, 0x6a09e667, 0x84caa73b, 0xbb67ae85, 0xfe94f82b, 0x3c6ef372, 0x5f1d36f1, 0xa54ff53a,
|
|
@@ -73543,9 +73694,9 @@ function requireDot$1 () {
|
|
|
73543
73694
|
hasRequiredDot$1 = 1;
|
|
73544
73695
|
Object.defineProperty(dot, "__esModule", { value: true });
|
|
73545
73696
|
dot.createDotAddressDecoder = dot.createDotAddressEncoder = void 0;
|
|
73546
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
73697
|
+
const utils_1 = /*@__PURE__*/ requireUtils$1();
|
|
73547
73698
|
const blake2b_1 = /*@__PURE__*/ requireBlake2b();
|
|
73548
|
-
const utils_2 = /*@__PURE__*/ requireUtils$
|
|
73699
|
+
const utils_2 = /*@__PURE__*/ requireUtils$9();
|
|
73549
73700
|
const base58_js_1 = requireBase58();
|
|
73550
73701
|
const prefixStringBytes = new Uint8Array([
|
|
73551
73702
|
0x53, 0x53, 0x35, 0x38, 0x50, 0x52, 0x45,
|
|
@@ -73740,7 +73891,7 @@ function requireEtn () {
|
|
|
73740
73891
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
73741
73892
|
exports$1.etn = exports$1.decodeEtnAddress = exports$1.encodeEtnAddress = void 0;
|
|
73742
73893
|
const sha3_1 = /*@__PURE__*/ requireSha3$1();
|
|
73743
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
73894
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
73744
73895
|
const base_1 = /*@__PURE__*/ requireLib$1();
|
|
73745
73896
|
const xmr_js_1 = requireXmr();
|
|
73746
73897
|
const name = "etn";
|
|
@@ -73846,9 +73997,9 @@ function requireFil () {
|
|
|
73846
73997
|
(function (exports$1) {
|
|
73847
73998
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
73848
73999
|
exports$1.fil = exports$1.decodeFilAddress = exports$1.encodeFilAddress = void 0;
|
|
73849
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
74000
|
+
const utils_1 = /*@__PURE__*/ requireUtils$1();
|
|
73850
74001
|
const blake2b_1 = /*@__PURE__*/ requireBlake2b();
|
|
73851
|
-
const utils_2 = /*@__PURE__*/ requireUtils$
|
|
74002
|
+
const utils_2 = /*@__PURE__*/ requireUtils$9();
|
|
73852
74003
|
const base32_js_1 = requireBase32();
|
|
73853
74004
|
const leb128_js_1 = requireLeb128();
|
|
73854
74005
|
const name = "fil";
|
|
@@ -74445,7 +74596,7 @@ function requireHnt () {
|
|
|
74445
74596
|
(function (exports$1) {
|
|
74446
74597
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
74447
74598
|
exports$1.hnt = exports$1.decodeHntAddress = exports$1.encodeHntAddress = void 0;
|
|
74448
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
74599
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
74449
74600
|
const base58_js_1 = requireBase58();
|
|
74450
74601
|
const name = "hnt";
|
|
74451
74602
|
const coinType = 904;
|
|
@@ -74483,7 +74634,7 @@ function requireIcx () {
|
|
|
74483
74634
|
(function (exports$1) {
|
|
74484
74635
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
74485
74636
|
exports$1.icx = exports$1.decodeIcxAddress = exports$1.encodeIcxAddress = void 0;
|
|
74486
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
74637
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
74487
74638
|
const bytes_js_1 = requireBytes();
|
|
74488
74639
|
const name = "icx";
|
|
74489
74640
|
const coinType = 74;
|
|
@@ -74555,7 +74706,7 @@ function requireIota () {
|
|
|
74555
74706
|
(function (exports$1) {
|
|
74556
74707
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
74557
74708
|
exports$1.iota = exports$1.decodeIotaAddress = exports$1.encodeIotaAddress = void 0;
|
|
74558
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
74709
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
74559
74710
|
const bech32_js_1 = requireBech32();
|
|
74560
74711
|
const name = "iota";
|
|
74561
74712
|
const coinType = 4218;
|
|
@@ -75302,7 +75453,7 @@ function requireNuls () {
|
|
|
75302
75453
|
(function (exports$1) {
|
|
75303
75454
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
75304
75455
|
exports$1.nuls = exports$1.decodeNulsAddress = exports$1.encodeNulsAddress = void 0;
|
|
75305
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
75456
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
75306
75457
|
const base58_js_1 = requireBase58();
|
|
75307
75458
|
const name = "nuls";
|
|
75308
75459
|
const coinType = 8964;
|
|
@@ -75410,7 +75561,7 @@ function requireOnt () {
|
|
|
75410
75561
|
(function (exports$1) {
|
|
75411
75562
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
75412
75563
|
exports$1.ont = exports$1.decodeOntAddress = exports$1.encodeOntAddress = void 0;
|
|
75413
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
75564
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
75414
75565
|
const base58_js_1 = requireBase58();
|
|
75415
75566
|
const name = "ont";
|
|
75416
75567
|
const coinType = 1024;
|
|
@@ -75638,9 +75789,9 @@ function requireSc () {
|
|
|
75638
75789
|
(function (exports$1) {
|
|
75639
75790
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
75640
75791
|
exports$1.sc = exports$1.decodeScAddress = exports$1.encodeScAddress = void 0;
|
|
75641
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
75792
|
+
const utils_1 = /*@__PURE__*/ requireUtils$1();
|
|
75642
75793
|
const blake2b_1 = /*@__PURE__*/ requireBlake2b();
|
|
75643
|
-
const utils_2 = /*@__PURE__*/ requireUtils$
|
|
75794
|
+
const utils_2 = /*@__PURE__*/ requireUtils$9();
|
|
75644
75795
|
const bytes_js_1 = requireBytes();
|
|
75645
75796
|
const name = "sc";
|
|
75646
75797
|
const coinType = 1991;
|
|
@@ -75891,9 +76042,9 @@ function requireStx () {
|
|
|
75891
76042
|
(function (exports$1) {
|
|
75892
76043
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
75893
76044
|
exports$1.stx = exports$1.decodeStxAddress = exports$1.encodeStxAddress = void 0;
|
|
75894
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
76045
|
+
const utils_1 = /*@__PURE__*/ requireUtils$1();
|
|
75895
76046
|
const sha256_1 = /*@__PURE__*/ requireSha256();
|
|
75896
|
-
const utils_2 = /*@__PURE__*/ requireUtils$
|
|
76047
|
+
const utils_2 = /*@__PURE__*/ requireUtils$9();
|
|
75897
76048
|
const base_1 = /*@__PURE__*/ requireLib$1();
|
|
75898
76049
|
const base32_js_1 = requireBase32();
|
|
75899
76050
|
const name = "stx";
|
|
@@ -76313,7 +76464,7 @@ function requireVsys () {
|
|
|
76313
76464
|
(function (exports$1) {
|
|
76314
76465
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
76315
76466
|
exports$1.vsys = exports$1.decodeVsysAddress = exports$1.encodeVsysAddress = void 0;
|
|
76316
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
76467
|
+
const utils_1 = /*@__PURE__*/ requireUtils$1();
|
|
76317
76468
|
const blake2b_1 = /*@__PURE__*/ requireBlake2b();
|
|
76318
76469
|
const sha3_1 = /*@__PURE__*/ requireSha3$1();
|
|
76319
76470
|
const base58_js_1 = requireBase58();
|
|
@@ -76581,8 +76732,8 @@ function requireXlm () {
|
|
|
76581
76732
|
(function (exports$1) {
|
|
76582
76733
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
76583
76734
|
exports$1.xlm = exports$1.decodeXlmAddress = exports$1.encodeXlmAddress = void 0;
|
|
76584
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
76585
|
-
const utils_2 = /*@__PURE__*/ requireUtils$
|
|
76735
|
+
const utils_1 = /*@__PURE__*/ requireUtils$1();
|
|
76736
|
+
const utils_2 = /*@__PURE__*/ requireUtils$9();
|
|
76586
76737
|
const base32_js_1 = requireBase32();
|
|
76587
76738
|
const bytes_js_1 = requireBytes();
|
|
76588
76739
|
const name = "xlm";
|
|
@@ -76674,7 +76825,7 @@ function requireXtz () {
|
|
|
76674
76825
|
(function (exports$1) {
|
|
76675
76826
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
76676
76827
|
exports$1.xtz = exports$1.decodeXtzAddress = exports$1.encodeXtzAddress = void 0;
|
|
76677
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
76828
|
+
const utils_1 = /*@__PURE__*/ requireUtils$9();
|
|
76678
76829
|
const base58_js_1 = requireBase58();
|
|
76679
76830
|
const name = "xtz";
|
|
76680
76831
|
const coinType = 1729;
|
|
@@ -76800,7 +76951,7 @@ function requireZen () {
|
|
|
76800
76951
|
(function (exports$1) {
|
|
76801
76952
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
76802
76953
|
exports$1.zen = exports$1.decodeZenAddress = exports$1.encodeZenAddress = void 0;
|
|
76803
|
-
const utils_1 = /*@__PURE__*/ requireUtils$
|
|
76954
|
+
const utils_1 = /*@__PURE__*/ requireUtils$1();
|
|
76804
76955
|
const base58_js_1 = requireBase58();
|
|
76805
76956
|
const name = "zen";
|
|
76806
76957
|
const coinType = 121;
|
|
@@ -87701,13 +87852,13 @@ function requireSrc () {
|
|
|
87701
87852
|
return src;
|
|
87702
87853
|
}
|
|
87703
87854
|
|
|
87704
|
-
var hasRequiredUtils
|
|
87855
|
+
var hasRequiredUtils;
|
|
87705
87856
|
|
|
87706
|
-
function requireUtils
|
|
87707
|
-
if (hasRequiredUtils
|
|
87708
|
-
hasRequiredUtils
|
|
87709
|
-
Object.defineProperty(utils$
|
|
87710
|
-
utils$
|
|
87857
|
+
function requireUtils () {
|
|
87858
|
+
if (hasRequiredUtils) return utils$2;
|
|
87859
|
+
hasRequiredUtils = 1;
|
|
87860
|
+
Object.defineProperty(utils$2, "__esModule", { value: true });
|
|
87861
|
+
utils$2.convertEnsRecordsToResolverData = void 0;
|
|
87711
87862
|
const viem_1 = viem;
|
|
87712
87863
|
const address_encoder_1 = /*@__PURE__*/ requireCjs();
|
|
87713
87864
|
const address_records_1 = requireAddressRecords();
|
|
@@ -87786,8 +87937,8 @@ function requireUtils$1 () {
|
|
|
87786
87937
|
}
|
|
87787
87938
|
return resolverData;
|
|
87788
87939
|
};
|
|
87789
|
-
utils$
|
|
87790
|
-
return utils$
|
|
87940
|
+
utils$2.convertEnsRecordsToResolverData = convertEnsRecordsToResolverData;
|
|
87941
|
+
return utils$2;
|
|
87791
87942
|
}
|
|
87792
87943
|
|
|
87793
87944
|
var hasRequiredMintClient;
|
|
@@ -87803,10 +87954,10 @@ function requireMintClient () {
|
|
|
87803
87954
|
const axios_1 = __importDefault(/*@__PURE__*/ requireAxios());
|
|
87804
87955
|
const env_1 = requireEnv();
|
|
87805
87956
|
const viem_1 = viem;
|
|
87806
|
-
const chains_1 = requireChains
|
|
87957
|
+
const chains_1 = requireChains();
|
|
87807
87958
|
const abi_1 = requireAbi();
|
|
87808
|
-
const addresses_1 = requireDist$
|
|
87809
|
-
const utils_1 = requireUtils
|
|
87959
|
+
const addresses_1 = requireDist$1();
|
|
87960
|
+
const utils_1 = requireUtils();
|
|
87810
87961
|
// Listing cache time
|
|
87811
87962
|
// 15 minutes
|
|
87812
87963
|
const DEFAULT_LISTING_CACHE = 15 * 60 * 1000;
|
|
@@ -88017,11 +88168,11 @@ function requireContenthashRecord () {
|
|
|
88017
88168
|
return contenthashRecord;
|
|
88018
88169
|
}
|
|
88019
88170
|
|
|
88020
|
-
var hasRequiredDist
|
|
88171
|
+
var hasRequiredDist;
|
|
88021
88172
|
|
|
88022
|
-
function requireDist
|
|
88023
|
-
if (hasRequiredDist
|
|
88024
|
-
hasRequiredDist
|
|
88173
|
+
function requireDist () {
|
|
88174
|
+
if (hasRequiredDist) return dist;
|
|
88175
|
+
hasRequiredDist = 1;
|
|
88025
88176
|
(function (exports$1) {
|
|
88026
88177
|
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
88027
88178
|
exports$1.ContenthashType = exports$1.ChainName = exports$1.createMintClient = void 0;
|
|
@@ -88031,18 +88182,18 @@ function requireDist$1 () {
|
|
|
88031
88182
|
Object.defineProperty(exports$1, "ChainName", { enumerable: true, get: function () { return address_records_1.ChainName; } });
|
|
88032
88183
|
var contenthash_record_1 = requireContenthashRecord();
|
|
88033
88184
|
Object.defineProperty(exports$1, "ContenthashType", { enumerable: true, get: function () { return contenthash_record_1.ContenthashType; } });
|
|
88034
|
-
} (dist
|
|
88035
|
-
return dist
|
|
88185
|
+
} (dist));
|
|
88186
|
+
return dist;
|
|
88036
88187
|
}
|
|
88037
88188
|
|
|
88038
|
-
var distExports
|
|
88189
|
+
var distExports = requireDist();
|
|
88039
88190
|
|
|
88040
88191
|
const LIST_MANAGER_API = "https://list-manager.namespace.ninja";
|
|
88041
88192
|
const LIST_MANAGER_TESTNET_API = "https://staging.list-manager.namespace.ninja";
|
|
88042
88193
|
const useMintManager = ({ isTestnet }) => {
|
|
88043
88194
|
const mintClient = useMemo(() => {
|
|
88044
88195
|
console.info(`Creating a mint clinet, testnet: ${isTestnet}`);
|
|
88045
|
-
return distExports
|
|
88196
|
+
return distExports.createMintClient({
|
|
88046
88197
|
cursomRpcUrls: {},
|
|
88047
88198
|
isTestnet: isTestnet || false
|
|
88048
88199
|
});
|
|
@@ -88125,1277 +88276,10 @@ const useMintSubname = ({ chainId }) => {
|
|
|
88125
88276
|
};
|
|
88126
88277
|
};
|
|
88127
88278
|
|
|
88128
|
-
var dist = {};
|
|
88129
|
-
|
|
88130
|
-
var offchainClient = {};
|
|
88131
|
-
|
|
88132
|
-
var privateActions = {};
|
|
88133
|
-
|
|
88134
|
-
var utils = {};
|
|
88135
|
-
|
|
88136
|
-
var dto = {};
|
|
88137
|
-
|
|
88138
|
-
var chains = {};
|
|
88139
|
-
|
|
88140
|
-
var hasRequiredChains;
|
|
88141
|
-
|
|
88142
|
-
function requireChains () {
|
|
88143
|
-
if (hasRequiredChains) return chains;
|
|
88144
|
-
hasRequiredChains = 1;
|
|
88145
|
-
(function (exports$1) {
|
|
88146
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
88147
|
-
exports$1.getCoinType = exports$1.chainMetadata = exports$1.ChainName = void 0;
|
|
88148
|
-
/**
|
|
88149
|
-
* Supported blockchain networks for address records.
|
|
88150
|
-
* Each chain has a corresponding coin type used internally for ENS address records.
|
|
88151
|
-
*
|
|
88152
|
-
* @example
|
|
88153
|
-
* ```typescript
|
|
88154
|
-
* import { ChainName } from '@thenamespace/offchain-manager';
|
|
88155
|
-
*
|
|
88156
|
-
* // Use in address records
|
|
88157
|
-
* const addressRecord = {
|
|
88158
|
-
* chain: ChainName.Ethereum,
|
|
88159
|
-
* value: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
|
|
88160
|
-
* };
|
|
88161
|
-
* ```
|
|
88162
|
-
*/
|
|
88163
|
-
var ChainName;
|
|
88164
|
-
(function (ChainName) {
|
|
88165
|
-
/** Ethereum mainnet */
|
|
88166
|
-
ChainName["Ethereum"] = "eth";
|
|
88167
|
-
/** Default (EVM-compatible) */
|
|
88168
|
-
ChainName["Default"] = "default";
|
|
88169
|
-
/** Solana */
|
|
88170
|
-
ChainName["Solana"] = "sol";
|
|
88171
|
-
/** Arbitrum One */
|
|
88172
|
-
ChainName["Arbitrum"] = "arb";
|
|
88173
|
-
/** Optimism */
|
|
88174
|
-
ChainName["Optimism"] = "op";
|
|
88175
|
-
/** Base */
|
|
88176
|
-
ChainName["Base"] = "base";
|
|
88177
|
-
/** Polygon (formerly Matic) */
|
|
88178
|
-
ChainName["Polygon"] = "polygon";
|
|
88179
|
-
/** BNB Smart Chain (formerly BSC) */
|
|
88180
|
-
ChainName["Bsc"] = "bsc";
|
|
88181
|
-
/** Avalanche C-Chain */
|
|
88182
|
-
ChainName["Avalanche"] = "avax";
|
|
88183
|
-
/** Gnosis Chain (formerly xDai) */
|
|
88184
|
-
ChainName["Gnosis"] = "gnosis";
|
|
88185
|
-
/** zkSync Era */
|
|
88186
|
-
ChainName["Zksync"] = "zksync";
|
|
88187
|
-
/** Cosmos Hub */
|
|
88188
|
-
ChainName["Cosmos"] = "cosmos";
|
|
88189
|
-
/** NEAR Protocol */
|
|
88190
|
-
ChainName["Near"] = "near";
|
|
88191
|
-
/** Linea */
|
|
88192
|
-
ChainName["Linea"] = "linea";
|
|
88193
|
-
/** Scroll */
|
|
88194
|
-
ChainName["Scroll"] = "scroll";
|
|
88195
|
-
/** Bitcoin */
|
|
88196
|
-
ChainName["Bitcoin"] = "btc";
|
|
88197
|
-
/** Starknet */
|
|
88198
|
-
ChainName["Starknet"] = "starknet";
|
|
88199
|
-
/** Sui Network */
|
|
88200
|
-
ChainName["Sui"] = "sui";
|
|
88201
|
-
/** Unichain */
|
|
88202
|
-
ChainName["Unichain"] = "unichain";
|
|
88203
|
-
/** Berachain */
|
|
88204
|
-
ChainName["Berachain"] = "berachain";
|
|
88205
|
-
/** WorldChain */
|
|
88206
|
-
ChainName["WorldChain"] = "world_chain";
|
|
88207
|
-
/** Zora */
|
|
88208
|
-
ChainName["Zora"] = "zora";
|
|
88209
|
-
/** Celo */
|
|
88210
|
-
ChainName["Celo"] = "celo";
|
|
88211
|
-
/** Aptos */
|
|
88212
|
-
ChainName["Aptos"] = "aptos";
|
|
88213
|
-
/** Algorand */
|
|
88214
|
-
ChainName["Algorand"] = "algorand";
|
|
88215
|
-
/** Monad */
|
|
88216
|
-
ChainName["Monad"] = "monad";
|
|
88217
|
-
/** Push Chain */
|
|
88218
|
-
ChainName["Push"] = "push";
|
|
88219
|
-
})(ChainName || (exports$1.ChainName = ChainName = {}));
|
|
88220
|
-
exports$1.chainMetadata = {
|
|
88221
|
-
eth: {
|
|
88222
|
-
label: "Ethereum",
|
|
88223
|
-
coin: 60,
|
|
88224
|
-
evm: true,
|
|
88225
|
-
},
|
|
88226
|
-
default: {
|
|
88227
|
-
label: "Default",
|
|
88228
|
-
coin: 2147483648,
|
|
88229
|
-
evm: true,
|
|
88230
|
-
},
|
|
88231
|
-
base: {
|
|
88232
|
-
label: "Base",
|
|
88233
|
-
coin: 8453,
|
|
88234
|
-
evm: true,
|
|
88235
|
-
},
|
|
88236
|
-
op: {
|
|
88237
|
-
label: "Optimism",
|
|
88238
|
-
coin: 10,
|
|
88239
|
-
evm: true,
|
|
88240
|
-
},
|
|
88241
|
-
arb: {
|
|
88242
|
-
label: "Arbitrum",
|
|
88243
|
-
coin: 42161,
|
|
88244
|
-
evm: true,
|
|
88245
|
-
},
|
|
88246
|
-
bsc: {
|
|
88247
|
-
label: "BNB",
|
|
88248
|
-
coin: 56,
|
|
88249
|
-
evm: true,
|
|
88250
|
-
},
|
|
88251
|
-
polygon: {
|
|
88252
|
-
label: "Polygon",
|
|
88253
|
-
coin: 137,
|
|
88254
|
-
evm: true,
|
|
88255
|
-
},
|
|
88256
|
-
avax: {
|
|
88257
|
-
label: "Avax",
|
|
88258
|
-
coin: 43114,
|
|
88259
|
-
evm: true,
|
|
88260
|
-
},
|
|
88261
|
-
gnosis: {
|
|
88262
|
-
label: "Gnosis",
|
|
88263
|
-
coin: 100,
|
|
88264
|
-
evm: true,
|
|
88265
|
-
},
|
|
88266
|
-
zksync: {
|
|
88267
|
-
label: "ZkSync",
|
|
88268
|
-
coin: 324,
|
|
88269
|
-
evm: true,
|
|
88270
|
-
},
|
|
88271
|
-
starknet: {
|
|
88272
|
-
label: "Starknet",
|
|
88273
|
-
coin: 9004,
|
|
88274
|
-
},
|
|
88275
|
-
sol: {
|
|
88276
|
-
label: "Solana",
|
|
88277
|
-
coin: 501,
|
|
88278
|
-
},
|
|
88279
|
-
btc: {
|
|
88280
|
-
label: "Bitcoin",
|
|
88281
|
-
coin: 0,
|
|
88282
|
-
},
|
|
88283
|
-
cosmos: {
|
|
88284
|
-
label: "Cosmos",
|
|
88285
|
-
coin: 118,
|
|
88286
|
-
},
|
|
88287
|
-
near: {
|
|
88288
|
-
label: "Near",
|
|
88289
|
-
coin: 397,
|
|
88290
|
-
},
|
|
88291
|
-
linea: {
|
|
88292
|
-
label: "Linea",
|
|
88293
|
-
coin: 59144,
|
|
88294
|
-
evm: true,
|
|
88295
|
-
},
|
|
88296
|
-
scroll: {
|
|
88297
|
-
label: "Scroll",
|
|
88298
|
-
coin: 534352,
|
|
88299
|
-
evm: true,
|
|
88300
|
-
},
|
|
88301
|
-
sui: {
|
|
88302
|
-
label: "Sui",
|
|
88303
|
-
coin: 784,
|
|
88304
|
-
},
|
|
88305
|
-
unichain: {
|
|
88306
|
-
label: "Unichain",
|
|
88307
|
-
coin: 130,
|
|
88308
|
-
evm: true,
|
|
88309
|
-
},
|
|
88310
|
-
berachain: {
|
|
88311
|
-
label: "Berachain",
|
|
88312
|
-
coin: 80094,
|
|
88313
|
-
evm: true,
|
|
88314
|
-
},
|
|
88315
|
-
world_chain: {
|
|
88316
|
-
label: "WorldChain",
|
|
88317
|
-
coin: 480,
|
|
88318
|
-
evm: true,
|
|
88319
|
-
},
|
|
88320
|
-
zora: {
|
|
88321
|
-
label: "Zora",
|
|
88322
|
-
coin: 7777777,
|
|
88323
|
-
evm: true,
|
|
88324
|
-
},
|
|
88325
|
-
celo: {
|
|
88326
|
-
label: "Celo",
|
|
88327
|
-
coin: 42220,
|
|
88328
|
-
evm: true,
|
|
88329
|
-
},
|
|
88330
|
-
aptos: {
|
|
88331
|
-
label: "Aptos",
|
|
88332
|
-
coin: 22,
|
|
88333
|
-
},
|
|
88334
|
-
algorand: {
|
|
88335
|
-
label: "Algorand",
|
|
88336
|
-
coin: 8,
|
|
88337
|
-
},
|
|
88338
|
-
monad: {
|
|
88339
|
-
label: "Monad",
|
|
88340
|
-
coin: 143,
|
|
88341
|
-
evm: true,
|
|
88342
|
-
},
|
|
88343
|
-
push: {
|
|
88344
|
-
label: "Push Chain",
|
|
88345
|
-
coin: 42101,
|
|
88346
|
-
evm: true,
|
|
88347
|
-
},
|
|
88348
|
-
};
|
|
88349
|
-
/**
|
|
88350
|
-
* Get the SLIP-0044 coin type for a given blockchain network.
|
|
88351
|
-
* This coin type is used internally for ENS address records.
|
|
88352
|
-
*
|
|
88353
|
-
* @param chain - The blockchain network to get the coin type for
|
|
88354
|
-
* @returns The SLIP-0044 coin type number
|
|
88355
|
-
*
|
|
88356
|
-
* @example
|
|
88357
|
-
* ```typescript
|
|
88358
|
-
* import { getCoinType, ChainName } from '@thenamespace/offchain-manager';
|
|
88359
|
-
*
|
|
88360
|
-
* const ethCoinType = getCoinType(ChainName.Ethereum); // Returns 60
|
|
88361
|
-
* const baseCoinType = getCoinType(ChainName.Base); // Returns 8453
|
|
88362
|
-
* ```
|
|
88363
|
-
*/
|
|
88364
|
-
const getCoinType = (chain) => {
|
|
88365
|
-
return exports$1.chainMetadata[chain].coin;
|
|
88366
|
-
};
|
|
88367
|
-
exports$1.getCoinType = getCoinType;
|
|
88368
|
-
} (chains));
|
|
88369
|
-
return chains;
|
|
88370
|
-
}
|
|
88371
|
-
|
|
88372
|
-
var createSubnameRequest_dto = {};
|
|
88373
|
-
|
|
88374
|
-
var hasRequiredCreateSubnameRequest_dto;
|
|
88375
|
-
|
|
88376
|
-
function requireCreateSubnameRequest_dto () {
|
|
88377
|
-
if (hasRequiredCreateSubnameRequest_dto) return createSubnameRequest_dto;
|
|
88378
|
-
hasRequiredCreateSubnameRequest_dto = 1;
|
|
88379
|
-
Object.defineProperty(createSubnameRequest_dto, "__esModule", { value: true });
|
|
88380
|
-
return createSubnameRequest_dto;
|
|
88381
|
-
}
|
|
88382
|
-
|
|
88383
|
-
var subname_dto = {};
|
|
88384
|
-
|
|
88385
|
-
var hasRequiredSubname_dto;
|
|
88386
|
-
|
|
88387
|
-
function requireSubname_dto () {
|
|
88388
|
-
if (hasRequiredSubname_dto) return subname_dto;
|
|
88389
|
-
hasRequiredSubname_dto = 1;
|
|
88390
|
-
Object.defineProperty(subname_dto, "__esModule", { value: true });
|
|
88391
|
-
return subname_dto;
|
|
88392
|
-
}
|
|
88393
|
-
|
|
88394
|
-
var updateSubnameRequest_dto = {};
|
|
88395
|
-
|
|
88396
|
-
var hasRequiredUpdateSubnameRequest_dto;
|
|
88397
|
-
|
|
88398
|
-
function requireUpdateSubnameRequest_dto () {
|
|
88399
|
-
if (hasRequiredUpdateSubnameRequest_dto) return updateSubnameRequest_dto;
|
|
88400
|
-
hasRequiredUpdateSubnameRequest_dto = 1;
|
|
88401
|
-
Object.defineProperty(updateSubnameRequest_dto, "__esModule", { value: true });
|
|
88402
|
-
return updateSubnameRequest_dto;
|
|
88403
|
-
}
|
|
88404
|
-
|
|
88405
|
-
var hasRequiredDto;
|
|
88406
|
-
|
|
88407
|
-
function requireDto () {
|
|
88408
|
-
if (hasRequiredDto) return dto;
|
|
88409
|
-
hasRequiredDto = 1;
|
|
88410
|
-
(function (exports$1) {
|
|
88411
|
-
var __createBinding = (dto && dto.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
88412
|
-
if (k2 === undefined) k2 = k;
|
|
88413
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
88414
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
88415
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
88416
|
-
}
|
|
88417
|
-
Object.defineProperty(o, k2, desc);
|
|
88418
|
-
}) : (function(o, m, k, k2) {
|
|
88419
|
-
if (k2 === undefined) k2 = k;
|
|
88420
|
-
o[k2] = m[k];
|
|
88421
|
-
}));
|
|
88422
|
-
var __exportStar = (dto && dto.__exportStar) || function(m, exports$1) {
|
|
88423
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
88424
|
-
};
|
|
88425
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
88426
|
-
__exportStar(requireChains(), exports$1);
|
|
88427
|
-
__exportStar(requireCreateSubnameRequest_dto(), exports$1);
|
|
88428
|
-
__exportStar(requireSubname_dto(), exports$1);
|
|
88429
|
-
__exportStar(requireUpdateSubnameRequest_dto(), exports$1);
|
|
88430
|
-
} (dto));
|
|
88431
|
-
return dto;
|
|
88432
|
-
}
|
|
88433
|
-
|
|
88434
|
-
var hasRequiredUtils;
|
|
88435
|
-
|
|
88436
|
-
function requireUtils () {
|
|
88437
|
-
if (hasRequiredUtils) return utils;
|
|
88438
|
-
hasRequiredUtils = 1;
|
|
88439
|
-
Object.defineProperty(utils, "__esModule", { value: true });
|
|
88440
|
-
utils.subnameResponseToRequest = utils.mapAddrMapToAddressRecords = utils.mapTextMapToTextRecords = utils.mapAddressesToInternal = void 0;
|
|
88441
|
-
const dto_1 = requireDto();
|
|
88442
|
-
const mapAddressesToInternal = (addrs) => {
|
|
88443
|
-
const _addr = addrs.map((addr) => {
|
|
88444
|
-
const _internalAddr = {
|
|
88445
|
-
coin: (0, dto_1.getCoinType)(addr.chain),
|
|
88446
|
-
value: addr.value,
|
|
88447
|
-
};
|
|
88448
|
-
return _internalAddr;
|
|
88449
|
-
});
|
|
88450
|
-
return _addr;
|
|
88451
|
-
};
|
|
88452
|
-
utils.mapAddressesToInternal = mapAddressesToInternal;
|
|
88453
|
-
const mapTextMapToTextRecords = (txtMap) => {
|
|
88454
|
-
return Object.keys(txtMap).map((txtKey) => {
|
|
88455
|
-
return {
|
|
88456
|
-
key: txtKey,
|
|
88457
|
-
value: txtMap[txtKey],
|
|
88458
|
-
};
|
|
88459
|
-
});
|
|
88460
|
-
};
|
|
88461
|
-
utils.mapTextMapToTextRecords = mapTextMapToTextRecords;
|
|
88462
|
-
const mapAddrMapToAddressRecords = (addrMap) => {
|
|
88463
|
-
return Object.keys(addrMap).map((addrKey) => {
|
|
88464
|
-
return {
|
|
88465
|
-
coin: parseInt(addrKey),
|
|
88466
|
-
value: addrMap[addrKey],
|
|
88467
|
-
};
|
|
88468
|
-
});
|
|
88469
|
-
};
|
|
88470
|
-
utils.mapAddrMapToAddressRecords = mapAddrMapToAddressRecords;
|
|
88471
|
-
const subnameResponseToRequest = (response) => {
|
|
88472
|
-
const addrs = [];
|
|
88473
|
-
const texts = [];
|
|
88474
|
-
if (response.addresses) {
|
|
88475
|
-
Object.keys(response.addresses).forEach((addrCoin) => {
|
|
88476
|
-
try {
|
|
88477
|
-
const coin = parseInt(addrCoin);
|
|
88478
|
-
const value = response.addresses[addrCoin];
|
|
88479
|
-
addrs.push({ coin: coin, value: value });
|
|
88480
|
-
}
|
|
88481
|
-
catch (err) { }
|
|
88482
|
-
});
|
|
88483
|
-
}
|
|
88484
|
-
if (response.texts) {
|
|
88485
|
-
Object.keys(response.texts).forEach((txt) => {
|
|
88486
|
-
texts.push({
|
|
88487
|
-
key: txt,
|
|
88488
|
-
value: response.texts[txt],
|
|
88489
|
-
});
|
|
88490
|
-
});
|
|
88491
|
-
}
|
|
88492
|
-
return {
|
|
88493
|
-
label: response.label,
|
|
88494
|
-
parentName: response.parentName,
|
|
88495
|
-
addresses: addrs,
|
|
88496
|
-
texts: texts,
|
|
88497
|
-
contenthash: response.contenthash,
|
|
88498
|
-
metadata: Object.keys(response.metadata || {}).map((data) => {
|
|
88499
|
-
return {
|
|
88500
|
-
key: data,
|
|
88501
|
-
value: response.metadata[data],
|
|
88502
|
-
};
|
|
88503
|
-
}),
|
|
88504
|
-
ttl: response.ttl,
|
|
88505
|
-
};
|
|
88506
|
-
};
|
|
88507
|
-
utils.subnameResponseToRequest = subnameResponseToRequest;
|
|
88508
|
-
return utils;
|
|
88509
|
-
}
|
|
88510
|
-
|
|
88511
|
-
var publicActions = {};
|
|
88512
|
-
|
|
88513
|
-
var hasRequiredPublicActions;
|
|
88514
|
-
|
|
88515
|
-
function requirePublicActions () {
|
|
88516
|
-
if (hasRequiredPublicActions) return publicActions;
|
|
88517
|
-
hasRequiredPublicActions = 1;
|
|
88518
|
-
Object.defineProperty(publicActions, "__esModule", { value: true });
|
|
88519
|
-
publicActions._getFilteredSubnames = publicActions._getSingleSubname = publicActions._getDataRecord = publicActions._getDataRecords = publicActions._getTextRecord = publicActions._getTextRecords = publicActions._isSubnameAvailable = void 0;
|
|
88520
|
-
const axios_1 = /*@__PURE__*/ requireAxios();
|
|
88521
|
-
const _isSubnameAvailable = async (client, fullSubname) => {
|
|
88522
|
-
try {
|
|
88523
|
-
const { data } = await client.get(`/api/v1/subnames/${fullSubname}`);
|
|
88524
|
-
return { isAvailable: !data };
|
|
88525
|
-
}
|
|
88526
|
-
catch (err) {
|
|
88527
|
-
if (err instanceof axios_1.AxiosError) {
|
|
88528
|
-
const axiosErr = err;
|
|
88529
|
-
if (axiosErr.response?.status === 404) {
|
|
88530
|
-
return { isAvailable: true };
|
|
88531
|
-
}
|
|
88532
|
-
}
|
|
88533
|
-
throw err;
|
|
88534
|
-
}
|
|
88535
|
-
};
|
|
88536
|
-
publicActions._isSubnameAvailable = _isSubnameAvailable;
|
|
88537
|
-
const _getTextRecords = async (client, fullSubname) => {
|
|
88538
|
-
const subname = await client
|
|
88539
|
-
.get(`/api/v1/subnames/${fullSubname}`)
|
|
88540
|
-
.then((res) => res.data);
|
|
88541
|
-
return subname.texts;
|
|
88542
|
-
};
|
|
88543
|
-
publicActions._getTextRecords = _getTextRecords;
|
|
88544
|
-
const _getTextRecord = async (client, fullSubname, key) => {
|
|
88545
|
-
const subname = await client
|
|
88546
|
-
.get(`/api/v1/subnames/${fullSubname}`)
|
|
88547
|
-
.then((res) => res.data);
|
|
88548
|
-
return { record: subname.texts[key] };
|
|
88549
|
-
};
|
|
88550
|
-
publicActions._getTextRecord = _getTextRecord;
|
|
88551
|
-
const _getDataRecords = async (client, fullSubname) => {
|
|
88552
|
-
const subname = await client
|
|
88553
|
-
.get(`/api/v1/subnames/${fullSubname}`)
|
|
88554
|
-
.then((res) => res.data);
|
|
88555
|
-
return subname.metadata;
|
|
88556
|
-
};
|
|
88557
|
-
publicActions._getDataRecords = _getDataRecords;
|
|
88558
|
-
const _getDataRecord = async (client, fullSubname, key) => {
|
|
88559
|
-
const subname = await client
|
|
88560
|
-
.get(`/api/v1/subnames/${fullSubname}`)
|
|
88561
|
-
.then((res) => res.data);
|
|
88562
|
-
return { record: subname.metadata[key] };
|
|
88563
|
-
};
|
|
88564
|
-
publicActions._getDataRecord = _getDataRecord;
|
|
88565
|
-
const _getSingleSubname = (client, fullSubname) => {
|
|
88566
|
-
return client
|
|
88567
|
-
.get(`/api/v1/subnames/${fullSubname}`)
|
|
88568
|
-
.then((res) => res.data);
|
|
88569
|
-
};
|
|
88570
|
-
publicActions._getSingleSubname = _getSingleSubname;
|
|
88571
|
-
const _getFilteredSubnames = async (client, query) => {
|
|
88572
|
-
if (query.parentName) {
|
|
88573
|
-
query.parentName;
|
|
88574
|
-
}
|
|
88575
|
-
if (query.page) {
|
|
88576
|
-
query.page;
|
|
88577
|
-
}
|
|
88578
|
-
if (query.size) {
|
|
88579
|
-
query.size;
|
|
88580
|
-
}
|
|
88581
|
-
if (query.parentNames && query.parentNames.length > 0) {
|
|
88582
|
-
query.parentNames;
|
|
88583
|
-
}
|
|
88584
|
-
if (query.labelSearch) {
|
|
88585
|
-
query.labelSearch;
|
|
88586
|
-
}
|
|
88587
|
-
if (query.metadata) {
|
|
88588
|
-
JSON.stringify(query.metadata);
|
|
88589
|
-
}
|
|
88590
|
-
return client
|
|
88591
|
-
.post(`/api/v1/subnames/search`, query)
|
|
88592
|
-
.then((res) => res.data);
|
|
88593
|
-
};
|
|
88594
|
-
publicActions._getFilteredSubnames = _getFilteredSubnames;
|
|
88595
|
-
return publicActions;
|
|
88596
|
-
}
|
|
88597
|
-
|
|
88598
|
-
var hasRequiredPrivateActions;
|
|
88599
|
-
|
|
88600
|
-
function requirePrivateActions () {
|
|
88601
|
-
if (hasRequiredPrivateActions) return privateActions;
|
|
88602
|
-
hasRequiredPrivateActions = 1;
|
|
88603
|
-
Object.defineProperty(privateActions, "__esModule", { value: true });
|
|
88604
|
-
privateActions._setDefaultEthereumAddress = privateActions._deleteDataRecord = privateActions._addDataRecord = privateActions._deleteTextRecord = privateActions._addTextRecord = privateActions._deleteSubname = privateActions._deleteAddressRecord = privateActions._addAddressRecord = privateActions._updateSubname = privateActions._createSubname = void 0;
|
|
88605
|
-
const utils_1 = requireUtils();
|
|
88606
|
-
const chains_1 = requireChains();
|
|
88607
|
-
const public_actions_1 = requirePublicActions();
|
|
88608
|
-
const AUTH_HEADER = "x-auth-token";
|
|
88609
|
-
const _createSubname = (client, apiKey, createRequest, customHeaders) => {
|
|
88610
|
-
const request = {
|
|
88611
|
-
label: createRequest.label,
|
|
88612
|
-
parentName: createRequest.parentName,
|
|
88613
|
-
addresses: (0, utils_1.mapAddressesToInternal)(createRequest.addresses || []),
|
|
88614
|
-
contenthash: createRequest.contenthash,
|
|
88615
|
-
metadata: createRequest.metadata,
|
|
88616
|
-
texts: createRequest.texts,
|
|
88617
|
-
ttl: createRequest.ttl,
|
|
88618
|
-
owner: createRequest.owner
|
|
88619
|
-
};
|
|
88620
|
-
return client.post("/api/v1/subnames", request, {
|
|
88621
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88622
|
-
});
|
|
88623
|
-
};
|
|
88624
|
-
privateActions._createSubname = _createSubname;
|
|
88625
|
-
const _updateSubname = async (client, apiKey, fullSubname, updateRequest, customHeaders) => {
|
|
88626
|
-
const subname = await (0, public_actions_1._getSingleSubname)(client, fullSubname);
|
|
88627
|
-
const request = {
|
|
88628
|
-
label: subname.label,
|
|
88629
|
-
parentName: subname.parentName,
|
|
88630
|
-
addresses: (0, utils_1.mapAddressesToInternal)(updateRequest.addresses || []),
|
|
88631
|
-
contenthash: updateRequest.contenthash,
|
|
88632
|
-
metadata: updateRequest.metadata,
|
|
88633
|
-
texts: updateRequest.texts,
|
|
88634
|
-
ttl: updateRequest.ttl,
|
|
88635
|
-
};
|
|
88636
|
-
return client
|
|
88637
|
-
.post("/api/v1/subnames", request, {
|
|
88638
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88639
|
-
})
|
|
88640
|
-
.then((res) => res.data);
|
|
88641
|
-
};
|
|
88642
|
-
privateActions._updateSubname = _updateSubname;
|
|
88643
|
-
const _addAddressRecord = async (client, apiKey, fullSubname, coin, value, customHeaders) => {
|
|
88644
|
-
const subname = await (0, public_actions_1._getSingleSubname)(client, fullSubname);
|
|
88645
|
-
const addresses = subname.addresses || {};
|
|
88646
|
-
addresses[coin] = value;
|
|
88647
|
-
const _req = (0, utils_1.subnameResponseToRequest)(subname);
|
|
88648
|
-
const request = {
|
|
88649
|
-
..._req,
|
|
88650
|
-
addresses: (0, utils_1.mapAddrMapToAddressRecords)(addresses),
|
|
88651
|
-
};
|
|
88652
|
-
return client.post(`/api/v1/subnames`, request, {
|
|
88653
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88654
|
-
});
|
|
88655
|
-
};
|
|
88656
|
-
privateActions._addAddressRecord = _addAddressRecord;
|
|
88657
|
-
const _deleteAddressRecord = async (client, apiKey, fullSubname, coin, customHeaders) => {
|
|
88658
|
-
const subname = await (0, public_actions_1._getSingleSubname)(client, fullSubname);
|
|
88659
|
-
const addresses = subname.addresses || {};
|
|
88660
|
-
delete addresses[coin];
|
|
88661
|
-
const _req = (0, utils_1.subnameResponseToRequest)(subname);
|
|
88662
|
-
const request = {
|
|
88663
|
-
..._req,
|
|
88664
|
-
addresses: (0, utils_1.mapAddrMapToAddressRecords)(addresses),
|
|
88665
|
-
};
|
|
88666
|
-
return client.post(`/api/v1/subnames`, request, {
|
|
88667
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88668
|
-
});
|
|
88669
|
-
};
|
|
88670
|
-
privateActions._deleteAddressRecord = _deleteAddressRecord;
|
|
88671
|
-
const _deleteSubname = (client, apiKey, fullSubname, customHeaders) => {
|
|
88672
|
-
return client.delete(`/api/v1/subnames/${fullSubname}`, {
|
|
88673
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88674
|
-
});
|
|
88675
|
-
};
|
|
88676
|
-
privateActions._deleteSubname = _deleteSubname;
|
|
88677
|
-
const _addTextRecord = async (client, apiKey, fullSubname, key, value, customHeaders) => {
|
|
88678
|
-
const subname = await (0, public_actions_1._getSingleSubname)(client, fullSubname);
|
|
88679
|
-
const _req = (0, utils_1.subnameResponseToRequest)(subname);
|
|
88680
|
-
const texts = subname.texts || {};
|
|
88681
|
-
texts[key] = value;
|
|
88682
|
-
const request = {
|
|
88683
|
-
..._req,
|
|
88684
|
-
texts: (0, utils_1.mapTextMapToTextRecords)(texts),
|
|
88685
|
-
};
|
|
88686
|
-
return client.post(`/api/v1/subnames`, request, {
|
|
88687
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88688
|
-
});
|
|
88689
|
-
};
|
|
88690
|
-
privateActions._addTextRecord = _addTextRecord;
|
|
88691
|
-
const _deleteTextRecord = async (client, apiKey, fullSubname, key, customHeaders) => {
|
|
88692
|
-
const subname = await (0, public_actions_1._getSingleSubname)(client, fullSubname);
|
|
88693
|
-
const texts = subname.texts || {};
|
|
88694
|
-
delete texts[key];
|
|
88695
|
-
const _req = (0, utils_1.subnameResponseToRequest)(subname);
|
|
88696
|
-
const request = {
|
|
88697
|
-
..._req,
|
|
88698
|
-
texts: (0, utils_1.mapTextMapToTextRecords)(texts),
|
|
88699
|
-
};
|
|
88700
|
-
return client.post(`/api/v1/subnames`, request, {
|
|
88701
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88702
|
-
});
|
|
88703
|
-
};
|
|
88704
|
-
privateActions._deleteTextRecord = _deleteTextRecord;
|
|
88705
|
-
const _addDataRecord = async (client, apiKey, fullSubname, key, value, customHeaders) => {
|
|
88706
|
-
const subname = await (0, public_actions_1._getSingleSubname)(client, fullSubname);
|
|
88707
|
-
const metadata = subname.metadata || {};
|
|
88708
|
-
metadata[key] = value;
|
|
88709
|
-
const _req = (0, utils_1.subnameResponseToRequest)(subname);
|
|
88710
|
-
const request = {
|
|
88711
|
-
..._req,
|
|
88712
|
-
metadata: (0, utils_1.mapTextMapToTextRecords)(metadata),
|
|
88713
|
-
};
|
|
88714
|
-
return client.post(`/api/v1/subnames`, request, {
|
|
88715
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88716
|
-
});
|
|
88717
|
-
};
|
|
88718
|
-
privateActions._addDataRecord = _addDataRecord;
|
|
88719
|
-
const _deleteDataRecord = async (client, apiKey, fullSubname, key, customHeaders) => {
|
|
88720
|
-
const subname = await client
|
|
88721
|
-
.get(`/api/v1/subnames/${fullSubname}`, {
|
|
88722
|
-
headers: customHeaders,
|
|
88723
|
-
})
|
|
88724
|
-
.then((res) => res.data);
|
|
88725
|
-
const updatedData = Object.entries(subname.metadata)
|
|
88726
|
-
.filter(([dataKey]) => dataKey !== key)
|
|
88727
|
-
.map(([dataKey, dataValue]) => ({ key: dataKey, value: dataValue }));
|
|
88728
|
-
const _req = (0, utils_1.subnameResponseToRequest)(subname);
|
|
88729
|
-
const request = {
|
|
88730
|
-
..._req,
|
|
88731
|
-
metadata: updatedData,
|
|
88732
|
-
};
|
|
88733
|
-
return client.post(`/api/v1/subnames`, request, {
|
|
88734
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88735
|
-
});
|
|
88736
|
-
};
|
|
88737
|
-
privateActions._deleteDataRecord = _deleteDataRecord;
|
|
88738
|
-
const _setDefaultEthereumAddress = async (client, apiKey, fullSubname, value, customHeaders) => {
|
|
88739
|
-
const subname = await (0, public_actions_1._getSingleSubname)(client, fullSubname);
|
|
88740
|
-
const addresses = subname.addresses || {};
|
|
88741
|
-
// Derive EVM chains from shared chainMetadata (evm=true)
|
|
88742
|
-
Object.values(chains_1.chainMetadata)
|
|
88743
|
-
.filter((meta) => meta.evm)
|
|
88744
|
-
.forEach((meta) => {
|
|
88745
|
-
addresses[meta.coin] = value;
|
|
88746
|
-
});
|
|
88747
|
-
const _req = (0, utils_1.subnameResponseToRequest)(subname);
|
|
88748
|
-
const request = {
|
|
88749
|
-
..._req,
|
|
88750
|
-
addresses: (0, utils_1.mapAddrMapToAddressRecords)(addresses),
|
|
88751
|
-
};
|
|
88752
|
-
return client.post(`/api/v1/subnames`, request, {
|
|
88753
|
-
headers: createAuthorizationHeaders(apiKey, customHeaders),
|
|
88754
|
-
});
|
|
88755
|
-
};
|
|
88756
|
-
privateActions._setDefaultEthereumAddress = _setDefaultEthereumAddress;
|
|
88757
|
-
const createAuthorizationHeaders = (apiKey, customHeaders) => {
|
|
88758
|
-
const base = {
|
|
88759
|
-
[AUTH_HEADER]: `${apiKey}`,
|
|
88760
|
-
};
|
|
88761
|
-
if (!customHeaders) {
|
|
88762
|
-
return base;
|
|
88763
|
-
}
|
|
88764
|
-
// NOTE: If customHeaders includes the same auth header key (x-auth-token),
|
|
88765
|
-
// it will explicitly override the API key value.
|
|
88766
|
-
return {
|
|
88767
|
-
...base,
|
|
88768
|
-
...customHeaders,
|
|
88769
|
-
};
|
|
88770
|
-
};
|
|
88771
|
-
return privateActions;
|
|
88772
|
-
}
|
|
88773
|
-
|
|
88774
|
-
var hasRequiredOffchainClient;
|
|
88775
|
-
|
|
88776
|
-
function requireOffchainClient () {
|
|
88777
|
-
if (hasRequiredOffchainClient) return offchainClient;
|
|
88778
|
-
hasRequiredOffchainClient = 1;
|
|
88779
|
-
var __createBinding = (offchainClient && offchainClient.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
88780
|
-
if (k2 === undefined) k2 = k;
|
|
88781
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
88782
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
88783
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
88784
|
-
}
|
|
88785
|
-
Object.defineProperty(o, k2, desc);
|
|
88786
|
-
}) : (function(o, m, k, k2) {
|
|
88787
|
-
if (k2 === undefined) k2 = k;
|
|
88788
|
-
o[k2] = m[k];
|
|
88789
|
-
}));
|
|
88790
|
-
var __setModuleDefault = (offchainClient && offchainClient.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
88791
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
88792
|
-
}) : function(o, v) {
|
|
88793
|
-
o["default"] = v;
|
|
88794
|
-
});
|
|
88795
|
-
var __importStar = (offchainClient && offchainClient.__importStar) || (function () {
|
|
88796
|
-
var ownKeys = function(o) {
|
|
88797
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
88798
|
-
var ar = [];
|
|
88799
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
88800
|
-
return ar;
|
|
88801
|
-
};
|
|
88802
|
-
return ownKeys(o);
|
|
88803
|
-
};
|
|
88804
|
-
return function (mod) {
|
|
88805
|
-
if (mod && mod.__esModule) return mod;
|
|
88806
|
-
var result = {};
|
|
88807
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
88808
|
-
__setModuleDefault(result, mod);
|
|
88809
|
-
return result;
|
|
88810
|
-
};
|
|
88811
|
-
})();
|
|
88812
|
-
Object.defineProperty(offchainClient, "__esModule", { value: true });
|
|
88813
|
-
offchainClient.createOffchainClient = void 0;
|
|
88814
|
-
const axios_1 = __importStar(/*@__PURE__*/ requireAxios());
|
|
88815
|
-
const private_actions_1 = requirePrivateActions();
|
|
88816
|
-
const public_actions_1 = requirePublicActions();
|
|
88817
|
-
const dto_1 = requireDto();
|
|
88818
|
-
/** Backend URI mappings for different network modes */
|
|
88819
|
-
const backendUris = {
|
|
88820
|
-
mainnet: "https://offchain-manager.namespace.ninja",
|
|
88821
|
-
sepolia: "https://staging.offchain-manager.namespace.ninja",
|
|
88822
|
-
};
|
|
88823
|
-
class HttpOffchainClient {
|
|
88824
|
-
constructor(config = {}) {
|
|
88825
|
-
this.config = config;
|
|
88826
|
-
this.apiKeys = {};
|
|
88827
|
-
this.fetchApiKeyForName = (name, isSubname = true) => {
|
|
88828
|
-
const extractParent = () => {
|
|
88829
|
-
const split = name.split(".");
|
|
88830
|
-
const splitLen = split.length;
|
|
88831
|
-
if (splitLen < 2) {
|
|
88832
|
-
throw Error(`Invalid ENS name: ${name}`);
|
|
88833
|
-
}
|
|
88834
|
-
if (splitLen === 2) {
|
|
88835
|
-
return name;
|
|
88836
|
-
}
|
|
88837
|
-
return split[splitLen - 2] + "." + split[splitLen - 1];
|
|
88838
|
-
};
|
|
88839
|
-
let parentName = isSubname ? extractParent() : name;
|
|
88840
|
-
if (this.apiKeys[parentName]) {
|
|
88841
|
-
return this.apiKeys[parentName];
|
|
88842
|
-
}
|
|
88843
|
-
if (this.defaultApiKey) {
|
|
88844
|
-
return this.defaultApiKey;
|
|
88845
|
-
}
|
|
88846
|
-
throw new Error(`Api key is not present for name: ${parentName}. Use setApiKey() or setDefaultApiKey() to configure authentication.`);
|
|
88847
|
-
};
|
|
88848
|
-
const mode = config.mode || "mainnet";
|
|
88849
|
-
const uri = config.backendUri || backendUris[mode];
|
|
88850
|
-
this.HTTP = axios_1.default.create({
|
|
88851
|
-
...this.config,
|
|
88852
|
-
baseURL: uri,
|
|
88853
|
-
});
|
|
88854
|
-
// Initialize authentication from config if provided
|
|
88855
|
-
if (config.defaultApiKey) {
|
|
88856
|
-
this.setDefaultApiKey(config.defaultApiKey);
|
|
88857
|
-
}
|
|
88858
|
-
if (config.domainApiKeys) {
|
|
88859
|
-
for (const [ensName, apiKey] of Object.entries(config.domainApiKeys)) {
|
|
88860
|
-
this.setApiKey(ensName, apiKey);
|
|
88861
|
-
}
|
|
88862
|
-
}
|
|
88863
|
-
if (config.customHeaders) {
|
|
88864
|
-
this.setCustomHeaders(config.customHeaders);
|
|
88865
|
-
}
|
|
88866
|
-
}
|
|
88867
|
-
async updateSubname(subname, request) {
|
|
88868
|
-
return (0, private_actions_1._updateSubname)(this.HTTP, this.fetchApiKeyForName(subname), subname, request, this.customHeaders);
|
|
88869
|
-
}
|
|
88870
|
-
async addAddressRecord(subname, chain, value) {
|
|
88871
|
-
const coin = (0, dto_1.getCoinType)(chain);
|
|
88872
|
-
if (coin === undefined) {
|
|
88873
|
-
throw Error(`Unsupported address: ${chain}`);
|
|
88874
|
-
}
|
|
88875
|
-
await (0, private_actions_1._addAddressRecord)(this.HTTP, this.fetchApiKeyForName(subname), subname, coin, value, this.customHeaders);
|
|
88876
|
-
}
|
|
88877
|
-
async deleteAddressRecord(subname, chain) {
|
|
88878
|
-
const coin = (0, dto_1.getCoinType)(chain);
|
|
88879
|
-
if (coin === undefined) {
|
|
88880
|
-
throw Error(`Unsupported address: ${chain}`);
|
|
88881
|
-
}
|
|
88882
|
-
await (0, private_actions_1._deleteAddressRecord)(this.HTTP, this.fetchApiKeyForName(subname), subname, coin, this.customHeaders);
|
|
88883
|
-
}
|
|
88884
|
-
async setDefaultEvmAddress(subname, value) {
|
|
88885
|
-
await (0, private_actions_1._setDefaultEthereumAddress)(this.HTTP, this.fetchApiKeyForName(subname), subname, value, this.customHeaders);
|
|
88886
|
-
}
|
|
88887
|
-
async getSingleSubname(fullSubname) {
|
|
88888
|
-
try {
|
|
88889
|
-
return (0, public_actions_1._getSingleSubname)(this.HTTP, fullSubname);
|
|
88890
|
-
}
|
|
88891
|
-
catch (err) {
|
|
88892
|
-
if (err instanceof axios_1.AxiosError) {
|
|
88893
|
-
const axiosErr = err;
|
|
88894
|
-
if (axiosErr.response?.status === 404) {
|
|
88895
|
-
return null;
|
|
88896
|
-
}
|
|
88897
|
-
}
|
|
88898
|
-
throw err;
|
|
88899
|
-
}
|
|
88900
|
-
}
|
|
88901
|
-
async getTextRecords(fullSubname) {
|
|
88902
|
-
return await (0, public_actions_1._getTextRecords)(this.HTTP, fullSubname);
|
|
88903
|
-
}
|
|
88904
|
-
async getTextRecord(fullSubname, key) {
|
|
88905
|
-
return await (0, public_actions_1._getTextRecord)(this.HTTP, fullSubname, key);
|
|
88906
|
-
}
|
|
88907
|
-
async getDataRecords(fullSubname) {
|
|
88908
|
-
return await (0, public_actions_1._getDataRecords)(this.HTTP, fullSubname);
|
|
88909
|
-
}
|
|
88910
|
-
async getDataRecord(fullSubname, key) {
|
|
88911
|
-
return await (0, public_actions_1._getDataRecord)(this.HTTP, fullSubname, key);
|
|
88912
|
-
}
|
|
88913
|
-
async isSubnameAvailable(fullSubname) {
|
|
88914
|
-
return await (0, public_actions_1._isSubnameAvailable)(this.HTTP, fullSubname);
|
|
88915
|
-
}
|
|
88916
|
-
async createSubname(request) {
|
|
88917
|
-
await (0, private_actions_1._createSubname)(this.HTTP, this.fetchApiKeyForName(request.parentName, false), request, this.customHeaders);
|
|
88918
|
-
}
|
|
88919
|
-
async deleteSubname(fullSubname) {
|
|
88920
|
-
await (0, private_actions_1._deleteSubname)(this.HTTP, this.fetchApiKeyForName(fullSubname), fullSubname, this.customHeaders);
|
|
88921
|
-
}
|
|
88922
|
-
async addTextRecord(subname, key, value) {
|
|
88923
|
-
await (0, private_actions_1._addTextRecord)(this.HTTP, this.fetchApiKeyForName(subname), subname, key, value, this.customHeaders);
|
|
88924
|
-
}
|
|
88925
|
-
async deleteTextRecord(fullSubname, key) {
|
|
88926
|
-
await (0, private_actions_1._deleteTextRecord)(this.HTTP, this.fetchApiKeyForName(fullSubname), fullSubname, key, this.customHeaders);
|
|
88927
|
-
}
|
|
88928
|
-
async addDataRecord(subname, key, value) {
|
|
88929
|
-
await (0, private_actions_1._addDataRecord)(this.HTTP, this.fetchApiKeyForName(subname), subname, key, value, this.customHeaders);
|
|
88930
|
-
}
|
|
88931
|
-
async deleteDataRecord(fullSubname, key) {
|
|
88932
|
-
await (0, private_actions_1._deleteDataRecord)(this.HTTP, this.fetchApiKeyForName(fullSubname), fullSubname, key, this.customHeaders);
|
|
88933
|
-
}
|
|
88934
|
-
async getFilteredSubnames(query) {
|
|
88935
|
-
return (0, public_actions_1._getFilteredSubnames)(this.HTTP, query);
|
|
88936
|
-
}
|
|
88937
|
-
setCustomHeaders(headers) {
|
|
88938
|
-
this.customHeaders = headers || {};
|
|
88939
|
-
// Apply custom headers as Axios defaults so they are sent with all requests
|
|
88940
|
-
this.HTTP.defaults.headers.common = {
|
|
88941
|
-
...(this.HTTP.defaults.headers.common || {}),
|
|
88942
|
-
...this.customHeaders,
|
|
88943
|
-
};
|
|
88944
|
-
}
|
|
88945
|
-
setApiKey(ensName, apiKey) {
|
|
88946
|
-
this.apiKeys[ensName] = apiKey;
|
|
88947
|
-
}
|
|
88948
|
-
setDefaultApiKey(apiKey) {
|
|
88949
|
-
this.defaultApiKey = apiKey;
|
|
88950
|
-
}
|
|
88951
|
-
}
|
|
88952
|
-
/**
|
|
88953
|
-
* Create a new OffchainClient instance for managing ENS subnames.
|
|
88954
|
-
*
|
|
88955
|
-
* @param config - Optional configuration options including network mode, HTTP settings, and API keys
|
|
88956
|
-
* @returns A configured OffchainClient instance
|
|
88957
|
-
*
|
|
88958
|
-
* @example
|
|
88959
|
-
* ```typescript
|
|
88960
|
-
* import { createOffchainClient } from '@thenamespace/offchain-manager';
|
|
88961
|
-
*
|
|
88962
|
-
* // 1. No-arg initialization (defaults to mainnet)
|
|
88963
|
-
* const client = createOffchainClient();
|
|
88964
|
-
*
|
|
88965
|
-
* // 2. Configure network mode
|
|
88966
|
-
* const client = createOffchainClient({ mode: 'sepolia' });
|
|
88967
|
-
*
|
|
88968
|
-
* // 3. Initialize with address-based API key (works with all your ENS domains)
|
|
88969
|
-
* const client = createOffchainClient({
|
|
88970
|
-
* mode: 'sepolia',
|
|
88971
|
-
* defaultApiKey: 'your-address-based-api-key'
|
|
88972
|
-
* });
|
|
88973
|
-
*
|
|
88974
|
-
* // 4. Initialize with domain-based API keys (for specific ENS domains)
|
|
88975
|
-
* const client = createOffchainClient({
|
|
88976
|
-
* mode: 'sepolia',
|
|
88977
|
-
* domainApiKeys: {
|
|
88978
|
-
* 'example.eth': 'your-domain-based-api-key',
|
|
88979
|
-
* 'test.eth': 'another-domain-key'
|
|
88980
|
-
* }
|
|
88981
|
-
* });
|
|
88982
|
-
*
|
|
88983
|
-
* // 5. Initialize with both default and domain API keys
|
|
88984
|
-
* const client = createOffchainClient({
|
|
88985
|
-
* mode: 'sepolia',
|
|
88986
|
-
* defaultApiKey: 'your-address-based-api-key',
|
|
88987
|
-
* domainApiKeys: {
|
|
88988
|
-
* 'example.eth': 'your-domain-based-api-key'
|
|
88989
|
-
* }
|
|
88990
|
-
* });
|
|
88991
|
-
*
|
|
88992
|
-
* // You can also set/update keys after initialization
|
|
88993
|
-
* client.setDefaultApiKey('your-api-key');
|
|
88994
|
-
* client.setApiKey('example.eth', 'your-domain-key');
|
|
88995
|
-
* ```
|
|
88996
|
-
*/
|
|
88997
|
-
const createOffchainClient = (config = {}) => {
|
|
88998
|
-
return new HttpOffchainClient(config);
|
|
88999
|
-
};
|
|
89000
|
-
offchainClient.createOffchainClient = createOffchainClient;
|
|
89001
|
-
return offchainClient;
|
|
89002
|
-
}
|
|
89003
|
-
|
|
89004
|
-
var validation = {};
|
|
89005
|
-
|
|
89006
|
-
var errors = {};
|
|
89007
|
-
|
|
89008
|
-
var hasRequiredErrors;
|
|
89009
|
-
|
|
89010
|
-
function requireErrors () {
|
|
89011
|
-
if (hasRequiredErrors) return errors;
|
|
89012
|
-
hasRequiredErrors = 1;
|
|
89013
|
-
Object.defineProperty(errors, "__esModule", { value: true });
|
|
89014
|
-
errors.RateLimitError = errors.SubnameAlreadyExistsError = errors.SubnameNotFoundError = errors.ValidationError = errors.AuthenticationError = errors.NamespaceSDKError = void 0;
|
|
89015
|
-
class NamespaceSDKError extends Error {
|
|
89016
|
-
constructor(message, code) {
|
|
89017
|
-
super(message);
|
|
89018
|
-
this.code = code;
|
|
89019
|
-
this.name = 'NamespaceSDKError';
|
|
89020
|
-
}
|
|
89021
|
-
}
|
|
89022
|
-
errors.NamespaceSDKError = NamespaceSDKError;
|
|
89023
|
-
class AuthenticationError extends NamespaceSDKError {
|
|
89024
|
-
constructor(message = 'Authentication failed. Please check your API key.') {
|
|
89025
|
-
super(message, 'AUTH_ERROR');
|
|
89026
|
-
this.name = 'AuthenticationError';
|
|
89027
|
-
}
|
|
89028
|
-
}
|
|
89029
|
-
errors.AuthenticationError = AuthenticationError;
|
|
89030
|
-
class ValidationError extends NamespaceSDKError {
|
|
89031
|
-
constructor(message) {
|
|
89032
|
-
super(message, 'VALIDATION_ERROR');
|
|
89033
|
-
this.name = 'ValidationError';
|
|
89034
|
-
}
|
|
89035
|
-
}
|
|
89036
|
-
errors.ValidationError = ValidationError;
|
|
89037
|
-
class SubnameNotFoundError extends NamespaceSDKError {
|
|
89038
|
-
constructor(subname) {
|
|
89039
|
-
super(`Subname not found: ${subname}`, 'SUBDOMAIN_NOT_FOUND');
|
|
89040
|
-
this.name = 'SubnameNotFoundError';
|
|
89041
|
-
}
|
|
89042
|
-
}
|
|
89043
|
-
errors.SubnameNotFoundError = SubnameNotFoundError;
|
|
89044
|
-
class SubnameAlreadyExistsError extends NamespaceSDKError {
|
|
89045
|
-
constructor(subname) {
|
|
89046
|
-
super(`Subname already exists: ${subname}`, 'SUBDOMAIN_EXISTS');
|
|
89047
|
-
this.name = 'SubnameAlreadyExistsError';
|
|
89048
|
-
}
|
|
89049
|
-
}
|
|
89050
|
-
errors.SubnameAlreadyExistsError = SubnameAlreadyExistsError;
|
|
89051
|
-
class RateLimitError extends NamespaceSDKError {
|
|
89052
|
-
constructor(message = 'Rate limit exceeded. Please try again later.') {
|
|
89053
|
-
super(message, 'RATE_LIMIT');
|
|
89054
|
-
this.name = 'RateLimitError';
|
|
89055
|
-
}
|
|
89056
|
-
}
|
|
89057
|
-
errors.RateLimitError = RateLimitError;
|
|
89058
|
-
return errors;
|
|
89059
|
-
}
|
|
89060
|
-
|
|
89061
|
-
var hasRequiredValidation;
|
|
89062
|
-
|
|
89063
|
-
function requireValidation () {
|
|
89064
|
-
if (hasRequiredValidation) return validation;
|
|
89065
|
-
hasRequiredValidation = 1;
|
|
89066
|
-
(function (exports$1) {
|
|
89067
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
89068
|
-
exports$1.validateApiKey = exports$1.validateAddress = exports$1.validateSubname = exports$1.validateEnsName = void 0;
|
|
89069
|
-
const errors_1 = requireErrors();
|
|
89070
|
-
const dto_1 = requireDto();
|
|
89071
|
-
/**
|
|
89072
|
-
* Validates that a string is a properly formatted ENS domain name.
|
|
89073
|
-
* ENS supports many TLDs including .eth, .com, .art, .xyz, and others through ENS import.
|
|
89074
|
-
*
|
|
89075
|
-
* Validation follows ENS normalization rules:
|
|
89076
|
-
* - Names must be lowercase
|
|
89077
|
-
* - Variation selectors (U+FE00-U+FE0F) are not allowed
|
|
89078
|
-
* - Zero-width characters are not allowed (prevents homoglyph attacks)
|
|
89079
|
-
* - Supports emojis, accented characters, and many Unicode characters
|
|
89080
|
-
*
|
|
89081
|
-
* @param name - The ENS name to validate (e.g., 'example.eth', 'mysite.com', 'art.gallery.art')
|
|
89082
|
-
* @throws {ValidationError} When the name format is invalid
|
|
89083
|
-
*
|
|
89084
|
-
* @example
|
|
89085
|
-
* ```typescript
|
|
89086
|
-
* import { validateEnsName } from '@thenamespace/offchain-manager';
|
|
89087
|
-
*
|
|
89088
|
-
* validateEnsName('example.eth'); // ✅ Valid
|
|
89089
|
-
* validateEnsName('mysite.com'); // ✅ Valid (ENS supports imported domains)
|
|
89090
|
-
* validateEnsName('gallery.art'); // ✅ Valid
|
|
89091
|
-
* validateEnsName('sub.example.eth'); // ✅ Valid
|
|
89092
|
-
* validateEnsName('🚀.eth'); // ✅ Valid (emojis supported)
|
|
89093
|
-
* validateEnsName('café.eth'); // ✅ Valid (accented characters supported)
|
|
89094
|
-
* validateEnsName('Example.eth'); // ❌ Throws ValidationError (uppercase not allowed)
|
|
89095
|
-
* validateEnsName('invalid..domain'); // ❌ Throws ValidationError
|
|
89096
|
-
* ```
|
|
89097
|
-
*/
|
|
89098
|
-
const validateEnsName = (name) => {
|
|
89099
|
-
if (!name || typeof name !== 'string') {
|
|
89100
|
-
throw new errors_1.ValidationError('ENS name must be a non-empty string');
|
|
89101
|
-
}
|
|
89102
|
-
// Check for uppercase characters (ENS normalizes to lowercase)
|
|
89103
|
-
if (name !== name.toLowerCase()) {
|
|
89104
|
-
throw new errors_1.ValidationError(`Invalid ENS domain format: ${name}. ENS names must be lowercase.`);
|
|
89105
|
-
}
|
|
89106
|
-
// Check for variation selectors (U+FE00 to U+FE0F) - these are stripped in ENS normalization
|
|
89107
|
-
const variationSelectorRegex = /[\uFE00-\uFE0F]/;
|
|
89108
|
-
if (variationSelectorRegex.test(name)) {
|
|
89109
|
-
throw new errors_1.ValidationError(`Invalid ENS domain format: ${name}. Variation selectors are not allowed in ENS names.`);
|
|
89110
|
-
}
|
|
89111
|
-
// Check for zero-width characters that could be used for homoglyph attacks
|
|
89112
|
-
const zeroWidthChars = /[\u200B-\u200D\uFEFF\u2060]/;
|
|
89113
|
-
if (zeroWidthChars.test(name)) {
|
|
89114
|
-
throw new errors_1.ValidationError(`Invalid ENS domain format: ${name}. Zero-width characters are not allowed in ENS names.`);
|
|
89115
|
-
}
|
|
89116
|
-
// Basic domain name validation - ENS supports many characters including emojis
|
|
89117
|
-
// Must have at least one dot and proper structure
|
|
89118
|
-
// Allow any character except dots, and ensure proper domain structure
|
|
89119
|
-
const domainRegex = /^[^.]+\.[^.]+(\.[^.]+)*$/;
|
|
89120
|
-
if (!domainRegex.test(name)) {
|
|
89121
|
-
throw new errors_1.ValidationError(`Invalid ENS domain format: ${name}. Must be a valid domain name with at least one TLD (e.g., example.eth, mysite.com, gallery.art).`);
|
|
89122
|
-
}
|
|
89123
|
-
// Check for invalid patterns
|
|
89124
|
-
if (name.includes('..') || name.startsWith('.') || name.endsWith('.')) {
|
|
89125
|
-
throw new errors_1.ValidationError(`Invalid ENS domain format: ${name}. Cannot have consecutive dots or start/end with dots.`);
|
|
89126
|
-
}
|
|
89127
|
-
// Check length constraints (ENS has some practical limits)
|
|
89128
|
-
if (name.length > 253) {
|
|
89129
|
-
throw new errors_1.ValidationError(`ENS domain name too long: ${name}. Maximum length is 253 characters.`);
|
|
89130
|
-
}
|
|
89131
|
-
// Check individual label lengths (max 63 characters per label)
|
|
89132
|
-
const labels = name.split('.');
|
|
89133
|
-
for (const label of labels) {
|
|
89134
|
-
if (label.length === 0) {
|
|
89135
|
-
throw new errors_1.ValidationError(`Invalid ENS domain format: ${name}. Empty labels are not allowed.`);
|
|
89136
|
-
}
|
|
89137
|
-
if (label.length > 63) {
|
|
89138
|
-
throw new errors_1.ValidationError(`Invalid ENS domain format: ${name}. Label '${label}' exceeds 63 character limit.`);
|
|
89139
|
-
}
|
|
89140
|
-
}
|
|
89141
|
-
};
|
|
89142
|
-
exports$1.validateEnsName = validateEnsName;
|
|
89143
|
-
/**
|
|
89144
|
-
* Validates that a string is a properly formatted ENS subname.
|
|
89145
|
-
* A subname must have at least one label before the parent domain.
|
|
89146
|
-
* Supports all ENS-compatible TLDs (.eth, .com, .art, .xyz, etc.).
|
|
89147
|
-
*
|
|
89148
|
-
* @param subname - The subname to validate (e.g., 'alice.example.eth', 'app.mysite.com')
|
|
89149
|
-
* @throws {ValidationError} When the subname format is invalid
|
|
89150
|
-
*
|
|
89151
|
-
* @example
|
|
89152
|
-
* ```typescript
|
|
89153
|
-
* import { validateSubname } from '@thenamespace/offchain-manager';
|
|
89154
|
-
*
|
|
89155
|
-
* validateSubname('alice.example.eth'); // ✅ Valid
|
|
89156
|
-
* validateSubname('app.mysite.com'); // ✅ Valid
|
|
89157
|
-
* validateSubname('user.gallery.art'); // ✅ Valid
|
|
89158
|
-
* validateSubname('app.subdomain.example.eth'); // ✅ Valid
|
|
89159
|
-
* validateSubname('example.eth'); // ❌ Throws ValidationError (not a subname, just 2 parts)
|
|
89160
|
-
* validateSubname('.example.eth'); // ❌ Throws ValidationError (empty label)
|
|
89161
|
-
* ```
|
|
89162
|
-
*/
|
|
89163
|
-
const validateSubname = (subname) => {
|
|
89164
|
-
if (!subname || typeof subname !== 'string') {
|
|
89165
|
-
throw new errors_1.ValidationError('Subname must be a non-empty string');
|
|
89166
|
-
}
|
|
89167
|
-
// Normalize to lowercase for validation
|
|
89168
|
-
const normalizedSubname = subname.toLowerCase();
|
|
89169
|
-
// Subname should be in format: label.parent.tld (minimum 3 parts)
|
|
89170
|
-
const parts = normalizedSubname.split('.');
|
|
89171
|
-
if (parts.length < 3) {
|
|
89172
|
-
throw new errors_1.ValidationError(`Invalid subname format: ${subname}. Expected format: label.parent.tld (e.g., alice.example.eth, app.mysite.com)`);
|
|
89173
|
-
}
|
|
89174
|
-
const label = parts[0];
|
|
89175
|
-
if (!label || label.length === 0) {
|
|
89176
|
-
throw new errors_1.ValidationError('Subname label cannot be empty');
|
|
89177
|
-
}
|
|
89178
|
-
// Validate the parent domain (everything after the first label)
|
|
89179
|
-
const parent = parts.slice(1).join('.');
|
|
89180
|
-
(0, exports$1.validateEnsName)(parent);
|
|
89181
|
-
};
|
|
89182
|
-
exports$1.validateSubname = validateSubname;
|
|
89183
|
-
/**
|
|
89184
|
-
* Validates that an address is properly formatted for the specified blockchain network.
|
|
89185
|
-
* Each blockchain has its own address format and validation rules.
|
|
89186
|
-
*
|
|
89187
|
-
* @param address - The wallet address to validate
|
|
89188
|
-
* @param chain - The blockchain network this address belongs to
|
|
89189
|
-
* @throws {ValidationError} When the address format is invalid for the specified chain
|
|
89190
|
-
*
|
|
89191
|
-
* @example
|
|
89192
|
-
* ```typescript
|
|
89193
|
-
* import { validateAddress, ChainName } from '@thenamespace/offchain-manager';
|
|
89194
|
-
*
|
|
89195
|
-
* // Ethereum-style addresses (40 hex characters)
|
|
89196
|
-
* validateAddress('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', ChainName.Ethereum); // ✅
|
|
89197
|
-
* validateAddress('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', ChainName.Base); // ✅
|
|
89198
|
-
*
|
|
89199
|
-
* // Solana addresses (base58 encoded)
|
|
89200
|
-
* validateAddress('9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', ChainName.Solana); // ✅
|
|
89201
|
-
*
|
|
89202
|
-
* // NEAR addresses (.near suffix)
|
|
89203
|
-
* validateAddress('alice.near', ChainName.Near); // ✅
|
|
89204
|
-
*
|
|
89205
|
-
* // Invalid examples
|
|
89206
|
-
* validateAddress('invalid', ChainName.Ethereum); // ❌ Throws ValidationError
|
|
89207
|
-
* validateAddress('0x123', ChainName.Ethereum); // ❌ Throws ValidationError (too short)
|
|
89208
|
-
* ```
|
|
89209
|
-
*/
|
|
89210
|
-
const validateAddress = (address, chain) => {
|
|
89211
|
-
if (!address || typeof address !== 'string') {
|
|
89212
|
-
throw new errors_1.ValidationError('Address must be a non-empty string');
|
|
89213
|
-
}
|
|
89214
|
-
// Basic address validation based on chain
|
|
89215
|
-
switch (chain) {
|
|
89216
|
-
case dto_1.ChainName.Ethereum:
|
|
89217
|
-
case dto_1.ChainName.Default:
|
|
89218
|
-
case dto_1.ChainName.Arbitrum:
|
|
89219
|
-
case dto_1.ChainName.Optimism:
|
|
89220
|
-
case dto_1.ChainName.Base:
|
|
89221
|
-
case dto_1.ChainName.Polygon:
|
|
89222
|
-
case dto_1.ChainName.Bsc:
|
|
89223
|
-
case dto_1.ChainName.Avalanche:
|
|
89224
|
-
case dto_1.ChainName.Gnosis:
|
|
89225
|
-
case dto_1.ChainName.Zksync:
|
|
89226
|
-
case dto_1.ChainName.Linea:
|
|
89227
|
-
case dto_1.ChainName.Scroll:
|
|
89228
|
-
case dto_1.ChainName.Unichain:
|
|
89229
|
-
case dto_1.ChainName.Berachain:
|
|
89230
|
-
case dto_1.ChainName.WorldChain:
|
|
89231
|
-
case dto_1.ChainName.Zora:
|
|
89232
|
-
case dto_1.ChainName.Celo:
|
|
89233
|
-
case dto_1.ChainName.Monad:
|
|
89234
|
-
case dto_1.ChainName.Push:
|
|
89235
|
-
// Ethereum-style addresses (EVM chains)
|
|
89236
|
-
if (!/^0x[a-fA-F0-9]{40}$/.test(address)) {
|
|
89237
|
-
throw new errors_1.ValidationError(`Invalid Ethereum-style address: ${address}`);
|
|
89238
|
-
}
|
|
89239
|
-
break;
|
|
89240
|
-
case dto_1.ChainName.Starknet:
|
|
89241
|
-
// Starknet addresses are up to 64 hex characters (leading zeros can be omitted)
|
|
89242
|
-
if (!/^0x[a-fA-F0-9]{1,64}$/.test(address)) {
|
|
89243
|
-
throw new errors_1.ValidationError(`Invalid Starknet address: ${address}`);
|
|
89244
|
-
}
|
|
89245
|
-
break;
|
|
89246
|
-
case dto_1.ChainName.Solana:
|
|
89247
|
-
// Solana addresses are base58 encoded, typically 32-44 characters
|
|
89248
|
-
if (!/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(address)) {
|
|
89249
|
-
throw new errors_1.ValidationError(`Invalid Solana address: ${address}`);
|
|
89250
|
-
}
|
|
89251
|
-
break;
|
|
89252
|
-
case dto_1.ChainName.Bitcoin:
|
|
89253
|
-
// Bitcoin addresses - supports Legacy (P2PKH), Script (P2SH), Bech32 (P2WPKH/P2WSH), and Taproot (P2TR)
|
|
89254
|
-
const bitcoinRegex = /^([13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[a-z0-9]{39,59})$/;
|
|
89255
|
-
if (!bitcoinRegex.test(address)) {
|
|
89256
|
-
throw new errors_1.ValidationError(`Invalid Bitcoin address: ${address}`);
|
|
89257
|
-
}
|
|
89258
|
-
break;
|
|
89259
|
-
case dto_1.ChainName.Cosmos:
|
|
89260
|
-
// Cosmos addresses use bech32 format with 'cosmos' prefix
|
|
89261
|
-
if (!/^cosmos1[a-z0-9]{38}$/.test(address)) {
|
|
89262
|
-
throw new errors_1.ValidationError(`Invalid Cosmos address: ${address}`);
|
|
89263
|
-
}
|
|
89264
|
-
break;
|
|
89265
|
-
case dto_1.ChainName.Near:
|
|
89266
|
-
// NEAR addresses: either implicit (64 hex chars) or named accounts ending with .near
|
|
89267
|
-
const nearImplicit = /^[a-f0-9]{64}$/;
|
|
89268
|
-
const nearNamed = /^[a-z0-9._-]+\.near$/;
|
|
89269
|
-
if (!nearImplicit.test(address) && !nearNamed.test(address)) {
|
|
89270
|
-
throw new errors_1.ValidationError(`Invalid NEAR address: ${address}`);
|
|
89271
|
-
}
|
|
89272
|
-
break;
|
|
89273
|
-
case dto_1.ChainName.Sui:
|
|
89274
|
-
// Sui addresses are up to 64 hex characters (leading zeros can be omitted)
|
|
89275
|
-
if (!/^0x[a-fA-F0-9]{1,64}$/.test(address)) {
|
|
89276
|
-
throw new errors_1.ValidationError(`Invalid Sui address: ${address}`);
|
|
89277
|
-
}
|
|
89278
|
-
break;
|
|
89279
|
-
case dto_1.ChainName.Aptos:
|
|
89280
|
-
// Aptos addresses are up to 64 hex characters (leading zeros can be omitted)
|
|
89281
|
-
if (!/^0x[a-fA-F0-9]{1,64}$/.test(address)) {
|
|
89282
|
-
throw new errors_1.ValidationError(`Invalid Aptos address: ${address}`);
|
|
89283
|
-
}
|
|
89284
|
-
break;
|
|
89285
|
-
case dto_1.ChainName.Algorand:
|
|
89286
|
-
// Algorand addresses are 58-character Base32 strings (A-Z, 2-7)
|
|
89287
|
-
if (!/^[A-Z2-7]{58}$/.test(address)) {
|
|
89288
|
-
throw new errors_1.ValidationError(`Invalid Algorand address: ${address}`);
|
|
89289
|
-
}
|
|
89290
|
-
break;
|
|
89291
|
-
default:
|
|
89292
|
-
throw new errors_1.ValidationError(`Unsupported chain: ${chain}`);
|
|
89293
|
-
}
|
|
89294
|
-
};
|
|
89295
|
-
exports$1.validateAddress = validateAddress;
|
|
89296
|
-
/**
|
|
89297
|
-
* Validates that an API key appears to be in the correct format.
|
|
89298
|
-
* This performs basic sanity checks but doesn't verify the key with the server.
|
|
89299
|
-
*
|
|
89300
|
-
* @param apiKey - The API key to validate
|
|
89301
|
-
* @throws {ValidationError} When the API key format appears invalid
|
|
89302
|
-
*
|
|
89303
|
-
* @example
|
|
89304
|
-
* ```typescript
|
|
89305
|
-
* import { validateApiKey } from '@thenamespace/offchain-manager';
|
|
89306
|
-
*
|
|
89307
|
-
* validateApiKey('ns-123fcc-1126-1234-1234-c63047985fe2'); // ✅ Valid format
|
|
89308
|
-
* validateApiKey('short'); // ❌ Throws ValidationError (too short)
|
|
89309
|
-
* validateApiKey(''); // ❌ Throws ValidationError (empty)
|
|
89310
|
-
* ```
|
|
89311
|
-
*/
|
|
89312
|
-
const validateApiKey = (apiKey) => {
|
|
89313
|
-
if (!apiKey || typeof apiKey !== 'string') {
|
|
89314
|
-
throw new errors_1.ValidationError('API key must be a non-empty string');
|
|
89315
|
-
}
|
|
89316
|
-
if (apiKey.length < 10) {
|
|
89317
|
-
throw new errors_1.ValidationError('API key appears to be too short');
|
|
89318
|
-
}
|
|
89319
|
-
};
|
|
89320
|
-
exports$1.validateApiKey = validateApiKey;
|
|
89321
|
-
} (validation));
|
|
89322
|
-
return validation;
|
|
89323
|
-
}
|
|
89324
|
-
|
|
89325
|
-
var hasRequiredDist;
|
|
89326
|
-
|
|
89327
|
-
function requireDist () {
|
|
89328
|
-
if (hasRequiredDist) return dist;
|
|
89329
|
-
hasRequiredDist = 1;
|
|
89330
|
-
(function (exports$1) {
|
|
89331
|
-
/**
|
|
89332
|
-
* @fileoverview Namespace SDK - Offchain Manager
|
|
89333
|
-
*
|
|
89334
|
-
* A TypeScript SDK for managing ENS subnames off-chain using the Namespace API.
|
|
89335
|
-
* This library provides a simple interface for creating, updating, deleting, and querying
|
|
89336
|
-
* ENS subnames and their associated records (addresses, text records, metadata).
|
|
89337
|
-
*
|
|
89338
|
-
* Supports all ENS-compatible domains including:
|
|
89339
|
-
* - Native ENS domains (.eth)
|
|
89340
|
-
* - Imported web2 domains (.com, .org, .net, etc.)
|
|
89341
|
-
* - Alternative TLDs (.art, .xyz, .club, etc.)
|
|
89342
|
-
*
|
|
89343
|
-
* @example
|
|
89344
|
-
* ```typescript
|
|
89345
|
-
* import { createOffchainClient, ChainName } from '@thenamespace/offchain-manager';
|
|
89346
|
-
*
|
|
89347
|
-
* // Initialize client with API key inline
|
|
89348
|
-
* const client = createOffchainClient({
|
|
89349
|
-
* mode: 'sepolia',
|
|
89350
|
-
* defaultApiKey: 'your-address-based-api-key'
|
|
89351
|
-
* });
|
|
89352
|
-
*
|
|
89353
|
-
* // Create a subname
|
|
89354
|
-
* await client.createSubname({
|
|
89355
|
-
* parentName: 'example.eth',
|
|
89356
|
-
* label: 'alice',
|
|
89357
|
-
* addresses: [{ chain: ChainName.Ethereum, value: '0x...' }],
|
|
89358
|
-
* texts: [{ key: 'com.twitter', value: 'alice' }]
|
|
89359
|
-
* });
|
|
89360
|
-
* ```
|
|
89361
|
-
*
|
|
89362
|
-
* @author Namespace Team
|
|
89363
|
-
* @version 3.0.6
|
|
89364
|
-
* @license MIT
|
|
89365
|
-
*/
|
|
89366
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
89367
|
-
exports$1.RateLimitError = exports$1.SubnameAlreadyExistsError = exports$1.SubnameNotFoundError = exports$1.ValidationError = exports$1.AuthenticationError = exports$1.NamespaceSDKError = exports$1.validateApiKey = exports$1.validateAddress = exports$1.validateSubname = exports$1.validateEnsName = exports$1.getCoinType = exports$1.ChainName = exports$1.createOffchainClient = void 0;
|
|
89368
|
-
// Core client exports
|
|
89369
|
-
var offchain_client_1 = requireOffchainClient();
|
|
89370
|
-
Object.defineProperty(exports$1, "createOffchainClient", { enumerable: true, get: function () { return offchain_client_1.createOffchainClient; } });
|
|
89371
|
-
// Data transfer objects
|
|
89372
|
-
var dto_1 = requireDto();
|
|
89373
|
-
Object.defineProperty(exports$1, "ChainName", { enumerable: true, get: function () { return dto_1.ChainName; } });
|
|
89374
|
-
Object.defineProperty(exports$1, "getCoinType", { enumerable: true, get: function () { return dto_1.getCoinType; } });
|
|
89375
|
-
// Validation utilities (for advanced usage)
|
|
89376
|
-
var validation_1 = requireValidation();
|
|
89377
|
-
Object.defineProperty(exports$1, "validateEnsName", { enumerable: true, get: function () { return validation_1.validateEnsName; } });
|
|
89378
|
-
Object.defineProperty(exports$1, "validateSubname", { enumerable: true, get: function () { return validation_1.validateSubname; } });
|
|
89379
|
-
Object.defineProperty(exports$1, "validateAddress", { enumerable: true, get: function () { return validation_1.validateAddress; } });
|
|
89380
|
-
Object.defineProperty(exports$1, "validateApiKey", { enumerable: true, get: function () { return validation_1.validateApiKey; } });
|
|
89381
|
-
// Error classes (for error handling)
|
|
89382
|
-
var errors_1 = requireErrors();
|
|
89383
|
-
Object.defineProperty(exports$1, "NamespaceSDKError", { enumerable: true, get: function () { return errors_1.NamespaceSDKError; } });
|
|
89384
|
-
Object.defineProperty(exports$1, "AuthenticationError", { enumerable: true, get: function () { return errors_1.AuthenticationError; } });
|
|
89385
|
-
Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return errors_1.ValidationError; } });
|
|
89386
|
-
Object.defineProperty(exports$1, "SubnameNotFoundError", { enumerable: true, get: function () { return errors_1.SubnameNotFoundError; } });
|
|
89387
|
-
Object.defineProperty(exports$1, "SubnameAlreadyExistsError", { enumerable: true, get: function () { return errors_1.SubnameAlreadyExistsError; } });
|
|
89388
|
-
Object.defineProperty(exports$1, "RateLimitError", { enumerable: true, get: function () { return errors_1.RateLimitError; } });
|
|
89389
|
-
} (dist));
|
|
89390
|
-
return dist;
|
|
89391
|
-
}
|
|
89392
|
-
|
|
89393
|
-
var distExports = requireDist();
|
|
89394
|
-
|
|
89395
88279
|
const useOffchainManager = (name, apiKeyOrToken, isTestnet = false) => {
|
|
89396
88280
|
const client = useMemo(() => {
|
|
89397
88281
|
const key = { [name]: apiKeyOrToken };
|
|
89398
|
-
return
|
|
88282
|
+
return createOffchainClient({
|
|
89399
88283
|
domainApiKeys: key,
|
|
89400
88284
|
mode: isTestnet ? "sepolia" : "mainnet"
|
|
89401
88285
|
});
|
|
@@ -89422,19 +88306,19 @@ const getAvatarUploadErrorMessage = (err) => {
|
|
|
89422
88306
|
};
|
|
89423
88307
|
const getImageUploadErrorMessage = (err, imageType = "avatar") => {
|
|
89424
88308
|
const defaultFailedMessage = imageType === "avatar" ? "Failed to upload avatar." : "Failed to upload header image.";
|
|
89425
|
-
if (err instanceof distExports$
|
|
88309
|
+
if (err instanceof distExports$2.AvatarSDKError) {
|
|
89426
88310
|
switch (err.code) {
|
|
89427
|
-
case distExports$
|
|
88311
|
+
case distExports$2.ErrorCodes.MISSING_PROVIDER:
|
|
89428
88312
|
return imageType === "avatar" ? "Please connect your wallet to upload avatar." : "Please connect your wallet to upload header image.";
|
|
89429
|
-
case distExports$
|
|
88313
|
+
case distExports$2.ErrorCodes.NOT_SUBNAME_OWNER:
|
|
89430
88314
|
return "You do not own this ENS name.";
|
|
89431
|
-
case distExports$
|
|
88315
|
+
case distExports$2.ErrorCodes.FILE_TOO_LARGE:
|
|
89432
88316
|
return "Image is too large.";
|
|
89433
|
-
case distExports$
|
|
88317
|
+
case distExports$2.ErrorCodes.INVALID_FILE_TYPE:
|
|
89434
88318
|
return "Unsupported image type.";
|
|
89435
|
-
case distExports$
|
|
88319
|
+
case distExports$2.ErrorCodes.EXPIRED_NONCE:
|
|
89436
88320
|
return "Signature expired. Please try again.";
|
|
89437
|
-
case distExports$
|
|
88321
|
+
case distExports$2.ErrorCodes.INVALID_SIGNATURE:
|
|
89438
88322
|
return "Wallet signature verification failed.";
|
|
89439
88323
|
default:
|
|
89440
88324
|
return err.message || defaultFailedMessage;
|
|
@@ -89466,7 +88350,7 @@ const useAvatarClient = ({ isTestnet, domain }) => {
|
|
|
89466
88350
|
};
|
|
89467
88351
|
}, [walletClient, address, fallbackChainId]);
|
|
89468
88352
|
const client = useMemo(() => {
|
|
89469
|
-
return distExports$
|
|
88353
|
+
return distExports$2.createAvatarClient({
|
|
89470
88354
|
network: isTestnet ? "sepolia" : "mainnet",
|
|
89471
88355
|
domain: resolvedDomain,
|
|
89472
88356
|
provider
|
|
@@ -89585,13 +88469,13 @@ const IMAGE_UPLOAD_MODAL_LOG_PREFIX = "[ImageUploadModal]";
|
|
|
89585
88469
|
const IMAGE_CONFIG = {
|
|
89586
88470
|
avatar: {
|
|
89587
88471
|
label: "avatar",
|
|
89588
|
-
maxSize: distExports$
|
|
88472
|
+
maxSize: distExports$2.AVATAR_MAX_SIZE,
|
|
89589
88473
|
cropAspect: 1,
|
|
89590
88474
|
cropShape: "round"
|
|
89591
88475
|
},
|
|
89592
88476
|
header: {
|
|
89593
88477
|
label: "header",
|
|
89594
|
-
maxSize: distExports$
|
|
88478
|
+
maxSize: distExports$2.HEADER_MAX_SIZE,
|
|
89595
88479
|
cropAspect: 3,
|
|
89596
88480
|
cropShape: "rect"
|
|
89597
88481
|
}
|
|
@@ -89661,7 +88545,7 @@ const ImageUploadModal = ({
|
|
|
89661
88545
|
setUploadProgress(0);
|
|
89662
88546
|
}, [isOpen]);
|
|
89663
88547
|
const acceptedTypes = useMemo(() => {
|
|
89664
|
-
return distExports$
|
|
88548
|
+
return distExports$2.ALLOWED_FORMATS.join(",");
|
|
89665
88549
|
}, []);
|
|
89666
88550
|
const openFilePicker = () => {
|
|
89667
88551
|
if (!fileInputRef.current) {
|
|
@@ -89675,7 +88559,7 @@ const ImageUploadModal = ({
|
|
|
89675
88559
|
return;
|
|
89676
88560
|
}
|
|
89677
88561
|
setError(null);
|
|
89678
|
-
if (!distExports$
|
|
88562
|
+
if (!distExports$2.ALLOWED_FORMATS.includes(file.type)) {
|
|
89679
88563
|
setError(
|
|
89680
88564
|
"Unsupported file type. Please use JPEG, PNG, GIF, WebP, or SVG."
|
|
89681
88565
|
);
|
|
@@ -90635,16 +89519,40 @@ const TransactionPendingScreen = ({
|
|
|
90635
89519
|
return () => clearInterval(int);
|
|
90636
89520
|
}, [progressStep, isCompleted]);
|
|
90637
89521
|
return /* @__PURE__ */ jsxs("div", { className: "ns-text-center", children: [
|
|
90638
|
-
/* @__PURE__ */ jsxs(Text, { weight: "
|
|
89522
|
+
/* @__PURE__ */ jsxs(Text, { weight: "bold", size: "lg", children: [
|
|
90639
89523
|
"Transaction ",
|
|
90640
89524
|
!isCompleted ? "in Progress" : "Completed!"
|
|
90641
89525
|
] }),
|
|
90642
89526
|
/* @__PURE__ */ jsx(Text, { color: "grey", size: "xs", className: "mt-2", children: message || "Your transaction has been sent!" }),
|
|
90643
89527
|
/* @__PURE__ */ jsx(ProgressBar, { progress: progressStep }),
|
|
90644
|
-
/* @__PURE__ */
|
|
90645
|
-
"
|
|
90646
|
-
|
|
90647
|
-
|
|
89528
|
+
/* @__PURE__ */ jsxs(
|
|
89529
|
+
"a",
|
|
89530
|
+
{
|
|
89531
|
+
href: getBlockExplorerTransactionUrl(effectiveChainId, hash),
|
|
89532
|
+
target: "_blank",
|
|
89533
|
+
rel: "noopener noreferrer",
|
|
89534
|
+
style: {
|
|
89535
|
+
display: "inline-flex",
|
|
89536
|
+
alignItems: "center",
|
|
89537
|
+
gap: 6,
|
|
89538
|
+
marginTop: 12,
|
|
89539
|
+
padding: "6px 14px",
|
|
89540
|
+
borderRadius: 999,
|
|
89541
|
+
border: "1px solid var(--ns-color-border)",
|
|
89542
|
+
background: "var(--ns-color-bg-secondary, var(--ns-color-bg))",
|
|
89543
|
+
textDecoration: "none",
|
|
89544
|
+
color: "var(--ns-color-text-secondary)",
|
|
89545
|
+
fontSize: 12,
|
|
89546
|
+
fontWeight: 500,
|
|
89547
|
+
transition: "border-color 0.15s, color 0.15s"
|
|
89548
|
+
},
|
|
89549
|
+
children: [
|
|
89550
|
+
/* @__PURE__ */ jsx(Icon, { name: "globe", size: 13 }),
|
|
89551
|
+
"View on ",
|
|
89552
|
+
getBlockExplorerName(effectiveChainId)
|
|
89553
|
+
]
|
|
89554
|
+
}
|
|
89555
|
+
)
|
|
90648
89556
|
] });
|
|
90649
89557
|
};
|
|
90650
89558
|
|
|
@@ -92029,7 +90937,6 @@ const EnsNameRegistrationForm = (props) => {
|
|
|
92029
90937
|
isTaken: false
|
|
92030
90938
|
});
|
|
92031
90939
|
const [showProfile, setShowProfile] = useState(false);
|
|
92032
|
-
const { address } = useAccount();
|
|
92033
90940
|
const [ensRecordTemplate, setEnsRecordsTemplate] = useState({
|
|
92034
90941
|
addresses: [],
|
|
92035
90942
|
texts: []
|
|
@@ -92041,7 +90948,7 @@ const EnsNameRegistrationForm = (props) => {
|
|
|
92041
90948
|
const hasRecordsDifference = useMemo(() => {
|
|
92042
90949
|
return getEnsRecordsDiff(ensRecords, ensRecordTemplate).isDifferent;
|
|
92043
90950
|
}, [ensRecords, ensRecordTemplate]);
|
|
92044
|
-
const [successData, setSuccessData] = useState(
|
|
90951
|
+
const [successData, setSuccessData] = useState();
|
|
92045
90952
|
const handleSaveRecords = () => {
|
|
92046
90953
|
setEnsRecords(deepCopy(ensRecordTemplate));
|
|
92047
90954
|
setShowProfile(false);
|
|
@@ -93450,6 +92357,8 @@ const SubnameMintForm = ({
|
|
|
93450
92357
|
label,
|
|
93451
92358
|
isTestnet,
|
|
93452
92359
|
avatarUploadDomain,
|
|
92360
|
+
title,
|
|
92361
|
+
subtitle,
|
|
93453
92362
|
onCancel,
|
|
93454
92363
|
onSuccess,
|
|
93455
92364
|
onSubnameMinted,
|
|
@@ -93520,6 +92429,8 @@ const SubnameMintForm = ({
|
|
|
93520
92429
|
isL2: initState.isL2,
|
|
93521
92430
|
isExpirable: initState.isExpirable || false,
|
|
93522
92431
|
avatarUploadDomain,
|
|
92432
|
+
title,
|
|
92433
|
+
subtitle,
|
|
93523
92434
|
onCancel,
|
|
93524
92435
|
onSuccess,
|
|
93525
92436
|
onSubnameMinted,
|
|
@@ -93543,6 +92454,8 @@ const SubnameMintFormContent = ({
|
|
|
93543
92454
|
isL2,
|
|
93544
92455
|
isExpirable = false,
|
|
93545
92456
|
avatarUploadDomain,
|
|
92457
|
+
title,
|
|
92458
|
+
subtitle,
|
|
93546
92459
|
onCancel,
|
|
93547
92460
|
onSuccess,
|
|
93548
92461
|
onSubnameMinted,
|
|
@@ -93976,7 +92889,10 @@ const SubnameMintFormContent = ({
|
|
|
93976
92889
|
);
|
|
93977
92890
|
}
|
|
93978
92891
|
return /* @__PURE__ */ jsxs("div", { style: { padding: 15 }, children: [
|
|
93979
|
-
/* @__PURE__ */
|
|
92892
|
+
/* @__PURE__ */ jsxs("div", { className: "ns-text-center mb-3", children: [
|
|
92893
|
+
/* @__PURE__ */ jsx(Text, { weight: "bold", size: "lg", children: title || "Get Your Web3 Username" }),
|
|
92894
|
+
subtitle && /* @__PURE__ */ jsx(Text, { color: "grey", size: "sm", className: "mt-1", children: subtitle })
|
|
92895
|
+
] }),
|
|
93980
92896
|
/* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsx(
|
|
93981
92897
|
NameAvailabilityInput,
|
|
93982
92898
|
{
|
|
@@ -94037,79 +92953,6 @@ const SubnameMintFormContent = ({
|
|
|
94037
92953
|
] });
|
|
94038
92954
|
};
|
|
94039
92955
|
|
|
94040
|
-
const coinTypeToChainName = (_coinType) => {
|
|
94041
|
-
const chainNames = Object.values(distExports.ChainName);
|
|
94042
|
-
for (const chainName of chainNames) {
|
|
94043
|
-
try {
|
|
94044
|
-
const coinType = distExports.getCoinType(chainName);
|
|
94045
|
-
if (_coinType === coinType || convertEVMChainIdToCoinType(coinType) === _coinType) {
|
|
94046
|
-
return chainName;
|
|
94047
|
-
}
|
|
94048
|
-
} catch (e) {
|
|
94049
|
-
continue;
|
|
94050
|
-
}
|
|
94051
|
-
}
|
|
94052
|
-
return null;
|
|
94053
|
-
};
|
|
94054
|
-
const parseContenthash = (contenthash) => {
|
|
94055
|
-
if (!contenthash) return void 0;
|
|
94056
|
-
for (const record of supportedContenthashRecords) {
|
|
94057
|
-
if (contenthash.startsWith(record.protocolPrefix)) {
|
|
94058
|
-
const value = contenthash.substring(record.protocolPrefix.length);
|
|
94059
|
-
return {
|
|
94060
|
-
protocol: record.protocol,
|
|
94061
|
-
value
|
|
94062
|
-
};
|
|
94063
|
-
}
|
|
94064
|
-
}
|
|
94065
|
-
if (contenthash.startsWith("Qm") || contenthash.startsWith("bafy")) {
|
|
94066
|
-
return {
|
|
94067
|
-
protocol: ContenthashProtocol.Ipfs,
|
|
94068
|
-
value: contenthash
|
|
94069
|
-
};
|
|
94070
|
-
}
|
|
94071
|
-
return void 0;
|
|
94072
|
-
};
|
|
94073
|
-
const offchainRecordsToEnsRecords = (subname) => {
|
|
94074
|
-
const ensRecords = {
|
|
94075
|
-
addresses: [],
|
|
94076
|
-
texts: []
|
|
94077
|
-
};
|
|
94078
|
-
if (subname.texts) {
|
|
94079
|
-
Object.keys(subname.texts).forEach((key) => {
|
|
94080
|
-
ensRecords.texts.push({ key, value: subname.texts[key] });
|
|
94081
|
-
});
|
|
94082
|
-
}
|
|
94083
|
-
if (subname.addresses) {
|
|
94084
|
-
Object.keys(subname.addresses).forEach((keyStr) => {
|
|
94085
|
-
const keyNum = parseInt(keyStr, 10);
|
|
94086
|
-
const value = subname.addresses[keyStr];
|
|
94087
|
-
if (isNaN(keyNum) || !value) return;
|
|
94088
|
-
let coinType;
|
|
94089
|
-
if (keyNum >= 2147483648) {
|
|
94090
|
-
coinType = keyNum;
|
|
94091
|
-
} else {
|
|
94092
|
-
const evmChain = supportedAddresses.find(
|
|
94093
|
-
(addr) => addr.chainId === keyNum && addr.isEMV
|
|
94094
|
-
);
|
|
94095
|
-
if (evmChain) {
|
|
94096
|
-
coinType = convertEVMChainIdToCoinType(keyNum);
|
|
94097
|
-
} else {
|
|
94098
|
-
coinType = keyNum;
|
|
94099
|
-
}
|
|
94100
|
-
}
|
|
94101
|
-
ensRecords.addresses.push({ coinType, value });
|
|
94102
|
-
});
|
|
94103
|
-
}
|
|
94104
|
-
if (subname.contenthash) {
|
|
94105
|
-
const parsedContenthash = parseContenthash(subname.contenthash);
|
|
94106
|
-
if (parsedContenthash) {
|
|
94107
|
-
ensRecords.contenthash = parsedContenthash;
|
|
94108
|
-
}
|
|
94109
|
-
}
|
|
94110
|
-
return ensRecords;
|
|
94111
|
-
};
|
|
94112
|
-
|
|
94113
92956
|
const SuccessScreen = ({ fullSubname, isUpdateMode, onContinue }) => {
|
|
94114
92957
|
const actionText = isUpdateMode ? "updated" : "created";
|
|
94115
92958
|
return /* @__PURE__ */ jsx("div", { className: "ns-offchain-subname-form", children: /* @__PURE__ */ jsx("div", { style: { padding: 15 }, children: /* @__PURE__ */ jsxs("div", { className: "ns-text-center", children: [
|
|
@@ -94139,15 +92982,16 @@ const SuccessScreen = ({ fullSubname, isUpdateMode, onContinue }) => {
|
|
|
94139
92982
|
] }) }) });
|
|
94140
92983
|
};
|
|
94141
92984
|
|
|
94142
|
-
const FormHeader = ({ isUpdateMode, label, parentName, showFullName }) => {
|
|
94143
|
-
const
|
|
92985
|
+
const FormHeader = ({ isUpdateMode, label, parentName, showFullName, title, subtitle }) => {
|
|
92986
|
+
const defaultTitle = isUpdateMode ? "Update subname" : "Create subname";
|
|
94144
92987
|
return /* @__PURE__ */ jsxs("div", { className: "ns-text-center mb-3", children: [
|
|
94145
|
-
/* @__PURE__ */ jsx(Text, { size: "
|
|
92988
|
+
/* @__PURE__ */ jsx(Text, { size: "lg", weight: "bold", className: "mb-1", children: title ?? defaultTitle }),
|
|
94146
92989
|
showFullName && /* @__PURE__ */ jsxs(Text, { size: "lg", weight: "bold", children: [
|
|
94147
92990
|
label,
|
|
94148
92991
|
".",
|
|
94149
92992
|
parentName
|
|
94150
|
-
] })
|
|
92993
|
+
] }),
|
|
92994
|
+
subtitle && /* @__PURE__ */ jsx(Text, { size: "sm", color: "grey", className: "mt-1", children: subtitle })
|
|
94151
92995
|
] });
|
|
94152
92996
|
};
|
|
94153
92997
|
|
|
@@ -94233,6 +93077,79 @@ const useOwnerValidation = () => {
|
|
|
94233
93077
|
};
|
|
94234
93078
|
};
|
|
94235
93079
|
|
|
93080
|
+
const coinTypeToChainName = (_coinType) => {
|
|
93081
|
+
const chainNames = Object.values(ChainName);
|
|
93082
|
+
for (const chainName of chainNames) {
|
|
93083
|
+
try {
|
|
93084
|
+
const coinType = getCoinType(chainName);
|
|
93085
|
+
if (_coinType === coinType || convertEVMChainIdToCoinType(coinType) === _coinType) {
|
|
93086
|
+
return chainName;
|
|
93087
|
+
}
|
|
93088
|
+
} catch (e) {
|
|
93089
|
+
continue;
|
|
93090
|
+
}
|
|
93091
|
+
}
|
|
93092
|
+
return null;
|
|
93093
|
+
};
|
|
93094
|
+
const parseContenthash = (contenthash) => {
|
|
93095
|
+
if (!contenthash) return void 0;
|
|
93096
|
+
for (const record of supportedContenthashRecords) {
|
|
93097
|
+
if (contenthash.startsWith(record.protocolPrefix)) {
|
|
93098
|
+
const value = contenthash.substring(record.protocolPrefix.length);
|
|
93099
|
+
return {
|
|
93100
|
+
protocol: record.protocol,
|
|
93101
|
+
value
|
|
93102
|
+
};
|
|
93103
|
+
}
|
|
93104
|
+
}
|
|
93105
|
+
if (contenthash.startsWith("Qm") || contenthash.startsWith("bafy")) {
|
|
93106
|
+
return {
|
|
93107
|
+
protocol: ContenthashProtocol.Ipfs,
|
|
93108
|
+
value: contenthash
|
|
93109
|
+
};
|
|
93110
|
+
}
|
|
93111
|
+
return void 0;
|
|
93112
|
+
};
|
|
93113
|
+
const offchainRecordsToEnsRecords = (subname) => {
|
|
93114
|
+
const ensRecords = {
|
|
93115
|
+
addresses: [],
|
|
93116
|
+
texts: []
|
|
93117
|
+
};
|
|
93118
|
+
if (subname.texts) {
|
|
93119
|
+
Object.keys(subname.texts).forEach((key) => {
|
|
93120
|
+
ensRecords.texts.push({ key, value: subname.texts[key] });
|
|
93121
|
+
});
|
|
93122
|
+
}
|
|
93123
|
+
if (subname.addresses) {
|
|
93124
|
+
Object.keys(subname.addresses).forEach((keyStr) => {
|
|
93125
|
+
const keyNum = parseInt(keyStr, 10);
|
|
93126
|
+
const value = subname.addresses[keyStr];
|
|
93127
|
+
if (isNaN(keyNum) || !value) return;
|
|
93128
|
+
let coinType;
|
|
93129
|
+
if (keyNum >= 2147483648) {
|
|
93130
|
+
coinType = keyNum;
|
|
93131
|
+
} else {
|
|
93132
|
+
const evmChain = supportedAddresses.find(
|
|
93133
|
+
(addr) => addr.chainId === keyNum && addr.isEMV
|
|
93134
|
+
);
|
|
93135
|
+
if (evmChain) {
|
|
93136
|
+
coinType = convertEVMChainIdToCoinType(keyNum);
|
|
93137
|
+
} else {
|
|
93138
|
+
coinType = keyNum;
|
|
93139
|
+
}
|
|
93140
|
+
}
|
|
93141
|
+
ensRecords.addresses.push({ coinType, value });
|
|
93142
|
+
});
|
|
93143
|
+
}
|
|
93144
|
+
if (subname.contenthash) {
|
|
93145
|
+
const parsedContenthash = parseContenthash(subname.contenthash);
|
|
93146
|
+
if (parsedContenthash) {
|
|
93147
|
+
ensRecords.contenthash = parsedContenthash;
|
|
93148
|
+
}
|
|
93149
|
+
}
|
|
93150
|
+
return ensRecords;
|
|
93151
|
+
};
|
|
93152
|
+
|
|
94236
93153
|
const useSubnameChecker = (client, parentName) => {
|
|
94237
93154
|
const [isLoadingSubname, setIsLoadingSubname] = useState(false);
|
|
94238
93155
|
const [error, setError] = useState(null);
|
|
@@ -94301,16 +93218,19 @@ const buildSubnameRequest = (ensRecords, ownerAddress) => {
|
|
|
94301
93218
|
|
|
94302
93219
|
const MIN_ENS_LEN = 1;
|
|
94303
93220
|
const OffchainSubnameForm = ({
|
|
94304
|
-
|
|
93221
|
+
offchainManager,
|
|
94305
93222
|
name,
|
|
94306
93223
|
label: propLabel,
|
|
93224
|
+
title,
|
|
93225
|
+
subtitle,
|
|
94307
93226
|
hideTitle = false,
|
|
94308
93227
|
isTestnet,
|
|
94309
93228
|
avatarUploadDomain,
|
|
94310
93229
|
onCancel,
|
|
94311
|
-
|
|
93230
|
+
onSubnameCreated,
|
|
93231
|
+
onSubnameUpdated
|
|
94312
93232
|
}) => {
|
|
94313
|
-
const client =
|
|
93233
|
+
const client = offchainManager;
|
|
94314
93234
|
const [label, setLabel] = useState(propLabel || "");
|
|
94315
93235
|
const [showProfile, setShowProfile] = useState(false);
|
|
94316
93236
|
const [createStep, setCreateStep] = useState("form" /* Form */);
|
|
@@ -94433,18 +93353,21 @@ const OffchainSubnameForm = ({
|
|
|
94433
93353
|
}
|
|
94434
93354
|
}
|
|
94435
93355
|
const requestData = buildSubnameRequest(ensRecords, ownerAddress);
|
|
93356
|
+
const data = {
|
|
93357
|
+
label,
|
|
93358
|
+
parentName: name,
|
|
93359
|
+
fullSubname: `${label}.${name}`,
|
|
93360
|
+
addresses: requestData.addresses,
|
|
93361
|
+
texts: requestData.texts,
|
|
93362
|
+
owner: requestData.owner
|
|
93363
|
+
};
|
|
94436
93364
|
if (isUpdateMode) {
|
|
94437
|
-
|
|
94438
|
-
await client.updateSubname(fullSubname, requestData);
|
|
93365
|
+
await onSubnameUpdated?.(data);
|
|
94439
93366
|
} else {
|
|
94440
|
-
|
|
94441
|
-
parentName: name,
|
|
94442
|
-
label,
|
|
94443
|
-
...requestData
|
|
94444
|
-
};
|
|
94445
|
-
await client.createSubname(createRequest);
|
|
93367
|
+
await onSubnameCreated?.(data);
|
|
94446
93368
|
}
|
|
94447
|
-
|
|
93369
|
+
setSuccessData(data);
|
|
93370
|
+
setCreateStep("success" /* Success */);
|
|
94448
93371
|
} catch (err) {
|
|
94449
93372
|
console.error("Create/Update error:", err);
|
|
94450
93373
|
setCreateError(err?.message || `Failed to ${isUpdateMode ? "update" : "create"} subname`);
|
|
@@ -94452,27 +93375,6 @@ const OffchainSubnameForm = ({
|
|
|
94452
93375
|
setIsCreating(false);
|
|
94453
93376
|
}
|
|
94454
93377
|
};
|
|
94455
|
-
const refreshSubnameData = async () => {
|
|
94456
|
-
const fullSubname = `${label}.${name}`;
|
|
94457
|
-
const updatedSubname = await client.getSingleSubname(fullSubname);
|
|
94458
|
-
const latestRecords = updatedSubname ? offchainRecordsToEnsRecords(updatedSubname) : ensRecords;
|
|
94459
|
-
setBaselineRecords(deepCopy(latestRecords));
|
|
94460
|
-
setEnsRecords(latestRecords);
|
|
94461
|
-
setEnsRecordsTemplate(deepCopy(latestRecords));
|
|
94462
|
-
const latestOwner = updatedSubname?.owner || (ownerAddress && ownerAddress.trim() !== "" ? ownerAddress : "");
|
|
94463
|
-
setInitialOwner(latestOwner);
|
|
94464
|
-
setOwnerAddress(latestOwner);
|
|
94465
|
-
const data = {
|
|
94466
|
-
label,
|
|
94467
|
-
parentName: name,
|
|
94468
|
-
fullSubname: `${label}.${name}`,
|
|
94469
|
-
records: latestRecords,
|
|
94470
|
-
ownerAddress: latestOwner || void 0
|
|
94471
|
-
};
|
|
94472
|
-
setSuccessData(data);
|
|
94473
|
-
setCreateStep("success" /* Success */);
|
|
94474
|
-
onSuccess?.(data);
|
|
94475
|
-
};
|
|
94476
93378
|
const handleCreateAnother = () => {
|
|
94477
93379
|
setSuccessData(null);
|
|
94478
93380
|
setCreateError(null);
|
|
@@ -94533,7 +93435,9 @@ const OffchainSubnameForm = ({
|
|
|
94533
93435
|
isUpdateMode,
|
|
94534
93436
|
label,
|
|
94535
93437
|
parentName: name,
|
|
94536
|
-
showFullName
|
|
93438
|
+
showFullName,
|
|
93439
|
+
title,
|
|
93440
|
+
subtitle
|
|
94537
93441
|
}
|
|
94538
93442
|
),
|
|
94539
93443
|
/* @__PURE__ */ jsx(
|
|
@@ -94629,5 +93533,5 @@ const useTheme = () => {
|
|
|
94629
93533
|
return ctx;
|
|
94630
93534
|
};
|
|
94631
93535
|
|
|
94632
|
-
export { Accordion, Alert, Button, Card, ChainIcon, ConnectAndSetChain, ContenthashIcon, ContenthashProtocol, ContractErrorLabel, Dropdown, ENS_RESOLVER_ABI, EnsNameRegistrationForm, EnsRecordsForm, Icon, Input, ListingNetwork, ListingType, MULTICALL, Modal, OffchainSubnameForm, PricingDisplay, ProfileHeader, ProgressBar, SET_ADDRESS_FUNC, SET_CONTENTHASH_FUNC, SET_TEXT_FUNC, SelectRecordsForm, ShurikenSpinner, SubnameMintForm, Text, TextRecordCategory, Textarea, ThemeProvider, Tooltip, TxProgress, capitalize, convertEVMChainIdToCoinType, convertToMulticallResolverData, convertToResolverData, createEnsReferer, debounce, deepCopy, diffToEnsRecords, ensureFloatInput, equalsIgnoreCase, formatFloat, getAvatarUploadErrorMessage, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerName, getBlockExplorerTransactionUrl, getChainIdForListingNetwork, getEnsAppUrl, getEnsRecordsDiff, getImageUploadErrorMessage, getSupportedAddressByChainId, getSupportedAddressByCoin, getSupportedAddressByName, getSupportedAddressMap, getSupportedChashByProtocol, getSupportedText, isCommitmentToNewErr, isContenthashValid, isUserDeniedError, supportedAddresses, supportedContenthashRecords, supportedTexts, useAvatarClient, useENSResolver, useMintManager, useMintSubname, useOffchainManager, useRegisterENS, useTheme, useWaitTransaction, validateEnsRecords, wait };
|
|
93536
|
+
export { Accordion, Alert, Button, Card, ChainIcon, ConnectAndSetChain, ContenthashIcon, ContenthashProtocol, ContractErrorLabel, Dropdown, ENS_RESOLVER_ABI, EnsNameRegistrationForm, EnsRecordsForm, Icon, Input, ListingNetwork, ListingType, MULTICALL, Modal, OffchainSubnameForm, PricingDisplay, ProfileHeader, ProgressBar, SET_ADDRESS_FUNC, SET_CONTENTHASH_FUNC, SET_TEXT_FUNC, SelectRecordsForm, ShurikenSpinner, SubnameMintForm, Text, TextRecordCategory, Textarea, ThemeProvider, Tooltip, TransactionPendingScreen, TxProgress, capitalize, convertEVMChainIdToCoinType, convertToMulticallResolverData, convertToResolverData, createEnsReferer, debounce, deepCopy, diffToEnsRecords, ensureFloatInput, equalsIgnoreCase, formatFloat, getAvatarUploadErrorMessage, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerName, getBlockExplorerTransactionUrl, getChainIdForListingNetwork, getEnsAppUrl, getEnsRecordsDiff, getImageUploadErrorMessage, getSupportedAddressByChainId, getSupportedAddressByCoin, getSupportedAddressByName, getSupportedAddressMap, getSupportedChashByProtocol, getSupportedText, isCommitmentToNewErr, isContenthashValid, isUserDeniedError, supportedAddresses, supportedContenthashRecords, supportedTexts, useAvatarClient, useENSResolver, useMintManager, useMintSubname, useOffchainManager, useRegisterENS, useTheme, useWaitTransaction, validateEnsRecords, wait };
|
|
94633
93537
|
//# sourceMappingURL=index.js.map
|