@proton/wrap-constants 0.0.39 → 0.0.43
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/coins.d.ts +9 -1
- package/dist/wrap-constants.cjs.development.js +123 -59
- package/dist/wrap-constants.cjs.development.js.map +1 -1
- package/dist/wrap-constants.cjs.production.min.js +1 -1
- package/dist/wrap-constants.cjs.production.min.js.map +1 -1
- package/dist/wrap-constants.esm.js +123 -59
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/coins.ts +132 -64
package/src/coins.ts
CHANGED
|
@@ -22,6 +22,10 @@ export enum Chains {
|
|
|
22
22
|
HederaTestnet = 'Hedera (Testnet)',
|
|
23
23
|
DogeMainnet = 'Dogecoin',
|
|
24
24
|
CardanoMainnet = 'Cardano',
|
|
25
|
+
AvalancheXChain = 'Avalanche X-Chain',
|
|
26
|
+
AvalancheCChain = 'Avalanche C-Chain',
|
|
27
|
+
PolygonMainnet = 'Polygon',
|
|
28
|
+
TerraMainnet = 'Terra'
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
export enum Networks {
|
|
@@ -88,6 +92,10 @@ export const explorerLinkByChain = {
|
|
|
88
92
|
[Chains.HederaTestnet] : (txid: string) => `https://testnet.dragonglass.me/transactions/${txid}`,
|
|
89
93
|
[Chains.DogeMainnet] : (txid: string) => `https://blockchair.com/dogecoin/transaction/${txid}`,
|
|
90
94
|
[Chains.CardanoMainnet] : (txid: string) => `https://explorer.cardano.org/en/transaction?id=${txid}`,
|
|
95
|
+
[Chains.AvalancheXChain] : (txid: string) => `https://avascan.info/blockchain/x/tx/${txid}`,
|
|
96
|
+
[Chains.AvalancheCChain] : (txid: string) => `https://snowtrace.io/tx/${txid}`,
|
|
97
|
+
[Chains.PolygonMainnet] : (txid: string) => `https://polygonscan.com/tx/${txid}`,
|
|
98
|
+
[Chains.TerraMainnet] : (txid: string) => `https://terra.stake.id/?#/tx/${txid}`,
|
|
91
99
|
}
|
|
92
100
|
|
|
93
101
|
export const initializeCoins = (protonChain: string): {
|
|
@@ -135,7 +143,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
135
143
|
}
|
|
136
144
|
]: []),
|
|
137
145
|
],
|
|
138
|
-
image: '/
|
|
146
|
+
image: 'https://www.protonchain.com/images/tokens/eosio-tokenXPR.png',
|
|
139
147
|
coingeckoId: 'proton'
|
|
140
148
|
},
|
|
141
149
|
{
|
|
@@ -188,7 +196,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
188
196
|
hasWithdrawMemo: false
|
|
189
197
|
}]: [])
|
|
190
198
|
],
|
|
191
|
-
image: '/
|
|
199
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXUSDC.png',
|
|
192
200
|
coingeckoId: 'usd-coin'
|
|
193
201
|
},
|
|
194
202
|
{
|
|
@@ -212,7 +220,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
212
220
|
hasWithdrawMemo: false
|
|
213
221
|
}]: [])
|
|
214
222
|
],
|
|
215
|
-
image: '/
|
|
223
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXMT.png',
|
|
216
224
|
coingeckoId: 'metal'
|
|
217
225
|
},
|
|
218
226
|
{
|
|
@@ -245,7 +253,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
245
253
|
hasWithdrawMemo: false
|
|
246
254
|
}]: [])
|
|
247
255
|
],
|
|
248
|
-
image: '/
|
|
256
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXBTC.png',
|
|
249
257
|
coingeckoId: 'bitcoin'
|
|
250
258
|
},
|
|
251
259
|
{
|
|
@@ -278,24 +286,23 @@ export const initializeCoins = (protonChain: string): {
|
|
|
278
286
|
hasWithdrawMemo: false
|
|
279
287
|
}]: [])
|
|
280
288
|
],
|
|
281
|
-
image: '/
|
|
289
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXETH.png',
|
|
282
290
|
coingeckoId: 'ethereum'
|
|
283
291
|
},
|
|
284
292
|
{
|
|
285
293
|
allowSwap: IS_MAINNET,
|
|
286
294
|
allowBridge: false,
|
|
287
295
|
allowLend: false,
|
|
288
|
-
allowBorrow:
|
|
289
|
-
name: '
|
|
296
|
+
allowBorrow: false,
|
|
297
|
+
name: 'Loan',
|
|
290
298
|
coin: 'LOAN',
|
|
291
299
|
xtokenSymbol: 'LOAN',
|
|
292
300
|
xtokenPrecision: 4,
|
|
293
301
|
xtokenContract: 'loan.token',
|
|
294
302
|
wallets: [],
|
|
295
|
-
image: '/
|
|
303
|
+
image: 'https://www.protonchain.com/images/tokens/loan.tokenLOAN.png',
|
|
296
304
|
coingeckoId: ''
|
|
297
305
|
},
|
|
298
|
-
|
|
299
306
|
{
|
|
300
307
|
allowSwap: IS_MAINNET,
|
|
301
308
|
allowBridge: true,
|
|
@@ -326,7 +333,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
326
333
|
hasWithdrawMemo: false
|
|
327
334
|
}]: [])
|
|
328
335
|
],
|
|
329
|
-
image: '/
|
|
336
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXUSDT.png',
|
|
330
337
|
coingeckoId: 'tether'
|
|
331
338
|
},
|
|
332
339
|
{
|
|
@@ -350,7 +357,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
350
357
|
hasWithdrawMemo: false
|
|
351
358
|
}]: [])
|
|
352
359
|
],
|
|
353
|
-
image: '/
|
|
360
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXTUSD.png',
|
|
354
361
|
coingeckoId: 'true-usd'
|
|
355
362
|
},
|
|
356
363
|
{
|
|
@@ -374,7 +381,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
374
381
|
hasWithdrawMemo: false
|
|
375
382
|
}]: [])
|
|
376
383
|
],
|
|
377
|
-
image: '/
|
|
384
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXPAX.png',
|
|
378
385
|
coingeckoId: 'usdp'
|
|
379
386
|
},
|
|
380
387
|
{
|
|
@@ -407,7 +414,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
407
414
|
hasWithdrawMemo: false
|
|
408
415
|
}]: [])
|
|
409
416
|
],
|
|
410
|
-
image: '/
|
|
417
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXPAXG.png',
|
|
411
418
|
coingeckoId: 'pax-gold'
|
|
412
419
|
},
|
|
413
420
|
{
|
|
@@ -440,7 +447,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
440
447
|
hasWithdrawMemo: false
|
|
441
448
|
}]: [])
|
|
442
449
|
],
|
|
443
|
-
image: '/
|
|
450
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXUNI.png',
|
|
444
451
|
coingeckoId: 'uniswap'
|
|
445
452
|
},
|
|
446
453
|
{
|
|
@@ -464,7 +471,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
464
471
|
hasWithdrawMemo: false
|
|
465
472
|
}]: [])
|
|
466
473
|
],
|
|
467
|
-
image: '/
|
|
474
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXINCH.png',
|
|
468
475
|
coingeckoId: '1inch'
|
|
469
476
|
},
|
|
470
477
|
{
|
|
@@ -488,7 +495,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
488
495
|
hasWithdrawMemo: false
|
|
489
496
|
}]: [])
|
|
490
497
|
],
|
|
491
|
-
image: '/
|
|
498
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXLINK.png',
|
|
492
499
|
coingeckoId: 'chainlink'
|
|
493
500
|
},
|
|
494
501
|
{
|
|
@@ -521,7 +528,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
521
528
|
hasWithdrawMemo: false
|
|
522
529
|
}]: [])
|
|
523
530
|
],
|
|
524
|
-
image: '/
|
|
531
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXLTC.png',
|
|
525
532
|
coingeckoId: 'litecoin'
|
|
526
533
|
},
|
|
527
534
|
{
|
|
@@ -554,7 +561,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
554
561
|
hasWithdrawMemo: false
|
|
555
562
|
}]: [])
|
|
556
563
|
],
|
|
557
|
-
image: '/
|
|
564
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXBCH.png',
|
|
558
565
|
coingeckoId: 'bitcoin-cash'
|
|
559
566
|
},
|
|
560
567
|
{
|
|
@@ -587,7 +594,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
587
594
|
hasWithdrawMemo: true
|
|
588
595
|
}]: [])
|
|
589
596
|
],
|
|
590
|
-
image: '/
|
|
597
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXXLM.png',
|
|
591
598
|
coingeckoId: 'stellar'
|
|
592
599
|
},
|
|
593
600
|
{
|
|
@@ -601,7 +608,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
601
608
|
xtokenPrecision: 4,
|
|
602
609
|
xtokenContract: 'sense',
|
|
603
610
|
wallets: [],
|
|
604
|
-
image: '/
|
|
611
|
+
image: 'https://www.protonchain.com/images/tokens/senseXSENSE.png',
|
|
605
612
|
coingeckoId: 'sense'
|
|
606
613
|
},
|
|
607
614
|
{
|
|
@@ -625,7 +632,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
625
632
|
hasWithdrawMemo: false
|
|
626
633
|
}]: [])
|
|
627
634
|
],
|
|
628
|
-
image: '/
|
|
635
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXDOT.png',
|
|
629
636
|
coingeckoId: 'polkadot'
|
|
630
637
|
},
|
|
631
638
|
{
|
|
@@ -649,7 +656,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
649
656
|
hasWithdrawMemo: false
|
|
650
657
|
}]: [])
|
|
651
658
|
],
|
|
652
|
-
image: '/
|
|
659
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXBNB.png',
|
|
653
660
|
coingeckoId: 'binancecoin'
|
|
654
661
|
},
|
|
655
662
|
{
|
|
@@ -682,14 +689,14 @@ export const initializeCoins = (protonChain: string): {
|
|
|
682
689
|
hasWithdrawMemo: true
|
|
683
690
|
}]: [])
|
|
684
691
|
],
|
|
685
|
-
image: '/
|
|
692
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXEOS.png',
|
|
686
693
|
coingeckoId: 'eos'
|
|
687
694
|
},
|
|
688
695
|
{
|
|
689
696
|
allowSwap: IS_MAINNET,
|
|
690
697
|
allowBridge: IS_MAINNET,
|
|
691
698
|
allowLend: true,
|
|
692
|
-
allowBorrow:
|
|
699
|
+
allowBorrow: true,
|
|
693
700
|
name: 'Dogecoin',
|
|
694
701
|
coin: 'DOGE',
|
|
695
702
|
xtokenSymbol: 'XDOGE',
|
|
@@ -706,7 +713,7 @@ export const initializeCoins = (protonChain: string): {
|
|
|
706
713
|
hasWithdrawMemo: false
|
|
707
714
|
}]: []),
|
|
708
715
|
],
|
|
709
|
-
image: '/
|
|
716
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXDOGE.png',
|
|
710
717
|
coingeckoId: 'dogecoin'
|
|
711
718
|
},
|
|
712
719
|
{
|
|
@@ -730,79 +737,140 @@ export const initializeCoins = (protonChain: string): {
|
|
|
730
737
|
hasWithdrawMemo: false
|
|
731
738
|
}]: [])
|
|
732
739
|
],
|
|
733
|
-
image: '/
|
|
740
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXADA.png',
|
|
734
741
|
coingeckoId: 'cardano'
|
|
735
742
|
},
|
|
736
|
-
|
|
737
|
-
// Synthethic
|
|
738
743
|
{
|
|
739
744
|
allowSwap: false,
|
|
740
|
-
allowBridge:
|
|
745
|
+
allowBridge: false,
|
|
741
746
|
allowLend: false,
|
|
742
747
|
allowBorrow: false,
|
|
743
|
-
name: '
|
|
744
|
-
coin: '
|
|
745
|
-
xtokenSymbol: '
|
|
746
|
-
xtokenPrecision:
|
|
748
|
+
name: 'Avalanche',
|
|
749
|
+
coin: 'AVAX',
|
|
750
|
+
xtokenSymbol: 'XAVAX',
|
|
751
|
+
xtokenPrecision: 9,
|
|
747
752
|
xtokenContract: 'xtokens',
|
|
748
753
|
wallets: [
|
|
749
|
-
...(
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
754
|
+
...(IS_MAINNET ? [
|
|
755
|
+
{
|
|
756
|
+
wallet: 'AVAX',
|
|
757
|
+
symbol: 'AVAX',
|
|
758
|
+
chain: Chains.AvalancheXChain,
|
|
759
|
+
network: Networks.Mainnet,
|
|
760
|
+
precision: 9,
|
|
761
|
+
contract: undefined,
|
|
762
|
+
hasWithdrawMemo: false
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
wallet: 'AVAX',
|
|
766
|
+
symbol: 'AVAX',
|
|
767
|
+
chain: Chains.AvalancheCChain,
|
|
768
|
+
network: Networks.Mainnet,
|
|
769
|
+
precision: 9,
|
|
770
|
+
contract: undefined,
|
|
771
|
+
hasWithdrawMemo: false
|
|
772
|
+
}
|
|
773
|
+
]: [])
|
|
774
|
+
],
|
|
775
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXAVAX.png',
|
|
776
|
+
coingeckoId: 'avalanche-2'
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
allowSwap: false,
|
|
780
|
+
allowBridge: false,
|
|
781
|
+
allowLend: false,
|
|
782
|
+
allowBorrow: false,
|
|
783
|
+
name: 'Polygon',
|
|
784
|
+
coin: 'MATIC',
|
|
785
|
+
xtokenSymbol: 'XMATIC',
|
|
786
|
+
xtokenPrecision: 8,
|
|
787
|
+
xtokenContract: 'xtokens',
|
|
788
|
+
wallets: [
|
|
789
|
+
...(IS_MAINNET ? [{
|
|
790
|
+
wallet: 'MATIC',
|
|
791
|
+
symbol: 'MATIC',
|
|
792
|
+
chain: Chains.PolygonMainnet,
|
|
793
|
+
network: Networks.Mainnet,
|
|
794
|
+
precision: 18,
|
|
795
|
+
contract: '0x0000000000000000000000000000000000000000',
|
|
756
796
|
hasWithdrawMemo: false
|
|
757
797
|
}]: [])
|
|
758
798
|
],
|
|
759
|
-
image: '/
|
|
760
|
-
coingeckoId: '
|
|
799
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXMATIC.png',
|
|
800
|
+
coingeckoId: 'matic-network'
|
|
761
801
|
},
|
|
762
|
-
|
|
763
802
|
{
|
|
764
803
|
allowSwap: false,
|
|
765
804
|
allowBridge: false,
|
|
766
805
|
allowLend: false,
|
|
767
806
|
allowBorrow: false,
|
|
768
|
-
name: '
|
|
769
|
-
coin: '
|
|
770
|
-
xtokenSymbol: '
|
|
807
|
+
name: 'Luna',
|
|
808
|
+
coin: 'LUNA',
|
|
809
|
+
xtokenSymbol: 'XLUNA',
|
|
771
810
|
xtokenPrecision: 6,
|
|
772
811
|
xtokenContract: 'xtokens',
|
|
773
|
-
wallets: [
|
|
774
|
-
|
|
775
|
-
|
|
812
|
+
wallets: [
|
|
813
|
+
...(IS_MAINNET ? [{
|
|
814
|
+
wallet: 'LUNA',
|
|
815
|
+
symbol: 'LUNA',
|
|
816
|
+
chain: Chains.TerraMainnet,
|
|
817
|
+
network: Networks.Mainnet,
|
|
818
|
+
precision: 6,
|
|
819
|
+
contract: undefined,
|
|
820
|
+
hasWithdrawMemo: true
|
|
821
|
+
}]: [])
|
|
822
|
+
],
|
|
823
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXLUNA.png',
|
|
824
|
+
coingeckoId: 'terra-luna'
|
|
776
825
|
},
|
|
777
826
|
{
|
|
778
827
|
allowSwap: false,
|
|
779
828
|
allowBridge: false,
|
|
780
829
|
allowLend: false,
|
|
781
830
|
allowBorrow: false,
|
|
782
|
-
name: '
|
|
783
|
-
coin: '
|
|
784
|
-
xtokenSymbol: '
|
|
831
|
+
name: 'TerraUSD',
|
|
832
|
+
coin: 'UST',
|
|
833
|
+
xtokenSymbol: 'XUST',
|
|
785
834
|
xtokenPrecision: 6,
|
|
786
835
|
xtokenContract: 'xtokens',
|
|
787
|
-
wallets: [
|
|
788
|
-
|
|
789
|
-
|
|
836
|
+
wallets: [
|
|
837
|
+
...(IS_MAINNET ? [{
|
|
838
|
+
wallet: 'UST',
|
|
839
|
+
symbol: 'UST',
|
|
840
|
+
chain: Chains.TerraMainnet,
|
|
841
|
+
network: Networks.Mainnet,
|
|
842
|
+
precision: 6,
|
|
843
|
+
contract: undefined,
|
|
844
|
+
hasWithdrawMemo: true
|
|
845
|
+
}]: [])
|
|
846
|
+
],
|
|
847
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXUST.png',
|
|
848
|
+
coingeckoId: 'terrausd'
|
|
790
849
|
},
|
|
791
850
|
{
|
|
792
851
|
allowSwap: false,
|
|
793
|
-
allowBridge:
|
|
852
|
+
allowBridge: IS_TESTNET,
|
|
794
853
|
allowLend: false,
|
|
795
854
|
allowBorrow: false,
|
|
796
|
-
name: '
|
|
797
|
-
coin: '
|
|
798
|
-
xtokenSymbol: '
|
|
855
|
+
name: 'HBAR',
|
|
856
|
+
coin: 'HBAR',
|
|
857
|
+
xtokenSymbol: 'XHBAR',
|
|
799
858
|
xtokenPrecision: 6,
|
|
800
859
|
xtokenContract: 'xtokens',
|
|
801
|
-
wallets: [
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
860
|
+
wallets: [
|
|
861
|
+
...(IS_TESTNET ? [{
|
|
862
|
+
wallet: 'HBAR',
|
|
863
|
+
symbol: 'HBAR',
|
|
864
|
+
chain: Chains.HederaTestnet,
|
|
865
|
+
network: Networks.Testnet,
|
|
866
|
+
precision: 8,
|
|
867
|
+
contract: undefined,
|
|
868
|
+
hasWithdrawMemo: false
|
|
869
|
+
}]: [])
|
|
870
|
+
],
|
|
871
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXHBAR.png',
|
|
872
|
+
coingeckoId: 'hedera-hashgraph'
|
|
873
|
+
}
|
|
806
874
|
]
|
|
807
875
|
|
|
808
876
|
// Validation
|