@suilend/sdk 1.1.81 → 1.1.82
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/lib/strategyOwnerCap.d.ts +4 -2
- package/lib/strategyOwnerCap.js +30 -0
- package/lib/types.d.ts +12 -0
- package/package.json +1 -1
|
@@ -8,7 +8,9 @@ export declare enum StrategyType {
|
|
|
8
8
|
sSUI_SUI_LOOPING = "1",
|
|
9
9
|
stratSUI_SUI_LOOPING = "2",
|
|
10
10
|
USDC_sSUI_SUI_LOOPING = "3",
|
|
11
|
-
AUSD_sSUI_SUI_LOOPING = "4"
|
|
11
|
+
AUSD_sSUI_SUI_LOOPING = "4",
|
|
12
|
+
xBTC_sSUI_SUI_LOOPING = "100",// Used to be for Slush Strategies #0
|
|
13
|
+
xBTC_wBTC_LOOPING = "101"
|
|
12
14
|
}
|
|
13
15
|
export declare const STRATEGY_TYPE_INFO_MAP: Record<StrategyType, {
|
|
14
16
|
queryParam: string;
|
|
@@ -19,7 +21,7 @@ export declare const STRATEGY_TYPE_INFO_MAP: Record<StrategyType, {
|
|
|
19
21
|
type: string;
|
|
20
22
|
};
|
|
21
23
|
depositBaseCoinType?: string;
|
|
22
|
-
depositLstCoinType
|
|
24
|
+
depositLstCoinType?: string;
|
|
23
25
|
borrowCoinType: string;
|
|
24
26
|
currencyCoinTypes: string[];
|
|
25
27
|
defaultCurrencyCoinType: string;
|
package/lib/strategyOwnerCap.js
CHANGED
|
@@ -27,6 +27,8 @@ var StrategyType;
|
|
|
27
27
|
StrategyType["stratSUI_SUI_LOOPING"] = "2";
|
|
28
28
|
StrategyType["USDC_sSUI_SUI_LOOPING"] = "3";
|
|
29
29
|
StrategyType["AUSD_sSUI_SUI_LOOPING"] = "4";
|
|
30
|
+
StrategyType["xBTC_sSUI_SUI_LOOPING"] = "100";
|
|
31
|
+
StrategyType["xBTC_wBTC_LOOPING"] = "101";
|
|
30
32
|
})(StrategyType || (exports.StrategyType = StrategyType = {}));
|
|
31
33
|
exports.STRATEGY_TYPE_INFO_MAP = {
|
|
32
34
|
[StrategyType.sSUI_SUI_LOOPING]: {
|
|
@@ -85,6 +87,34 @@ exports.STRATEGY_TYPE_INFO_MAP = {
|
|
|
85
87
|
currencyCoinTypes: [sui_fe_1.NORMALIZED_AUSD_COINTYPE],
|
|
86
88
|
defaultCurrencyCoinType: sui_fe_1.NORMALIZED_AUSD_COINTYPE,
|
|
87
89
|
},
|
|
90
|
+
[StrategyType.xBTC_sSUI_SUI_LOOPING]: {
|
|
91
|
+
queryParam: "xBTC-sSUI-SUI-looping",
|
|
92
|
+
header: {
|
|
93
|
+
coinTypes: [sui_fe_1.NORMALIZED_xBTC_COINTYPE],
|
|
94
|
+
title: "xBTC sSUI/SUI",
|
|
95
|
+
tooltip: "Sets up an xBTC sSUI/SUI Looping strategy by depositing xBTC and looping sSUI/SUI to the desired leverage",
|
|
96
|
+
type: "Looping",
|
|
97
|
+
},
|
|
98
|
+
depositBaseCoinType: sui_fe_1.NORMALIZED_xBTC_COINTYPE,
|
|
99
|
+
depositLstCoinType: sui_fe_1.NORMALIZED_sSUI_COINTYPE,
|
|
100
|
+
borrowCoinType: sui_fe_1.NORMALIZED_SUI_COINTYPE,
|
|
101
|
+
currencyCoinTypes: [sui_fe_1.NORMALIZED_xBTC_COINTYPE],
|
|
102
|
+
defaultCurrencyCoinType: sui_fe_1.NORMALIZED_xBTC_COINTYPE,
|
|
103
|
+
},
|
|
104
|
+
[StrategyType.xBTC_wBTC_LOOPING]: {
|
|
105
|
+
queryParam: "xBTC-wBTC-looping",
|
|
106
|
+
header: {
|
|
107
|
+
coinTypes: [sui_fe_1.NORMALIZED_xBTC_COINTYPE, sui_fe_1.NORMALIZED_wBTC_COINTYPE],
|
|
108
|
+
title: "xBTC/wBTC",
|
|
109
|
+
tooltip: "Sets up an xBTC/wBTC Looping strategy by depositing xBTC and borrowing wBTC to the desired leverage",
|
|
110
|
+
type: "Looping",
|
|
111
|
+
},
|
|
112
|
+
depositBaseCoinType: sui_fe_1.NORMALIZED_xBTC_COINTYPE,
|
|
113
|
+
depositLstCoinType: undefined,
|
|
114
|
+
borrowCoinType: sui_fe_1.NORMALIZED_wBTC_COINTYPE,
|
|
115
|
+
currencyCoinTypes: [sui_fe_1.NORMALIZED_xBTC_COINTYPE, sui_fe_1.NORMALIZED_wBTC_COINTYPE],
|
|
116
|
+
defaultCurrencyCoinType: sui_fe_1.NORMALIZED_xBTC_COINTYPE,
|
|
117
|
+
},
|
|
88
118
|
};
|
|
89
119
|
const strategyDeposit = (coin, coinType, strategyOwnerCap, reserveArrayIndex, transaction) => transaction.moveCall({
|
|
90
120
|
target: `${STRATEGY_WRAPPER_PACKAGE_ID_V6}::strategy_wrapper::deposit_liquidity_and_deposit_into_obligation`,
|
package/lib/types.d.ts
CHANGED
|
@@ -158,6 +158,18 @@ export type ApiForgiveEvent = {
|
|
|
158
158
|
eventIndex: number;
|
|
159
159
|
sender: string;
|
|
160
160
|
};
|
|
161
|
+
export type ApiSocializeLossEvent = {
|
|
162
|
+
id: number;
|
|
163
|
+
lendingMarketId: string;
|
|
164
|
+
reserveId: string;
|
|
165
|
+
obligationId: string;
|
|
166
|
+
coinType: string;
|
|
167
|
+
lossAmount: string;
|
|
168
|
+
socializationRate: string;
|
|
169
|
+
relatedForgiveDigest: string;
|
|
170
|
+
timestamp: number;
|
|
171
|
+
sender: string;
|
|
172
|
+
};
|
|
161
173
|
export type ApiClaimRewardEvent = {
|
|
162
174
|
id: number;
|
|
163
175
|
lendingMarketId: string;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@suilend/sdk","version":"1.1.
|
|
1
|
+
{"name":"@suilend/sdk","version":"1.1.82","private":false,"description":"A TypeScript SDK for interacting with the Suilend program","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./client":"./client.js","./api/events":"./api/events.js","./api":"./api/index.js","./lib/constants":"./lib/constants.js","./lib":"./lib/index.js","./lib/initialize":"./lib/initialize.js","./lib/liquidityMining":"./lib/liquidityMining.js","./lib/strategyOwnerCap":"./lib/strategyOwnerCap.js","./lib/transactions":"./lib/transactions.js","./lib/types":"./lib/types.js","./parsers/apiReserveAssetDataEvent":"./parsers/apiReserveAssetDataEvent.js","./parsers":"./parsers/index.js","./parsers/lendingMarket":"./parsers/lendingMarket.js","./parsers/obligation":"./parsers/obligation.js","./parsers/rateLimiter":"./parsers/rateLimiter.js","./parsers/reserve":"./parsers/reserve.js","./swap":"./swap/index.js","./swap/quote":"./swap/quote.js","./swap/transaction":"./swap/transaction.js","./utils/events":"./utils/events.js","./utils":"./utils/index.js","./utils/obligation":"./utils/obligation.js","./utils/simulate":"./utils/simulate.js","./_generated/_framework/reified":"./_generated/_framework/reified.js","./_generated/_framework/util":"./_generated/_framework/util.js","./_generated/_framework/vector":"./_generated/_framework/vector.js","./_generated/suilend":"./_generated/suilend/index.js","./_generated/suilend/cell/structs":"./_generated/suilend/cell/structs.js","./_generated/suilend/decimal/structs":"./_generated/suilend/decimal/structs.js","./_generated/suilend/lending-market/functions":"./_generated/suilend/lending-market/functions.js","./_generated/suilend/lending-market/structs":"./_generated/suilend/lending-market/structs.js","./_generated/suilend/lending-market-registry/functions":"./_generated/suilend/lending-market-registry/functions.js","./_generated/suilend/liquidity-mining/structs":"./_generated/suilend/liquidity-mining/structs.js","./_generated/suilend/obligation/structs":"./_generated/suilend/obligation/structs.js","./_generated/suilend/rate-limiter/functions":"./_generated/suilend/rate-limiter/functions.js","./_generated/suilend/rate-limiter/structs":"./_generated/suilend/rate-limiter/structs.js","./_generated/suilend/reserve/structs":"./_generated/suilend/reserve/structs.js","./_generated/suilend/reserve-config/functions":"./_generated/suilend/reserve-config/functions.js","./_generated/suilend/reserve-config/structs":"./_generated/suilend/reserve-config/structs.js","./_generated/_dependencies/source/0x1":"./_generated/_dependencies/source/0x1/index.js","./_generated/_dependencies/source/0x2":"./_generated/_dependencies/source/0x2/index.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.js","./_generated/_dependencies/source/0x1/ascii/structs":"./_generated/_dependencies/source/0x1/ascii/structs.js","./_generated/_dependencies/source/0x1/option/structs":"./_generated/_dependencies/source/0x1/option/structs.js","./_generated/_dependencies/source/0x1/type-name/structs":"./_generated/_dependencies/source/0x1/type-name/structs.js","./_generated/_dependencies/source/0x2/bag/structs":"./_generated/_dependencies/source/0x2/bag/structs.js","./_generated/_dependencies/source/0x2/balance/structs":"./_generated/_dependencies/source/0x2/balance/structs.js","./_generated/_dependencies/source/0x2/object/structs":"./_generated/_dependencies/source/0x2/object/structs.js","./_generated/_dependencies/source/0x2/object-table/structs":"./_generated/_dependencies/source/0x2/object-table/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs.js"},"types":"./index.js","scripts":{"build":"rm -rf ./dist && bun tsc","eslint":"eslint --fix \"./src/**/*.ts\"","prettier":"prettier --write \"./src/**/*\"","lint":"bun eslint && bun prettier && bun tsc --noEmit","release":"bun run build && bun ts-node ./release.ts && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/suilend/suilend-fe-public.git"},"bugs":{"url":"https://github.com/suilend/suilend-fe-public/issues"},"dependencies":{"@7kprotocol/sdk-ts":"^3.4.1","@cetusprotocol/aggregator-sdk":"^1.2.1","@flowx-finance/sdk":"^1.13.4","@pythnetwork/pyth-sui-js":"^2.2.0","aftermath-ts-sdk":"^1.3.22","bignumber.js":"^9.1.2","bn.js":"^5.2.2","crypto-js":"^4.2.0","lodash":"^4.17.21","p-limit":"3.1.0","uuid":"^11.0.3"},"devDependencies":{"@types/bn.js":"^5.2.0","@types/lodash":"^4.17.20","ts-node":"^10.9.2"},"peerDependencies":{"@mysten/bcs":"1.6.0","@mysten/sui":"1.28.2","@suilend/sui-fe":"^0.3.29"},"overrides":{"chalk":"5.3.0","strip-ansi":"7.1.0","color-convert":"2.0.1","color-name":"1.1.4","is-core-module":"2.13.1","error-ex":"1.3.2","has-ansi":"5.0.1"}}
|