@strkfarm/sdk 1.1.17 → 1.1.20
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 +2547 -556
- package/dist/index.browser.mjs +2285 -294
- package/dist/index.d.ts +25 -4
- package/dist/index.js +2294 -295
- package/dist/index.mjs +2285 -294
- package/package.json +2 -1
- package/src/dataTypes/_bignumber.ts +29 -11
- package/src/modules/pricer-from-api.ts +1 -1
- package/src/strategies/base-strategy.ts +5 -1
- package/src/strategies/constants.ts +1 -1
- package/src/strategies/ekubo-cl-vault.tsx +45 -0
- package/src/strategies/universal-adapters/adapter-utils.ts +3 -1
- package/src/strategies/universal-adapters/index.ts +1 -0
- package/src/strategies/universal-adapters/vesu-adapter.ts +79 -36
- package/src/strategies/universal-lst-muliplier-strategy.tsx +69 -26
- package/src/strategies/universal-strategy.tsx +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -416,6 +416,7 @@ declare class BaseStrategy<TVLInfo, ActionInfo> extends CacheClass {
|
|
|
416
416
|
getTVL(): Promise<TVLInfo>;
|
|
417
417
|
depositCall(amountInfo: ActionInfo, receiver: ContractAddr): Promise<Call[]>;
|
|
418
418
|
withdrawCall(amountInfo: ActionInfo, receiver: ContractAddr, owner: ContractAddr): Promise<Call[]>;
|
|
419
|
+
getVaultPositions(): Promise<VaultPosition[]>;
|
|
419
420
|
}
|
|
420
421
|
|
|
421
422
|
interface PoolProps {
|
|
@@ -729,6 +730,7 @@ declare class EkuboCLVault extends BaseStrategy<DualTokenInfo, DualActionAmount>
|
|
|
729
730
|
mag: number;
|
|
730
731
|
sign: number;
|
|
731
732
|
};
|
|
733
|
+
getVaultPositions(): Promise<VaultPosition[]>;
|
|
732
734
|
getPoolKey(blockIdentifier?: BlockIdentifier): Promise<EkuboPoolKey>;
|
|
733
735
|
getNewBounds(): Promise<EkuboBounds>;
|
|
734
736
|
/**
|
|
@@ -1038,9 +1040,14 @@ interface VesuModifyDelegationCallParams {
|
|
|
1038
1040
|
declare const VesuPools: {
|
|
1039
1041
|
Genesis: ContractAddr;
|
|
1040
1042
|
Re7xSTRK: ContractAddr;
|
|
1043
|
+
Re7xBTC: ContractAddr;
|
|
1044
|
+
};
|
|
1045
|
+
declare function getVesuSingletonAddress(vesuPool: ContractAddr): {
|
|
1046
|
+
addr: ContractAddr;
|
|
1047
|
+
isV2: boolean;
|
|
1041
1048
|
};
|
|
1042
1049
|
declare class VesuAdapter extends BaseAdapter {
|
|
1043
|
-
|
|
1050
|
+
VESU_MULTIPLY_V1: ContractAddr;
|
|
1044
1051
|
VESU_MULTIPLY: ContractAddr;
|
|
1045
1052
|
config: VesuAdapterConfig;
|
|
1046
1053
|
networkConfig: IConfig | undefined;
|
|
@@ -1079,7 +1086,10 @@ declare class VesuAdapter extends BaseAdapter {
|
|
|
1079
1086
|
getDefiSpringClaimCall: () => GenerateCallFn<VesuDefiSpringRewardsCallParams>;
|
|
1080
1087
|
formatAmountTypeEnum(amountType: VesuAmountType): CairoCustomEnum;
|
|
1081
1088
|
formatAmountDenominationEnum(denomination: VesuAmountDenomination): CairoCustomEnum;
|
|
1082
|
-
getVesuSingletonContract(config: IConfig):
|
|
1089
|
+
getVesuSingletonContract(config: IConfig, poolId: ContractAddr): {
|
|
1090
|
+
contract: Contract;
|
|
1091
|
+
isV2: boolean;
|
|
1092
|
+
};
|
|
1083
1093
|
getLTVConfig(config: IConfig): Promise<number>;
|
|
1084
1094
|
getPositions(config: IConfig): Promise<VaultPosition[]>;
|
|
1085
1095
|
getCollateralization(config: IConfig): Promise<Omit<VaultPosition, 'amount'>[]>;
|
|
@@ -1096,6 +1106,14 @@ declare class VesuAdapter extends BaseAdapter {
|
|
|
1096
1106
|
static getVesuPools(retry?: number): Promise<VesuPoolsInfo>;
|
|
1097
1107
|
}
|
|
1098
1108
|
|
|
1109
|
+
declare const SIMPLE_SANITIZER: ContractAddr;
|
|
1110
|
+
declare const SIMPLE_SANITIZER_V2: ContractAddr;
|
|
1111
|
+
declare const SIMPLE_SANITIZER_VESU_V1_DELEGATIONS: ContractAddr;
|
|
1112
|
+
declare const PRICE_ROUTER: ContractAddr;
|
|
1113
|
+
declare const AVNU_MIDDLEWARE: ContractAddr;
|
|
1114
|
+
declare const VESU_SINGLETON: ContractAddr;
|
|
1115
|
+
declare function toBigInt(value: string | number): bigint;
|
|
1116
|
+
|
|
1099
1117
|
interface UniversalManageCall {
|
|
1100
1118
|
proofs: string[];
|
|
1101
1119
|
manageCall: ManageCall;
|
|
@@ -1249,8 +1267,11 @@ declare const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[
|
|
|
1249
1267
|
|
|
1250
1268
|
declare class UniversalLstMultiplierStrategy extends UniversalStrategy<UniversalStrategySettings> {
|
|
1251
1269
|
private quoteAmountToFetchPrice;
|
|
1252
|
-
constructor(config: IConfig, pricer:
|
|
1270
|
+
constructor(config: IConfig, pricer: PricerBase, metadata: IStrategyMetadata<UniversalStrategySettings>);
|
|
1271
|
+
asset(): TokenInfo;
|
|
1272
|
+
getTag(): string;
|
|
1253
1273
|
getVesuAdapters(): VesuAdapter[];
|
|
1274
|
+
protected getRewardsAUM(prevAum: Web3Number): Promise<Web3Number>;
|
|
1254
1275
|
getLSTDexPrice(): Promise<number>;
|
|
1255
1276
|
/**
|
|
1256
1277
|
* Uses vesu's multiple call to create leverage on LST
|
|
@@ -1485,4 +1506,4 @@ declare class PasswordJsonCryptoUtil {
|
|
|
1485
1506
|
decrypt(encryptedData: string, password: string): any;
|
|
1486
1507
|
}
|
|
1487
1508
|
|
|
1488
|
-
export { AUMTypes, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type ApproveCallParams, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, 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, FatalError, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, Network, PasswordJsonCryptoUtil, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerLST, PricerRedis, Protocols, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type RouteNode, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type Swap, type SwapInfo, TelegramNotif, type TokenAmount, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, 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, getAPIUsingHeadlessBrowser, getContractDetails, getDefaultStoreConfig, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getTrovesEndpoint, highlightTextWithLinks, type i257, logger };
|
|
1509
|
+
export { AUMTypes, AVNU_MIDDLEWARE, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type ApproveCallParams, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, 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, FatalError, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, Network, PRICE_ROUTER, PasswordJsonCryptoUtil, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerLST, PricerRedis, Protocols, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type Swap, type SwapInfo, TelegramNotif, type TokenAmount, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, VESU_SINGLETON, 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, getAPIUsingHeadlessBrowser, getContractDetails, getDefaultStoreConfig, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, logger, toBigInt };
|