@strkfarm/sdk 2.0.0-staging.71 → 2.0.0-staging.72

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.
@@ -4,6 +4,236 @@ import axios3 from "axios";
4
4
  // src/global.ts
5
5
  import axios from "axios";
6
6
 
7
+ // src/utils/logger.browser.ts
8
+ var logger = {
9
+ ...console,
10
+ verbose(message) {
11
+ console.log(`[VERBOSE] ${message}`);
12
+ }
13
+ };
14
+
15
+ // src/interfaces/lending.ts
16
+ var MarginType = /* @__PURE__ */ ((MarginType2) => {
17
+ MarginType2["SHARED"] = "shared";
18
+ MarginType2["NONE"] = "none";
19
+ return MarginType2;
20
+ })(MarginType || {});
21
+ var ILending = class {
22
+ constructor(config, metadata) {
23
+ this.tokens = [];
24
+ this.initialised = false;
25
+ this.metadata = metadata;
26
+ this.config = config;
27
+ this.init();
28
+ }
29
+ /** Wait for initialisation */
30
+ waitForInitilisation() {
31
+ return new Promise((resolve, reject) => {
32
+ const interval = setInterval(() => {
33
+ logger.verbose(`Waiting for ${this.metadata.name} to initialise`);
34
+ if (this.initialised) {
35
+ logger.verbose(`${this.metadata.name} initialised`);
36
+ clearInterval(interval);
37
+ resolve();
38
+ }
39
+ }, 1e3);
40
+ });
41
+ }
42
+ };
43
+
44
+ // src/interfaces/common.tsx
45
+ import { BlockTag, RpcProvider } from "starknet";
46
+ import { Fragment, jsx } from "react/jsx-runtime";
47
+ var RiskType = /* @__PURE__ */ ((RiskType2) => {
48
+ RiskType2["MARKET_RISK"] = "Market Risk";
49
+ RiskType2["IMPERMANENT_LOSS"] = "Impermanent Loss Risk";
50
+ RiskType2["LIQUIDATION_RISK"] = "Liquidation Risk";
51
+ RiskType2["LOW_LIQUIDITY_RISK"] = "Low Liquidity Risk";
52
+ RiskType2["SMART_CONTRACT_RISK"] = "Smart Contract Risk";
53
+ RiskType2["ORACLE_RISK"] = "Oracle Risk";
54
+ RiskType2["TECHNICAL_RISK"] = "Technical Risk";
55
+ RiskType2["COUNTERPARTY_RISK"] = "Counterparty Risk";
56
+ RiskType2["DEPEG_RISK"] = "Depeg Risk";
57
+ return RiskType2;
58
+ })(RiskType || {});
59
+ var TokenIndexingType = /* @__PURE__ */ ((TokenIndexingType2) => {
60
+ TokenIndexingType2["PEGGED"] = "pegged";
61
+ TokenIndexingType2["INDEXER"] = "indexer";
62
+ TokenIndexingType2["LST_SCRIPT"] = "lstScript";
63
+ TokenIndexingType2["IGNORE"] = "ignore";
64
+ return TokenIndexingType2;
65
+ })(TokenIndexingType || {});
66
+ var Network = /* @__PURE__ */ ((Network2) => {
67
+ Network2["mainnet"] = "mainnet";
68
+ Network2["sepolia"] = "sepolia";
69
+ Network2["devnet"] = "devnet";
70
+ return Network2;
71
+ })(Network || {});
72
+ var StrategyTag = /* @__PURE__ */ ((StrategyTag3) => {
73
+ StrategyTag3["META_VAULT"] = "Meta Vaults";
74
+ StrategyTag3["LEVERED"] = "Maxx";
75
+ StrategyTag3["AUTOMATED_LP"] = "Ekubo";
76
+ StrategyTag3["BTC"] = "BTC";
77
+ return StrategyTag3;
78
+ })(StrategyTag || {});
79
+ var VaultType = /* @__PURE__ */ ((VaultType2) => {
80
+ VaultType2["LOOPING"] = "Looping";
81
+ VaultType2["META_VAULT"] = "Meta Vault";
82
+ VaultType2["DELTA_NEUTRAL"] = "Delta Neutral";
83
+ VaultType2["AUTOMATED_LP"] = "Automated LP";
84
+ VaultType2["TVA"] = "Troves Value Averaging";
85
+ return VaultType2;
86
+ })(VaultType || {});
87
+ var AuditStatus = /* @__PURE__ */ ((AuditStatus2) => {
88
+ AuditStatus2["AUDITED"] = "Audited";
89
+ AuditStatus2["NOT_AUDITED"] = "Not Audited";
90
+ return AuditStatus2;
91
+ })(AuditStatus || {});
92
+ var SourceCodeType = /* @__PURE__ */ ((SourceCodeType2) => {
93
+ SourceCodeType2["OPEN_SOURCE"] = "Open Source";
94
+ SourceCodeType2["CLOSED_SOURCE"] = "Closed Source";
95
+ return SourceCodeType2;
96
+ })(SourceCodeType || {});
97
+ var AccessControlType = /* @__PURE__ */ ((AccessControlType2) => {
98
+ AccessControlType2["MULTISIG_ACCOUNT"] = "Multisig Account";
99
+ AccessControlType2["STANDARD_ACCOUNT"] = "Standard Account";
100
+ AccessControlType2["ROLE_BASED_ACCESS"] = "Role Based Access";
101
+ return AccessControlType2;
102
+ })(AccessControlType || {});
103
+ var InstantWithdrawalVault = /* @__PURE__ */ ((InstantWithdrawalVault2) => {
104
+ InstantWithdrawalVault2["YES"] = "Yes";
105
+ InstantWithdrawalVault2["NO"] = "No";
106
+ return InstantWithdrawalVault2;
107
+ })(InstantWithdrawalVault || {});
108
+ var FlowChartColors = /* @__PURE__ */ ((FlowChartColors2) => {
109
+ FlowChartColors2["Green"] = "purple";
110
+ FlowChartColors2["Blue"] = "#35484f";
111
+ FlowChartColors2["Purple"] = "#6e53dc";
112
+ return FlowChartColors2;
113
+ })(FlowChartColors || {});
114
+ var StrategyLiveStatus = /* @__PURE__ */ ((StrategyLiveStatus2) => {
115
+ StrategyLiveStatus2["ACTIVE"] = "Active";
116
+ StrategyLiveStatus2["NEW"] = "New";
117
+ StrategyLiveStatus2["COMING_SOON"] = "Coming Soon";
118
+ StrategyLiveStatus2["DEPRECATED"] = "Deprecated";
119
+ StrategyLiveStatus2["RETIRED"] = "Retired";
120
+ StrategyLiveStatus2["HOT"] = "Hot & New \u{1F525}";
121
+ return StrategyLiveStatus2;
122
+ })(StrategyLiveStatus || {});
123
+ function getMainnetConfig(rpcUrl = "https://starknet-mainnet.public.blastapi.io", blockIdentifier = BlockTag.LATEST) {
124
+ return {
125
+ provider: new RpcProvider({
126
+ nodeUrl: rpcUrl,
127
+ blockIdentifier
128
+ // specVersion
129
+ }),
130
+ stage: "production",
131
+ network: "mainnet" /* mainnet */
132
+ };
133
+ }
134
+ var getStrategyTagDesciption = (tag) => {
135
+ switch (tag) {
136
+ case "Meta Vaults" /* META_VAULT */:
137
+ return "A meta vault is a vault that auto allocates funds to multiple vaults based on optimal yield opportunities";
138
+ case "Maxx" /* LEVERED */:
139
+ return "Looping vaults on Endur LSTs with leveraged borrowing of STRK or BTC to increase yield (2-4x higher yield than simply staking)";
140
+ case "Ekubo" /* AUTOMATED_LP */:
141
+ return "Automated LP vaults on Ekubo that rebalance position automatically, ensuring you earn fees efficiently";
142
+ case "BTC" /* BTC */:
143
+ return "BTC linked vaults";
144
+ }
145
+ };
146
+ var getAllStrategyTags = () => {
147
+ return Object.values(StrategyTag);
148
+ };
149
+ var getRiskExplaination = (riskType) => {
150
+ switch (riskType) {
151
+ case "Market Risk" /* MARKET_RISK */:
152
+ return "The risk of the market moving against the position.";
153
+ case "Impermanent Loss Risk" /* IMPERMANENT_LOSS */:
154
+ return "The temporary loss of value experienced by liquidity providers in AMMs when asset prices diverge compared to simply holding them.";
155
+ case "Liquidation Risk" /* LIQUIDATION_RISK */:
156
+ return "The risk of losing funds due to the position being liquidated.";
157
+ case "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */:
158
+ return "The risk of low liquidity in the pool, which can lead to high slippages or reduced in-abilities to quickly exit the position.";
159
+ case "Oracle Risk" /* ORACLE_RISK */:
160
+ return "The risk of the oracle being manipulated or incorrect.";
161
+ case "Smart Contract Risk" /* SMART_CONTRACT_RISK */:
162
+ return "The risk of the smart contract being vulnerable to attacks.";
163
+ case "Technical Risk" /* TECHNICAL_RISK */:
164
+ return "The risk of technical issues e.g. backend failure.";
165
+ case "Counterparty Risk" /* COUNTERPARTY_RISK */:
166
+ return "The risk of the counterparty defaulting e.g. bad debt on lending platforms.";
167
+ case "Depeg Risk" /* DEPEG_RISK */:
168
+ return "The risk of a token losing its peg to the underlying asset, leading to potential losses for holders.";
169
+ }
170
+ };
171
+ var getRiskColor = (risk) => {
172
+ const value = risk.value;
173
+ if (value <= 2) return "light_green_2";
174
+ if (value < 3) return "yellow";
175
+ return "red";
176
+ };
177
+ var getNoRiskTags = (risks) => {
178
+ const noRisks1 = risks.filter((risk) => risk.value === 0).map((risk) => risk.type);
179
+ const noRisks2 = Object.values(RiskType).filter(
180
+ (risk) => !risks.map((risk2) => risk2.type).includes(risk)
181
+ );
182
+ const mergedUnique = [.../* @__PURE__ */ new Set([...noRisks1, ...noRisks2])];
183
+ return mergedUnique;
184
+ };
185
+ function highlightTextWithLinks(put, highlights) {
186
+ const escapeRegExp = (text) => text.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
187
+ const pattern = new RegExp(
188
+ `(${highlights.map((m) => escapeRegExp(m.highlight)).join("|")})`,
189
+ "gi"
190
+ );
191
+ const parts = put.split(pattern);
192
+ return /* @__PURE__ */ jsx(Fragment, { children: parts.map((part, i) => {
193
+ const match = highlights.find((m) => m.highlight.toLowerCase() === part.toLowerCase());
194
+ return match ? /* @__PURE__ */ jsx("a", { href: match.link, target: "_blank", style: { color: "white", background: "rgba(255, 255, 255, 0.04)" }, children: part }, i) : /* @__PURE__ */ jsx("span", { children: part }, i);
195
+ }) });
196
+ }
197
+ var VesuProtocol = {
198
+ name: "Vesu",
199
+ logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
200
+ };
201
+ var EndurProtocol = {
202
+ name: "Endur",
203
+ logo: "http://endur.fi/logo.png"
204
+ };
205
+ var ExtendedProtocol = {
206
+ name: "Extended",
207
+ logo: "https://static-assets-8zct.onrender.com/integrations/extended/extended.svg"
208
+ };
209
+ var Protocols = {
210
+ VESU: VesuProtocol,
211
+ ENDUR: EndurProtocol,
212
+ EXTENDED: ExtendedProtocol
213
+ };
214
+ var UnwrapLabsCurator = {
215
+ name: "Unwrap Labs",
216
+ logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
217
+ };
218
+
219
+ // src/interfaces/initializable.ts
220
+ var Initializable = class {
221
+ constructor() {
222
+ this.initialized = false;
223
+ }
224
+ async waitForInitilisation() {
225
+ return new Promise((resolve, reject) => {
226
+ const interval = setInterval(() => {
227
+ if (this.initialized) {
228
+ console.log("Initialised");
229
+ clearInterval(interval);
230
+ resolve();
231
+ }
232
+ }, 1e3);
233
+ });
234
+ }
235
+ };
236
+
7
237
  // src/dataTypes/bignumber.browser.ts
