@strkfarm/sdk 2.0.0-staging.4 → 2.0.0-staging.41

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.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import BigNumber from 'bignumber.js';
2
1
  import * as starknet from 'starknet';
3
- import { RpcProvider, BlockIdentifier, Contract, Uint256, Call, Account, CairoCustomEnum, RawArgs } from 'starknet';
2
+ import { Uint256, RpcProvider, BlockIdentifier, Contract, Call, Account, CairoCustomEnum, RawArgs } from 'starknet';
3
+ import BigNumber from 'bignumber.js';
4
4
  import React, { ReactNode } from 'react';
5
5
  import { Quote, AvnuOptions } from '@avnu/avnu-sdk';
6
6
  import { HexString, BytesLike } from '@ericnordelo/strk-merkle-tree/dist/bytes';
@@ -31,10 +31,12 @@ declare class _Web3Number<T extends _Web3Number<T>> extends BigNumber {
31
31
  mag: bigint;
32
32
  sign: 0 | 1;
33
33
  };
34
+ toUint256(): starknet.Uint256;
34
35
  }
35
36
 
36
37
  declare class Web3Number extends _Web3Number<Web3Number> {
37
38
  static fromWei(weiNumber: string | number, decimals: number): Web3Number;
39
+ static fromUint256(uint256Value: Uint256): Web3Number;
38
40
  }
39
41
 
