@proton/wrap-constants 0.0.42 → 0.0.46

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,11 +286,11 @@ 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
- allowSwap: IS_MAINNET,
293
+ allowSwap: true,
286
294
  allowBridge: false,
287
295
  allowLend: false,
288
296
  allowBorrow: false,
@@ -292,8 +300,8 @@ export const initializeCoins = (protonChain: string): {
292
300
  xtokenPrecision: 4,
293
301
  xtokenContract: 'loan.token',
294
302
  wallets: [],
295
- image: '/img/tokens/loan.png',
296
- coingeckoId: ''
303
+ image: 'https://www.protonchain.com/images/tokens/loan.tokenLOAN.png',
304
+ coingeckoId: 'proton-loan'
297
305
  },
298
306
  {
299
307
  allowSwap: IS_MAINNET,
@@ -325,7 +333,7 @@ export const initializeCoins = (protonChain: string): {
325
333
  hasWithdrawMemo: false
326
334
  }]: [])
327
335
  ],
328
- image: '/img/tokens/xusdt.png',
336
+ image: 'https://www.protonchain.com/images/tokens/xtokensXUSDT.png',
329
337
  coingeckoId: 'tether'
330
338
  },
331
339
  {
@@ -349,7 +357,7 @@ export const initializeCoins = (protonChain: string): {
349
357
  hasWithdrawMemo: false
350
358
  }]: [])
351
359
  ],
352
- image: '/img/tokens/xtusd.png',
360
+ image: 'https://www.protonchain.com/images/tokens/xtokensXTUSD.png',
353
361
  coingeckoId: 'true-usd'
354
362
  },
355
363
  {
@@ -373,7 +381,7 @@ export const initializeCoins = (protonChain: string): {
373
381
  hasWithdrawMemo: false
374
382
  }]: [])
375
383
  ],
376
- image: '/img/tokens/xpax.png',
384
+ image: 'https://www.protonchain.com/images/tokens/xtokensXPAX.png',
377
385
  coingeckoId: 'usdp'
378
386
  },
379
387
  {
@@ -406,7 +414,7 @@ export const initializeCoins = (protonChain: string): {
406
414
  hasWithdrawMemo: false
407
415
  }]: [])
408
416
  ],
409
- image: '/img/tokens/xpaxg.png',
417
+ image: 'https://www.protonchain.com/images/tokens/xtokensXPAXG.png',
410
418
  coingeckoId: 'pax-gold'
411
419
  },
412
420
  {
@@ -439,7 +447,7 @@ export const initializeCoins = (protonChain: string): {
439
447
  hasWithdrawMemo: false
440
448
  }]: [])
441
449
  ],
442
- image: '/img/tokens/xuni.png',
450
+ image: 'https://www.protonchain.com/images/tokens/xtokensXUNI.png',
443
451
  coingeckoId: 'uniswap'
444
452
  },
445
453
  {
@@ -463,7 +471,7 @@ export const initializeCoins = (protonChain: string): {
463
471
  hasWithdrawMemo: false
464
472
  }]: [])
465
473
  ],
466
- image: '/img/tokens/xinch.png',
474
+ image: 'https://www.protonchain.com/images/tokens/xtokensXINCH.png',
467
475
  coingeckoId: '1inch'
468
476
  },
469
477
  {
@@ -487,7 +495,7 @@ export const initializeCoins = (protonChain: string): {
487
495
  hasWithdrawMemo: false
488
496
  }]: [])
489
497
  ],
490
- image: '/img/tokens/xlink.png',
498
+ image: 'https://www.protonchain.com/images/tokens/xtokensXLINK.png',
491
499
  coingeckoId: 'chainlink'
492
500
  },
493
501
  {
@@ -520,7 +528,7 @@ export const initializeCoins = (protonChain: string): {
520
528
  hasWithdrawMemo: false
521
529
  }]: [])
522
530
  ],
523
- image: '/img/tokens/xltc.png',
531
+ image: 'https://www.protonchain.com/images/tokens/xtokensXLTC.png',
524
532
  coingeckoId: 'litecoin'
525
533
  },
526
534
  {
@@ -553,7 +561,7 @@ export const initializeCoins = (protonChain: string): {
553
561
  hasWithdrawMemo: false
554
562
  }]: [])
555
563
  ],
556
- image: '/img/tokens/xbch.png',
564
+ image: 'https://www.protonchain.com/images/tokens/xtokensXBCH.png',
557
565
  coingeckoId: 'bitcoin-cash'
558
566
  },
559
567
  {
@@ -586,7 +594,7 @@ export const initializeCoins = (protonChain: string): {
586
594
  hasWithdrawMemo: true
587
595
  }]: [])
588
596
  ],
589
- image: '/img/tokens/xxlm.png',
597
+ image: 'https://www.protonchain.com/images/tokens/xtokensXXLM.png',
590
598
  coingeckoId: 'stellar'
591
599
  },
592
600
  {
@@ -600,7 +608,7 @@ export const initializeCoins = (protonChain: string): {
600
608
  xtokenPrecision: 4,
601
609
  xtokenContract: 'sense',
602
610
  wallets: [],
603
- image: '/img/tokens/xsense.png',
611
+ image: 'https://www.protonchain.com/images/tokens/senseXSENSE.png',
604
612
  coingeckoId: 'sense'
605
613
  },
606
614
  {
@@ -624,7 +632,7 @@ export const initializeCoins = (protonChain: string): {
624
632
  hasWithdrawMemo: false
625
633
  }]: [])
