@strkfarm/sdk 1.0.58 → 1.0.60
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/cli.js +0 -0
- package/dist/cli.mjs +0 -0
- package/dist/index.browser.global.js +6168 -5881
- package/dist/index.browser.mjs +399 -2110
- package/dist/index.d.ts +27 -2
- package/dist/index.js +413 -2118
- package/dist/index.mjs +412 -2124
- package/package.json +3 -2
- package/src/interfaces/common.tsx +18 -4
- package/src/node/deployer.ts +1 -1
- package/src/strategies/universal-adapters/adapter-utils.ts +1 -1
- package/src/strategies/universal-adapters/common-adapter.ts +31 -0
- package/src/strategies/{universal-strategy.ts → universal-strategy.tsx} +371 -28
- package/src/utils/cacheClass.ts +28 -28
package/dist/index.d.ts
CHANGED
|
@@ -161,6 +161,8 @@ interface VaultPosition {
|
|
|
161
161
|
}
|
|
162
162
|
declare const Protocols: {
|
|
163
163
|
VESU: IProtocol;
|
|
164
|
+
ENDUR: IProtocol;
|
|
165
|
+
EXTENDED: IProtocol;
|
|
164
166
|
};
|
|
165
167
|
|
|
166
168
|
interface ILendingMetadata {
|
|
@@ -921,6 +923,8 @@ interface ApproveCallParams {
|
|
|
921
923
|
}
|
|
922
924
|
interface CommonAdapterConfig {
|
|
923
925
|
id: string;
|
|
926
|
+
vaultAddress: ContractAddr;
|
|
927
|
+
vaultAllocator: ContractAddr;
|
|
924
928
|
manager: ContractAddr;
|
|
925
929
|
asset: ContractAddr;
|
|
926
930
|
}
|
|
@@ -938,6 +942,15 @@ declare class CommonAdapter extends BaseAdapter {
|
|
|
938
942
|
calldata: bigint[];
|
|
939
943
|
};
|
|
940
944
|
};
|
|
945
|
+
getBringLiquidityAdapter(id: string): () => AdapterLeafType<ApproveCallParams>;
|
|
946
|
+
getBringLiquidityCall(): (params: ApproveCallParams) => {
|
|
947
|
+
sanitizer: ContractAddr;
|
|
948
|
+
call: {
|
|
949
|
+
contractAddress: ContractAddr;
|
|
950
|
+
selector: string;
|
|
951
|
+
calldata: bigint[];
|
|
952
|
+
};
|
|
953
|
+
};
|
|
941
954
|
}
|
|
942
955
|
|
|
943
956
|
interface VesuPoolsInfo {
|
|
@@ -1026,6 +1039,7 @@ declare class VesuAdapter extends BaseAdapter {
|
|
|
1026
1039
|
}
|
|
1027
1040
|
|
|
1028
1041
|
interface UniversalStrategySettings {
|
|
1042
|
+
vaultAddress: ContractAddr;
|
|
1029
1043
|
manager: ContractAddr;
|
|
1030
1044
|
vaultAllocator: ContractAddr;
|
|
1031
1045
|
redeemRequestNFT: ContractAddr;
|
|
@@ -1038,6 +1052,10 @@ interface UniversalStrategySettings {
|
|
|
1038
1052
|
targetHealthFactor: number;
|
|
1039
1053
|
minHealthFactor: number;
|
|
1040
1054
|
}
|
|
1055
|
+
declare enum AUMTypes {
|
|
1056
|
+
FINALISED = "finalised",
|
|
1057
|
+
DEFISPRING = "defispring"
|
|
1058
|
+
}
|
|
1041
1059
|
declare class UniversalStrategy<S extends UniversalStrategySettings> extends BaseStrategy<SingleTokenInfo, SingleActionAmount> {
|
|
1042
1060
|
/** Contract address of the strategy */
|
|
1043
1061
|
readonly address: ContractAddr;
|
|
@@ -1059,6 +1077,7 @@ declare class UniversalStrategy<S extends UniversalStrategySettings> extends Bas
|
|
|
1059
1077
|
getAdapter(id: string): BaseAdapter;
|
|
1060
1078
|
asset(): TokenInfo;
|
|
1061
1079
|
depositCall(amountInfo: SingleActionAmount, receiver: ContractAddr): Promise<Call[]>;
|
|
1080
|
+
withdrawCall(amountInfo: SingleActionAmount, receiver: ContractAddr, owner: ContractAddr): Promise<Call[]>;
|
|
1062
1081
|
/**
|
|
1063
1082
|
* Calculates the Total Value Locked (TVL) for a specific user.
|
|
1064
1083
|
* @param user - Address of the user
|
|
@@ -1090,6 +1109,7 @@ declare class UniversalStrategy<S extends UniversalStrategySettings> extends Bas
|
|
|
1090
1109
|
amount: Web3Number;
|
|
1091
1110
|
usdValue: number;
|
|
1092
1111
|
}>;
|
|
1112
|
+
getUnusedBalance(): Promise<SingleTokenInfo>;
|
|
1093
1113
|
getAUM(): Promise<{
|
|
1094
1114
|
net: SingleTokenInfo;
|
|
1095
1115
|
prevAum: Web3Number;
|
|
@@ -1128,6 +1148,9 @@ declare class UniversalStrategy<S extends UniversalStrategySettings> extends Bas
|
|
|
1128
1148
|
isDeposit: boolean;
|
|
1129
1149
|
leg1DepositAmount: Web3Number;
|
|
1130
1150
|
}): Promise<Call>;
|
|
1151
|
+
getBringLiquidityCall(params: {
|
|
1152
|
+
amount: Web3Number;
|
|
1153
|
+
}): Promise<Call>;
|
|
1131
1154
|
getRebalanceCall(params: {
|
|
1132
1155
|
isLeg1toLeg2: boolean;
|
|
1133
1156
|
amount: Web3Number;
|
|
@@ -1138,7 +1161,9 @@ declare enum UNIVERSAL_MANAGE_IDS {
|
|
|
1138
1161
|
VESU_LEG1 = "vesu_leg1",
|
|
1139
1162
|
VESU_LEG2 = "vesu_leg2",
|
|
1140
1163
|
APPROVE_TOKEN1 = "approve_token1",
|
|
1141
|
-
APPROVE_TOKEN2 = "approve_token2"
|
|
1164
|
+
APPROVE_TOKEN2 = "approve_token2",
|
|
1165
|
+
APPROVE_BRING_LIQUIDITY = "approve_bring_liquidity",
|
|
1166
|
+
BRING_LIQUIDITY = "bring_liquidity"
|
|
1142
1167
|
}
|
|
1143
1168
|
declare enum UNIVERSAL_ADAPTERS {
|
|
1144
1169
|
COMMON = "common_adapter",
|
|
@@ -1279,4 +1304,4 @@ declare class PasswordJsonCryptoUtil {
|
|
|
1279
1304
|
decrypt(encryptedData: string, password: string): any;
|
|
1280
1305
|
}
|
|
1281
1306
|
|
|
1282
|
-
export { 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 };
|
|
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 };
|