40
42
  /**
@@ -123,20 +125,23 @@ interface IProtocol {
123
125
  name: string;
124
126
  logo: string;
125
127
  }
126
- declare enum StrategyCategory {
127
- ALL = "all",
128
- BTC = "btc",
129
- META_VAULTS = "meta-vaults"
128
+ interface ICurator {
129
+ name: string;
130
+ logo: string;
130
131
  }
131
132
  declare enum StrategyTag {
132
- EKUBO = "Ekubo",
133
- EVERGREEN = "Evergreen",
134
- HYPER_LST = "Hyper-LST",
135
- VESU = "Vesu",
136
- SENSEI = "Sensei",
137
- ENDUR = "Endur",
133
+ META_VAULT = "Meta Vaults",
134
+ LEVERED = "Maxx",
135
+ AUTOMATED_LP = "Ekubo",
138
136
  BTC = "BTC"
139
137
  }
138
+ declare enum VaultType {
139
+ LOOPING = "Looping",
140
+ META_VAULT = "Meta Vault",
141
+ DELTA_NEUTRAL = "Delta Neutral",
142
+ AUTOMATED_LP = "Automated LP",
143
+ TVA = "Troves Value Averaging"
144
+ }
140
145
  declare enum AuditStatus {
141
146
  AUDITED = "Audited",
142
147
  NOT_AUDITED = "Not Audited"
@@ -147,7 +152,8 @@ declare enum SourceCodeType {
147
152
  }
148
153
  declare enum AccessControlType {
149
154
  MULTISIG_ACCOUNT = "Multisig Account",
150
- STANDARD_ACCOUNT = "Standard Account"
155
+ STANDARD_ACCOUNT = "Standard Account",
156
+ ROLE_BASED_ACCESS = "Role Based Access"
151
157
  }
152
158
  declare enum InstantWithdrawalVault {
153
159
  YES = "Yes",
@@ -160,21 +166,20 @@ interface SourceCodeInfo {
160
166
  interface AccessControlInfo {
161
167
  type: AccessControlType;
162
168
  addresses: ContractAddr[];
163
- timeLock: string;
169
+ timeLock?: string;
164
170
  }
165
171
  interface SecurityMetadata {
166
172
  auditStatus: AuditStatus;
167
173
  sourceCode: SourceCodeInfo;
168
174
  accessControl: AccessControlInfo;
169
175
  }
170
- interface RedemptionExpectedTime {
171
- upto1M: string;
172
- upto10M: string;
173
- above10M: string;
174
- }
175
176
  interface RedemptionInfo {
176
177
  instantWithdrawalVault: InstantWithdrawalVault;
177
- expectedRedemptionTime?: RedemptionExpectedTime;
178
+ redemptionsInfo: {
179
+ title: string;
180
+ description: string;
181
+ }[];
182
+ alerts: StrategyAlert[];
178
183
  }
179
184
  declare enum FlowChartColors {
180
185
  Green = "purple",
@@ -189,7 +194,8 @@ declare enum StrategyLiveStatus {
189
194
  ACTIVE = "Active",
190
195
  NEW = "New",
191
196
  COMING_SOON = "Coming Soon",
192
- RETIRED = "Retired",
197
+ DEPRECATED = "Deprecated",// active but not recommended
198
+ RETIRED = "Retired",// not active anymore
193
199
  HOT = "Hot & New \uD83D\uDD25"
194
200
  }
195
201
  interface StrategyAlert {
@@ -213,6 +219,10 @@ interface StrategySettings {
213
219
  alerts?: StrategyAlert[];
214
220
  tags?: StrategyTag[];
215
221
  }
222
+ interface StrategyApyHistoryUIConfig {
223
+ showApyHistory?: boolean;
224
+ noApyHistoryMessage?: string;
225
+ }
216
226
  /**
217
227
  * @property risk.riskFactor.factor - The risk factors that are considered for the strategy.
218
228
  * @property risk.riskFactor.factor - The value of the risk factor from 0 to 10, 0 being the lowest and 10 being the highest.
@@ -226,6 +236,10 @@ interface IStrategyMetadata<T> {
226
236
  address: ContractAddr;
227
237
  launchBlock: number;
228
238
  type: "ERC4626" | "ERC721" | "Other";
239
+ vaultType: {
240
+ type: VaultType;
241
+ description: string;
242
+ };
229
243
  depositTokens: TokenInfo[];
230
244
  protocols: IProtocol[];
231
245
  auditUrl?: string;
@@ -235,6 +249,7 @@ interface IStrategyMetadata<T> {
235
249
  notARisks: RiskType[];
236
250
  };
237
251
  apyMethodology?: string;
252
+ realizedApyMethodology?: string;
238
253
  additionalInfo: T;
239
254
  contractDetails: {
240
255
  address: ContractAddr;
@@ -249,16 +264,20 @@ interface IStrategyMetadata<T> {
249
264
  }[];
250
265
  docs?: string;
251
266
  investmentSteps: string[];
252
- curator?: {
253
- name: string;
254
- logo: string;
255
- };
267
+ curator?: ICurator;
256
268
  isPreview?: boolean;
257
- category: StrategyCategory;
258
269
  tags?: StrategyTag[];
259
270
  security: SecurityMetadata;
260
271
  redemptionInfo: RedemptionInfo;
272
+ usualTimeToEarnings: null | string;
273
+ usualTimeToEarningsDescription: null | string;
274
+ discontinuationInfo?: {
275
+ date?: Date;
276
+ reason?: React.ReactNode | string;
277
+ info?: React.ReactNode | string;
278
+ };
261
279
  settings?: StrategySettings;
280
+ apyHistoryUIConfig?: StrategyApyHistoryUIConfig;
262
281
  actions?: Array<{
263
282
  name?: string;
264
283
  pool?: {
@@ -290,6 +309,8 @@ interface IInvestmentFlow {
290
309
  style?: any;
291
310
  }
292
311
  declare function getMainnetConfig(rpcUrl?: string, blockIdentifier?: BlockIdentifier): IConfig;
312
+ declare const getStrategyTagDesciption: (tag: StrategyTag) => string;
313
+ declare const getAllStrategyTags: () => StrategyTag[];
293
314
  declare const getRiskExplaination: (riskType: RiskType) => "The risk of the market moving against the position." | "The temporary loss of value experienced by liquidity providers in AMMs when asset prices diverge compared to simply holding them." | "The risk of losing funds due to the position being liquidated." | "The risk of low liquidity in the pool, which can lead to high slippages or reduced in-abilities to quickly exit the position." | "The risk of the oracle being manipulated or incorrect." | "The risk of the smart contract being vulnerable to attacks." | "The risk of technical issues e.g. backend failure." | "The risk of the counterparty defaulting e.g. bad debt on lending platforms." | "The risk of a token losing its peg to the underlying asset, leading to potential losses for holders.";
294
315
  declare const getRiskColor: (risk: RiskFactor) => "light_green_2" | "yellow" | "red";
295
316
  declare const getNoRiskTags: (risks: RiskFactor[]) => RiskType[];
@@ -330,6 +351,7 @@ declare const Protocols: {
330
351
  ENDUR: IProtocol;
331
352
  EXTENDED: IProtocol;
332
353
  };
354
+ declare const UnwrapLabsCurator: ICurator;
333
355
 
334
356
  interface ILendingMetadata {
335
357
  name: string;
@@ -487,6 +509,7 @@ declare class ERC20 {
487
509
  contract(addr: string | ContractAddr): Contract;
488
510
  balanceOf(token: string | ContractAddr, address: string | ContractAddr, tokenDecimals: number): Promise<Web3Number>;
489
511
  allowance(token: string | ContractAddr, owner: string | ContractAddr, spender: string | ContractAddr, tokenDecimals: number): Promise<Web3Number>;
512
+ approve(token: string | ContractAddr, spender: string | ContractAddr, amount: Web3Number): starknet.Call;
490
513
  }
491
514
 
492
515
  interface Route {
@@ -584,21 +607,92 @@ interface DualTokenInfo {
584
607
  token0: SingleTokenInfo;
585
608
  token1: SingleTokenInfo;
586
609
  }
610
+ type StrategyInputMode = "single" | "dual";
611
+ type InputModeFromAction<T> = T extends DualActionAmount ? "dual" : "single";
612
+ interface NetAPYSplit {
613
+ apy: number;
614
+ id: string;
615
+ }
616
+ interface NetAPYDetails {
617
+ net: number;
618
+ splits: NetAPYSplit[];
619
+ }
620
+ type UserPositionCardSubValueColor = "default" | "positive" | "negative" | "info";
621
+ interface UserPositionCard {
622
+ title: string;
623
+ value: string;
624
+ tooltip?: string;
625
+ subValue?: string;
626
+ subValueColor?: UserPositionCardSubValueColor;
627
+ kind?: "metric" | "apy";
628
+ apyMethod?: string;
629
+ }
630
+ interface UserPositionCardsInput {
631
+ user: ContractAddr;
632
+ investmentFlows?: Array<{
633
+ amount: string;
634
+ type: string;
635
+ timestamp: number;
636
+ tx_hash: string;
637
+ }>;
638
+ usualTimeToEarnings?: string | null;
639
+ usualTimeToEarningsDescription?: string | null;
640
+ apy?: number | string | null;
641
+ apyMethod?: string | null;
642
+ }
587
643
  interface CacheData {
588
644
  timestamp: number;
589
645
  ttl: number;
590
646
  data: any;
591
647
  }
592
- declare class BaseStrategy<TVLInfo, ActionInfo> extends CacheClass {
648
+ declare class BaseStrategy<TVLInfo, DepositActionInfo, WithdrawActionInfo = DepositActionInfo> extends CacheClass {
593
649
  readonly config: IConfig;
594
650
  readonly cache: Map<string, CacheData>;
595
- constructor(config: IConfig);
651
+ private readonly _depositInputMode;
652
+ private readonly _withdrawInputMode;
653
+ constructor(config: IConfig, inputModes?: {
654
+ depositInputMode?: InputModeFromAction<DepositActionInfo>;
655
+ withdrawInputMode?: InputModeFromAction<WithdrawActionInfo>;
656
+ });
657
+ depositInputMode(): InputModeFromAction<DepositActionInfo>;
658
+ withdrawInputMode(): InputModeFromAction<WithdrawActionInfo>;
596
659
  getUserTVL(user: ContractAddr, blockIdentifier?: BlockIdentifier): Promise<TVLInfo>;
597
660
  getTVL(): Promise<TVLInfo>;
598
- depositCall(amountInfo: ActionInfo, receiver: ContractAddr): Promise<Call[]>;
599
- withdrawCall(amountInfo: ActionInfo, receiver: ContractAddr, owner: ContractAddr): Promise<Call[]>;
661
+ depositCall(amountInfo: DepositActionInfo, receiver: ContractAddr): Promise<Call[]>;
662
+ withdrawCall(amountInfo: WithdrawActionInfo, receiver: ContractAddr, owner: ContractAddr): Promise<Call[]>;
600
663
  getVaultPositions(): Promise<VaultPosition[]>;
664
+ netAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number, timeperiod?: "24h" | "7d" | "30d" | "3m"): Promise<number | string | NetAPYDetails>;
601
665
  getPendingRewards(): Promise<HarvestInfo[]>;
666
+ getUserRealizedAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
667
+ getUserPositionCards(_input: UserPositionCardsInput): Promise<UserPositionCard[]>;
668
+ protected formatTokenAmountForCard(amount: Web3Number, tokenInfo: TokenInfo): string;
669
+ protected formatPercentForCard(value: number): string;
670
+ protected resolveApyMethod(input?: UserPositionCardsInput): string | undefined;
671
+ protected normalizeApyDisplayValue(apy: number | string | NetAPYDetails | null | undefined): string;
672
+ protected resolveApyValueForCard(input?: UserPositionCardsInput): Promise<string>;
673
+ protected createApyCard(input?: UserPositionCardsInput): Promise<UserPositionCard>;
674
+ protected formatUSDForCard(value: number): string;
675
+ protected getSubValueColorFromSignedNumber(value: number): UserPositionCardSubValueColor;
676
+ /**
677
+ * Calculate lifetime earnings for a user based on provided data from client
678
+ * Formula: lifetimeEarnings = currentValue + totalWithdrawals - totalDeposits
679
+ *
680
+ * @param userTVL - The user's current TVL (SingleTokenInfo with amount, usdValue, tokenInfo)
681
+ * @param investmentFlows - Array of investment flow transactions from client
682
+ * @returns Object containing lifetime earnings, current value, and total deposits/withdrawals
683
+ */
684
+ getLifetimeEarnings(userTVL: SingleTokenInfo, investmentFlows: Array<{
685
+ amount: string;
686
+ type: string;
687
+ timestamp: number;
688
+ tx_hash: string;
689
+ }>): {
690
+ tokenInfo: SingleTokenInfo;
691
+ lifetimeEarnings: Web3Number;
692
+ currentValue: Web3Number;
693
+ totalDeposits: Web3Number;
694
+ totalWithdrawals: Web3Number;
695
+ };
602
696
  }
