@tria-sdk/constants 5.2.3 → 5.2.4

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.
@@ -1,19 +1,19 @@
1
1
 
2
- > @tria-sdk/constants@5.2.3 build /home/runner/work/tria-monorepo/tria-monorepo/packages/constants
2
+ > @tria-sdk/constants@5.2.4 build /home/runner/work/tria-monorepo/tria-monorepo/packages/constants
3
3
  > rimraf dist && npm run build:cjs && npm run build:esm && npm run build:types
4
4
 
5
5
  npm warn ignoring workspace config at /home/runner/work/tria-monorepo/tria-monorepo/packages/constants/.npmrc
6
6
 
7
- > @tria-sdk/constants@5.2.3 build:cjs
7
+ > @tria-sdk/constants@5.2.4 build:cjs
8
8
  > tsc -p tsconfig.cjs.json
9
9
 
10
10
  npm warn ignoring workspace config at /home/runner/work/tria-monorepo/tria-monorepo/packages/constants/.npmrc
11
11
 
12
- > @tria-sdk/constants@5.2.3 build:esm
12
+ > @tria-sdk/constants@5.2.4 build:esm
13
13
  > tsc -p tsconfig.json
14
14
 
15
15
  npm warn ignoring workspace config at /home/runner/work/tria-monorepo/tria-monorepo/packages/constants/.npmrc
16
16
 
17
- > @tria-sdk/constants@5.2.3 build:types
17
+ > @tria-sdk/constants@5.2.4 build:types
18
18
  > tsc -p tsconfig.json --emitDeclarationOnly --declarationDir dist/types
19
19
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.chainNameToLogoBlackAverageColor = exports.chainNameToLogoBlack = exports.chainNameToLogoAverageColor = exports.chainNameToLogo = exports.networks = exports.ALLCHAINS = exports.AA_SUPPORTED_EVM_CHAINS = exports.GAS_ABS_ENABLED_CHAINS = exports.SUPPORTED_EVM_CHAINS = exports.TESTNET_CHAINS = exports.injectiveTestnet = exports.injective = exports.solanaDevnet = exports.skaleTestnet = exports.vanarTestnet = exports.polygonAmoy = exports.sepolia = exports.neoxTestnet = exports.bitlayerMainnet = exports.bitlayerTestnet = exports.zkLinkTestnet = exports.zkLink = exports.skale = exports.eosg = exports.imx = exports.xlayer = exports.berachainBartio = exports.oasys = exports.saakuru = exports.baseTestnet = exports.base = exports.matChainTestnet = exports.matChain = exports.fuseSpark = exports.fuse = exports.ethereum = exports.polygon = exports.mumbai = void 0;
3
+ exports.nativeTokenIdMap = exports.getCoingeckoPlatformIdFromChainName = exports.chainNameToLogoBlackAverageColor = exports.chainNameToLogoBlack = exports.chainNameToLogoAverageColor = exports.chainNameToLogo = exports.networks = exports.ALLCHAINS = exports.EIP7702_ENABLED_CHAINS = exports.AA_SUPPORTED_EVM_CHAINS = exports.GAS_ABS_ENABLED_CHAINS = exports.SUPPORTED_EVM_CHAINS = exports.TESTNET_CHAINS = exports.avalanche = exports.optimism = exports.arbitrum = exports.binance = exports.injectiveTestnet = exports.injective = exports.solana = exports.solanaDevnet = exports.skaleTestnet = exports.vanarTestnet = exports.polygonAmoy = exports.sepolia = exports.neoxTestnet = exports.bitlayerMainnet = exports.bitlayerTestnet = exports.zkLinkTestnet = exports.zkLink = exports.sei = exports.skale = exports.eosg = exports.imx = exports.xlayer = exports.berachainBartio = exports.oasys = exports.saakuru = exports.baseTestnet = exports.base = exports.matChainTestnet = exports.matChain = exports.fuseSpark = exports.fuse = exports.ethereum = exports.polygon = exports.mumbai = void 0;
4
4
  exports.mumbai = "MUMBAI";
5
5
  exports.polygon = "POLYGON";
6
6
  exports.ethereum = "ETH";
@@ -17,6 +17,7 @@ exports.xlayer = "XLAYER";
17
17
  exports.imx = "IMX";
18
18
  exports.eosg = "EOSG";
19
19
  exports.skale = "SKALE";
20
+ exports.sei = "SEI";
20
21
  exports.zkLink = "ZKLINK-NOVA";
21
22
  exports.zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
22
23
  exports.bitlayerTestnet = "BITLAYER-TESTNET";
