@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.
package/dist/index.mjs CHANGED
@@ -4,6 +4,269 @@ import axios3 from "axios";
4
4
  // src/global.ts
5
5
  import axios from "axios";
6
6
 
7
+ // src/utils/logger.node.ts
8
+ import winston, { format } from "winston";
9
+ var colors = {
10
+ error: "red",
11
+ warn: "yellow",
12
+ info: "blue",
13
+ verbose: "white",
14
+ debug: "white"
15
+ };
16
+ winston.addColors(colors);
17
+ var logLevel = (process.env.LOG_LEVEL || process.env.SDK_LOG_LEVEL || "debug").toLowerCase();
18
+ var logger = winston.createLogger({
19
+ level: logLevel,
20
+ // Set the minimum logging level from environment variable
21
+ format: format.combine(
22
+ format.colorize({ all: true }),
23
+ // Apply custom colors
24
+ format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
25
+ // Add timestamp to log messages
26
+ format.printf(({ timestamp, level, message, ...meta }) => {
27
+ let msg = `${timestamp} ${level}: ${message}`;
28
+ if (meta && meta[/* @__PURE__ */ Symbol.for("splat")]) {
29
+ const splat = meta[/* @__PURE__ */ Symbol.for("splat")];
30
+ if (Array.isArray(splat)) {
31
+ for (const arg of splat) {
32
+ if (arg instanceof Error) {
33
+ msg += `
34
+ ${arg.stack}`;
35
+ }
36
+ }
37
+ }
38
+ }
39
+ return msg;
40
+ })
41
+ ),
42
+ transports: [
43
+ new winston.transports.Console()
44
+ // Output logs to the console
45
+ ]
46
+ });
47
+
48
+ // src/interfaces/lending.ts
49
+ var MarginType = /* @__PURE__ */ ((MarginType2) => {
50
+ MarginType2["SHARED"] = "shared";
51
+ MarginType2["NONE"] = "none";
52
+ return MarginType2;
53
+ })(MarginType || {});
54
+ var ILending = class {
55
+ constructor(config, metadata) {
56
+ this.tokens = [];
57
+ this.initialised = false;
58
+ this.metadata = metadata;
59
+ this.config = config;
60
+ this.init();
61
+ }
62
+ /** Wait for initialisation */
63
+ waitForInitilisation() {
64
+ return new Promise((resolve, reject) => {
65
+ const interval = setInterval(() => {
66
+ logger.verbose(`Waiting for ${this.metadata.name} to initialise`);
67
+ if (this.initialised) {
68
+ logger.verbose(`${this.metadata.name} initialised`);
69
+ clearInterval(interval);
70
+ resolve();
71
+ }
72
+ }, 1e3);
73
+ });
74
+ }
75
+ };
76
+
77
+ // src/interfaces/common.tsx
78
+ import { BlockTag, RpcProvider } from "starknet";
79
+ import { Fragment, jsx } from "react/jsx-runtime";
80
+ var RiskType = /* @__PURE__ */ ((RiskType2) => {
81
+ RiskType2["MARKET_RISK"] = "Market Risk";
82
+ RiskType2["IMPERMANENT_LOSS"] = "Impermanent Loss Risk";
83
+ RiskType2["LIQUIDATION_RISK"] = "Liquidation Risk";
84
+ RiskType2["LOW_LIQUIDITY_RISK"] = "Low Liquidity Risk";
85
+ RiskType2["SMART_CONTRACT_RISK"] = "Smart Contract Risk";
86
+ RiskType2["ORACLE_RISK"] = "Oracle Risk";
87
+ RiskType2["TECHNICAL_RISK"] = "Technical Risk";
88
+ RiskType2["COUNTERPARTY_RISK"] = "Counterparty Risk";
89
+ RiskType2["DEPEG_RISK"] = "Depeg Risk";
90
+ return RiskType2;
91
+ })(RiskType || {});
92
+ var TokenIndexingType = /* @__PURE__ */ ((TokenIndexingType2) => {
93
+ TokenIndexingType2["PEGGED"] = "pegged";
94
+ TokenIndexingType2["INDEXER"] = "indexer";
95
+ TokenIndexingType2["LST_SCRIPT"] = "lstScript";
96
+ TokenIndexingType2["IGNORE"] = "ignore";
97
+ return TokenIndexingType2;
98
+ })(TokenIndexingType || {});
99
+ var Network = /* @__PURE__ */ ((Network2) => {
100
+ Network2["mainnet"] = "mainnet";
101
+ Network2["sepolia"] = "sepolia";
102
+ Network2["devnet"] = "devnet";
103
+ return Network2;
104
+ })(Network || {});
105
+ var StrategyTag = /* @__PURE__ */ ((StrategyTag3) => {
106
+ StrategyTag3["META_VAULT"] = "Meta Vaults";
107
+ StrategyTag3["LEVERED"] = "Maxx";
108
+ StrategyTag3["AUTOMATED_LP"] = "Ekubo";
109
+ StrategyTag3["BTC"] = "BTC";
110
+ return StrategyTag3;
111
+ })(StrategyTag || {});
112
+ var VaultType = /* @__PURE__ */ ((VaultType2) => {
113
+ VaultType2["LOOPING"] = "Looping";
114
+ VaultType2["META_VAULT"] = "Meta Vault";
115
+ VaultType2["DELTA_NEUTRAL"] = "Delta Neutral";
116
+ VaultType2["AUTOMATED_LP"] = "Automated LP";
117
+ VaultType2["TVA"] = "Troves Value Averaging";
118
+ return VaultType2;
119
+ })(VaultType || {});
120
+ var AuditStatus = /* @__PURE__ */ ((AuditStatus2) => {
121
+ AuditStatus2["AUDITED"] = "Audited";
122
+ AuditStatus2["NOT_AUDITED"] = "Not Audited";
123
+ return AuditStatus2;
124
+ })(AuditStatus || {});
125
+ var SourceCodeType = /* @__PURE__ */ ((SourceCodeType2) => {
126
+ SourceCodeType2["OPEN_SOURCE"] = "Open Source";
127
+ SourceCodeType2["CLOSED_SOURCE"] = "Closed Source";
128
+ return SourceCodeType2;
129
+ })(SourceCodeType || {});
130
+ var AccessControlType = /* @__PURE__ */ ((AccessControlType2) => {
131
+ AccessControlType2["MULTISIG_ACCOUNT"] = "Multisig Account";
132
+ AccessControlType2["STANDARD_ACCOUNT"] = "Standard Account";
133
+ AccessControlType2["ROLE_BASED_ACCESS"] = "Role Based Access";
134
+ return AccessControlType2;
135
+ })(AccessControlType || {});
136
+ var InstantWithdrawalVault = /* @__PURE__ */ ((InstantWithdrawalVault2) => {
137
+ InstantWithdrawalVault2["YES"] = "Yes";
138
+ InstantWithdrawalVault2["NO"] = "No";
139
+ return InstantWithdrawalVault2;
140
+ })(InstantWithdrawalVault || {});
141
+ var FlowChartColors = /* @__PURE__ */ ((FlowChartColors2) => {
142
+ FlowChartColors2["Green"] = "purple";
143
+ FlowChartColors2["Blue"] = "#35484f";
144
+ FlowChartColors2["Purple"] = "#6e53dc";
145
+ return FlowChartColors2;
146
+ })(FlowChartColors || {});
147
+ var StrategyLiveStatus = /* @__PURE__ */ ((StrategyLiveStatus2) => {
148
+ StrategyLiveStatus2["ACTIVE"] = "Active";
149
+ StrategyLiveStatus2["NEW"] = "New";
150
+ StrategyLiveStatus2["COMING_SOON"] = "Coming Soon";
151
+ StrategyLiveStatus2["DEPRECATED"] = "Deprecated";
152
+ StrategyLiveStatus2["RETIRED"] = "Retired";
153
+ StrategyLiveStatus2["HOT"] = "Hot & New \u{1F525}";
154
+ return StrategyLiveStatus2;
155
+ })(StrategyLiveStatus || {});
156
+ function getMainnetConfig(rpcUrl = "https://starknet-mainnet.public.blastapi.io", blockIdentifier = BlockTag.LATEST) {
157
+ return {
158
+ provider: new RpcProvider({
159
+ nodeUrl: rpcUrl,
160
+ blockIdentifier
161
+ // specVersion
162
+ }),
163
+ stage: "production",
164
+ network: "mainnet" /* mainnet */
165
+ };
166
+ }
167
+ var getStrategyTagDesciption = (tag) => {
168
+ switch (tag) {
169
+ case "Meta Vaults" /* META_VAULT */:
170
+ return "A meta vault is a vault that auto allocates funds to multiple vaults based on optimal yield opportunities";
171
+ case "Maxx" /* LEVERED */:
172
+ return "Looping vaults on Endur LSTs with leveraged borrowing of STRK or BTC to increase yield (2-4x higher yield than simply staking)";
173
+ case "Ekubo" /* AUTOMATED_LP */:
174
+ return "Automated LP vaults on Ekubo that rebalance position automatically, ensuring you earn fees efficiently";
175
+ case "BTC" /* BTC */:
176
+ return "BTC linked vaults";
177
+ }
178
+ };
179
+ var getAllStrategyTags = () => {
180
+ return Object.values(StrategyTag);
181
+ };
182
+ var getRiskExplaination = (riskType) => {
183
+ switch (riskType) {
184
+ case "Market Risk" /* MARKET_RISK */:
185
+ return "The risk of the market moving against the position.";
186
+ case "Impermanent Loss Risk" /* IMPERMANENT_LOSS */:
187
+ return "The temporary loss of value experienced by liquidity providers in AMMs when asset prices diverge compared to simply holding them.";
188
+ case "Liquidation Risk" /* LIQUIDATION_RISK */:
189
+ return "The risk of losing funds due to the position being liquidated.";
190
+ case "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */:
191
+ return "The risk of low liquidity in the pool, which can lead to high slippages or reduced in-abilities to quickly exit the position.";
192
+ case "Oracle Risk" /* ORACLE_RISK */:
193
+ return "The risk of the oracle being manipulated or incorrect.";
194
+ case "Smart Contract Risk" /* SMART_CONTRACT_RISK */:
195
+ return "The risk of the smart contract being vulnerable to attacks.";
196
+ case "Technical Risk" /* TECHNICAL_RISK */:
197
+ return "The risk of technical issues e.g. backend failure.";
198
+ case "Counterparty Risk" /* COUNTERPARTY_RISK */:
199
+ return "The risk of the counterparty defaulting e.g. bad debt on lending platforms.";
200
+ case "Depeg Risk" /* DEPEG_RISK */:
201
+ return "The risk of a token losing its peg to the underlying asset, leading to potential losses for holders.";
202
+ }
203
+ };
204
+ var getRiskColor = (risk) => {
205
+ const value = risk.value;
206
+ if (value <= 2) return "light_green_2";
207
+ if (value < 3) return "yellow";
208
+ return "red";
209
+ };
210
+ var getNoRiskTags = (risks) => {
211
+ const noRisks1 = risks.filter((risk) => risk.value === 0).map((risk) => risk.type);
212
+ const noRisks2 = Object.values(RiskType).filter(
213
+ (risk) => !risks.map((risk2) => risk2.type).includes(risk)
214
+ );
215
+ const mergedUnique = [.../* @__PURE__ */ new Set([...noRisks1, ...noRisks2])];
216
+ return mergedUnique;
217
+ };
218
+ function highlightTextWithLinks(put, highlights) {
219
+ const escapeRegExp = (text) => text.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
220
+ const pattern = new RegExp(
221
+ `(${highlights.map((m) => escapeRegExp(m.highlight)).join("|")})`,
222
+ "gi"
223
+ );
224
+ const parts = put.split(pattern);
225
+ return /* @__PURE__ */ jsx(Fragment, { children: parts.map((part, i) => {
226
+ const match = highlights.find((m) => m.highlight.toLowerCase() === part.toLowerCase());
227
+ 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);
228
+ }) });
229
+ }
230
+ var VesuProtocol = {
231
+ name: "Vesu",
232
+ logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
233
+ };
234
+ var EndurProtocol = {
235
+ name: "Endur",
236
+ logo: "http://endur.fi/logo.png"
237
+ };
238
+ var ExtendedProtocol = {
239
+ name: "Extended",
240
+ logo: "https://static-assets-8zct.onrender.com/integrations/extended/extended.svg"
241
+ };
242
+ var Protocols = {
243
+ VESU: VesuProtocol,
244
+ ENDUR: EndurProtocol,
245
+ EXTENDED: ExtendedProtocol
246
+ };
247
+ var UnwrapLabsCurator = {
248
+ name: "Unwrap Labs",
249
+ logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
250
+ };
251
+
252
+ // src/interfaces/initializable.ts
253
+ var Initializable = class {
254
+ constructor() {
255
+ this.initialized = false;
256
+ }
257
+ async waitForInitilisation() {
258
+ return new Promise((resolve, reject) => {
259
+ const interval = setInterval(() => {
260
+ if (this.initialized) {
261
+ console.log("Initialised");
262
+ clearInterval(interval);
263
+ resolve();
264
+ }
265
+ }, 1e3);
266
+ });
267
+ }
268
+ };
269
+
7
270
  // src/dataTypes/bignumber.node.ts