626
634
  ],
627
- image: '/img/tokens/xdot.png',
635
+ image: 'https://www.protonchain.com/images/tokens/xtokensXDOT.png',
628
636
  coingeckoId: 'polkadot'
629
637
  },
630
638
  {
@@ -648,7 +656,7 @@ export const initializeCoins = (protonChain: string): {
648
656
  hasWithdrawMemo: false
649
657
  }]: [])
650
658
  ],
651
- image: '/img/tokens/xbnb.png',
659
+ image: 'https://www.protonchain.com/images/tokens/xtokensXBNB.png',
652
660
  coingeckoId: 'binancecoin'
653
661
  },
654
662
  {
@@ -681,7 +689,7 @@ export const initializeCoins = (protonChain: string): {
681
689
  hasWithdrawMemo: true
682
690
  }]: [])
683
691
  ],
684
- image: '/img/tokens/xeos.png',
692
+ image: 'https://www.protonchain.com/images/tokens/xtokensXEOS.png',
685
693
  coingeckoId: 'eos'
686
694
  },
687
695
  {
@@ -705,7 +713,7 @@ export const initializeCoins = (protonChain: string): {
705
713
  hasWithdrawMemo: false
706
714
  }]: []),
707
715
  ],
708
- image: '/img/tokens/xdoge.png',
716
+ image: 'https://www.protonchain.com/images/tokens/xtokensXDOGE.png',
709
717
  coingeckoId: 'dogecoin'
710
718
  },
711
719
  {
@@ -729,79 +737,140 @@ export const initializeCoins = (protonChain: string): {
729
737
  hasWithdrawMemo: false
730
738
  }]: [])
731
739
  ],
732
- image: '/img/tokens/xada.png',
740
+ image: 'https://www.protonchain.com/images/tokens/xtokensXADA.png',
733
741
  coingeckoId: 'cardano'
734
742
  },
735
-
736
- // Synthethic
737
743
  {
738
744
  allowSwap: false,
739
- allowBridge: IS_TESTNET,
745
+ allowBridge: false,
740
746
  allowLend: false,
741
747
  allowBorrow: false,
742
- name: 'HBAR',
743
- coin: 'HBAR',
744
- xtokenSymbol: 'XHBAR',
745
- xtokenPrecision: 6,
748
+ name: 'Avalanche',
749
+ coin: 'AVAX',
750
+ xtokenSymbol: 'XAVAX',
751
+ xtokenPrecision: 9,
746
752
  xtokenContract: 'xtokens',
747
753
  wallets: [
748
- ...(IS_TESTNET ? [{
749
- wallet: 'HBAR',
750
- symbol: 'HBAR',
751
- chain: Chains.HederaTestnet,
752
- network: Networks.Testnet,
753
- precision: 8,
754
- 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',
755
796
  hasWithdrawMemo: false
756
797
  }]: [])
757
798
  ],
758
- image: '/img/tokens/xhbar.png',
759
- coingeckoId: 'hedera-hashgraph'
799
+ image: 'https://www.protonchain.com/images/tokens/xtokensXMATIC.png',
800
+ coingeckoId: 'matic-network'
760
801
  },
761
-
762
802
  {
763
803
  allowSwap: false,
764
804
  allowBridge: false,
765
805
  allowLend: false,
766
806
  allowBorrow: false,
767
- name: 'Theta',
768
- coin: 'THETA',
769
- xtokenSymbol: 'XTHETA',
807
+ name: 'Luna',
808
+ coin: 'LUNA',
809
+ xtokenSymbol: 'XLUNA',
770
810
  xtokenPrecision: 6,
771
811
  xtokenContract: 'xtokens',
772
- wallets: [],
773
- image: '/img/tokens/xtheta.png',
774
- 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'
775
825
  },
776
826
  {
777
827
  allowSwap: false,
778
828
  allowBridge: false,
779
829
  allowLend: false,
780
830
  allowBorrow: false,
781
- name: 'Filecoin',
782
- coin: 'FIL',
783
- xtokenSymbol: 'XFIL',
831
+ name: 'TerraUSD',
832
+ coin: 'UST',
833
+ xtokenSymbol: 'XUST',
784
834
  xtokenPrecision: 6,
785
835
  xtokenContract: 'xtokens',
786
- wallets: [],
787
- image: '/img/tokens/xfil.png',
788
- 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'
789
849
  },
790
850
  {
791
851
  allowSwap: false,
792
- allowBridge: false,
852
+ allowBridge: IS_TESTNET,
793
853
  allowLend: false,
794
854
  allowBorrow: false,
795
- name: 'TRON',
796
- coin: 'TRX',
797
- xtokenSymbol: 'XTRX',
855
+ name: 'HBAR',
856
+ coin: 'HBAR',
857
+ xtokenSymbol: 'XHBAR',
798
858
  xtokenPrecision: 6,
799
859
  xtokenContract: 'xtokens',
800
- wallets: [],
801
- image: '/img/tokens/xtrx.png',
802
- coingeckoId: 'tron'
803
- },
804
- // 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: true
869
+ }]: [])
870
+ ],
871
+ image: 'https://www.protonchain.com/images/tokens/xtokensXHBAR.png',
872
+ coingeckoId: 'hedera-hashgraph'
873
+ }
805
874
  ]
806
875
 
807
876
  // Validation