@strkfarm/sdk 2.0.0-dev.2 → 2.0.0-dev.21

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
@@ -945,11 +945,13 @@ interface VesuMultiplyAdapterConfig extends BaseAdapterConfig {
945
945
  targetHealthFactor: number;
946
946
  minHealthFactor: number;
947
947
  quoteAmountToFetchPrice: Web3Number;
948
+ minimumVesuMovementAmount: number;
948
949
  }
949
950
  declare class VesuMultiplyAdapter extends BaseAdapter<DepositParams, WithdrawParams> {
950
951
  readonly config: VesuMultiplyAdapterConfig;
951
952
  readonly vesuAdapter: VesuAdapter;
952
953
  readonly tokenMarketData: TokenMarketData;
954
+ readonly minimumVesuMovementAmount: number;
953
955
  constructor(config: VesuMultiplyAdapterConfig);
954
956
  protected getAPY(supportedPosition: SupportedPosition): Promise<PositionAPY>;
955
957
  protected getPosition(supportedPosition: SupportedPosition): Promise<PositionAmount>;
@@ -1193,7 +1195,7 @@ interface Market {
1193
1195
  l2_config: L2Config;
1194
1196
  }
1195
1197
  interface AssetOperation {
1196
- id: number;
1198
+ id: string;
1197
1199
  type: AssetOperationType;
1198
1200
  status: AssetOperationStatus;
1199
1201
  amount: string;
@@ -1296,8 +1298,9 @@ declare class ExtendedWrapper {
1296
1298
  getHoldings(): Promise<ExtendedApiResponse<Balance>>;
1297
1299
  /**
1298
1300
  * Initiate a withdrawal from Extended Exchange
1301
+ * Returns data as number | string to preserve precision for large integers
1299
1302
  */
1300
- withdraw(request: WithdrawRequest): Promise<ExtendedApiResponse<number>>;
1303
+ withdraw(request: WithdrawRequest): Promise<ExtendedApiResponse<number | string>>;
1301
1304
  /**
1302
1305
  * Create and sign a withdrawal request hash
1303
1306
  */
@@ -1382,14 +1385,15 @@ declare class ExtendedWrapper {
1382
1385
  getOrderHistory(marketName: string): Promise<ExtendedApiResponse<OpenOrder[]>>;
1383
1386
  /**
1384
1387
  * Withdraw USDC (convenience method)
1388
+ * Returns data as number | string to preserve precision for large integers
1385
1389
  */
1386
- withdrawUSDC(amount: string): Promise<ExtendedApiResponse<number>>;
1390
+ withdrawUSDC(amount: string): Promise<ExtendedApiResponse<number | string>>;
1387
1391
  /**
1388
1392
  * Get funding rates for a specific market
1389
1393
  * @param marketName - The name of the market to get funding rates for
1390
1394
  * @returns The funding rates for the specified market
1391
1395
  */
1392
- getFundingRates(marketName: string, side: string): Promise<ExtendedApiResponse<FundingRate[]>>;
1396
+ getFundingRates(marketName: string, side: string, startTime: number, endTime?: number): Promise<ExtendedApiResponse<FundingRate[]>>;
1393
1397
  }
1394
1398
 
1395
1399
  interface Route {
@@ -1421,6 +1425,8 @@ interface AvnuAdapterConfig extends BaseAdapterConfig {
1421
1425
  baseUrl: string;
1422
1426
  avnuContract: ContractAddr;
1423
1427
  slippage: number;
1428
+ minimumExtendedPriceDifferenceForSwapOpen: number;
1429
+ maximumExtendedPriceDifferenceForSwapClosing: number;
1424
1430
  }
1425
1431
  declare class AvnuAdapter extends BaseAdapter<DepositParams, WithdrawParams> {
1426
1432
  readonly config: AvnuAdapterConfig;
@@ -1464,20 +1470,28 @@ declare class AvnuAdapter extends BaseAdapter<DepositParams, WithdrawParams> {
1464
1470
  interface ExtendedAdapterConfig extends BaseAdapterConfig {
1465
1471
  vaultIdExtended: number;
1466
1472
  extendedContract: ContractAddr;
1467
- extendedBackendUrl: string;
1468
- extendedApiKey: string;
1473
+ extendedBackendReadUrl: string;
1474
+ extendedBackendWriteUrl: string;
1469
1475
  extendedTimeout: number;
1470
1476
  extendedRetries: number;
1471
1477
  extendedBaseUrl: string;
1472
1478
  extendedMarketName: string;
1473
1479
  extendedPrecision: number;
1474
1480
  avnuAdapter: AvnuAdapter;
1481
+ retryDelayForOrderStatus: number;
1482
+ minimumExtendedMovementAmount: number;
1475
1483
  }
1476
1484
  declare class ExtendedAdapter extends BaseAdapter<DepositParams, WithdrawParams> {
1477
1485
  readonly config: ExtendedAdapterConfig;
1478
1486
  readonly client: ExtendedWrapper;
1487
+ readonly retryDelayForOrderStatus: number;
1488
+ readonly minimumExtendedMovementAmount: number;
1479
1489
  constructor(config: ExtendedAdapterConfig);
1480
1490
  protected getAPY(supportedPosition: SupportedPosition): Promise<PositionAPY>;
1491
+ getFundingRates(side: string, startTime?: number, endTime?: number): Promise<{
1492
+ success: boolean;
1493
+ data: FundingRate[];
1494
+ }>;
1481
1495
  protected getPosition(supportedPosition: SupportedPosition): Promise<PositionAmount>;
1482
1496
  maxDeposit(amount?: Web3Number): Promise<PositionInfo>;
1483
1497
  maxWithdraw(): Promise<PositionInfo>;
@@ -1510,7 +1524,10 @@ declare class ExtendedAdapter extends BaseAdapter<DepositParams, WithdrawParams>
1510
1524
  };
1511
1525
  getSwapFromLegacyCall(params: DepositParams): Promise<ManageCall[]>;
1512
1526
  getWithdrawCall(params: WithdrawParams): Promise<ManageCall[]>;
1513
- withdrawFromExtended(amount: Web3Number): Promise<boolean>;
1527
+ withdrawFromExtended(amount: Web3Number): Promise<{
1528
+ status: boolean;
1529
+ receivedTxnHash: boolean;
1530
+ }>;
1514
1531
  getHealthFactor(): Promise<number>;
1515
1532
  getExtendedDepositAmount(): Promise<Balance | undefined>;
1516
1533
  setLeverage(leverage: string, marketName: string): Promise<boolean>;
@@ -1529,7 +1546,8 @@ declare class ExtendedAdapter extends BaseAdapter<DepositParams, WithdrawParams>
1529
1546
  createExtendedPositon(client: ExtendedWrapper, marketName: string, amount: string, price: string, side: OrderSide): Promise<{
1530
1547
  position_id: string;
1531
1548
  } | null>;
1532
- getDepositOrWithdrawalStatus(orderId: number | string, operationsType: AssetOperationType): Promise<boolean>;
1549
+ getDepositOrWithdrawalStatus(orderId: number | string, // for deposits, send txn hash as string
1550
+ operationsType: AssetOperationType): Promise<boolean>;
1533
1551
  }
1534
1552
 
1535
1553
  declare const SIMPLE_SANITIZER: ContractAddr;
@@ -2026,6 +2044,10 @@ declare enum AUMTypes {
2026
2044
  FINALISED = "finalised",
2027
2045
  DEFISPRING = "defispring"
2028
2046
  }
2047
+ declare enum PositionTypeAvnuExtended {
2048
+ OPEN = "open",
2049
+ CLOSE = "close"
2050
+ }
2029
2051
  declare enum UNIVERSAL_MANAGE_IDS {
2030
2052
  FLASH_LOAN = "flash_loan_init",
2031
2053
  VESU_LEG1 = "vesu_leg1",
@@ -2163,8 +2185,37 @@ declare const _riskFactor: RiskFactor[];
2163
2185
  declare function getInvestmentSteps(lstSymbol: string, underlyingSymbol: string): string[];
2164
2186
  declare const HyperLSTStrategies: IStrategyMetadata<HyperLSTStrategySettings>[];
2165
2187
 
2188
+ /**
2189
+ * Transaction metadata that SDK generates and risk engine stores in DB.
2190
+ * This metadata is used to track transaction lifecycle without coupling SDK to DB.
2191
+ */
2192
+ interface TransactionMetadata {
2193
+ protocolFrom: string;
2194
+ protocolTo: string;
2195
+ transactionType: 'DEPOSIT' | 'WITHDRAWAL' | 'NONE';
2196
+ usdAmount: string;
2197
+ status: 'COMPLETED' | 'FAILED' | 'PENDING';
2198
+ cycleType: CycleType;
2199
+ }
2200
+ declare enum CycleType {
2201
+ INVESTMENT = "INVESTMENT",
2202
+ REBALANCE_PRICE_DROP = "REBALANCE_PRICE_DROP",
2203
+ REBALANCE_PRICE_RISE = "REBALANCE_PRICE_RISE",
2204
+ WITHDRAWAL = "WITHDRAWAL",
2205
+ DELTA_NEUTRAL_ADJUSTMENT = "DELTA_NEUTRAL_ADJUSTMENT"
2206
+ }
2207
+ /**
2208
+ * Enhanced return type for operations that generate transactions.
2209
+ * Includes both the calls (for execution) and metadata (for DB storage).
2210
+ */
2211
+ interface TransactionResult<T = any> {
2212
+ calls: Call[];
2213
+ status: boolean;
2214
+ transactionMetadata: TransactionMetadata;
2215
+ }
2216
+
2166
2217
  declare abstract class Operations {
2167
- abstract shouldMoveAssets(extendedAmount: Web3Number, vesuAmount: Web3Number): Promise<Call[]>;
2218
+ abstract shouldMoveAssets(extendedAmount: Web3Number, vesuAmount: Web3Number): Promise<TransactionResult[]>;
2168
2219
  abstract shouldInvest(): Promise<{
2169
2220
  shouldInvest: boolean;
2170
2221
  vesuAmount: Web3Number;
@@ -2172,22 +2223,28 @@ declare abstract class Operations {
2172
2223
  extendedLeverage: number;
2173
2224
  vesuLeverage: number;
2174
2225
  }>;
2226
+ /**
2227
+ * Move assets between protocols.
2228
+ * Returns transaction calls and metadata for DB tracking.
2229
+ */
2175
2230
  abstract moveAssets(params: {
2176
2231
  from: string;
2177
2232
  to: string;
2178
2233
  amount: Web3Number;
2179
- }, extendedAdapter: ExtendedAdapter, vesuAdapter: VesuMultiplyAdapter): Promise<{
2180
- calls: Call[];
2181
- status: boolean;
2182
- }>;
2183
- abstract handleDeposit(): Promise<{
2234
+ cycleType: CycleType;
2235
+ }, extendedAdapter: ExtendedAdapter, vesuAdapter: VesuMultiplyAdapter): Promise<TransactionResult>;
2236
+ /**
2237
+ * Handle deposit operation.
2238
+ * Returns transaction calls and metadata for DB tracking.
2239
+ */
2240
+ abstract handleDeposit(): Promise<TransactionResult<{
2184
2241
  extendedAmountInBTC: Web3Number;
2185
- calls: Call[];
2186
- }>;
2187
- abstract handleWithdraw(amount: Web3Number): Promise<{
2188
- calls: Call[];
2189
- status: boolean;
2190
- }>;
2242
+ }>>;
2243
+ /**
2244
+ * Handle withdrawal operation.
2245
+ * Returns transaction calls and metadata for DB tracking.
2246
+ */
2247
+ abstract handleWithdraw(amount: Web3Number): Promise<TransactionResult[]>;
2191
2248
  }
2192
2249
 
2193
2250
  interface VesuExtendedStrategySettings extends UniversalStrategySettings {
@@ -2198,6 +2255,7 @@ interface VesuExtendedStrategySettings extends UniversalStrategySettings {
2198
2255
  minHealthFactor: number;
2199
2256
  aumOracle: ContractAddr;
2200
2257
  minimumWBTCDifferenceForAvnuSwap: number;
2258
+ walletAddress: string;
2201
2259
  }
2202
2260
  declare class VesuExtendedMultiplierStrategy<S extends VesuExtendedStrategySettings> extends SVKStrategy<S> implements Operations {
2203
2261
  constructor(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<S>);
@@ -2211,7 +2269,10 @@ declare class VesuExtendedMultiplierStrategy<S extends VesuExtendedStrategySetti
2211
2269
  getVesuAdapter(): Promise<VesuMultiplyAdapter | null>;
2212
2270
  getAvnuAdapter(): Promise<AvnuAdapter | null>;
2213
2271
  getExtendedAdapter(): Promise<ExtendedAdapter | null>;
2214
- moveAssetsToVaultAllocator(amount: Web3Number, extendedAdapter: ExtendedAdapter): Promise<Call[]>;
2272
+ moveAssetsToVaultAllocator(amount: Web3Number, extendedAdapter: ExtendedAdapter): Promise<{
2273
+ calls: Call[];
2274
+ status: boolean;
2275
+ }>;
2215
2276
  shouldInvest(): Promise<{
2216
2277
  shouldInvest: boolean;
2217
2278
  vesuAmount: Web3Number;
@@ -2221,31 +2282,59 @@ declare class VesuExtendedMultiplierStrategy<S extends VesuExtendedStrategySetti
2221
2282
  debtPrice: number;
2222
2283
  vesuLeverage: number;
2223
2284
  }>;
2224
- shouldMoveAssets(extendedAmount: Web3Number, vesuAmount: Web3Number): Promise<Call[]>;
2285
+ shouldMoveAssets(extendedAmount: Web3Number, vesuAmount: Web3Number): Promise<TransactionResult[]>;
2286
+ /**
2287
+ * Helper method to create transaction result with metadata
2288
+ */
2289
+ private createTransactionResult;
2225
2290
  moveAssets(params: {
2226
2291
  amount: Web3Number;
2227
2292
  from: string;
2228
2293
  to: string;
2229
- }, extendedAdapter: ExtendedAdapter, vesuAdapter: VesuMultiplyAdapter): Promise<{
2230
- calls: Call[];
2231
- status: boolean;
2232
- }>;
2233
- handleDeposit(): Promise<{
2234
- extendedAmountInBTC: Web3Number;
2235
- calls: Call[];
2236
- }>;
2237
- checkPriceDifferenceBetweenAvnuAndExtended(extendedAdapter: ExtendedAdapter, vesuAdapter: VesuMultiplyAdapter, avnuAdapter: AvnuAdapter): Promise<boolean>;
2238
- handleWithdraw(amount: Web3Number): Promise<{
2239
- calls: Call[];
2240
- status: boolean;
2241
- }>;
2294
+ cycleType: CycleType;
2295
+ }, extendedAdapter: ExtendedAdapter, vesuAdapter: VesuMultiplyAdapter): Promise<TransactionResult>;
2296
+ handleDeposit(): Promise<TransactionResult>;
2297
+ /**
2298
+ * Check if the price difference between avnu and extended is within the acceptable range to enhance the position size or close the position
2299
+ * @param extendedAdapter - the extended adapter
2300
+ * @param vesuAdapter - the vesu adapter
2301
+ * @param avnuAdapter - the avnu adapter
2302
+ * @param positionType - the position type (open or close)
2303
+ * @returns true if the price difference is within the acceptable range, false otherwise
2304
+ */
2305
+ checkPriceDifferenceBetweenAvnuAndExtended(extendedAdapter: ExtendedAdapter, vesuAdapter: VesuMultiplyAdapter, avnuAdapter: AvnuAdapter, positionType: PositionTypeAvnuExtended): Promise<boolean>;
2306
+ /**
2307
+ * Handle the withdrawal of assets from the vault
2308
+ * @param amount - the amount to withdraw in USDC
2309
+ * @returns the calls to be executed and the status of the calls generated along with the metadata for the calls
2310
+ */
2311
+ handleWithdraw(amount: Web3Number): Promise<TransactionResult[]>;
2242
2312
  getAUM(): Promise<{
2243
2313
  net: SingleTokenInfo;
2244
2314
  prevAum: Web3Number;
2245
2315
  splits: PositionInfo[];
2246
2316
  }>;
2317
+ processTransactionDataFromSDK(txnData: TransactionResult<any>[]): Promise<{
2318
+ callsToBeExecutedFinal: Call[];
2319
+ txnMetadata: TransactionMetadata[];
2320
+ } | null>;
2321
+ processTransactionMetadata(txnMetadata: TransactionMetadata[], extendedIntentFulfilled: boolean): Promise<TransactionMetadata[] | null>;
2322
+ getMaxBorrowableAmount(): Promise<Web3Number>;
2323
+ getVesuHealthFactors(): Promise<number[]>;
2324
+ netAPY(): Promise<{
2325
+ net: number;
2326
+ splits: {
2327
+ apy: number;
2328
+ id: string;
2329
+ }[];
2330
+ }>;
2331
+ getWalletHoldings(): Promise<{
2332
+ tokenInfo: TokenInfo;
2333
+ amount: Web3Number;
2334
+ usdValue: number;
2335
+ }[]>;
2247
2336
  }
2248
- declare const VesuExtendedTestStrategies: (extendedBackendUrl: string, extendedApiKey: string, vaultIdExtended: number) => IStrategyMetadata<VesuExtendedStrategySettings>[];
2337
+ declare const VesuExtendedTestStrategies: (extendedBackendReadUrl: string, extendedBackendWriteUrl: string, vaultIdExtended: number, minimumExtendedMovementAmount: number, minimumVesuMovementAmount: number, minimumExtendedRetriesDelayForOrderStatus: number, minimumExtendedPriceDifferenceForSwapOpen: number, maximumExtendedPriceDifferenceForSwapClosing: number) => IStrategyMetadata<VesuExtendedStrategySettings>[];
2249
2338
 
2250
2339
  declare const AddressesConfig: {
2251
2340
  readonly tokens: {
@@ -2658,6 +2747,24 @@ declare const calculateDebtReductionAmountForWithdrawal: (debtAmount: Web3Number
2658
2747
  * @returns The amount to deposit on extended when incurring losses
2659
2748
  */
2660
2749
  declare const calculateAmountDepositOnExtendedWhenIncurringLosses: (client: ExtendedWrapper) => Promise<Web3Number | null>;
2750
+ /**
2751
+ * calculate the amount of collateral to deposit to maintain the ltv
2752
+ * The formula is:
2753
+ * ((debt * debtPrice * targetHF) - (collateral * collateralPrice * ltv)) / ltv
2754
+ * @param collateralAmount in collateral units
2755
+ * @param debtAmount in debt units
2756
+ * @param debtPrice in usd
2757
+ * @param maxLtv
2758
+ * @param collateralPrice in usd
2759
+ * @param targetHF
2760
+ * @returns deltaCollateralAmountUnits in collateral units
2761
+ * null if there is an error
2762
+ */
2763
+ declare const calculateWBTCAmountToMaintainLTV: (collateralAmount: Web3Number, debtAmount: Web3Number, debtPrice: number, maxLtv: number | undefined, collateralPrice: number, targetHF?: number) => {
2764
+ deltaCollateralAmountUnits: Web3Number;
2765
+ } | {
2766
+ deltaCollateralAmountUnits: null;
2767
+ };
2661
2768
  declare const calculateExposureDelta: (exposure_extended: number, exposure_vesu: number) => number;
2662
2769
  /**
2663
2770
  * calculate the delta percentage between the current btc price and the last btc price
@@ -3017,4 +3124,4 @@ declare class PasswordJsonCryptoUtil {
3017
3124
  decrypt(encryptedData: string, password: string): any;
3018
3125
  }
3019
3126
 
3020
- export { type APYInfo, APYType, AUDIT_URL, AUMTypes, AVNU_EXCHANGE, AVNU_EXCHANGE_FOR_LEGACY_USDC, AVNU_LEGACY_SANITIZER, AVNU_MIDDLEWARE, AVNU_QUOTE_URL, AbisConfig, type AccountInfo, type AdapterLeafType, AddressesConfig, type AllAccountsStore, type ApiResponse, type ApproveCallParams, type AssetOperation, AssetOperationStatus, AssetOperationType, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, type Balance, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, type CancelOrderRequest, CommonAdapter, type CommonAdapterConfig, ContractAddr, type CreateOrderRequest, type DecreaseLeverParams, Deployer, type DepositParams, type DualActionAmount, type DualTokenInfo, ERC20, EXTENDED_CONTRACT, EXTENDED_SANITIZER, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, ExitType, ExtendedAdapter, type ExtendedAdapterConfig, type ExtendedApiResponse, ExtendedConfig, ExtendedWrapper, type ExtendedWrapperConfig, type FAQ, FatalError, type FlashloanCallParams, FlowChartColors, type FundingRate, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, type L2Config, LSTAPRService, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, type Market, type MarketStats, Midas, Network, type OpenOrder, OrderSide, OrderStatus, OrderStatusReason, OrderType, PRICE_ROUTER, PasswordJsonCryptoUtil, type PlacedOrder, type Position, type PositionAPY, type PositionAmount, type PositionHistory, type PositionInfo, PositionSide, Pragma, type PriceInfo, Pricer, PricerBase, PricerFromApi, PricerLST, PricerRedis, Protocols, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, type RiskFactorConfig, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SettlementSignature, type SignedWithdrawRequest, type SingleActionAmount, type SingleTokenInfo, StandardMerkleTree, type StandardMerkleTreeData, type StarkDebuggingOrderAmounts, type StarkSettlement, Store, type StoreConfig, type SupportedPosition, type Swap, type SwapInfo, TelegramGroupNotif, TelegramNotif, TimeInForce, type TokenAmount, type TokenInfo, TokenMarketData, type TradingConfig, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, type UniversalStrategySettings, UnusedBalanceAdapter, type UnusedBalanceAdapterConfig, type UpdateLeverageRequest, VESU_SINGLETON, VESU_V2_MODIFY_POSITION_SANITIZER, type VaultPosition, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, VesuConfig, type VesuDefiSpringRewardsCallParams, VesuExtendedMultiplierStrategy, type VesuExtendedStrategySettings, VesuExtendedTestStrategies, type VesuModifyDelegationCallParams, type VesuModifyPositionCallParams, VesuMultiplyAdapter, type VesuMultiplyAdapterConfig, type VesuMultiplyCallParams, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, VesuSupplyOnlyAdapter, type VesuSupplyOnlyAdapterConfig, Web3Number, type WithdrawParams, type WithdrawRequest, ZkLend, _riskFactor, assert, calculateAmountDepositOnExtendedWhenIncurringLosses, calculateAmountDistribution, calculateAmountDistributionForWithdrawal, calculateBTCPriceDelta, calculateDebtAmount, calculateDebtReductionAmountForWithdrawal, calculateExposureDelta, calculateExtendedLevergae, calculateVesUPositionSizeGivenExtended, calculateVesuLeverage, extensionMap, getAPIUsingHeadlessBrowser, getContractDetails, getDefaultStoreConfig, getFAQs, getInvestmentSteps, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, logger, returnFormattedAmount, toBigInt };
3127
+ export { type APYInfo, APYType, AUDIT_URL, AUMTypes, AVNU_EXCHANGE, AVNU_EXCHANGE_FOR_LEGACY_USDC, AVNU_LEGACY_SANITIZER, AVNU_MIDDLEWARE, AVNU_QUOTE_URL, AbisConfig, type AccountInfo, type AdapterLeafType, AddressesConfig, type AllAccountsStore, type ApiResponse, type ApproveCallParams, type AssetOperation, AssetOperationStatus, AssetOperationType, AutoCompounderSTRK, AvnuAdapter, type AvnuAdapterConfig, type AvnuSwapCallParams, AvnuWrapper, type Balance, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, type CancelOrderRequest, CommonAdapter, type CommonAdapterConfig, ContractAddr, type CreateOrderRequest, CycleType, type DecreaseLeverParams, Deployer, type DepositParams, type DualActionAmount, type DualTokenInfo, ERC20, EXTENDED_CONTRACT, EXTENDED_SANITIZER, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, ExitType, ExtendedAdapter, type ExtendedAdapterConfig, type ExtendedApiResponse, ExtendedConfig, ExtendedWrapper, type ExtendedWrapperConfig, type FAQ, FatalError, type FlashloanCallParams, FlowChartColors, type FundingRate, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, type L2Config, LSTAPRService, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, type Market, type MarketStats, Midas, Network, type OpenOrder, OrderSide, OrderStatus, OrderStatusReason, OrderType, PRICE_ROUTER, PasswordJsonCryptoUtil, type PlacedOrder, type Position, type PositionAPY, type PositionAmount, type PositionHistory, type PositionInfo, PositionSide, PositionTypeAvnuExtended, Pragma, type PriceInfo, Pricer, PricerBase, PricerFromApi, PricerLST, PricerRedis, Protocols, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, type RiskFactorConfig, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SettlementSignature, type SignedWithdrawRequest, type SingleActionAmount, type SingleTokenInfo, StandardMerkleTree, type StandardMerkleTreeData, type StarkDebuggingOrderAmounts, type StarkSettlement, Store, type StoreConfig, type SupportedPosition, type Swap, type SwapInfo, TelegramGroupNotif, TelegramNotif, TimeInForce, type TokenAmount, type TokenInfo, TokenMarketData, type TradingConfig, type TransactionMetadata, type TransactionResult, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, type UniversalStrategySettings, UnusedBalanceAdapter, type UnusedBalanceAdapterConfig, type UpdateLeverageRequest, VESU_SINGLETON, VESU_V2_MODIFY_POSITION_SANITIZER, type VaultPosition, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, VesuConfig, type VesuDefiSpringRewardsCallParams, VesuExtendedMultiplierStrategy, type VesuExtendedStrategySettings, VesuExtendedTestStrategies, type VesuModifyDelegationCallParams, type VesuModifyPositionCallParams, VesuMultiplyAdapter, type VesuMultiplyAdapterConfig, type VesuMultiplyCallParams, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, VesuSupplyOnlyAdapter, type VesuSupplyOnlyAdapterConfig, Web3Number, type WithdrawParams, type WithdrawRequest, ZkLend, _riskFactor, assert, calculateAmountDepositOnExtendedWhenIncurringLosses, calculateAmountDistribution, calculateAmountDistributionForWithdrawal, calculateBTCPriceDelta, calculateDebtAmount, calculateDebtReductionAmountForWithdrawal, calculateExposureDelta, calculateExtendedLevergae, calculateVesUPositionSizeGivenExtended, calculateVesuLeverage, calculateWBTCAmountToMaintainLTV, extensionMap, getAPIUsingHeadlessBrowser, getContractDetails, getDefaultStoreConfig, getFAQs, getInvestmentSteps, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, logger, returnFormattedAmount, toBigInt };