8
271
  import util from "util";
9
272
 
@@ -266,47 +529,6 @@ var MyNumber = class _MyNumber {
266
529
  }
267
530
  };
268
531
 
269
- // src/utils/logger.node.ts
270
- import winston, { format } from "winston";
271
- var colors = {
272
- error: "red",
273
- warn: "yellow",
274
- info: "blue",
275
- verbose: "white",
276
- debug: "white"
277
- };
278
- winston.addColors(colors);
279
- var logLevel = (process.env.LOG_LEVEL || process.env.SDK_LOG_LEVEL || "debug").toLowerCase();
280
- var logger = winston.createLogger({
281
- level: logLevel,
282
- // Set the minimum logging level from environment variable
283
- format: format.combine(
284
- format.colorize({ all: true }),
285
- // Apply custom colors
286
- format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
287
- // Add timestamp to log messages
288
- format.printf(({ timestamp, level, message, ...meta }) => {
289
- let msg = `${timestamp} ${level}: ${message}`;
290
- if (meta && meta[/* @__PURE__ */ Symbol.for("splat")]) {
291
- const splat = meta[/* @__PURE__ */ Symbol.for("splat")];
292
- if (Array.isArray(splat)) {
293
- for (const arg of splat) {
294
- if (arg instanceof Error) {
295
- msg += `
296
- ${arg.stack}`;
297
- }
298
- }
299
- }
300
- }
301
- return msg;
302
- })
303
- ),
304
- transports: [
305
- new winston.transports.Console()
306
- // Output logs to the console
307
- ]
308
- });
309
-
310
532
  // src/global.ts
