@strkfarm/sdk 1.0.62 → 1.0.64
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 +660 -372
- package/dist/index.browser.mjs +357 -69
- package/dist/index.d.ts +27 -3
- package/dist/index.js +358 -72
- package/dist/index.mjs +360 -74
- package/package.json +1 -1
- package/src/global.ts +19 -1
- package/src/interfaces/common.tsx +1 -0
- package/src/interfaces/risks.ts +175 -0
- package/src/modules/harvests.ts +4 -2
- package/src/notifs/telegram.ts +3 -3
- package/src/strategies/ekubo-cl-vault.tsx +201 -71
- package/src/strategies/universal-adapters/adapter-utils.ts +3 -1
- package/src/strategies/universal-adapters/common-adapter.ts +57 -1
- package/src/strategies/universal-adapters/vesu-adapter.ts +39 -0
- package/src/strategies/universal-strategy.tsx +78 -5
package/dist/index.d.ts
CHANGED
|
@@ -133,6 +133,10 @@ interface IStrategyMetadata<T> {
|
|
|
133
133
|
}[];
|
|
134
134
|
docs?: string;
|
|
135
135
|
investmentSteps: string[];
|
|
136
|
+
curator?: {
|
|
137
|
+
name: string;
|
|
138
|
+
logo: string;
|
|
139
|
+
};
|
|
136
140
|
}
|
|
137
141
|
interface IInvestmentFlow {
|
|
138
142
|
id?: string;
|
|
@@ -668,6 +672,7 @@ interface CLVaultStrategySettings {
|
|
|
668
672
|
direction: "any" | "uponly";
|
|
669
673
|
customShouldRebalance: (currentPoolPrice: number) => Promise<boolean>;
|
|
670
674
|
};
|
|
675
|
+
quoteAsset: TokenInfo;
|
|
671
676
|
}
|
|
672
677
|
declare class EkuboCLVault extends BaseStrategy<DualTokenInfo, DualActionAmount> {
|
|
673
678
|
/** Contract address of the strategy */
|
|
@@ -816,7 +821,7 @@ declare class EkuboCLVault extends BaseStrategy<DualTokenInfo, DualActionAmount>
|
|
|
816
821
|
getInvestmentFlows(): Promise<IInvestmentFlow[]>;
|
|
817
822
|
}
|
|
818
823
|
/**
|
|
819
|
-
* Represents the
|
|
824
|
+
* Represents the Ekubo CL Vault Strategies.
|
|
820
825
|
*/
|
|
821
826
|
declare const EkuboCLVaultStrategies: IStrategyMetadata<CLVaultStrategySettings>[];
|
|
822
827
|
|
|
@@ -921,6 +926,9 @@ interface FlashloanCallParams {
|
|
|
921
926
|
interface ApproveCallParams {
|
|
922
927
|
amount: Web3Number;
|
|
923
928
|
}
|
|
929
|
+
interface AvnuSwapCallParams {
|
|
930
|
+
props: SwapInfo;
|
|
931
|
+
}
|
|
924
932
|
interface CommonAdapterConfig {
|
|
925
933
|
id: string;
|
|
926
934
|
vaultAddress: ContractAddr;
|
|
@@ -951,6 +959,8 @@ declare class CommonAdapter extends BaseAdapter {
|
|
|
951
959
|
calldata: bigint[];
|
|
952
960
|
};
|
|
953
961
|
};
|
|
962
|
+
getAvnuAdapter(fromToken: ContractAddr, toToken: ContractAddr, id: string): () => AdapterLeafType<AvnuSwapCallParams>;
|
|
963
|
+
getAvnuCall(fromToken: ContractAddr, toToken: ContractAddr): GenerateCallFn<AvnuSwapCallParams>;
|
|
954
964
|
}
|
|
955
965
|
|
|
956
966
|
interface VesuPoolsInfo {
|
|
@@ -978,6 +988,10 @@ interface VesuModifyPositionCallParams {
|
|
|
978
988
|
collateralAmount: VesuAmount;
|
|
979
989
|
debtAmount: VesuAmount;
|
|
980
990
|
}
|
|
991
|
+
interface VesuDefiSpringRewardsCallParams {
|
|
992
|
+
amount: Web3Number;
|
|
993
|
+
proofs: string[];
|
|
994
|
+
}
|
|
981
995
|
interface VesuAdapterConfig {
|
|
982
996
|
poolId: ContractAddr;
|
|
983
997
|
collateral: TokenInfo;
|
|
@@ -1019,6 +1033,8 @@ declare class VesuAdapter extends BaseAdapter {
|
|
|
1019
1033
|
};
|
|
1020
1034
|
};
|
|
1021
1035
|
getModifyPositionCall: (params: VesuModifyPositionCallParams) => ManageCall;
|
|
1036
|
+
getDefispringRewardsAdapter: (id: string) => () => AdapterLeafType<VesuDefiSpringRewardsCallParams>;
|
|
1037
|
+
getDefiSpringClaimCall: () => GenerateCallFn<VesuDefiSpringRewardsCallParams>;
|
|
1022
1038
|
formatAmountTypeEnum(amountType: VesuAmountType): CairoCustomEnum;
|
|
1023
1039
|
formatAmountDenominationEnum(denomination: VesuAmountDenomination): CairoCustomEnum;
|
|
1024
1040
|
getVesuSingletonContract(config: IConfig): Contract;
|
|
@@ -1151,6 +1167,11 @@ declare class UniversalStrategy<S extends UniversalStrategySettings> extends Bas
|
|
|
1151
1167
|
getBringLiquidityCall(params: {
|
|
1152
1168
|
amount: Web3Number;
|
|
1153
1169
|
}): Promise<Call>;
|
|
1170
|
+
getHarvestCall(): Promise<{
|
|
1171
|
+
call: Call;
|
|
1172
|
+
reward: Web3Number;
|
|
1173
|
+
tokenInfo: TokenInfo;
|
|
1174
|
+
}>;
|
|
1154
1175
|
getRebalanceCall(params: {
|
|
1155
1176
|
isLeg1toLeg2: boolean;
|
|
1156
1177
|
amount: Web3Number;
|
|
@@ -1163,7 +1184,10 @@ declare enum UNIVERSAL_MANAGE_IDS {
|
|
|
1163
1184
|
APPROVE_TOKEN1 = "approve_token1",
|
|
1164
1185
|
APPROVE_TOKEN2 = "approve_token2",
|
|
1165
1186
|
APPROVE_BRING_LIQUIDITY = "approve_bring_liquidity",
|
|
1166
|
-
BRING_LIQUIDITY = "bring_liquidity"
|
|
1187
|
+
BRING_LIQUIDITY = "bring_liquidity",
|
|
1188
|
+
DEFISPRING_REWARDS = "defispring_rewards",
|
|
1189
|
+
APPROVE_SWAP_TOKEN1 = "approve_swap_token1",
|
|
1190
|
+
AVNU_SWAP_REWARDS = "avnu_swap_rewards"
|
|
1167
1191
|
}
|
|
1168
1192
|
declare enum UNIVERSAL_ADAPTERS {
|
|
1169
1193
|
COMMON = "common_adapter",
|
|
@@ -1304,4 +1328,4 @@ declare class PasswordJsonCryptoUtil {
|
|
|
1304
1328
|
decrypt(encryptedData: string, password: string): any;
|
|
1305
1329
|
}
|
|
1306
1330
|
|
|
1307
|
-
export { AUMTypes, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type ApproveCallParams, AutoCompounderSTRK, AvnuWrapper, BaseAdapter, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type FAQ, FatalError, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, Initializable, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, Network, PasswordJsonCryptoUtil, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerRedis, Protocols, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type SwapInfo, TelegramNotif, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, type VaultPosition, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, type VesuModifyPositionCallParams, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, ZkLend, assert, getAPIUsingHeadlessBrowser, getDefaultStoreConfig, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getTrovesEndpoint, highlightTextWithLinks, type i257, logger };
|
|
1331
|
+
export { AUMTypes, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type ApproveCallParams, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type FAQ, FatalError, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, Initializable, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, Network, PasswordJsonCryptoUtil, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerRedis, Protocols, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type SwapInfo, TelegramNotif, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, type VaultPosition, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, type VesuDefiSpringRewardsCallParams, type VesuModifyPositionCallParams, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, ZkLend, assert, getAPIUsingHeadlessBrowser, getDefaultStoreConfig, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getTrovesEndpoint, highlightTextWithLinks, type i257, logger };
|