@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/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: '/img/tokens/xpr.png',
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: '/img/tokens/xusdc.png',
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: '/img/tokens/xmt.png',
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: '/img/tokens/xbtc.png',
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: '/img/tokens/xeth.png',
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: true,
289
- name: 'Proton Loan',
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: '/img/tokens/loan.png',
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: '/img/tokens/xusdt.png',
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: '/img/tokens/xtusd.png',
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: '/img/tokens/xpax.png',
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: '/img/tokens/xpaxg.png',
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: '/img/tokens/xuni.png',
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: '/img/tokens/xinch.png',
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: '/img/tokens/xlink.png',
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: '/img/tokens/xltc.png',
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: '/img/tokens/xbch.png',
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: '/img/tokens/xxlm.png',
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: '/img/tokens/xsense.png',
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: '/img/tokens/xdot.png',
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: '/img/tokens/xbnb.png',
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: '/img/tokens/xeos.png',
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: false,
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: '/img/tokens/xdoge.png',
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: '/img/tokens/xada.png',
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: IS_TESTNET,
745
+ allowBridge: false,
741
746
  allowLend: false,
742
747
  allowBorrow: false,
743
- name: 'HBAR',
744
- coin: 'HBAR',
745
- xtokenSymbol: 'XHBAR',
746
- xtokenPrecision: 6,
748
+ name: 'Avalanche',
749
+ coin: 'AVAX',
750
+ xtokenSymbol: 'XAVAX',
751
+ xtokenPrecision: 9,
747
752
  xtokenContract: 'xtokens',
748
753
  wallets: [
749
- ...(IS_TESTNET ? [{
750
- wallet: 'HBAR',
751
- symbol: 'HBAR',
752
- chain: Chains.HederaTestnet,
753
- network: Networks.Testnet,
754
- precision: 8,
755
- contract: undefined,
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: '/img/tokens/xhbar.png',
760
- coingeckoId: 'hedera-hashgraph'
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: 'Theta',
769
- coin: 'THETA',
770
- xtokenSymbol: 'XTHETA',
807
+ name: 'Luna',
808
+ coin: 'LUNA',
809
+ xtokenSymbol: 'XLUNA',
771
810
  xtokenPrecision: 6,
772
811
  xtokenContract: 'xtokens',
773
- wallets: [],
774
- image: '/img/tokens/xtheta.png',
775
- coingeckoId: 'theta-token'
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: 'Filecoin',
783
- coin: 'FIL',
784
- xtokenSymbol: 'XFIL',
831
+ name: 'TerraUSD',
832
+ coin: 'UST',
833
+ xtokenSymbol: 'XUST',
785
834
  xtokenPrecision: 6,
786
835
  xtokenContract: 'xtokens',
787
- wallets: [],
788
- image: '/img/tokens/xfil.png',
789
- coingeckoId: 'filecoin'
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: false,
852
+ allowBridge: IS_TESTNET,
794
853
  allowLend: false,
795
854
  allowBorrow: false,
796
- name: 'TRON',
797
- coin: 'TRX',
798
- xtokenSymbol: 'XTRX',
855
+ name: 'HBAR',
856
+ coin: 'HBAR',
857
+ xtokenSymbol: 'XHBAR',
799
858
  xtokenPrecision: 6,
800
859
  xtokenContract: 'xtokens',
801
- wallets: [],
802
- image: '/img/tokens/xtrx.png',
803
- coingeckoId: 'tron'
804
- },
805
- // End synthetic
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