@@ -27,8 +28,13 @@ exports.polygonAmoy = "AMOY";
27
28
  exports.vanarTestnet = "VANGUARD-VANAR-TESTNET";
28
29
  exports.skaleTestnet = "SKALE-TESTNET";
29
30
  exports.solanaDevnet = "SOLANA-DEVNET";
31
+ exports.solana = "SOLANA";
30
32
  exports.injective = "INJECTIVE";
31
33
  exports.injectiveTestnet = "INJECTIVE-TESTNET";
34
+ exports.binance = "BINANCE";
35
+ exports.arbitrum = "ARBITRUM";
36
+ exports.optimism = "OPTIMISM";
37
+ exports.avalanche = "AVALANCHE";
32
38
  exports.TESTNET_CHAINS = [
33
39
  exports.sepolia,
34
40
  "MUMBAI",
@@ -49,13 +55,13 @@ exports.TESTNET_CHAINS = [
49
55
  exports.berachainBartio,
50
56
  ];
51
57
  exports.SUPPORTED_EVM_CHAINS = [
52
- "ETH",
53
- "POLYGON",
54
- "AVALANCHE",
55
- "ARBITRUM",
56
- "BINANCE",
57
- "OPTIMISM",
58
- "FANTOM",
58
+ exports.ethereum,
59
+ exports.polygon,
60
+ exports.avalanche,
61
+ exports.arbitrum,
62
+ exports.binance,
63
+ exports.optimism,
64
+ // "FANTOM",
59
65
  "FUSE",
60
66
  "FUSESPARK",
61
67
  "MUMBAI",
@@ -85,27 +91,28 @@ exports.SUPPORTED_EVM_CHAINS = [
85
91
  exports.imx,
86
92
  exports.eosg,
87
93
  exports.skale,
94
+ exports.sei,
88
95
  ];
89
- exports.GAS_ABS_ENABLED_CHAINS = [exports.sepolia, "POLYGON"];
96
+ exports.GAS_ABS_ENABLED_CHAINS = [exports.sepolia, exports.polygon];
90
97
  exports.AA_SUPPORTED_EVM_CHAINS = [
91
- "ARBITRUM",
92
- "POLYGON",
93
- "BINANCE",
98
+ exports.arbitrum,
99
+ exports.polygon,
94
100
  "MUMBAI",
95
- exports.sepolia,
96
- "OPTIMISM",
97
- "AVALANCHE",
101
+ exports.binance,
102
+ exports.optimism,
103
+ exports.avalanche,
98
104
  "MANTLE",
99
- "BASE",
105
+ exports.base,
100
106
  ];
107
+ exports.EIP7702_ENABLED_CHAINS = [exports.sepolia, exports.binance];
101
108
  exports.ALLCHAINS = [
102
- "ETH",
103
- "POLYGON",
104
- "AVALANCHE",
105
- "ARBITRUM",
106
- "BINANCE",
107
- "OPTIMISM",
108
- "FANTOM",
109
+ exports.ethereum,
110
+ exports.polygon,
111
+ exports.avalanche,
112
+ exports.arbitrum,
113
+ exports.binance,
114
+ exports.optimism,
115
+ // "FANTOM",
109
116
  "FUSE",
110
117
  "FUSESPARK",
111
118
  "MUMBAI",
@@ -116,7 +123,7 @@ exports.ALLCHAINS = [
116
123
  "METIS-TESTNET",
117
124
  "MANTLE",
118
125
  "MANTLE-TESTNET",
119
- "SOLANA",
126
+ exports.solana,
120
127
  exports.solanaDevnet,
121
128
  exports.zkLink,
122
129
  exports.zkLinkTestnet,
@@ -139,12 +146,13 @@ exports.ALLCHAINS = [
139
146
  exports.imx,
140
147
  exports.eosg,
141
148
  exports.skale,
149
+ exports.sei,
142
150
  ];
143
151
  const baseLogoUrl = "https://static.tria.so/chain-logo-w";
144
152
  const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
145
153
  exports.networks = [
146
154
  {
147
- chainName: "ETH",
155
+ chainName: exports.ethereum,
148
156
  logo: `${baseLogoUrl}/Ethereum.webp`,
149
157
  type: "mainnet",
150
158
  },
@@ -153,13 +161,13 @@ exports.networks = [
153
161
  logo: `${baseLogoUrl}/Ethereum.webp`,
154
162
  type: "testnet",
155
163
  },
164
+ // {
165
+ // chainName: "FANTOM",
166
+ // logo: `${baseLogoUrl}/Fantom.webp`,
167
+ // type: "mainnet",
168
+ // },
156
169
  {
157
- chainName: "FANTOM",
158
- logo: `${baseLogoUrl}/Fantom.webp`,
159
- type: "mainnet",
160
- },
161
- {
162
- chainName: "POLYGON",
170
+ chainName: exports.polygon,
163
171
  logo: `${baseLogoUrl}/Polygon.svg`,
164
172
  type: "mainnet",
165
173
  },
@@ -169,17 +177,17 @@ exports.networks = [
169
177
  type: "testnet",
170
178
  },
171
179
  {
172
- chainName: "AVALANCHE",
180
+ chainName: exports.avalanche,
173
181
  logo: `${baseLogoUrl}/Avalanche.webp`,
174
182
  type: "mainnet",
175
183
  },
176
184
  {
177
- chainName: "OPTIMISM",
185
+ chainName: exports.optimism,
178
186
  logo: `${baseLogoUrl}/Optimism.webp`,
179
187
  type: "mainnet",
180
188
  },
181
189
  {
182
- chainName: "ARBITRUM",
190
+ chainName: exports.arbitrum,
183
191
  logo: `${baseLogoUrl}/Arbitrum.webp`,
184
192
  type: "mainnet",
185
193
  },
@@ -199,7 +207,7 @@ exports.networks = [
199
207
  type: "testnet",
200
208
  },
201
209
  {
202
- chainName: "BINANCE",
210
+ chainName: exports.binance,
203
211
  logo: `${baseLogoUrl}/Binance.svg`,
204
212
  type: "mainnet",
205
213
  },
@@ -238,7 +246,7 @@ exports.networks = [
238
246
  type: "testnet",
239
247
  },
240
248
  {
241
- chainName: "SOLANA",
249
+ chainName: exports.solana,
242
250
  logo: `${baseLogoUrl}/Solana.webp`,
243
251
  type: "mainnet",
244
252
  },
@@ -347,28 +355,33 @@ exports.networks = [
347
355
  logo: `${baseLogoUrl}/skale.webp`,
348
356
  type: "mainnet",
349
357
  },
358
+ {
359
+ chainName: exports.sei,
360
+ logo: `${baseLogoUrl}/Sei.webp`,
361
+ type: "mainnet",
362
+ },
350
363
  ];
351
364
  exports.chainNameToLogo = {
352
- ETH: `${baseLogoUrl}/Ethereum.webp`,
365
+ [exports.ethereum]: `${baseLogoUrl}/Ethereum.webp`,
353
366
  [exports.sepolia]: `${baseLogoUrl}/Ethereum.webp`,
354
- FANTOM: `${baseLogoUrl}/Fantom.webp`,
355
- POLYGON: `${baseLogoUrl}/Polygon.webp`,
367
+ // FANTOM: `${baseLogoUrl}/Fantom.webp`,
368
+ [exports.polygon]: `${baseLogoUrl}/Polygon.webp`,
356
369
  [exports.polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
357
- AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
358
- OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
359
- ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
370
+ [exports.avalanche]: `${baseLogoUrl}/Avalanche.webp`,
371
+ [exports.optimism]: `${baseLogoUrl}/Optimism.webp`,
372
+ [exports.arbitrum]: `${baseLogoUrl}/Arbitrum.webp`,
360
373
  LINEA: `${baseLogoUrl}/Linea.webp`,
361
374
  MUMBAI: `${baseLogoUrl}/Polygon.webp`,
362
375
  FUSE: `${baseLogoUrl}/Fuse.webp`,
363
376
  FUSESPARK: `${baseLogoUrl}/Fuse.webp`,
364
- BINANCE: `${baseLogoUrl}/Binance.svg`,
377
+ [exports.binance]: `${baseLogoUrl}/Binance.svg`,
365
378
  MANTA: `${baseLogoUrl}/Manta.webp`,
366
379
  "MANTA-TESTNET": `${baseLogoUrl}/Manta.webp`,
367
380
  METIS: `${baseLogoUrl}/Metis.webp`,
368
381
  "METIS-TESTNET": `${baseLogoUrl}/Metis.webp`,
369
382
  MANTLE: `${baseLogoUrl}/Mantle.webp`,
370
383
  "MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
371
- SOLANA: `${baseLogoUrl}/Solana.webp`,
384
+ [exports.solana]: `${baseLogoUrl}/Solana.webp`,
372
385
  [exports.solanaDevnet]: `${baseLogoUrl}/Solana.webp`,
373
386
  [exports.zkLink]: `${baseLogoUrl}/zklink.webp`,
374
387
  [exports.zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
@@ -390,17 +403,18 @@ exports.chainNameToLogo = {
390
403
  [exports.imx]: `${baseLogoUrl}/IMX.webp`,
391
404
  [exports.eosg]: `${baseLogoUrl}/EOSG.webp`,
392
405
  [exports.skale]: `${baseLogoUrl}/skale.webp`,
406
+ [exports.sei]: `${baseLogoUrl}/Sei.webp`,
393
407
  };
394
408
  exports.chainNameToLogoAverageColor = {
395
- ETH: "rgba(98,126,235,0.7)",
396
- POLYGON: "rgba(131,69,231,0.7)",
409
+ [exports.ethereum]: "rgba(98,126,235,0.7)",
410
+ [exports.polygon]: "rgba(131,69,231,0.7)",
397
411
  SEPOLIA: "rgba(98,126,235,0.7)",
398
- FANTOM: "rgba(19,181,235,0.7)",
412
+ // FANTOM: "rgba(19,181,235,0.7)",
399
413
  AMOY: "rgba(131,69,231,0.7)",
400
- AVALANCHE: "rgba(232,65,67,0.7)",
401
- ARBITRUM: "rgba(17,170,255,0.7)",
402
- OPTIMISM: "rgba(255,5,32,0.7)",
403
- LINEA: "UNDETERMINED",
414
+ [exports.avalanche]: "rgba(232,65,67,0.7)",
415
+ [exports.arbitrum]: "rgba(17,170,255,0.7)",
416
+ [exports.optimism]: "rgba(255,5,32,0.7)",
417
+ LINEA: "rgba(51,51,51,0.7)",
404
418
  MUMBAI: "rgba(131,69,231,0.7)",
405
419
  FUSESPARK: "rgba(180,249,185,0.7)",
406
420
  FUSE: "rgba(180,249,185,0.7)",
@@ -408,26 +422,42 @@ exports.chainNameToLogoAverageColor = {
408
422
  "MANTA-TESTNET": "rgba(98,126,235,0.7)",
409
423
  "METIS-TESTNET": "rgba(18,171,225,0.7)",
410
424
  METIS: "rgba(18,171,225,0.7)",
411
- SOLANA: "UNDETERMINED",
412
- "MANTLE-TESTNET": "UNDETERMINED",
413
- MANTLE: "UNDETERMINED",
425
+ [exports.solana]: "rgba(20,241,149,0.7)",
426
+ "MANTLE-TESTNET": "rgba(66,66,66,0.7)",
427
+ MANTLE: "rgba(66,66,66,0.7)",
414
428
  "BITLAYER-TESTNET": "rgba(226,110,26,0.7)",
415
- "ZKLINK-NOVA": "UNDETERMINED",
416
- "ZKLINK-NOVA-TESTNET": "UNDETERMINED",
429
+ "ZKLINK-NOVA": "rgba(63,81,181,0.7)",
430
+ "ZKLINK-NOVA-TESTNET": "rgba(63,81,181,0.7)",
417
431
  "NEOX-TESTNET": "rgba(1,229,155,0.7)",
418
432
  "VANGUARD-VANAR-TESTNET": "rgba(71, 51, 147,0.7)",
419
- BINANCE: "rgba(240,185,11,0.7)",
433
+ [exports.binance]: "rgba(240,185,11,0.7)",
434
+ [exports.base]: "rgba(0,82,255,0.7)",
435
+ [exports.bitlayerMainnet]: "rgba(226,110,26,0.7)",
436
+ [exports.injective]: "rgba(40,44,52,0.7)",
437
+ [exports.matChain]: "rgba(98,126,235,0.7)",
438
+ [exports.saakuru]: "rgba(98,73,227,0.7)",
439
+ [exports.oasys]: "rgba(20,175,125,0.7)",
440
+ [exports.xlayer]: "rgba(30,143,217,0.7)",
441
+ [exports.imx]: "rgba(86,35,180,0.7)",
442
+ [exports.eosg]: "rgba(0,0,0,0.7)",
443
+ [exports.skale]: "rgba(72,138,240,0.7)",
444
+ [exports.solanaDevnet]: "rgba(20,241,149,0.7)",
445
+ [exports.skaleTestnet]: "rgba(72,138,240,0.7)",
446
+ [exports.injectiveTestnet]: "rgba(40,44,52,0.7)",
447
+ [exports.matChainTestnet]: "rgba(98,126,235,0.7)",
448
+ [exports.baseTestnet]: "rgba(0,82,255,0.7)",
449
+ [exports.berachainBartio]: "rgba(252,186,3,0.7)",
420
450
  };
421
451
  exports.chainNameToLogoBlack = {
422
- ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
452
+ [exports.ethereum]: `${baseLogoUrlBlack}/Ethereum.webp`,
423
453
  [exports.sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
424
- BINANCE: `${baseLogoUrlBlack}/binance.svg`,
425
- FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
426
- POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
454
+ [exports.binance]: `${baseLogoUrlBlack}/binance.svg`,
455
+ // FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
456
+ [exports.polygon]: `${baseLogoUrlBlack}/Polygon.webp`,
427
457
  [exports.polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
428
- AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
429
- OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
430
- ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
458
+ [exports.avalanche]: `${baseLogoUrlBlack}/Avalanche.webp`,
459
+ [exports.optimism]: `${baseLogoUrlBlack}/Optimism.webp`,
460
+ [exports.arbitrum]: `${baseLogoUrlBlack}/Arbitrum.webp`,
431
461
  LINEA: `${baseLogoUrlBlack}/Linea.webp`,
432
462
  MUMBAI: `${baseLogoUrlBlack}/Polygon.webp`,
433
463
  FUSE: `${baseLogoUrlBlack}/fuse.webp`,
@@ -438,7 +468,7 @@ exports.chainNameToLogoBlack = {
438
468
  "METIS-TESTNET": `${baseLogoUrlBlack}/Metis.webp`,
439
469
  MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
440
470
  "MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
441
- SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
471
+ [exports.solana]: `${baseLogoUrlBlack}/Solana.webp`,
442
472
  [exports.solanaDevnet]: `${baseLogoUrlBlack}/Solana.webp`,
443
473
  [exports.zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
444
474
  [exports.zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
@@ -460,23 +490,24 @@ exports.chainNameToLogoBlack = {
460
490
  [exports.imx]: `${baseLogoUrlBlack}/IMX.webp`,
461
491
  [exports.eosg]: `${baseLogoUrlBlack}/EOSG.webp`,
462
492
  [exports.skale]: `${baseLogoUrlBlack}/skale.webp`,
493
+ [exports.sei]: `${baseLogoUrlBlack}/Sei.webp`,
463
494
  };
464
495
  exports.chainNameToLogoBlackAverageColor = {
465
- FANTOM: [
466
- { color: "rgb(255,255,255)", count: 25004 },
467
- { color: "rgb(132,132,132)", count: 3219 },
468
- { color: "rgb(143,143,143)", count: 2392 },
469
- { color: "rgb(114,114,114)", count: 2283 },
470
- { color: "rgb(254,254,254)", count: 2250 },
471
- ],
472
- POLYGON: [
496
+ // FANTOM: [
497
+ // { color: "rgb(255,255,255)", count: 25004 },
498
+ // { color: "rgb(132,132,132)", count: 3219 },
499
+ // { color: "rgb(143,143,143)", count: 2392 },
500
+ // { color: "rgb(114,114,114)", count: 2283 },
501
+ // { color: "rgb(254,254,254)", count: 2250 },
502
+ // ],
503
+ [exports.polygon]: [
473
504
  { color: "rgb(255,255,255)", count: 26414 },
474
505
  { color: "rgb(132,132,132)", count: 3390 },
475
506
  { color: "rgb(128,128,128)", count: 2783 },
476
507
  { color: "rgb(125,125,125)", count: 2448 },
477
508
  { color: "rgb(118,118,118)", count: 2387 },
478
509
  ],
479
- ETH: [
510
+ [exports.ethereum]: [
480
511
  { color: "rgb(255,255,255)", count: 23340 },
481
512
  { color: "rgb(132,132,132)", count: 2559 },
482
513
  { color: "rgb(111,111,111)", count: 2372 },
@@ -497,14 +528,14 @@ exports.chainNameToLogoBlackAverageColor = {
497
528
  { color: "rgb(125,125,125)", count: 2448 },
498
529
  { color: "rgb(118,118,118)", count: 2387 },
499
530
  ],
500
- ARBITRUM: [
531
+ [exports.arbitrum]: [
501
532
  { color: "rgb(255,255,255)", count: 37899 },
502
533
  { color: "rgb(143,143,143)", count: 2422 },
503
534
  { color: "rgb(111,111,111)", count: 2106 },
504
535
  { color: "rgb(105,105,105)", count: 1930 },
505
536
  { color: "rgb(254,254,254)", count: 1913 },
506
537
  ],
507
- OPTIMISM: [
538
+ [exports.optimism]: [
508
539
  { color: "rgb(255,255,255)", count: 27023 },
509
540
  { color: "rgb(132,132,132)", count: 3031 },
510
541
  { color: "rgb(111,111,111)", count: 2578 },
@@ -518,7 +549,7 @@ exports.chainNameToLogoBlackAverageColor = {
518
549
  { color: "rgb(118,118,118)", count: 2815 },
519
550
  { color: "rgb(143,143,143)", count: 2740 },
520
551
  ],
521
- AVALANCHE: [
552
+ [exports.avalanche]: [
522
553
  { color: "rgb(255,255,255)", count: 28225 },
523
554
  { color: "rgb(132,132,132)", count: 3609 },
524
555
  { color: "rgb(111,111,111)", count: 2934 },
@@ -574,7 +605,7 @@ exports.chainNameToLogoBlackAverageColor = {
574
605
  { color: "rgb(124,16,16)", count: 764 },
575
606
  { color: "rgb(16,16,157)", count: 758 },
576
607
  ],
577
- SOLANA: [
608
+ [exports.solana]: [
578
609
  { color: "rgb(255,255,255)", count: 32241 },
579
610
  { color: "rgb(132,132,132)", count: 3455 },
580
611
  { color: "rgb(254,254,254)", count: 2440 },
@@ -630,7 +661,7 @@ exports.chainNameToLogoBlackAverageColor = {
630
661
  { color: "rgb(0,255,255)", count: 2993 },
631
662
  { color: "rgb(255,0,255)", count: 2892 },
632
663
  ],
633
- BINANCE: [
664
+ [exports.binance]: [
634
665
  { color: "rgb(0,0,0)", count: 2614 },
635
666
  { color: "rgb(255,255,255)", count: 1676 },
636
667
  { color: "rgb(15,15,15)", count: 974 },
@@ -638,3 +669,57 @@ exports.chainNameToLogoBlackAverageColor = {
638
669
  { color: "rgb(17,17,17)", count: 56 },
639
670
  ],
640
671
  };
672
+ const getCoingeckoPlatformIdFromChainName = (chainName) => {
673
+ const map = {
674
+ ETH: "ethereum",
675
+ POLYGON: "polygon-pos",
676
+ AVALANCHE: "avalanche",
677
+ OPTIMISM: "optimistic-ethereum",
678
+ ARBITRUM: "arbitrum-one",
679
+ BINANCE: "binance-smart-chain",
680
+ FUSE: "fuse",
681
+ METIS: "metis-andromeda",
682
+ MANTA: "manta",
683
+ MANTLE: "mantle",
684
+ SOLANA: "solana",
685
+ ZKLINK: "zklink",
686
+ BITLAYERMAINNET: "bitlayer",
687
+ INJECTIVE: "injective",
688
+ MATCHAIN: "matchain",
689
+ BASE: "base",
690
+ SAAKURU: "saakuru",
691
+ OASYS: "oasys",
692
+ XLAYER: "xlayer",
693
+ IMX: "immutable-x",
694
+ EOSG: "eos",
695
+ SKALE: "skale",
696
+ SEI: "sei-network",
697
+ };
698
+ return map[chainName.toUpperCase()];
699
+ };
700
+ exports.getCoingeckoPlatformIdFromChainName = getCoingeckoPlatformIdFromChainName;
701
+ exports.nativeTokenIdMap = {
702
+ ETH: "ethereum",
703
+ OPTIMISM: "ethereum",
704
+ ARBITRUM: "ethereum",
705
+ BASE: "ethereum",
706
+ MANTLE: "ethereum",
707
+ METIS: "ethereum",
708
+ ZKLINK: "ethereum",
709
+ XLAYER: "ethereum",
710
+ BITLAYERMAINNET: "ethereum",
711
+ POLYGON: "matic-network",
712
+ AVALANCHE: "avalanche-2",
713
+ FUSE: "fuse-network-token",
714
+ BINANCE: "binancecoin",
715
+ MANTA: "manta-network",
716
+ SOLANA: "solana",
717
+ INJECTIVE: "injective-protocol",
718
+ MATCHAIN: "matchain",
719
+ SAAKURU: "saakuru",
720
+ OASYS: "oasys",
721
+ IMX: "immutable-x",
722
+ EOSG: "eos",
723
+ SKALE: "skale",
724
+ SEI: "sei",
725
+ };
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isGasAbsEnabled = exports.isTestnetChain = exports.isChainSupported = exports.isAaSupportedChain = exports.isEvmChain = exports.prodApiUrl = void 0;
3
+ exports.getChainNameFromAddress = exports.isGasAbsEnabled = exports.isTestnetChain = exports.isChainSupported = exports.isAaSupportedChain = exports.isEvmChain = exports.prodApiUrl = void 0;
4
4
  const chains_1 = require("./chains");
5
5
  exports.prodApiUrl = "https://production.tria.so";
6
+ const solanaRegex = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
7
+ const injectiveRegex = /^inj1[a-zA-Z0-9]{38}$/;
6
8
  const isEvmChain = (chainName) => {
7
9
  return chains_1.SUPPORTED_EVM_CHAINS.includes(chainName) || chainName == "EVM";
8
10
  };
@@ -23,3 +25,26 @@ const isGasAbsEnabled = (chainName) => {
23
25
  return chains_1.GAS_ABS_ENABLED_CHAINS.includes(chainName);
24
26
  };
25
27
  exports.isGasAbsEnabled = isGasAbsEnabled;
28
+ const getChainNameFromAddress = (address) => {
29
+ if (!address) {
30
+ return { isValidAddress: false, chainName: "NONE" };
31
+ }
32
+ const isTriaName = address?.includes("@");
33
+ if (isTriaName) {
34
+ return { isValidAddress: true, chainName: "TRIANAME" };
35
+ }
36
+ const isSolanaAddress = solanaRegex.test(address);
37
+ if (isSolanaAddress) {
38
+ return { isValidAddress: true, chainName: "SOLANA" };
39
+ }
40
+ const isInjectiveAddress = injectiveRegex.test(address);
41
+ if (isInjectiveAddress) {
42
+ return { isValidAddress: true, chainName: "INJECTIVE" };
43
+ }
44
+ const isEvmAddress = address.startsWith("0x");
45
+ if (isEvmAddress) {
46
+ return { isValidAddress: true, chainName: "EVM" };
47
+ }
48
+ return { isValidAddress: false, chainName: "NONE" };
49
+ };
50
+ exports.getChainNameFromAddress = getChainNameFromAddress;
package/dist/cjs/txn.js CHANGED
@@ -11,7 +11,7 @@ exports.explorerBaseUrls = {
11
11
  ARBITRUM: "https://arbiscan.io",
12
12
  BINANCE: "https://bscscan.com",
13
13
  OPTIMISM: "https://optimistic.etherscan.io",
14
- FANTOM: "https://ftmscan.com",
14
+ // FANTOM: "https://ftmscan.com",
15
15
  SOLANA: "https://solscan.io",
16
16
  [chains_1.solanaDevnet]: "https://solscan.io",
17
17
  APTOS: "https://explorer.aptoslabs.com",
@@ -46,6 +46,7 @@ exports.explorerBaseUrls = {
46
46
  [chains_1.imx]: "https://explorer.immutable.com",
47
47
  [chains_1.eosg]: "https://empireofsight-2732633231529000-1.sagaexplorer.io",
48
48
  [chains_1.skale]: "https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com",
49
+ [chains_1.sei]: "https://seitrace.com",
49
50
  };
50
51
  exports.txnBaseUrl = {
51
52
  ETH: `${exports.explorerBaseUrls.ETH}/tx`, // /txHash
@@ -56,7 +57,7 @@ exports.txnBaseUrl = {
56
57
  ARBITRUM: `${exports.explorerBaseUrls.ARBITRUM}/tx`,
57
58
  BINANCE: `${exports.explorerBaseUrls.BINANCE}/tx`,
58
59
  OPTIMISM: `${exports.explorerBaseUrls.OPTIMISM}/tx`,
59
- FANTOM: `${exports.explorerBaseUrls.FANTOM}/tx`,
60
+ // FANTOM: `${explorerBaseUrls.FANTOM}/tx`,
60
61
  FUSE: `${exports.explorerBaseUrls.FUSE}/tx`,
61
62
  FUSESPARK: `${exports.explorerBaseUrls.FUSESPARK}/tx`,
62
63
  MUMBAI: `${exports.explorerBaseUrls.MUMBAI}/tx`,
@@ -88,6 +89,7 @@ exports.txnBaseUrl = {
88
89
  [chains_1.imx]: `${exports.explorerBaseUrls[chains_1.imx]}/tx`,
89
90
  [chains_1.eosg]: `${exports.explorerBaseUrls[chains_1.eosg]}/tx`,
90
91
  [chains_1.skale]: `${exports.explorerBaseUrls[chains_1.skale]}/tx`,
92
+ [chains_1.sei]: `${exports.explorerBaseUrls[chains_1.sei]}/tx`,
91
93
  };
92
94
  exports.nativeTokenDetails = {
93
95
  ETH: {
@@ -130,11 +132,11 @@ exports.nativeTokenDetails = {
130
132
  symbol: "ETH",
131
133
  logoUrl: "https://www.datocms-assets.com/86369/1670347461-optimisim-colour.png",
132
134
  },
133
- FANTOM: {
134
- name: "Fantom",
135
- symbol: "FTM",
136
- logoUrl: "https://www.datocms-assets.com/86369/1669925359-fantom-1.png",
137
- },
135
+ // FANTOM: {
136
+ // name: "Fantom",
137
+ // symbol: "FTM",
138
+ // logoUrl: "https://www.datocms-assets.com/86369/1669925359-fantom-1.png",
139
+ // },
138
140
  FUSE: {
139
141
  name: "Fuse",
140
142
  symbol: "FUSE",
@@ -290,6 +292,11 @@ exports.nativeTokenDetails = {
290
292
  symbol: "sFUEL",
291
293
  logoUrl: "https://assets.coingecko.com/coins/images/13564/standard/SFUEL.png?1696513318",
292
294
  },
295
+ [chains_1.sei]: {
296
+ name: "SEI",
297
+ symbol: "SEI",
298
+ logoUrl: "https://static.tria.so/chain-logo-w/Sei.webp",
299
+ },
293
300
  };
294
301
  const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
295
302
  exports.rpcUrls = {
@@ -302,7 +309,7 @@ exports.rpcUrls = {
302
309
  ARBITRUM: `https://arb-mainnet.g.alchemy.com/v2/${alchemyKey}`, //"https://arbitrum-one.publicnode.com",
303
310
  BINANCE: `https://bnb-mainnet.g.alchemy.com/v2/${alchemyKey}`, //"https://bsc.publicnode.com",
304
311
  OPTIMISM: `https://opt-mainnet.g.alchemy.com/v2/${alchemyKey}`, //"https://optimism.meowrpc.com",
305
- FANTOM: `https://fantom-mainnet.g.alchemy.com/v2/${alchemyKey}`, //"https://fantom.publicnode.com",
312
+ // FANTOM: `https://fantom-mainnet.g.alchemy.com/v2/${alchemyKey}`, //"https://fantom.publicnode.com",
306
313
  FUSE: "https://rpc.fuse.io",
307
314
  FUSESPARK: "https://rpc.fusespark.io",
308
315
  MANTA: "https://1rpc.io/manta",
@@ -329,6 +336,7 @@ exports.rpcUrls = {
329
336
  [chains_1.imx]: "https://rpc.immutable.com",
330
337
  [chains_1.eosg]: "https://empireofsight-2732633231529000-1.jsonrpc.sagarpc.io",
331
338
  [chains_1.skale]: "https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague",
339
+ [chains_1.sei]: `https://sei-mainnet.g.alchemy.com/v2/${alchemyKey}`,
332
340
  };
333
341
  exports.chainNameToChainId = {
334
342
  MUMBAI: 80001,
@@ -340,7 +348,7 @@ exports.chainNameToChainId = {
340
348
  ARBITRUM: 42161,
341
349
  BINANCE: 56,
342
350
  OPTIMISM: 10,
343
- FANTOM: 250,
351
+ // FANTOM: 250,
344
352
  FUSE: 122,
345
353
  FUSESPARK: 123,
346
354
  MANTA: 169,
@@ -367,6 +375,7 @@ exports.chainNameToChainId = {
367
375
  [chains_1.imx]: 13371,
368
376
  [chains_1.eosg]: 2732633231529000,
369
377
  [chains_1.skale]: 1564830818,
378
+ [chains_1.sei]: 1329,
370
379
  };
371
380
  exports.chainIdToChainName = {
372
381
  11155111: chains_1.sepolia,
@@ -378,7 +387,7 @@ exports.chainIdToChainName = {
378
387
  42161: "ARBITRUM",
379
388
  56: "BINANCE",
380
389
  10: "OPTIMISM",
381
- 250: "FANTOM",
390
+ // 250: "FANTOM",
382
391
  122: "FUSE",
383
392
  123: "FUSESPARK",
384
393
  5000: "MANTLE",
@@ -405,4 +414,6 @@ exports.chainIdToChainName = {
405
414
  13371: chains_1.imx,
406
415
  2732633231529000: chains_1.eosg,
407
416
  1564830818: chains_1.skale,
417
+ 1151111081099710: chains_1.solana,
418
+ 1329: chains_1.sei,
408
419
  };