603
697
 
604
698
  interface PoolProps {
@@ -884,17 +978,31 @@ declare class EkuboCLVault extends BaseStrategy<DualTokenInfo, DualActionAmount>
884
978
  rebalanceCall(newBounds: EkuboBounds, swapParams: SwapInfo): Call[];
885
979
  handleUnusedCall(swapParams: SwapInfo): Call[];
886
980
  handleFeesCall(): Call[];
887
- getFeeHistory(timePeriod?: '24h' | '7d' | '30d' | '3m'): Promise<{
981
+ getFeeHistory(timePeriod?: '24h' | '7d' | '30d' | '3m' | '6m', range?: {
982
+ startTimestamp?: number;
983
+ endTimestamp?: number;
984
+ }): Promise<{
888
985
  summary: DualTokenInfo;
889
986
  history: FeeHistory[];
890
987
  }>;
891
988
  netSharesBasedTrueAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
989
+ /**
990
+ * Calculate lifetime earnings for a user
991
+ * Not yet implemented for Ekubo CL Vault strategy
992
+ */
993
+ getLifetimeEarnings(userTVL: SingleTokenInfo, investmentFlows: Array<{
994
+ amount: string;
995
+ type: string;
996
+ timestamp: number;
997
+ tx_hash: string;
998
+ }>): any;
892
999
  /**
893
1000
  * Calculates realized APY based on TVL per share growth, always valued in USDC.
894
1001
  * This is a vault-level metric (same for all users) and works for all strategies,
895
1002
  * regardless of quote asset configuration.
896
1003
  */
897
1004
  getUserRealizedAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
1005
+ getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
898
1006
  feeBasedAPY(timeperiod?: '24h' | '7d' | '30d' | '3m'): Promise<number>;
899
1007
  /**
900
1008
  * Calculates assets before and now in a given token of TVL per share to observe growth
@@ -1090,14 +1198,98 @@ declare class SenseiVault extends BaseStrategy<SingleTokenInfo, SingleActionAmou
1090
1198
  }>;
1091
1199
  getSecondaryTokenPriceRelativeToMain(retry?: number): Promise<number>;
1092
1200
  getSettings: () => Promise<starknet.CallResult>;
1201
+ /**
1202
+ * Calculate lifetime earnings for a user
1203
+ * Not yet implemented for Sensei Vault strategy
1204
+ */
1205
+ getLifetimeEarnings(userTVL: SingleTokenInfo, investmentFlows: Array<{
1206
+ amount: string;
1207
+ type: string;
1208
+ timestamp: number;
1209
+ tx_hash: string;
1210
+ }>): any;
1211
+ netAPY(): Promise<number>;
1093
1212
  /**
1094
1213
  * Calculates user realized APY based on position growth accounting for deposits and withdrawals.
1095
1214
  * Returns the APY as a number.
1215
+ * Not implemented for Sensei Strategy yet.
1096
1216
  */
1097
- getUserRealizedAPY(userAddress: ContractAddr, blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
1217
+ getUserRealizedAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
1218
+ getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
1098
1219
  }
1099
1220
  declare const SenseiStrategies: IStrategyMetadata<SenseiVaultSettings>[];
1100
1221
 
1222
+ interface YoloVaultSettings {
1223
+ startDate: string;
1224
+ expiryDate: string;
1225
+ mainToken: TokenInfo;
1226
+ secondaryToken: TokenInfo;
1227
+ totalEpochs: number;
1228
+ minEpochDurationSeconds: number;
1229
+ spendingLevels: YoloSpendingLevel[];
1230
+ feeBps: number;
1231
+ }
1232
+ interface YoloSpendingLevel {
1233
+ minPrice?: number;
1234
+ maxPrice?: number;
1235
+ spendPercent: number;
1236
+ }
1237
+ interface UserYoloInfo {
1238
+ shares: bigint;
1239
+ claimable_second_tokens: bigint;
1240
+ base_token_balance: bigint;
1241
+ base_token_consumed: bigint;
1242
+ base_consumed_last_index: bigint;
1243
+ second_token_last_index: bigint;
1244
+ second_token_balance: bigint;
1245
+ }
1246
+ interface YoloVaultStatus {
1247
+ current_epoch: bigint;
1248
+ total_epochs: bigint;
1249
+ remaining_base: bigint;
1250
+ total_second_tokens: bigint;
1251
+ global_second_token_index: bigint;
1252
+ cumulative_spend_index: bigint;
1253
+ total_shares: bigint;
1254
+ base_token_assets_per_share: bigint;
1255
+ }
1256
+ interface YoloSettings {
1257
+ base_token: bigint;
1258
+ second_token: bigint;
1259
+ total_epochs: bigint;
1260
+ min_time_per_epoch: bigint;
1261
+ max_spend_units_per_epoch: bigint;
1262
+ base_token_assets_per_share: bigint;
1263
+ oracle: bigint;
1264
+ }
1265
+ declare class YoLoVault extends BaseStrategy<DualTokenInfo, SingleActionAmount, DualActionAmount> {
1266
+ readonly address: ContractAddr;
1267
+ readonly metadata: IStrategyMetadata<YoloVaultSettings>;
1268
+ readonly pricer: PricerBase;
1269
+ readonly contract: Contract;
1270
+ readonly primaryToken: TokenInfo;
1271
+ readonly secondaryToken: TokenInfo;
1272
+ constructor(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<YoloVaultSettings>);
1273
+ private getNormalizedUserInfo;
1274
+ private resolveWithdrawRequest;
1275
+ getUserTVL(user: ContractAddr): Promise<DualTokenInfo>;
1276
+ getVaultPositions(): Promise<VaultPosition[]>;
1277
+ getTVL(): Promise<DualTokenInfo>;
1278
+ depositCall(amountInfo: SingleActionAmount, receiver: ContractAddr): Promise<Call[]>;
1279
+ getVaultStatus(): Promise<YoloVaultStatus>;
1280
+ matchInputAmounts(amountInfo: DualActionAmount, user: ContractAddr): Promise<DualActionAmount>;
1281
+ withdrawCall(amountInfo: DualActionAmount, receiver: ContractAddr, owner: ContractAddr): Promise<Call[]>;
1282
+ netAPY(): Promise<number | string | NetAPYDetails>;
1283
+ getSwapAmounts(spendUnits: Web3Number): Promise<{
1284
+ grossSpend: Web3Number;
1285
+ netSpend: Web3Number;
1286
+ isReadyForNextSwap: boolean;
1287
+ }>;
1288
+ getSettings: () => Promise<YoloSettings>;
1289
+ getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
1290
+ }
1291
+ declare const YoloVaultStrategies: IStrategyMetadata<YoloVaultSettings>[];
1292
+
1101
1293
  interface LeveledLogMethod {
1102
1294
  (message: string, ...meta: any[]): void;
1103
1295
  (message: any): void;
@@ -1351,6 +1543,24 @@ declare const VesuPools: {
1351
1543
  Re7xSTRK: ContractAddr;
1352
1544
  Re7xBTC: ContractAddr;
1353
1545
  Prime: ContractAddr;
1546
+ Re7STRK: ContractAddr;
1547
+ };
1548
+ declare const VesuPoolMetadata: {
1549
+ [VesuPools.Genesis.address]: {
1550
+ name: string;
1551
+ };
1552
+ [VesuPools.Re7xSTRK.address]: {
1553
+ name: string;
1554
+ };
1555
+ [VesuPools.Re7xBTC.address]: {
1556
+ name: string;
1557
+ };
1558
+ [VesuPools.Prime.address]: {
1559
+ name: string;
1560
+ };
1561
+ [VesuPools.Re7STRK.address]: {
1562
+ name: string;
1563
+ };
1354
1564
  };
1355
1565
  declare const extensionMap: {
1356
1566
  [key: string]: ContractAddr;
@@ -1393,8 +1603,15 @@ declare class VesuAdapter extends BaseAdapter {
1393
1603
  getModifyPositionCall: (params: VesuModifyPositionCallParams) => ManageCall;
1394
1604
  getMultiplyAdapter: (id: string) => LeafAdapterFn<VesuMultiplyCallParams>;
1395
1605
  getMultiplyCall: (params: VesuMultiplyCallParams) => ManageCall;
1396
- getVesuModifyDelegationAdapter: (id: string) => LeafAdapterFn<VesuModifyDelegationCallParams>;
1397
- getVesuModifyDelegationCall: (params: VesuModifyDelegationCallParams) => ManageCall;
1606
+ getVesuModifyDelegationAdapter: (id: string, delegatee: ContractAddr) => LeafAdapterFn<VesuModifyDelegationCallParams>;
1607
+ getVesuModifyDelegationCall: (delegatee: ContractAddr) => (params: VesuModifyDelegationCallParams) => {
1608
+ sanitizer: ContractAddr;
1609
+ call: {
1610
+ contractAddress: ContractAddr;
1611
+ selector: string;
1612
+ calldata: bigint[];
1613
+ };
1614
+ };
1398
1615
  getDefispringRewardsAdapter: (id: string) => () => AdapterLeafType<VesuDefiSpringRewardsCallParams>;
1399
1616
  getDefiSpringClaimCall: () => GenerateCallFn<VesuDefiSpringRewardsCallParams>;
1400
1617
  formatAmountTypeEnum(amountType: VesuAmountType): CairoCustomEnum;
@@ -1449,6 +1666,11 @@ declare const AVNU_EXCHANGE: ContractAddr;
1449
1666
  declare const VESU_SINGLETON: ContractAddr;
1450
1667
  declare function toBigInt(value: string | number): bigint;
1451
1668
 
1669
+ declare enum LSTPriceType {
1670
+ ENDUR_PRICE = "ENDUR_PRICE",
1671
+ AVNU_PRICE = "AVNU_PRICE"
1672
+ }
1673
+
1452
1674
  interface UniversalManageCall {
1453
1675
  proofs: string[];
1454
1676
  manageCall: ManageCall;
@@ -1533,6 +1755,7 @@ declare class UniversalStrategy<S extends UniversalStrategySettings> extends Bas
1533
1755
  * Returns the APY as a number.
1534
1756
  */
1535
1757
  getUserRealizedAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
1758
+ getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
1536
1759
  /**
1537
1760
  * Calculates the total TVL of the strategy.
1538
1761
  * @returns Object containing the total amount in token units and USD value
@@ -1543,9 +1766,9 @@ declare class UniversalStrategy<S extends UniversalStrategySettings> extends Bas
1543
1766
  usdValue: number;
1544
1767
  }>;
1545
1768
  getUnusedBalance(): Promise<SingleTokenInfo>;
1546
- protected getVesuAUM(adapter: VesuAdapter): Promise<Web3Number>;
1769
+ protected getVesuAUM(adapter: VesuAdapter, _priceType?: LSTPriceType): Promise<Web3Number>;
1547
1770
  getPrevAUM(): Promise<Web3Number>;
1548
- getAUM(): Promise<{
1771
+ getAUM(unrealizedAUM?: boolean): Promise<{
1549
1772
  net: SingleTokenInfo;
1550
1773
  prevAum: Web3Number;
1551
1774
  splits: {
@@ -1624,10 +1847,12 @@ declare function getContractDetails(settings: UniversalStrategySettings): {
1624
1847
  declare const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[];
1625
1848
 
1626
1849
  interface HyperLSTStrategySettings extends UniversalStrategySettings {
1627
- borrowable_assets: TokenInfo[];
1850
+ borrowable_assets: {
1851
+ token: TokenInfo;
1852
+ poolId: ContractAddr;
1853
+ }[];
1628
1854
  underlyingToken: TokenInfo;
1629
1855
  defaultPoolId: ContractAddr;
1630
- altSupportedPoolIds: ContractAddr[];
1631
1856
  }
1632
1857
  declare class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTStrategySettings> {
1633
1858
  private quoteAmountToFetchPrice;
@@ -1662,7 +1887,21 @@ declare class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTS
1662
1887
  shouldRebalance: boolean;
1663
1888
  manageCall: Call | undefined;
1664
1889
  }>;
1665
- protected getVesuAUM(adapter: VesuAdapter): Promise<Web3Number>;
1890
+ protected getVesuAUM(adapter: VesuAdapter, priceType?: LSTPriceType): Promise<Web3Number>;
1891
+ getTVLUnrealized(): Promise<{
1892
+ net: SingleTokenInfo;
1893
+ prevAum: Web3Number;
1894
+ splits: {
1895
+ id: string;
1896
+ aum: Web3Number;
1897
+ }[];
1898
+ }>;
1899
+ getUserUnrealizedGains(user: ContractAddr): Promise<{
1900
+ unrealizedGains: Web3Number;
1901
+ userShare: number;
1902
+ tokenInfo: TokenInfo;
1903
+ }>;
1904
+ getUserPositionCards(input: UserPositionCardsInput): Promise<UserPositionCard[]>;
1666
1905
  private _getMinOutputAmountLSTBuy;
1667
1906
  private _getMinOutputAmountLSTSell;
1668
1907
  /**
@@ -1687,6 +1926,7 @@ declare class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTS
1687
1926
  maxBorrowableAmount: Web3Number;
1688
1927
  borrowableAsset: TokenInfo;
1689
1928
  ltv: number;
1929
+ poolId: ContractAddr;
1690
1930
  }[];
1691
1931
  }>;
1692
1932
  getMaxSwappableWithMaxSlippage(fromToken: TokenInfo, toToken: TokenInfo, maxSlippage: number, maxAmount: Web3Number): Promise<Web3Number>;
@@ -1715,6 +1955,7 @@ declare class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTS
1715
1955
  apy: number;
1716
1956
  weight: number;
1717
1957
  }>;
1958
+ getLSTAvnuRate(): Promise<number>;
1718
1959
  getLSTExchangeRate(): Promise<number>;
1719
1960
  /**
1720
1961
  *
@@ -1745,7 +1986,6 @@ interface FilterOption {
1745
1986
  interface StrategyFilterMetadata {
1746
1987
  assets: FilterOption[];
1747
1988
  protocols: FilterOption[];
1748
- categories: FilterOption[];
1749
1989
  quickFilters: FilterOption[];
1750
1990
  }
1751
1991
  /**
@@ -1756,7 +1996,8 @@ declare enum StrategyType {
1756
1996
  UNIVERSAL = "universal",
1757
1997
  HYPER_LST = "hyper-lst",
1758
1998
  VESU_REBALANCE = "vesu-rebalance",
1759
- SENSEI = "sensei"
1999
+ SENSEI = "sensei",
2000
+ YOLO_VAULT = "yolo-vault"
1760
2001
  }
1761
2002
  /**
1762
2003
  * Strategy metadata extracted from IStrategyMetadata
@@ -1767,7 +2008,6 @@ interface StrategyMetadata {
1767
2008
  type: StrategyType;
1768
2009
  assets: string[];
1769
2010
  protocols: string[];
1770
- category: string;
1771
2011
  tags: string[];
1772
2012
  curator?: {
1773
2013
  name: string;
@@ -1808,10 +2048,12 @@ declare enum FactoryStrategyType {
1808
2048
  EKUBO_CL = "EKUBO_CL",
1809
2049
  HYPER_LST = "HYPER_LST",
1810
2050
  VESU_REBALANCE = "VESU_REBALANCE",
1811
- SENSEI = "SENSEI"
2051
+ SENSEI = "SENSEI",
2052
+ YOLO_VAULT = "YOLO_VAULT"
1812
2053
  }
1813
2054
  declare function createUniversalStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<UniversalStrategySettings>): UniversalStrategy<UniversalStrategySettings>;
1814
2055
  declare function createEkuboCLStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<CLVaultStrategySettings>): EkuboCLVault;
2056
+ declare function createYoloVaultStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<YoloVaultSettings>): YoLoVault;
1815
2057
  declare function createHyperLSTStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<HyperLSTStrategySettings>): UniversalLstMultiplierStrategy;
1816
2058
  declare function createVesuRebalanceStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<VesuRebalanceSettings>): VesuRebalance;
1817
2059
  declare function createSenseiStrategy(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<SenseiVaultSettings>): SenseiVault;
@@ -1822,7 +2064,7 @@ declare function getStrategyTypeFromMetadata(metadata: IStrategyMetadata<any>):
1822
2064
  /**
1823
2065
  * Generic factory function that creates SDK strategy instances based on type
1824
2066
  */
1825
- declare function createStrategy(type: FactoryStrategyType, config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<any>): VesuRebalance | EkuboCLVault | SenseiVault | UniversalStrategy<UniversalStrategySettings>;
2067
+ declare function createStrategy(type: FactoryStrategyType, config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<any>): VesuRebalance | EkuboCLVault | SenseiVault | YoLoVault | UniversalStrategy<UniversalStrategySettings>;
1826
2068
 
1827
2069
  interface EkuboRouteNode {
1828
2070
  pool_key: {
@@ -2098,4 +2340,4 @@ declare class PasswordJsonCryptoUtil {
2098
2340
  decrypt(encryptedData: string, password: string): any;
2099
2341
  }
2100
2342
 
2101
- export { APYType, AUMTypes, AVNU_EXCHANGE, AVNU_MIDDLEWARE, type AccessControlInfo, AccessControlType, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type AmountInfo, type AmountsInfo, type ApproveCallParams, AuditStatus, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, type DecreaseLeverParams, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, type FAQ, FactoryStrategyType, FatalError, type FilterOption, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, InstantWithdrawalVault, LSTAPRService, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, MyNumber, Network, PRICE_ROUTER, PasswordJsonCryptoUtil, type PositionAPY, type PositionInfo, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerLST, PricerRedis, Protocols, type RedemptionExpectedTime, type RedemptionInfo, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, type SecurityMetadata, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, type SourceCodeInfo, SourceCodeType, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type StrategyAlert, type StrategyCapabilities, StrategyCategory, type StrategyFilterMetadata, StrategyLiveStatus, type StrategyMetadata, type StrategyRegistryEntry, type StrategySettings, StrategyTag, StrategyType, type SupportedPosition, type Swap, type SwapInfo, TelegramGroupNotif, TelegramNotif, type TokenAmount, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, VESU_SINGLETON, VESU_V2_MODIFY_POSITION_SANITIZER, type VaultPosition, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, type VesuDefiSpringRewardsCallParams, type VesuModifyDelegationCallParams, type VesuModifyPositionCallParams, type VesuMultiplyCallParams, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, ZkLend, assert, buildStrategyRegistry, createEkuboCLStrategy, createHyperLSTStrategy, createSenseiStrategy, createStrategy, createUniversalStrategy, createVesuRebalanceStrategy, detectCapabilities, extensionMap, getAPIUsingHeadlessBrowser, getAllStrategyMetadata, getContractDetails, getDefaultStoreConfig, getFilterMetadata, getLiveStrategies, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getStrategiesByType, getStrategyTypeFromMetadata, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, isDualTokenStrategy, logger, toAmountsInfo, toBigInt };
2343
+ export { APYType, AUMTypes, AVNU_EXCHANGE, AVNU_MIDDLEWARE, type AccessControlInfo, AccessControlType, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type AmountInfo, type AmountsInfo, type ApproveCallParams, AuditStatus, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, type DecreaseLeverParams, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, type FAQ, FactoryStrategyType, FatalError, type FilterOption, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type ICurator, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, type InputModeFromAction, InstantWithdrawalVault, LSTAPRService, LSTPriceType, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, MyNumber, type NetAPYDetails, type NetAPYSplit, Network, PRICE_ROUTER, PasswordJsonCryptoUtil, type PositionAPY, type PositionInfo, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerLST, PricerRedis, Protocols, type RedemptionInfo, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, type SecurityMetadata, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, type SourceCodeInfo, SourceCodeType, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type StrategyAlert, type StrategyApyHistoryUIConfig, type StrategyCapabilities, type StrategyFilterMetadata, type StrategyInputMode, StrategyLiveStatus, type StrategyMetadata, type StrategyRegistryEntry, type StrategySettings, StrategyTag, StrategyType, type SupportedPosition, type Swap, type SwapInfo, TelegramGroupNotif, TelegramNotif, type TokenAmount, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, UnwrapLabsCurator, type UserPositionCard, type UserPositionCardSubValueColor, type UserPositionCardsInput, type UserYoloInfo, VESU_SINGLETON, VESU_V2_MODIFY_POSITION_SANITIZER, type VaultPosition, VaultType, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, type VesuDefiSpringRewardsCallParams, type VesuModifyDelegationCallParams, type VesuModifyPositionCallParams, type VesuMultiplyCallParams, VesuPoolMetadata, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, YoLoVault, type YoloSettings, type YoloSpendingLevel, type YoloVaultSettings, type YoloVaultStatus, YoloVaultStrategies, ZkLend, assert, buildStrategyRegistry, createEkuboCLStrategy, createHyperLSTStrategy, createSenseiStrategy, createStrategy, createUniversalStrategy, createVesuRebalanceStrategy, createYoloVaultStrategy, detectCapabilities, extensionMap, getAPIUsingHeadlessBrowser, getAllStrategyMetadata, getAllStrategyTags, getContractDetails, getDefaultStoreConfig, getFilterMetadata, getLiveStrategies, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getStrategiesByType, getStrategyTagDesciption, getStrategyTypeFromMetadata, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, isDualTokenStrategy, logger, toAmountsInfo, toBigInt };