8
238
  import { uint256 as uint2562 } from "starknet";
9
239
 
@@ -256,14 +486,6 @@ var MyNumber = class _MyNumber {
256
486
  }
257
487
  };
258
488
 
259
- // src/utils/logger.browser.ts
260
- var logger = {
261
- ...console,
262
- verbose(message) {
263
- console.log(`[VERBOSE] ${message}`);
264
- }
265
- };
266
-
267
489
  // src/global.ts
268
490
  var FatalError = class extends Error {
269
491
  constructor(message, err) {
@@ -283,7 +505,8 @@ var defaultTokens = [{
283
505
  coingeckId: "starknet",
284
506
  displayDecimals: 2,
285
507
  priceCheckAmount: 5e3,
286
- priceMethod: "Avnu"
508
+ priceMethod: "Avnu",
509
+ indexingType: "indexer" /* INDEXER */
287
510
  }, {
288
511
  name: "xSTRK",
289
512
  symbol: "xSTRK",
@@ -293,7 +516,8 @@ var defaultTokens = [{
293
516
  coingeckId: void 0,
294
517
  priceCheckAmount: 5e3,
295
518
  displayDecimals: 2,
296
- priceMethod: "Avnu"
519
+ priceMethod: "Avnu",
520
+ indexingType: "lstScript" /* LST_SCRIPT */
297
521
  }, {
298
522
  name: "ETH",
299
523
  symbol: "ETH",
@@ -302,7 +526,8 @@ var defaultTokens = [{
302
526
  decimals: 18,
303
527
  coingeckId: void 0,
304
528
  priceCheckAmount: 0.1,
305
- displayDecimals: 6
529
+ displayDecimals: 6,
530
+ indexingType: "indexer" /* INDEXER */
306
531
  }, {
307
532
  name: "USDC.e",
308
533
  symbol: "USDC.e",
@@ -311,7 +536,9 @@ var defaultTokens = [{
311
536
  decimals: 6,
312
537
  coingeckId: void 0,
313
538
  displayDecimals: 2,
314
- priceCheckAmount: 1e3
539
+ priceCheckAmount: 1e3,
540
+ priceProxySymbol: "USDC",
541
+ indexingType: "pegged" /* PEGGED */
315
542
  }, {
316
543
  name: "USDC",
317
544
  symbol: "USDC",
@@ -320,7 +547,8 @@ var defaultTokens = [{
320
547
  decimals: 6,
321
548
  coingeckId: void 0,
322
549
  displayDecimals: 2,
323
- priceCheckAmount: 1e3
550
+ priceCheckAmount: 1e3,
551
+ indexingType: "indexer" /* INDEXER */
324
552
  }, {
325
553
  name: "USDT",
326
554
  symbol: "USDT",
@@ -329,7 +557,8 @@ var defaultTokens = [{
329
557
  decimals: 6,
330
558
  coingeckId: void 0,
331
559
  priceCheckAmount: 1e3,
332
- displayDecimals: 2
560
+ displayDecimals: 2,
561
+ indexingType: "indexer" /* INDEXER */
333
562
  }, {
334
563
  name: "WBTC",
335
564
  symbol: "WBTC",
@@ -338,8 +567,9 @@ var defaultTokens = [{
338
567
  decimals: 8,
339
568
  coingeckId: void 0,
340
569
  displayDecimals: 6,
341
- priceCheckAmount: 1e-3
570
+ priceCheckAmount: 1e-3,
342
571
  // 112000 * 0.0001 = $110.2
572
+ indexingType: "indexer" /* INDEXER */
343
573
  }, {
344
574
  name: "tBTC",
345
575
  symbol: "tBTC",
@@ -348,8 +578,10 @@ var defaultTokens = [{
348
578
  decimals: 18,
349
579
  coingeckId: void 0,
350
580
  displayDecimals: 6,
351
- priceCheckAmount: 1e-3
581
+ priceCheckAmount: 1e-3,
352
582
  // 112000 * 0.0001 = $110.2
583
+ priceProxySymbol: "WBTC",
584
+ indexingType: "pegged" /* PEGGED */
353
585
  }, {
354
586
  name: "solvBTC",
355
587
  symbol: "solvBTC",
@@ -359,8 +591,9 @@ var defaultTokens = [{
359
591
  coingeckId: void 0,
360
592
  priceProxySymbol: "WBTC",
361
593
  displayDecimals: 6,
362
- priceCheckAmount: 1e-4
594
+ priceCheckAmount: 1e-4,
363
595
  // 112000 * 0.0001 = $11.2
596
+ indexingType: "pegged" /* PEGGED */
364
597
  }, {
365
598
  name: "LBTC",
366
599
  symbol: "LBTC",
@@ -370,8 +603,9 @@ var defaultTokens = [{
370
603
  coingeckId: void 0,
371
604
  displayDecimals: 6,
372
605
  priceProxySymbol: "WBTC",
373
- priceCheckAmount: 1e-4
606
+ priceCheckAmount: 1e-4,
374
607
  // 112000 * 0.0001 = $11.2
608
+ indexingType: "pegged" /* PEGGED */
375
609
  }, {
376
610
  name: "xWBTC",
377
611
  symbol: "xWBTC",
@@ -382,7 +616,8 @@ var defaultTokens = [{
382
616
  displayDecimals: 6,
383
617
  priceCheckAmount: 1e-3,
384
618
  // 112000 * 0.0001 = $110.2
385
- priceMethod: "Avnu"
619
+ priceMethod: "Avnu",
620
+ indexingType: "lstScript" /* LST_SCRIPT */
386
621
  }, {
387
622
  name: "xsBTC",
388
623
  symbol: "xsBTC",
@@ -393,7 +628,8 @@ var defaultTokens = [{
393
628
  displayDecimals: 6,
394
629
  priceCheckAmount: 1e-4,
395
630
  // 112000 * 0.0001 = $11.2
396
- priceMethod: "Avnu"
631
+ priceMethod: "Avnu",
632
+ indexingType: "lstScript" /* LST_SCRIPT */
397
633
  }, {
398
634
  name: "xtBTC",
399
635
  symbol: "xtBTC",
@@ -404,7 +640,8 @@ var defaultTokens = [{
404
640
  displayDecimals: 6,
405
641
  priceCheckAmount: 1e-3,
406
642
  // 112000 * 0.0001 = $110.2
407
- priceMethod: "Avnu"
643
+ priceMethod: "Avnu",
644
+ indexingType: "lstScript" /* LST_SCRIPT */
408
645
  }, {
409
646
  name: "xLBTC",
410
647
  symbol: "xLBTC",
@@ -415,7 +652,8 @@ var defaultTokens = [{
415
652
  displayDecimals: 6,
416
653
  priceCheckAmount: 1e-4,
417
654
  // 112000 * 0.0001 = $11.2
418
- priceMethod: "Avnu"
655
+ priceMethod: "Avnu",
656
+ indexingType: "lstScript" /* LST_SCRIPT */
419
657
  }, {
420
658
  name: "mRe7BTC",
421
659
  symbol: "mRe7BTC",
@@ -426,7 +664,8 @@ var defaultTokens = [{
426
664
  displayDecimals: 6,
427
665
  priceCheckAmount: 1e-4,
428
666
  // 112000 * 0.0001 = $11.2
429
- dontPrice: true
667
+ dontPrice: true,
668
+ indexingType: "ignore" /* IGNORE */
430
669
  }, {
431
670
  name: "mRe7YIELD",
432
671
  symbol: "mRe7YIELD",
@@ -436,7 +675,8 @@ var defaultTokens = [{
436
675
  coingeckId: void 0,
437
676
  displayDecimals: 2,
438
677
  priceCheckAmount: 100,
439
- dontPrice: true
678
+ dontPrice: true,
679
+ indexingType: "ignore" /* IGNORE */
440
680
  }, {
441
681
  name: "fyeWBTC",
442
682
  symbol: "fyeWBTC",
@@ -447,7 +687,8 @@ var defaultTokens = [{
447
687
  displayDecimals: 6,
448
688
  priceCheckAmount: 1e-3,
449
689
  // 112000 * 0.0001 = $110.2
450
- dontPrice: true
690
+ dontPrice: true,
691
+ indexingType: "ignore" /* IGNORE */
451
692
  }, {
452
693
  name: "fyETH",
453
694
  symbol: "fyETH",
@@ -457,7 +698,8 @@ var defaultTokens = [{
457
698
  coingeckId: void 0,
458
699
  displayDecimals: 4,
459
700
  priceCheckAmount: 0.1,
460
- dontPrice: true
701
+ dontPrice: true,
702
+ indexingType: "ignore" /* IGNORE */
461
703
  }, {
462
704
  name: "fyeUSDC",
463
705
  symbol: "fyeUSDC",
@@ -467,7 +709,8 @@ var defaultTokens = [{
467
709
  coingeckId: void 0,
468
710
  displayDecimals: 2,
469
711
  priceCheckAmount: 100,
470
- dontPrice: true
712
+ dontPrice: true,
713
+ indexingType: "ignore" /* IGNORE */
471
714
  }, {
472
715
  name: "strkBTC",
473
716
  symbol: "strkBTC",
@@ -478,7 +721,9 @@ var defaultTokens = [{
478
721
  displayDecimals: 6,
479
722
  priceCheckAmount: 1e-3,
480
723
  // 112000 * 0.0001 = $110.2
481
- priceMethod: "Avnu"
724
+ priceMethod: "Avnu",
725
+ priceProxySymbol: "WBTC",
726
+ indexingType: "pegged" /* PEGGED */
482
727
  }, {
483
728
  name: "xstrkBTC",
484
729
  symbol: "xstrkBTC",
@@ -488,7 +733,8 @@ var defaultTokens = [{
488
733
  coingeckId: void 0,
489
734
  displayDecimals: 6,
490
735
  priceCheckAmount: 1e-3,
491
- priceMethod: "Avnu"
736
+ priceMethod: "Avnu",
737
+ indexingType: "lstScript" /* LST_SCRIPT */
492
738
  }];
493
739
  var tokens = defaultTokens;
494
740
  var _Global = class _Global {
@@ -521,7 +767,8 @@ var _Global = class _Global {
521
767
  decimals: token.decimals,
522
768
  logo: token.logoUri,
523
769
  coingeckId: token.extensions.coingeckoId,
524
- displayDecimals: 2
770
+ displayDecimals: 2,
771
+ indexingType: "ignore" /* IGNORE */
525
772
  });
526
773
  });
527
774
  console.log(tokens);
@@ -1202,37 +1449,6 @@ var Pragma = class extends PricerBase {
1202
1449
 
1203
1450
  // src/modules/zkLend.ts
1204
1451
  import axios4 from "axios";
1205
-
1206
- // src/interfaces/lending.ts
1207
- var MarginType = /* @__PURE__ */ ((MarginType2) => {
1208
- MarginType2["SHARED"] = "shared";
1209
- MarginType2["NONE"] = "none";
1210
- return MarginType2;
1211
- })(MarginType || {});
1212
- var ILending = class {
1213
- constructor(config, metadata) {
1214
- this.tokens = [];
1215
- this.initialised = false;
1216
- this.metadata = metadata;
1217
- this.config = config;
1218
- this.init();
1219
- }
1220
- /** Wait for initialisation */
1221
- waitForInitilisation() {
1222
- return new Promise((resolve, reject) => {
1223
- const interval = setInterval(() => {
1224
- logger.verbose(`Waiting for ${this.metadata.name} to initialise`);
1225
- if (this.initialised) {
1226
- logger.verbose(`${this.metadata.name} initialised`);
1227
- clearInterval(interval);
1228
- resolve();
1229
- }
1230
- }, 1e3);
1231
- });
1232
- }
1233
- };
1234
-
1235
- // src/modules/zkLend.ts
1236
1452
  var _ZkLend = class _ZkLend extends ILending {
1237
1453
  constructor(config, pricer) {
1238
1454
  super(config, {
@@ -1262,7 +1478,8 @@ var _ZkLend = class _ZkLend extends ILending {
1262
1478
  decimals: pool.token.decimals,
1263
1479
  borrowFactor: Web3Number.fromWei(pool.borrow_factor.value, pool.borrow_factor.decimals),
1264
1480
  collareralFactor,
1265
- displayDecimals: 2
1481
+ displayDecimals: 2,
1482
+ indexingType: "ignore" /* IGNORE */
1266
1483
  };
1267
1484
  this.tokens.push(token);
1268
1485
  });
@@ -1664,7 +1881,8 @@ var EkuboPricer = class extends PricerBase {
1664
1881
  constructor(config, tokens2) {
1665
1882
  super(config, tokens2);
1666
1883
  this.EKUBO_PRICE_FETCHER_ADDRESS = "0x04946fb4ad5237d97bbb1256eba2080c4fe1de156da6a7f83e3b4823bb6d7da1";
1667
- this.USDC_ADDRESS = "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";
1884
+ // Updating to new USDC_ADDRESS
1885
+ this.USDC_ADDRESS = "0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb";
1668
1886
  this.USDC_DECIMALS = 6;
1669
1887
  this.contract = new Contract2({
1670
1888
  abi: ekubo_price_fethcer_abi_default,
@@ -3250,192 +3468,6 @@ LSTAPRService.cache = null;
3250
3468
  LSTAPRService.cacheTimestamp = 0;
3251
3469
  LSTAPRService.CACHE_DURATION = 5 * 60 * 1e3;
3252
3470
 
3253
- // src/interfaces/common.tsx
3254
- import { BlockTag, RpcProvider as RpcProvider3 } from "starknet";
3255
- import { Fragment, jsx } from "react/jsx-runtime";
3256
- var RiskType = /* @__PURE__ */ ((RiskType2) => {
3257
- RiskType2["MARKET_RISK"] = "Market Risk";
3258
- RiskType2["IMPERMANENT_LOSS"] = "Impermanent Loss Risk";
3259
- RiskType2["LIQUIDATION_RISK"] = "Liquidation Risk";
3260
- RiskType2["LOW_LIQUIDITY_RISK"] = "Low Liquidity Risk";
3261
- RiskType2["SMART_CONTRACT_RISK"] = "Smart Contract Risk";
3262
- RiskType2["ORACLE_RISK"] = "Oracle Risk";
3263
- RiskType2["TECHNICAL_RISK"] = "Technical Risk";
3264
- RiskType2["COUNTERPARTY_RISK"] = "Counterparty Risk";
3265
- RiskType2["DEPEG_RISK"] = "Depeg Risk";
3266
- return RiskType2;
3267
- })(RiskType || {});
3268
- var Network = /* @__PURE__ */ ((Network2) => {
3269
- Network2["mainnet"] = "mainnet";
3270
- Network2["sepolia"] = "sepolia";
3271
- Network2["devnet"] = "devnet";
3272
- return Network2;
3273
- })(Network || {});
3274
- var StrategyTag = /* @__PURE__ */ ((StrategyTag3) => {
3275
- StrategyTag3["META_VAULT"] = "Meta Vaults";
3276
- StrategyTag3["LEVERED"] = "Maxx";
3277
- StrategyTag3["AUTOMATED_LP"] = "Ekubo";
3278
- StrategyTag3["BTC"] = "BTC";
3279
- return StrategyTag3;
3280
- })(StrategyTag || {});
3281
- var VaultType = /* @__PURE__ */ ((VaultType2) => {
3282
- VaultType2["LOOPING"] = "Looping";
3283
- VaultType2["META_VAULT"] = "Meta Vault";
3284
- VaultType2["DELTA_NEUTRAL"] = "Delta Neutral";
3285
- VaultType2["AUTOMATED_LP"] = "Automated LP";
3286
- VaultType2["TVA"] = "Troves Value Averaging";
3287
- return VaultType2;
3288
- })(VaultType || {});
3289
- var AuditStatus = /* @__PURE__ */ ((AuditStatus2) => {
3290
- AuditStatus2["AUDITED"] = "Audited";
3291
- AuditStatus2["NOT_AUDITED"] = "Not Audited";
3292
- return AuditStatus2;
3293
- })(AuditStatus || {});
3294
- var SourceCodeType = /* @__PURE__ */ ((SourceCodeType2) => {
3295
- SourceCodeType2["OPEN_SOURCE"] = "Open Source";
3296
- SourceCodeType2["CLOSED_SOURCE"] = "Closed Source";
3297
- return SourceCodeType2;
3298
- })(SourceCodeType || {});
3299
- var AccessControlType = /* @__PURE__ */ ((AccessControlType2) => {
3300
- AccessControlType2["MULTISIG_ACCOUNT"] = "Multisig Account";
3301
- AccessControlType2["STANDARD_ACCOUNT"] = "Standard Account";
3302
- AccessControlType2["ROLE_BASED_ACCESS"] = "Role Based Access";
3303
- return AccessControlType2;
3304
- })(AccessControlType || {});
3305
- var InstantWithdrawalVault = /* @__PURE__ */ ((InstantWithdrawalVault2) => {
3306
- InstantWithdrawalVault2["YES"] = "Yes";
3307
- InstantWithdrawalVault2["NO"] = "No";
3308
- return InstantWithdrawalVault2;
3309
- })(InstantWithdrawalVault || {});
3310
- var FlowChartColors = /* @__PURE__ */ ((FlowChartColors2) => {
3311
- FlowChartColors2["Green"] = "purple";
3312
- FlowChartColors2["Blue"] = "#35484f";
3313
- FlowChartColors2["Purple"] = "#6e53dc";
3314
- return FlowChartColors2;
3315
- })(FlowChartColors || {});
3316
- var StrategyLiveStatus = /* @__PURE__ */ ((StrategyLiveStatus2) => {
3317
- StrategyLiveStatus2["ACTIVE"] = "Active";
3318
- StrategyLiveStatus2["NEW"] = "New";
3319
- StrategyLiveStatus2["COMING_SOON"] = "Coming Soon";
3320
- StrategyLiveStatus2["DEPRECATED"] = "Deprecated";
3321
- StrategyLiveStatus2["RETIRED"] = "Retired";
3322
- StrategyLiveStatus2["HOT"] = "Hot & New \u{1F525}";
3323
- return StrategyLiveStatus2;
3324
- })(StrategyLiveStatus || {});
3325
- function getMainnetConfig(rpcUrl = "https://starknet-mainnet.public.blastapi.io", blockIdentifier = BlockTag.LATEST) {
3326
- return {
3327
- provider: new RpcProvider3({
3328
- nodeUrl: rpcUrl,
3329
- blockIdentifier
3330
- // specVersion
3331
- }),
3332
- stage: "production",
3333
- network: "mainnet" /* mainnet */
3334
- };
3335
- }
3336
- var getStrategyTagDesciption = (tag) => {
3337
- switch (tag) {
3338
- case "Meta Vaults" /* META_VAULT */:
3339
- return "A meta vault is a vault that auto allocates funds to multiple vaults based on optimal yield opportunities";
3340
- case "Maxx" /* LEVERED */:
3341
- return "Looping vaults on Endur LSTs with leveraged borrowing of STRK or BTC to increase yield (2-4x higher yield than simply staking)";
3342
- case "Ekubo" /* AUTOMATED_LP */:
3343
- return "Automated LP vaults on Ekubo that rebalance position automatically, ensuring you earn fees efficiently";
3344
- case "BTC" /* BTC */:
3345
- return "BTC linked vaults";
3346
- }
3347
- };
3348
- var getAllStrategyTags = () => {
3349
- return Object.values(StrategyTag);
3350
- };
3351
- var getRiskExplaination = (riskType) => {
3352
- switch (riskType) {
3353
- case "Market Risk" /* MARKET_RISK */:
3354
- return "The risk of the market moving against the position.";
3355
- case "Impermanent Loss Risk" /* IMPERMANENT_LOSS */:
3356
- return "The temporary loss of value experienced by liquidity providers in AMMs when asset prices diverge compared to simply holding them.";
3357
- case "Liquidation Risk" /* LIQUIDATION_RISK */:
3358
- return "The risk of losing funds due to the position being liquidated.";
3359
- case "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */:
3360
- return "The risk of low liquidity in the pool, which can lead to high slippages or reduced in-abilities to quickly exit the position.";
3361
- case "Oracle Risk" /* ORACLE_RISK */:
3362
- return "The risk of the oracle being manipulated or incorrect.";
3363
- case "Smart Contract Risk" /* SMART_CONTRACT_RISK */:
3364
- return "The risk of the smart contract being vulnerable to attacks.";
3365
- case "Technical Risk" /* TECHNICAL_RISK */:
3366
- return "The risk of technical issues e.g. backend failure.";
3367
- case "Counterparty Risk" /* COUNTERPARTY_RISK */:
3368
- return "The risk of the counterparty defaulting e.g. bad debt on lending platforms.";
3369
- case "Depeg Risk" /* DEPEG_RISK */:
3370
- return "The risk of a token losing its peg to the underlying asset, leading to potential losses for holders.";
3371
- }
3372
- };
3373
- var getRiskColor = (risk) => {
3374
- const value = risk.value;
3375
- if (value <= 2) return "light_green_2";
3376
- if (value < 3) return "yellow";
3377
- return "red";
3378
- };
3379
- var getNoRiskTags = (risks) => {
3380
- const noRisks1 = risks.filter((risk) => risk.value === 0).map((risk) => risk.type);
3381
- const noRisks2 = Object.values(RiskType).filter(
3382
- (risk) => !risks.map((risk2) => risk2.type).includes(risk)
3383
- );
3384
- const mergedUnique = [.../* @__PURE__ */ new Set([...noRisks1, ...noRisks2])];
3385
- return mergedUnique;
3386
- };
3387
- function highlightTextWithLinks(put, highlights) {
3388
- const escapeRegExp = (text) => text.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
3389
- const pattern = new RegExp(
3390
- `(${highlights.map((m) => escapeRegExp(m.highlight)).join("|")})`,
3391
- "gi"
3392
- );
3393
- const parts = put.split(pattern);
3394
- return /* @__PURE__ */ jsx(Fragment, { children: parts.map((part, i) => {
3395
- const match = highlights.find((m) => m.highlight.toLowerCase() === part.toLowerCase());
3396
- return match ? /* @__PURE__ */ jsx("a", { href: match.link, target: "_blank", style: { color: "white", background: "rgba(255, 255, 255, 0.04)" }, children: part }, i) : /* @__PURE__ */ jsx("span", { children: part }, i);
3397
- }) });
3398
- }
3399
- var VesuProtocol = {
3400
- name: "Vesu",
3401
- logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
3402
- };
3403
- var EndurProtocol = {
3404
- name: "Endur",
3405
- logo: "http://endur.fi/logo.png"
3406
- };
3407
- var ExtendedProtocol = {
3408
- name: "Extended",
3409
- logo: "https://static-assets-8zct.onrender.com/integrations/extended/extended.svg"
3410
- };
3411
- var Protocols = {
3412
- VESU: VesuProtocol,
3413
- ENDUR: EndurProtocol,
3414
- EXTENDED: ExtendedProtocol
3415
- };
3416
- var UnwrapLabsCurator = {
3417
- name: "Unwrap Labs",
3418
- logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
3419
- };
3420
-
3421
- // src/interfaces/initializable.ts
3422
- var Initializable = class {
3423
- constructor() {
3424
- this.initialized = false;
3425
- }
3426
- async waitForInitilisation() {
3427
- return new Promise((resolve, reject) => {
3428
- const interval = setInterval(() => {
3429
- if (this.initialized) {
3430
- console.log("Initialised");
3431
- clearInterval(interval);
3432
- resolve();
3433
- }
3434
- }, 1e3);
3435
- });
3436
- }
3437
- };
3438
-
3439
3471
  // src/strategies/autoCompounderStrk.ts
3440
3472
  import { Contract as Contract4, uint256 as uint2565 } from "starknet";
3441
3473
  var AutoCompounderSTRK = class {
@@ -29511,7 +29543,8 @@ var vesuPrimeUSDC = {
29511
29543
  name: "Vesu Prime USDC",
29512
29544
  decimals: 18,
29513
29545
  logo: usdc.logo,
29514
- displayDecimals: 2
29546
+ displayDecimals: 2,
29547
+ indexingType: "ignore" /* IGNORE */
29515
29548
  };
29516
29549
  var strk = Global.getDefaultTokens().find((t) => t.symbol === "STRK");
29517
29550
  function getYoloVaultErc4626Config(mainToken, secondaryToken) {
@@ -35319,6 +35352,7 @@ export {
35319
35352
  StrategyLiveStatus,
35320
35353
  StrategyTag,
35321
35354
  StrategyType,
35355
+ TokenIndexingType,
35322
35356
  UNIVERSAL_ADAPTERS,
35323
35357
  UNIVERSAL_MANAGE_IDS,
35324
35358
  UniversalLstMultiplierStrategy,