311
533
  var FatalError = class extends Error {
312
534
  constructor(message, err) {
@@ -326,7 +548,8 @@ var defaultTokens = [{
326
548
  coingeckId: "starknet",
327
549
  displayDecimals: 2,
328
550
  priceCheckAmount: 5e3,
329
- priceMethod: "Avnu"
551
+ priceMethod: "Avnu",
552
+ indexingType: "indexer" /* INDEXER */
330
553
  }, {
331
554
  name: "xSTRK",
332
555
  symbol: "xSTRK",
@@ -336,7 +559,8 @@ var defaultTokens = [{
336
559
  coingeckId: void 0,
337
560
  priceCheckAmount: 5e3,
338
561
  displayDecimals: 2,
339
- priceMethod: "Avnu"
562
+ priceMethod: "Avnu",
563
+ indexingType: "lstScript" /* LST_SCRIPT */
340
564
  }, {
341
565
  name: "ETH",
342
566
  symbol: "ETH",
@@ -345,7 +569,8 @@ var defaultTokens = [{
345
569
  decimals: 18,
346
570
  coingeckId: void 0,
347
571
  priceCheckAmount: 0.1,
348
- displayDecimals: 6
572
+ displayDecimals: 6,
573
+ indexingType: "indexer" /* INDEXER */
349
574
  }, {
350
575
  name: "USDC.e",
351
576
  symbol: "USDC.e",
@@ -354,7 +579,9 @@ var defaultTokens = [{
354
579
  decimals: 6,
355
580
  coingeckId: void 0,
356
581
  displayDecimals: 2,
357
- priceCheckAmount: 1e3
582
+ priceCheckAmount: 1e3,
583
+ priceProxySymbol: "USDC",
584
+ indexingType: "pegged" /* PEGGED */
358
585
  }, {
359
586
  name: "USDC",
360
587
  symbol: "USDC",
@@ -363,7 +590,8 @@ var defaultTokens = [{
363
590
  decimals: 6,
364
591
  coingeckId: void 0,
365
592
  displayDecimals: 2,
366
- priceCheckAmount: 1e3
593
+ priceCheckAmount: 1e3,
594
+ indexingType: "indexer" /* INDEXER */
367
595
  }, {
368
596
  name: "USDT",
369
597
  symbol: "USDT",
@@ -372,7 +600,8 @@ var defaultTokens = [{
372
600
  decimals: 6,
373
601
  coingeckId: void 0,
374
602
  priceCheckAmount: 1e3,
375
- displayDecimals: 2
603
+ displayDecimals: 2,
604
+ indexingType: "indexer" /* INDEXER */
376
605
  }, {
377
606
  name: "WBTC",
378
607
  symbol: "WBTC",
@@ -381,8 +610,9 @@ var defaultTokens = [{
381
610
  decimals: 8,
382
611
  coingeckId: void 0,
383
612
  displayDecimals: 6,
384
- priceCheckAmount: 1e-3
613
+ priceCheckAmount: 1e-3,
385
614
  // 112000 * 0.0001 = $110.2
615
+ indexingType: "indexer" /* INDEXER */
386
616
  }, {
387
617
  name: "tBTC",
388
618
  symbol: "tBTC",
@@ -391,8 +621,10 @@ var defaultTokens = [{
391
621
  decimals: 18,
392
622
  coingeckId: void 0,
393
623
  displayDecimals: 6,
394
- priceCheckAmount: 1e-3
624
+ priceCheckAmount: 1e-3,
395
625
  // 112000 * 0.0001 = $110.2
626
+ priceProxySymbol: "WBTC",
627
+ indexingType: "pegged" /* PEGGED */
396
628
  }, {
397
629
  name: "solvBTC",
398
630
  symbol: "solvBTC",
@@ -402,8 +634,9 @@ var defaultTokens = [{
402
634
  coingeckId: void 0,
403
635
  priceProxySymbol: "WBTC",
404
636
  displayDecimals: 6,
405
- priceCheckAmount: 1e-4
637
+ priceCheckAmount: 1e-4,
406
638
  // 112000 * 0.0001 = $11.2
639
+ indexingType: "pegged" /* PEGGED */
407
640
  }, {
408
641
  name: "LBTC",
409
642
  symbol: "LBTC",
@@ -413,8 +646,9 @@ var defaultTokens = [{
413
646
  coingeckId: void 0,
414
647
  displayDecimals: 6,
415
648
  priceProxySymbol: "WBTC",
416
- priceCheckAmount: 1e-4
649
+ priceCheckAmount: 1e-4,
417
650
  // 112000 * 0.0001 = $11.2
651
+ indexingType: "pegged" /* PEGGED */
418
652
  }, {
419
653
  name: "xWBTC",
420
654
  symbol: "xWBTC",
@@ -425,7 +659,8 @@ var defaultTokens = [{
425
659
  displayDecimals: 6,
426
660
  priceCheckAmount: 1e-3,
427
661
  // 112000 * 0.0001 = $110.2
428
- priceMethod: "Avnu"
662
+ priceMethod: "Avnu",
663
+ indexingType: "lstScript" /* LST_SCRIPT */
429
664
  }, {
430
665
  name: "xsBTC",
431
666
  symbol: "xsBTC",
@@ -436,7 +671,8 @@ var defaultTokens = [{
436
671
  displayDecimals: 6,
437
672
  priceCheckAmount: 1e-4,
438
673
  // 112000 * 0.0001 = $11.2
439
- priceMethod: "Avnu"
674
+ priceMethod: "Avnu",
675
+ indexingType: "lstScript" /* LST_SCRIPT */
440
676
  }, {
441
677
  name: "xtBTC",
442
678
  symbol: "xtBTC",
@@ -447,7 +683,8 @@ var defaultTokens = [{
447
683
  displayDecimals: 6,
448
684
  priceCheckAmount: 1e-3,
449
685
  // 112000 * 0.0001 = $110.2
450
- priceMethod: "Avnu"
686
+ priceMethod: "Avnu",
687
+ indexingType: "lstScript" /* LST_SCRIPT */
451
688
  }, {
452
689
  name: "xLBTC",
453
690
  symbol: "xLBTC",
@@ -458,7 +695,8 @@ var defaultTokens = [{
458
695
  displayDecimals: 6,
459
696
  priceCheckAmount: 1e-4,
460
697
  // 112000 * 0.0001 = $11.2
461
- priceMethod: "Avnu"
698
+ priceMethod: "Avnu",
699
+ indexingType: "lstScript" /* LST_SCRIPT */
462
700
  }, {
463
701
  name: "mRe7BTC",
464
702
  symbol: "mRe7BTC",
@@ -469,7 +707,8 @@ var defaultTokens = [{
469
707
  displayDecimals: 6,
470
708
  priceCheckAmount: 1e-4,
471
709
  // 112000 * 0.0001 = $11.2
472
- dontPrice: true
710
+ dontPrice: true,
711
+ indexingType: "ignore" /* IGNORE */
473
712
  }, {
474
713
  name: "mRe7YIELD",
475
714
  symbol: "mRe7YIELD",
@@ -479,7 +718,8 @@ var defaultTokens = [{
479
718
  coingeckId: void 0,
480
719
  displayDecimals: 2,
481
720
  priceCheckAmount: 100,
482
- dontPrice: true
721
+ dontPrice: true,
722
+ indexingType: "ignore" /* IGNORE */
483
723
  }, {
484
724
  name: "fyeWBTC",
485
725
  symbol: "fyeWBTC",
@@ -490,7 +730,8 @@ var defaultTokens = [{
490
730
  displayDecimals: 6,
491
731
  priceCheckAmount: 1e-3,
492
732
  // 112000 * 0.0001 = $110.2
493
- dontPrice: true
733
+ dontPrice: true,
734
+ indexingType: "ignore" /* IGNORE */
494
735
  }, {
495
736
  name: "fyETH",
496
737
  symbol: "fyETH",
@@ -500,7 +741,8 @@ var defaultTokens = [{
500
741
  coingeckId: void 0,
501
742
  displayDecimals: 4,
502
743
  priceCheckAmount: 0.1,
503
- dontPrice: true
744
+ dontPrice: true,
745
+ indexingType: "ignore" /* IGNORE */
504
746
  }, {
505
747
  name: "fyeUSDC",
506
748
  symbol: "fyeUSDC",
@@ -510,7 +752,8 @@ var defaultTokens = [{
510
752
  coingeckId: void 0,
511
753
  displayDecimals: 2,
512
754
  priceCheckAmount: 100,
513
- dontPrice: true
755
+ dontPrice: true,
756
+ indexingType: "ignore" /* IGNORE */
514
757
  }, {
515
758
  name: "strkBTC",
516
759
  symbol: "strkBTC",
@@ -521,7 +764,9 @@ var defaultTokens = [{
521
764
  displayDecimals: 6,
522
765
  priceCheckAmount: 1e-3,
523
766
  // 112000 * 0.0001 = $110.2
524
- priceMethod: "Avnu"
767
+ priceMethod: "Avnu",
768
+ priceProxySymbol: "WBTC",
769
+ indexingType: "pegged" /* PEGGED */
525
770
  }, {
526
771
  name: "xstrkBTC",
527
772
  symbol: "xstrkBTC",
@@ -531,7 +776,8 @@ var defaultTokens = [{
531
776
  coingeckId: void 0,
532
777
  displayDecimals: 6,
533
778
  priceCheckAmount: 1e-3,
534
- priceMethod: "Avnu"
779
+ priceMethod: "Avnu",
780
+ indexingType: "lstScript" /* LST_SCRIPT */
535
781
  }];
536
782
  var tokens = defaultTokens;
537
783
  var _Global = class _Global {
@@ -564,7 +810,8 @@ var _Global = class _Global {
564
810
  decimals: token.decimals,
565
811
  logo: token.logoUri,
566
812
  coingeckId: token.extensions.coingeckoId,
567
- displayDecimals: 2
813
+ displayDecimals: 2,
814
+ indexingType: "ignore" /* IGNORE */
568
815
  });
569
816
  });
570
817
  console.log(tokens);
@@ -1258,35 +1505,6 @@ var Web3Number2 = class _Web3Number2 extends _Web3Number {
1258
1505
  }
1259
1506
  };
1260
1507
 
1261
- // src/interfaces/lending.ts
1262
- var MarginType = /* @__PURE__ */ ((MarginType2) => {
1263
- MarginType2["SHARED"] = "shared";
1264
- MarginType2["NONE"] = "none";
1265
- return MarginType2;
1266
- })(MarginType || {});
1267
- var ILending = class {
1268
- constructor(config, metadata) {
1269
- this.tokens = [];
1270
- this.initialised = false;
1271
- this.metadata = metadata;
1272
- this.config = config;
1273
- this.init();
1274
- }
1275
- /** Wait for initialisation */
1276
- waitForInitilisation() {
1277
- return new Promise((resolve, reject) => {
1278
- const interval = setInterval(() => {
1279
- logger.verbose(`Waiting for ${this.metadata.name} to initialise`);
1280
- if (this.initialised) {
1281
- logger.verbose(`${this.metadata.name} initialised`);
1282
- clearInterval(interval);
1283
- resolve();
1284
- }
1285
- }, 1e3);
1286
- });
1287
- }
1288
- };
1289
-
1290
1508
  // src/modules/zkLend.ts
1291
1509
  var _ZkLend = class _ZkLend extends ILending {
1292
1510
  constructor(config, pricer) {
@@ -1317,7 +1535,8 @@ var _ZkLend = class _ZkLend extends ILending {
1317
1535
  decimals: pool.token.decimals,
1318
1536
  borrowFactor: Web3Number2.fromWei(pool.borrow_factor.value, pool.borrow_factor.decimals),
1319
1537
  collareralFactor,
1320
- displayDecimals: 2
1538
+ displayDecimals: 2,
1539
+ indexingType: "ignore" /* IGNORE */
1321
1540
  };
1322
1541
  this.tokens.push(token);
1323
1542
  });
@@ -1719,7 +1938,8 @@ var EkuboPricer = class extends PricerBase {
1719
1938
  constructor(config, tokens2) {
1720
1939
  super(config, tokens2);
1721
1940
  this.EKUBO_PRICE_FETCHER_ADDRESS = "0x04946fb4ad5237d97bbb1256eba2080c4fe1de156da6a7f83e3b4823bb6d7da1";
1722
- this.USDC_ADDRESS = "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";
1941
+ // Updating to new USDC_ADDRESS
1942
+ this.USDC_ADDRESS = "0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb";
1723
1943
  this.USDC_DECIMALS = 6;
1724
1944
  this.contract = new Contract2({
1725
1945
  abi: ekubo_price_fethcer_abi_default,
@@ -3154,192 +3374,6 @@ var EkuboQuoter = class {
3154
3374
  }
3155
3375
  };
3156
3376
 
3157
- // src/interfaces/common.tsx
3158
- import { BlockTag, RpcProvider as RpcProvider3 } from "starknet";
3159
- import { Fragment, jsx } from "react/jsx-runtime";
3160
- var RiskType = /* @__PURE__ */ ((RiskType2) => {
3161
- RiskType2["MARKET_RISK"] = "Market Risk";
3162
- RiskType2["IMPERMANENT_LOSS"] = "Impermanent Loss Risk";
3163
- RiskType2["LIQUIDATION_RISK"] = "Liquidation Risk";
3164
- RiskType2["LOW_LIQUIDITY_RISK"] = "Low Liquidity Risk";
3165
- RiskType2["SMART_CONTRACT_RISK"] = "Smart Contract Risk";
3166
- RiskType2["ORACLE_RISK"] = "Oracle Risk";
3167
- RiskType2["TECHNICAL_RISK"] = "Technical Risk";
3168
- RiskType2["COUNTERPARTY_RISK"] = "Counterparty Risk";
3169
- RiskType2["DEPEG_RISK"] = "Depeg Risk";
3170
- return RiskType2;
3171
- })(RiskType || {});
3172
- var Network = /* @__PURE__ */ ((Network2) => {
3173
- Network2["mainnet"] = "mainnet";
3174
- Network2["sepolia"] = "sepolia";
3175
- Network2["devnet"] = "devnet";
3176
- return Network2;
3177
- })(Network || {});
3178
- var StrategyTag = /* @__PURE__ */ ((StrategyTag3) => {
3179
- StrategyTag3["META_VAULT"] = "Meta Vaults";
3180
- StrategyTag3["LEVERED"] = "Maxx";
3181
- StrategyTag3["AUTOMATED_LP"] = "Ekubo";
3182
- StrategyTag3["BTC"] = "BTC";
3183
- return StrategyTag3;
3184
- })(StrategyTag || {});
3185
- var VaultType = /* @__PURE__ */ ((VaultType2) => {
3186
- VaultType2["LOOPING"] = "Looping";
3187
- VaultType2["META_VAULT"] = "Meta Vault";
3188
- VaultType2["DELTA_NEUTRAL"] = "Delta Neutral";
3189
- VaultType2["AUTOMATED_LP"] = "Automated LP";
3190
- VaultType2["TVA"] = "Troves Value Averaging";
3191
- return VaultType2;
3192
- })(VaultType || {});
3193
- var AuditStatus = /* @__PURE__ */ ((AuditStatus2) => {
3194
- AuditStatus2["AUDITED"] = "Audited";
3195
- AuditStatus2["NOT_AUDITED"] = "Not Audited";
3196
- return AuditStatus2;
3197
- })(AuditStatus || {});
3198
- var SourceCodeType = /* @__PURE__ */ ((SourceCodeType2) => {
3199
- SourceCodeType2["OPEN_SOURCE"] = "Open Source";
3200
- SourceCodeType2["CLOSED_SOURCE"] = "Closed Source";
3201
- return SourceCodeType2;
3202
- })(SourceCodeType || {});
3203
- var AccessControlType = /* @__PURE__ */ ((AccessControlType2) => {
3204
- AccessControlType2["MULTISIG_ACCOUNT"] = "Multisig Account";
3205
- AccessControlType2["STANDARD_ACCOUNT"] = "Standard Account";
3206
- AccessControlType2["ROLE_BASED_ACCESS"] = "Role Based Access";
3207
- return AccessControlType2;
3208
- })(AccessControlType || {});
3209
- var InstantWithdrawalVault = /* @__PURE__ */ ((InstantWithdrawalVault2) => {
3210
- InstantWithdrawalVault2["YES"] = "Yes";
3211
- InstantWithdrawalVault2["NO"] = "No";
3212
- return InstantWithdrawalVault2;
3213
- })(InstantWithdrawalVault || {});
3214
- var FlowChartColors = /* @__PURE__ */ ((FlowChartColors2) => {
3215
- FlowChartColors2["Green"] = "purple";
3216
- FlowChartColors2["Blue"] = "#35484f";
3217
- FlowChartColors2["Purple"] = "#6e53dc";
3218
- return FlowChartColors2;
3219
- })(FlowChartColors || {});
3220
- var StrategyLiveStatus = /* @__PURE__ */ ((StrategyLiveStatus2) => {
3221
- StrategyLiveStatus2["ACTIVE"] = "Active";
3222
- StrategyLiveStatus2["NEW"] = "New";
3223
- StrategyLiveStatus2["COMING_SOON"] = "Coming Soon";
3224
- StrategyLiveStatus2["DEPRECATED"] = "Deprecated";
3225
- StrategyLiveStatus2["RETIRED"] = "Retired";
3226
- StrategyLiveStatus2["HOT"] = "Hot & New \u{1F525}";
3227
- return StrategyLiveStatus2;
3228
- })(StrategyLiveStatus || {});
3229
- function getMainnetConfig(rpcUrl = "https://starknet-mainnet.public.blastapi.io", blockIdentifier = BlockTag.LATEST) {
3230
- return {
3231
- provider: new RpcProvider3({
3232
- nodeUrl: rpcUrl,
3233
- blockIdentifier
3234
- // specVersion
3235
- }),
3236
- stage: "production",
3237
- network: "mainnet" /* mainnet */
3238
- };
3239
- }
3240
- var getStrategyTagDesciption = (tag) => {
3241
- switch (tag) {
3242
- case "Meta Vaults" /* META_VAULT */:
3243
- return "A meta vault is a vault that auto allocates funds to multiple vaults based on optimal yield opportunities";
3244
- case "Maxx" /* LEVERED */:
3245
- return "Looping vaults on Endur LSTs with leveraged borrowing of STRK or BTC to increase yield (2-4x higher yield than simply staking)";
3246
- case "Ekubo" /* AUTOMATED_LP */:
3247
- return "Automated LP vaults on Ekubo that rebalance position automatically, ensuring you earn fees efficiently";
3248
- case "BTC" /* BTC */:
3249
- return "BTC linked vaults";
3250
- }
3251
- };
3252
- var getAllStrategyTags = () => {
3253
- return Object.values(StrategyTag);
3254
- };
3255
- var getRiskExplaination = (riskType) => {
3256
- switch (riskType) {
3257
- case "Market Risk" /* MARKET_RISK */:
3258
- return "The risk of the market moving against the position.";
3259
- case "Impermanent Loss Risk" /* IMPERMANENT_LOSS */:
3260
- return "The temporary loss of value experienced by liquidity providers in AMMs when asset prices diverge compared to simply holding them.";
3261
- case "Liquidation Risk" /* LIQUIDATION_RISK */:
3262
- return "The risk of losing funds due to the position being liquidated.";
3263
- case "Low Liquidity Risk" /* LOW_LIQUIDITY_RISK */:
3264
- return "The risk of low liquidity in the pool, which can lead to high slippages or reduced in-abilities to quickly exit the position.";
3265
- case "Oracle Risk" /* ORACLE_RISK */:
3266
- return "The risk of the oracle being manipulated or incorrect.";
3267
- case "Smart Contract Risk" /* SMART_CONTRACT_RISK */:
3268
- return "The risk of the smart contract being vulnerable to attacks.";
3269
- case "Technical Risk" /* TECHNICAL_RISK */:
3270
- return "The risk of technical issues e.g. backend failure.";
3271
- case "Counterparty Risk" /* COUNTERPARTY_RISK */:
3272
- return "The risk of the counterparty defaulting e.g. bad debt on lending platforms.";
3273
- case "Depeg Risk" /* DEPEG_RISK */:
3274
- return "The risk of a token losing its peg to the underlying asset, leading to potential losses for holders.";
3275
- }
3276
- };
3277
- var getRiskColor = (risk) => {
3278
- const value = risk.value;
3279
- if (value <= 2) return "light_green_2";
3280
- if (value < 3) return "yellow";
3281
- return "red";
3282
- };
3283
- var getNoRiskTags = (risks) => {
3284
- const noRisks1 = risks.filter((risk) => risk.value === 0).map((risk) => risk.type);
3285
- const noRisks2 = Object.values(RiskType).filter(
3286
- (risk) => !risks.map((risk2) => risk2.type).includes(risk)
3287
- );
3288
- const mergedUnique = [.../* @__PURE__ */ new Set([...noRisks1, ...noRisks2])];
3289
- return mergedUnique;
3290
- };
3291
- function highlightTextWithLinks(put, highlights) {
3292
- const escapeRegExp = (text) => text.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
3293
- const pattern = new RegExp(
3294
- `(${highlights.map((m) => escapeRegExp(m.highlight)).join("|")})`,
3295
- "gi"
3296
- );
3297
- const parts = put.split(pattern);
3298
- return /* @__PURE__ */ jsx(Fragment, { children: parts.map((part, i) => {
3299
- const match = highlights.find((m) => m.highlight.toLowerCase() === part.toLowerCase());
3300
- 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);
3301
- }) });
3302
- }
3303
- var VesuProtocol = {
3304
- name: "Vesu",
3305
- logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
3306
- };
3307
- var EndurProtocol = {
3308
- name: "Endur",
3309
- logo: "http://endur.fi/logo.png"
3310
- };
3311
- var ExtendedProtocol = {
3312
- name: "Extended",
3313
- logo: "https://static-assets-8zct.onrender.com/integrations/extended/extended.svg"
3314
- };
3315
- var Protocols = {
3316
- VESU: VesuProtocol,
3317
- ENDUR: EndurProtocol,
3318
- EXTENDED: ExtendedProtocol
3319
- };
3320
- var UnwrapLabsCurator = {
3321
- name: "Unwrap Labs",
3322
- logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
3323
- };
3324
-
3325
- // src/interfaces/initializable.ts
3326
- var Initializable = class {
3327
- constructor() {
3328
- this.initialized = false;
3329
- }
3330
- async waitForInitilisation() {
3331
- return new Promise((resolve, reject) => {
3332
- const interval = setInterval(() => {
3333
- if (this.initialized) {
3334
- console.log("Initialised");
3335
- clearInterval(interval);
3336
- resolve();
3337
- }
3338
- }, 1e3);
3339
- });
3340
- }
3341
- };
3342
-
3343
3377
  // src/strategies/autoCompounderStrk.ts
3344
3378
  import { Contract as Contract4, uint256 as uint2566 } from "starknet";
3345
3379
  var AutoCompounderSTRK = class {
@@ -29516,7 +29550,8 @@ var vesuPrimeUSDC = {
29516
29550
  name: "Vesu Prime USDC",
29517
29551
  decimals: 18,
29518
29552
  logo: usdc.logo,
29519
- displayDecimals: 2
29553
+ displayDecimals: 2,
29554
+ indexingType: "ignore" /* IGNORE */
29520
29555
  };
29521
29556
  var strk = Global.getDefaultTokens().find((t) => t.symbol === "STRK");
29522
29557
  function getYoloVaultErc4626Config(mainToken, secondaryToken) {
@@ -35918,6 +35953,7 @@ export {
35918
35953
  StrategyType,
35919
35954
  TelegramGroupNotif,
35920
35955
  TelegramNotif,
35956
+ TokenIndexingType,
35921
35957
  UNIVERSAL_ADAPTERS,
35922
35958
  UNIVERSAL_MANAGE_IDS,
35923
35959
  UniversalLstMultiplierStrategy,