@strkfarm/sdk 2.0.0-staging.70 → 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.browser.global.js +26212 -26154
- package/dist/index.browser.mjs +323 -267
- package/dist/index.d.ts +15 -2
- package/dist/index.js +385 -326
- package/dist/index.mjs +356 -298
- package/package.json +1 -1
- package/src/global.ts +37 -11
- package/src/interfaces/common.tsx +15 -0
- package/src/modules/ekubo-pricer.ts +2 -1
- package/src/modules/pricer.ts +27 -15
- package/src/modules/zkLend.ts +3 -2
- package/src/strategies/ekubo-cl-vault.tsx +3 -0
- package/src/strategies/universal-lst-muliplier-strategy.tsx +3 -0
- package/src/strategies/universal-strategy.tsx +3 -0
- package/src/strategies/yoloVault.ts +5 -0
package/dist/index.d.ts
CHANGED
|
@@ -99,6 +99,13 @@ interface RiskFactor {
|
|
|
99
99
|
weight: number;
|
|
100
100
|
reason?: string;
|
|
101
101
|
}
|
|
102
|
+
type PriceMethod = 'AvnuApi' | 'Coinbase' | 'Coinmarketcap' | 'Ekubo' | 'Avnu';
|
|
103
|
+
declare enum TokenIndexingType {
|
|
104
|
+
PEGGED = "pegged",
|
|
105
|
+
INDEXER = "indexer",
|
|
106
|
+
LST_SCRIPT = "lstScript",
|
|
107
|
+
IGNORE = "ignore"
|
|
108
|
+
}
|
|
102
109
|
interface TokenInfo {
|
|
103
110
|
name: string;
|
|
104
111
|
symbol: string;
|
|
@@ -109,7 +116,9 @@ interface TokenInfo {
|
|
|
109
116
|
displayDecimals: number;
|
|
110
117
|
priceProxySymbol?: string;
|
|
111
118
|
priceCheckAmount?: number;
|
|
119
|
+
priceMethod?: PriceMethod;
|
|
112
120
|
dontPrice?: boolean;
|
|
121
|
+
indexingType: TokenIndexingType;
|
|
113
122
|
}
|
|
114
123
|
declare enum Network {
|
|
115
124
|
mainnet = "mainnet",
|
|
@@ -223,6 +232,9 @@ interface StrategyApyHistoryUIConfig {
|
|
|
223
232
|
showApyHistory?: boolean;
|
|
224
233
|
noApyHistoryMessage?: string;
|
|
225
234
|
}
|
|
235
|
+
interface FeeBps {
|
|
236
|
+
performanceFeeBps: number;
|
|
237
|
+
}
|
|
226
238
|
/**
|
|
227
239
|
* @property risk.riskFactor.factor - The risk factors that are considered for the strategy.
|
|
228
240
|
* @property risk.riskFactor.factor - The value of the risk factor from 0 to 10, 0 being the lowest and 10 being the highest.
|
|
@@ -263,6 +275,7 @@ interface IStrategyMetadata<T> {
|
|
|
263
275
|
};
|
|
264
276
|
apyMethodology?: string;
|
|
265
277
|
realizedApyMethodology?: string;
|
|
278
|
+
feeBps?: FeeBps;
|
|
266
279
|
additionalInfo: T;
|
|
267
280
|
contractDetails: {
|
|
268
281
|
address: ContractAddr;
|
|
@@ -452,7 +465,6 @@ interface PriceInfo {
|
|
|
452
465
|
price: number;
|
|
453
466
|
timestamp: Date;
|
|
454
467
|
}
|
|
455
|
-
type PriceMethod = 'AvnuApi' | 'Coinbase' | 'Coinmarketcap' | 'Ekubo' | 'Avnu';
|
|
456
468
|
declare class Pricer extends PricerBase {
|
|
457
469
|
protected prices: {
|
|
458
470
|
[key: string]: PriceInfo;
|
|
@@ -477,6 +489,7 @@ declare class Pricer extends PricerBase {
|
|
|
477
489
|
getPrice(tokenSymbol: string, blockNumber?: BlockIdentifier): Promise<PriceInfo>;
|
|
478
490
|
protected _loadPrices(onUpdate?: (tokenSymbol: string) => void): void;
|
|
479
491
|
_getPrice(token: TokenInfo): Promise<number>;
|
|
492
|
+
protected _getMethodsToTry(token: TokenInfo): PriceMethod[];
|
|
480
493
|
protected _tryPriceMethod(token: TokenInfo, method: PriceMethod): Promise<number>;
|
|
481
494
|
_getPriceAvnuApi(token: TokenInfo): Promise<number>;
|
|
482
495
|
_getPriceCoinbase(token: TokenInfo): Promise<number>;
|
|
@@ -2410,4 +2423,4 @@ declare class PasswordJsonCryptoUtil {
|
|
|
2410
2423
|
decrypt(encryptedData: string, password: string): any;
|
|
2411
2424
|
}
|
|
2412
2425
|
|
|
2413
|
-
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, EkuboPricer, 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, PricerAvnuApi, 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 };
|
|
2426
|
+
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, EkuboPricer, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, type FAQ, FactoryStrategyType, FatalError, type FeeBps, 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, type PriceMethod, Pricer, PricerAvnuApi, 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, TokenIndexingType, 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 };
|