@suilend/sdk 2.0.4 → 3.0.1
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/_generated/_dependencies/source/0x1/ascii/structs.d.ts +7 -11
- package/_generated/_dependencies/source/0x1/ascii/structs.js +6 -63
- package/_generated/_dependencies/source/0x1/option/structs.d.ts +3 -9
- package/_generated/_dependencies/source/0x1/option/structs.js +4 -42
- package/_generated/_dependencies/source/0x1/type-name/structs.d.ts +5 -7
- package/_generated/_dependencies/source/0x1/type-name/structs.js +3 -32
- package/_generated/_dependencies/source/0x2/bag/structs.d.ts +7 -9
- package/_generated/_dependencies/source/0x2/bag/structs.js +3 -31
- package/_generated/_dependencies/source/0x2/balance/structs.d.ts +7 -11
- package/_generated/_dependencies/source/0x2/balance/structs.js +7 -82
- package/_generated/_dependencies/source/0x2/object/structs.d.ts +8 -12
- package/_generated/_dependencies/source/0x2/object/structs.js +7 -61
- package/_generated/_dependencies/source/0x2/object-table/structs.d.ts +7 -9
- package/_generated/_dependencies/source/0x2/object-table/structs.js +4 -44
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs.d.ts +5 -7
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs.js +3 -31
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs.d.ts +11 -13
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs.js +3 -32
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs.d.ts +23 -25
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs.js +3 -32
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.d.ts +4 -6
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.js +3 -33
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs.d.ts +55 -59
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs.js +6 -64
- package/_generated/_framework/reified.d.ts +2 -4
- package/_generated/_framework/vector.d.ts +2 -12
- package/_generated/suilend/cell/structs.d.ts +4 -10
- package/_generated/suilend/cell/structs.js +4 -42
- package/_generated/suilend/decimal/structs.d.ts +4 -6
- package/_generated/suilend/decimal/structs.js +3 -32
- package/_generated/suilend/lending-market/structs.d.ts +152 -392
- package/_generated/suilend/lending-market/structs.js +50 -548
- package/_generated/suilend/liquidity-mining/structs.d.ts +50 -158
- package/_generated/suilend/liquidity-mining/structs.js +16 -169
- package/_generated/suilend/obligation/structs.d.ts +108 -148
- package/_generated/suilend/obligation/structs.js +23 -232
- package/_generated/suilend/rate-limiter/structs.d.ts +15 -19
- package/_generated/suilend/rate-limiter/structs.js +6 -64
- package/_generated/suilend/reserve/structs.d.ts +138 -362
- package/_generated/suilend/reserve/structs.js +29 -327
- package/_generated/suilend/reserve-config/structs.d.ts +33 -37
- package/_generated/suilend/reserve-config/structs.js +6 -65
- package/client.d.ts +8 -8
- package/client.js +55 -88
- package/lib/initialize.d.ts +29 -28
- package/lib/initialize.js +16 -12
- package/lib/liquidityMining.d.ts +3 -3
- package/lib/pythAdapter.d.ts +9 -0
- package/lib/pythAdapter.js +121 -0
- package/lib/strategyOwnerCap.d.ts +12 -7
- package/lib/strategyOwnerCap.js +159 -156
- package/margin/margin/admin_cap.d.ts +2 -2
- package/margin/margin/deps/std/type_name.d.ts +1 -1
- package/margin/margin/deps/sui/vec_set.d.ts +3 -5
- package/margin/margin/deps/suilend/lending_market.d.ts +2 -2
- package/margin/margin/market.d.ts +21 -38
- package/margin/margin/position.d.ts +47 -47
- package/margin/margin/router.d.ts +5 -5
- package/margin/margin/version.d.ts +1 -1
- package/package.json +1 -1
- package/parsers/lendingMarket.d.ts +6 -6
- package/parsers/obligation.d.ts +8 -8
- package/parsers/reserve.d.ts +8 -8
- package/strategies.d.ts +38 -21
- package/strategies.js +239 -79
- package/swap/quote.d.ts +1 -9
- package/swap/quote.js +1 -52
- package/swap/transaction.d.ts +2 -4
- package/swap/transaction.js +9 -25
- package/utils/events.d.ts +6 -5
- package/utils/events.js +11 -8
- package/utils/obligation.d.ts +6 -5
- package/utils/obligation.js +118 -117
|
@@ -4,85 +4,85 @@
|
|
|
4
4
|
import { MoveStruct, type RawTransactionArgument } from '../utils/index.js';
|
|
5
5
|
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
6
|
export declare const Position: MoveStruct<{
|
|
7
|
-
id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
-
is_long: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
7
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
+
is_long: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
9
9
|
obligation_owner_cap: MoveStruct<{
|
|
10
|
-
id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
11
|
-
obligation_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
10
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
11
|
+
obligation_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
12
12
|
}, "suilend::lending_market::ObligationOwnerCap<phantom P>">;
|
|
13
|
-
created_ts: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
14
|
-
owner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
15
|
-
market_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
16
|
-
lending_market_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
13
|
+
created_ts: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
14
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
15
|
+
market_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
16
|
+
lending_market_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
17
17
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position::Position<phantom P>">;
|
|
18
18
|
export declare const PositionCap: MoveStruct<{
|
|
19
|
-
id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
20
|
-
position_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
19
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
20
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
21
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position::PositionCap">;
|
|
22
22
|
export declare const OpenPositionEvent: MoveStruct<{
|
|
23
|
-
position_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
24
|
-
market_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
25
|
-
obligation_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
26
|
-
is_long: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
23
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
24
|
+
market_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
25
|
+
obligation_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
26
|
+
is_long: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
27
27
|
collateral_coin_type: MoveStruct<{
|
|
28
|
-
name: import("@mysten/bcs").BcsType<string, string, "string">;
|
|
28
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
29
29
|
}, "std::type_name::TypeName">;
|
|
30
30
|
loan_coin_type: MoveStruct<{
|
|
31
|
-
name: import("@mysten/bcs").BcsType<string, string, "string">;
|
|
31
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
32
32
|
}, "std::type_name::TypeName">;
|
|
33
|
-
owner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
34
|
-
timestamp: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
33
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
34
|
+
timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
35
35
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position::OpenPositionEvent">;
|
|
36
36
|
export declare const ClosePositionEvent: MoveStruct<{
|
|
37
|
-
position_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
38
|
-
market_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
39
|
-
owner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
40
|
-
timestamp: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
37
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
38
|
+
market_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
39
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
40
|
+
timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
41
41
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position::ClosePositionEvent">;
|
|
42
42
|
export declare const DepositEvent: MoveStruct<{
|
|
43
|
-
position_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
44
|
-
owner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
43
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
44
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
45
45
|
coin_type: MoveStruct<{
|
|
46
|
-
name: import("@mysten/bcs").BcsType<string, string, "string">;
|
|
46
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
47
47
|
}, "std::type_name::TypeName">;
|
|
48
|
-
deposit_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
49
|
-
timestamp: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
48
|
+
deposit_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
49
|
+
timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
50
50
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position::DepositEvent">;
|
|
51
51
|
export declare const WithdrawEvent: MoveStruct<{
|
|
52
|
-
position_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
53
|
-
owner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
52
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
53
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
54
54
|
coin_type: MoveStruct<{
|
|
55
|
-
name: import("@mysten/bcs").BcsType<string, string, "string">;
|
|
55
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
56
56
|
}, "std::type_name::TypeName">;
|
|
57
|
-
withdraw_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
58
|
-
timestamp: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
57
|
+
withdraw_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
58
|
+
timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
59
59
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position::WithdrawEvent">;
|
|
60
60
|
export declare const BorrowEvent: MoveStruct<{
|
|
61
|
-
position_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
62
|
-
owner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
61
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
62
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
63
63
|
coin_type: MoveStruct<{
|
|
64
|
-
name: import("@mysten/bcs").BcsType<string, string, "string">;
|
|
64
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
65
65
|
}, "std::type_name::TypeName">;
|
|
66
|
-
borrow_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
67
|
-
timestamp: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
66
|
+
borrow_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
67
|
+
timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
68
68
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position::BorrowEvent">;
|
|
69
69
|
export declare const RepayEvent: MoveStruct<{
|
|
70
|
-
position_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
71
|
-
owner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
70
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
71
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
72
72
|
repay_coin_type: MoveStruct<{
|
|
73
|
-
name: import("@mysten/bcs").BcsType<string, string, "string">;
|
|
73
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
74
74
|
}, "std::type_name::TypeName">;
|
|
75
|
-
repay_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
76
|
-
timestamp: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
75
|
+
repay_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
76
|
+
timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
77
77
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position::RepayEvent">;
|
|
78
78
|
export declare const ClaimRewardEvent: MoveStruct<{
|
|
79
|
-
position_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
80
|
-
owner: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
79
|
+
position_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
80
|
+
owner: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
81
81
|
reward_coin_type: MoveStruct<{
|
|
82
|
-
name: import("@mysten/bcs").BcsType<string, string, "string">;
|
|
82
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
83
83
|
}, "std::type_name::TypeName">;
|
|
84
|
-
reward_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
85
|
-
timestamp: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
84
|
+
reward_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
85
|
+
timestamp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
86
86
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::position::ClaimRewardEvent">;
|
|
87
87
|
export interface OwnerArguments {
|
|
88
88
|
position: RawTransactionArgument<string>;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
import { MoveStruct, type RawTransactionArgument } from '../utils/index.js';
|
|
5
5
|
import { type Transaction } from '@mysten/sui/transactions';
|
|
6
6
|
export declare const FeeCollectedEvent: MoveStruct<{
|
|
7
|
-
market_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
-
is_open: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
9
|
-
fee_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
7
|
+
market_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
8
|
+
is_open: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
9
|
+
fee_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
10
10
|
fee_coin_type: MoveStruct<{
|
|
11
|
-
name: import("@mysten/bcs").BcsType<string, string, "string">;
|
|
11
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
12
12
|
}, "std::type_name::TypeName">;
|
|
13
|
-
recipient: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
13
|
+
recipient: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
14
14
|
}, "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::router::FeeCollectedEvent">;
|
|
15
15
|
export interface OpenPositionArguments {
|
|
16
16
|
market: RawTransactionArgument<string>;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { MoveTuple } from '../utils/index.js';
|
|
5
|
-
export declare const Version: MoveTuple<readonly [import("@mysten/bcs").BcsType<number, number, "u16">], "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::version::Version">;
|
|
5
|
+
export declare const Version: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<number, number, "u16">], "0xd5f3054404ec9275b50985851a5b515728f131a3bdd9c9a5f738a9326b738d53::version::Version">;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@suilend/sdk","version":"
|
|
1
|
+
{"name":"@suilend/sdk","version":"3.0.1","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","./mmt":"./mmt.js","./strategies":"./strategies.js","./parsers/apiReserveAssetDataEvent":"./parsers/apiReserveAssetDataEvent.js","./parsers/obligation":"./parsers/obligation.js","./parsers":"./parsers/index.js","./parsers/lendingMarket":"./parsers/lendingMarket.js","./parsers/rateLimiter":"./parsers/rateLimiter.js","./parsers/reserve":"./parsers/reserve.js","./swap/transaction":"./swap/transaction.js","./swap/quote":"./swap/quote.js","./swap":"./swap/index.js","./utils/simulate":"./utils/simulate.js","./utils/events":"./utils/events.js","./utils/obligation":"./utils/obligation.js","./utils":"./utils/index.js","./lib/constants":"./lib/constants.js","./lib/pythAdapter":"./lib/pythAdapter.js","./lib/transactions":"./lib/transactions.js","./lib/types":"./lib/types.js","./lib/initialize":"./lib/initialize.js","./lib":"./lib/index.js","./lib/liquidityMining":"./lib/liquidityMining.js","./lib/strategyOwnerCap":"./lib/strategyOwnerCap.js","./lib/pyth":"./lib/pyth.js","./api/events":"./api/events.js","./api":"./api/index.js","./margin":"./margin/index.js","./margin/utils":"./margin/utils/index.js","./margin/margin/market":"./margin/margin/market.js","./margin/margin/version":"./margin/margin/version.js","./margin/margin/router":"./margin/margin/router.js","./margin/margin/admin_cap":"./margin/margin/admin_cap.js","./margin/margin/permissions":"./margin/margin/permissions.js","./margin/margin/position":"./margin/margin/position.js","./_generated/suilend":"./_generated/suilend/index.js","./_generated/_framework/util":"./_generated/_framework/util.js","./_generated/_framework/reified":"./_generated/_framework/reified.js","./_generated/_framework/vector":"./_generated/_framework/vector.js","./_generated/suilend/obligation/structs":"./_generated/suilend/obligation/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/reserve-config/functions":"./_generated/suilend/reserve-config/functions.js","./_generated/suilend/reserve-config/structs":"./_generated/suilend/reserve-config/structs.js","./_generated/suilend/liquidity-mining/structs":"./_generated/suilend/liquidity-mining/structs.js","./_generated/suilend/cell/structs":"./_generated/suilend/cell/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/lending-market-registry/functions":"./_generated/suilend/lending-market-registry/functions.js","./margin/margin/deps/sui/vec_set":"./margin/margin/deps/sui/vec_set.js","./margin/margin/deps/std/type_name":"./margin/margin/deps/std/type_name.js","./margin/margin/deps/suilend/lending_market":"./margin/margin/deps/suilend/lending_market.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":"./_generated/_dependencies/source/0x1/index.js","./_generated/_dependencies/source/0x2/object-table/structs":"./_generated/_dependencies/source/0x2/object-table/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/bag/structs":"./_generated/_dependencies/source/0x2/bag/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs.js","./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs":"./_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.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"},"types":"./index.js","scripts":{"build":"rm -rf ./dist && bun tsc","eslint":"eslint --fix src/","prettier":"prettier --write src/","lint":"bun eslint && bun prettier && bun tsc --noEmit","release":"bun run build && bun ./release.js && 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":{"@bluefin-exchange/bluefin7k-aggregator-sdk":"^6.0.0","@cetusprotocol/aggregator-sdk":"^1.5.3","@flowx-finance/sdk":"^1.15.0","@suilend/springsui-sdk":"^3.0.1","aftermath-ts-sdk":"^2.0.0","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":"2.0.1","@mysten/sui":"2.15.0","@suilend/sui-fe":"^3.0.1","@pythnetwork/pyth-sui-js":"2.2.0"},"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","axios":"<=1.11.0"}}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuiClientTypes } from "@mysten/sui/client";
|
|
2
2
|
import BigNumber from "bignumber.js";
|
|
3
3
|
import { LendingMarket } from "../_generated/suilend/lending-market/structs";
|
|
4
4
|
import { Reserve } from "../_generated/suilend/reserve/structs";
|
|
5
5
|
import { LendingMarketMetadata } from "../lib";
|
|
6
6
|
export type ParsedLendingMarket = ReturnType<typeof parseLendingMarket>;
|
|
7
|
-
export declare const parseLendingMarket: (lendingMarket: LendingMarket<string>, reserves: Reserve<string>[], coinMetadataMap: Record<string, CoinMetadata>, nowS: number, lendingMarketMetadata?: LendingMarketMetadata) => {
|
|
7
|
+
export declare const parseLendingMarket: (lendingMarket: LendingMarket<string>, reserves: Reserve<string>[], coinMetadataMap: Record<string, SuiClientTypes.CoinMetadata>, nowS: number, lendingMarketMetadata?: LendingMarketMetadata) => {
|
|
8
8
|
version: bigint;
|
|
9
9
|
reserves: {
|
|
10
10
|
config: {
|
|
@@ -100,17 +100,17 @@ export declare const parseLendingMarket: (lendingMarket: LendingMarket<string>,
|
|
|
100
100
|
depositAprPercent: BigNumber;
|
|
101
101
|
utilizationPercent: BigNumber;
|
|
102
102
|
token: {
|
|
103
|
+
id: string | null;
|
|
103
104
|
decimals: number;
|
|
104
|
-
description: string;
|
|
105
|
-
iconUrl?: string | null;
|
|
106
|
-
id?: string | null;
|
|
107
105
|
name: string;
|
|
108
106
|
symbol: string;
|
|
107
|
+
description: string;
|
|
108
|
+
iconUrl: string | null;
|
|
109
109
|
coinType: string;
|
|
110
110
|
};
|
|
111
111
|
symbol: string;
|
|
112
112
|
name: string;
|
|
113
|
-
iconUrl: string | null
|
|
113
|
+
iconUrl: string | null;
|
|
114
114
|
description: string;
|
|
115
115
|
totalDeposits: BigNumber;
|
|
116
116
|
}[];
|
package/parsers/obligation.d.ts
CHANGED
|
@@ -120,17 +120,17 @@ export declare const parseObligation: (obligation: Obligation<string>, parsedRes
|
|
|
120
120
|
depositAprPercent: BigNumber;
|
|
121
121
|
utilizationPercent: BigNumber;
|
|
122
122
|
token: {
|
|
123
|
+
id: string | null;
|
|
123
124
|
decimals: number;
|
|
124
|
-
description: string;
|
|
125
|
-
iconUrl?: string | null;
|
|
126
|
-
id?: string | null;
|
|
127
125
|
name: string;
|
|
128
126
|
symbol: string;
|
|
127
|
+
description: string;
|
|
128
|
+
iconUrl: string | null;
|
|
129
129
|
coinType: string;
|
|
130
130
|
};
|
|
131
131
|
symbol: string;
|
|
132
132
|
name: string;
|
|
133
|
-
iconUrl: string | null
|
|
133
|
+
iconUrl: string | null;
|
|
134
134
|
description: string;
|
|
135
135
|
totalDeposits: BigNumber;
|
|
136
136
|
};
|
|
@@ -237,17 +237,17 @@ export declare const parseObligation: (obligation: Obligation<string>, parsedRes
|
|
|
237
237
|
depositAprPercent: BigNumber;
|
|
238
238
|
utilizationPercent: BigNumber;
|
|
239
239
|
token: {
|
|
240
|
+
id: string | null;
|
|
240
241
|
decimals: number;
|
|
241
|
-
description: string;
|
|
242
|
-
iconUrl?: string | null;
|
|
243
|
-
id?: string | null;
|
|
244
242
|
name: string;
|
|
245
243
|
symbol: string;
|
|
244
|
+
description: string;
|
|
245
|
+
iconUrl: string | null;
|
|
246
246
|
coinType: string;
|
|
247
247
|
};
|
|
248
248
|
symbol: string;
|
|
249
249
|
name: string;
|
|
250
|
-
iconUrl: string | null
|
|
250
|
+
iconUrl: string | null;
|
|
251
251
|
description: string;
|
|
252
252
|
totalDeposits: BigNumber;
|
|
253
253
|
};
|
package/parsers/reserve.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SuiClientTypes } from "@mysten/sui/client";
|
|
2
2
|
import BigNumber from "bignumber.js";
|
|
3
3
|
import { PoolReward, PoolRewardManager } from "../_generated/suilend/liquidity-mining/structs";
|
|
4
4
|
import { Reserve } from "../_generated/suilend/reserve/structs";
|
|
@@ -6,7 +6,7 @@ export type ParsedReserve = ReturnType<typeof parseReserve>;
|
|
|
6
6
|
export type ParsedReserveConfig = ReturnType<typeof parseReserveConfig>;
|
|
7
7
|
export type ParsedPoolRewardManager = ReturnType<typeof parsePoolRewardManager>;
|
|
8
8
|
export type ParsedPoolReward = NonNullable<ReturnType<typeof parsePoolReward>>;
|
|
9
|
-
export declare const parseReserve: (reserve: Reserve<string>, coinMetadataMap: Record<string, CoinMetadata>) => {
|
|
9
|
+
export declare const parseReserve: (reserve: Reserve<string>, coinMetadataMap: Record<string, SuiClientTypes.CoinMetadata>) => {
|
|
10
10
|
config: {
|
|
11
11
|
$typeName: string;
|
|
12
12
|
openLtvPct: number;
|
|
@@ -100,12 +100,12 @@ export declare const parseReserve: (reserve: Reserve<string>, coinMetadataMap: R
|
|
|
100
100
|
depositAprPercent: BigNumber;
|
|
101
101
|
utilizationPercent: BigNumber;
|
|
102
102
|
token: {
|
|
103
|
+
id: string | null;
|
|
103
104
|
decimals: number;
|
|
104
|
-
description: string;
|
|
105
|
-
iconUrl?: string | null;
|
|
106
|
-
id?: string | null;
|
|
107
105
|
name: string;
|
|
108
106
|
symbol: string;
|
|
107
|
+
description: string;
|
|
108
|
+
iconUrl: string | null;
|
|
109
109
|
coinType: string;
|
|
110
110
|
};
|
|
111
111
|
/**
|
|
@@ -119,7 +119,7 @@ export declare const parseReserve: (reserve: Reserve<string>, coinMetadataMap: R
|
|
|
119
119
|
/**
|
|
120
120
|
* @deprecated since version 1.1.19. Use `token.iconUrl` instead.
|
|
121
121
|
*/
|
|
122
|
-
iconUrl: string | null
|
|
122
|
+
iconUrl: string | null;
|
|
123
123
|
/**
|
|
124
124
|
* @deprecated since version 1.1.19. Use `token.description` instead.
|
|
125
125
|
*/
|
|
@@ -153,7 +153,7 @@ export declare const parseReserveConfig: (reserve: Reserve<string>) => {
|
|
|
153
153
|
aprPercent: BigNumber;
|
|
154
154
|
}[];
|
|
155
155
|
};
|
|
156
|
-
export declare const parsePoolRewardManager: (poolRewardManager: PoolRewardManager, coinMetadataMap: Record<string, CoinMetadata>) => {
|
|
156
|
+
export declare const parsePoolRewardManager: (poolRewardManager: PoolRewardManager, coinMetadataMap: Record<string, SuiClientTypes.CoinMetadata>) => {
|
|
157
157
|
$typeName: string;
|
|
158
158
|
id: string;
|
|
159
159
|
totalShares: bigint;
|
|
@@ -174,7 +174,7 @@ export declare const parsePoolRewardManager: (poolRewardManager: PoolRewardManag
|
|
|
174
174
|
}[];
|
|
175
175
|
lastUpdateTimeMs: bigint;
|
|
176
176
|
};
|
|
177
|
-
export declare const parsePoolReward: (poolReward: PoolReward | null, rewardIndex: number, coinMetadataMap: Record<string, CoinMetadata>) => {
|
|
177
|
+
export declare const parsePoolReward: (poolReward: PoolReward | null, rewardIndex: number, coinMetadataMap: Record<string, SuiClientTypes.CoinMetadata>) => {
|
|
178
178
|
$typeName: string;
|
|
179
179
|
id: string;
|
|
180
180
|
poolRewardManagerId: string;
|
package/strategies.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AggregatorClient as CetusSdk } from "@cetusprotocol/aggregator-sdk";
|
|
2
|
-
import {
|
|
2
|
+
import { SuiClientTypes } from "@mysten/sui/client";
|
|
3
|
+
import { SuiGrpcClient } from "@mysten/sui/grpc";
|
|
3
4
|
import { Transaction, TransactionArgument, TransactionObjectInput } from "@mysten/sui/transactions";
|
|
4
5
|
import BigNumber from "bignumber.js";
|
|
5
6
|
import { LstClient } from "@suilend/springsui-sdk";
|
|
@@ -130,17 +131,17 @@ export declare const getStrategySuiReserve: (reserveMap: Record<string, ParsedRe
|
|
|
130
131
|
depositAprPercent: BigNumber;
|
|
131
132
|
utilizationPercent: BigNumber;
|
|
132
133
|
token: {
|
|
134
|
+
id: string | null;
|
|
133
135
|
decimals: number;
|
|
134
|
-
description: string;
|
|
135
|
-
iconUrl?: string | null;
|
|
136
|
-
id?: string | null;
|
|
137
136
|
name: string;
|
|
138
137
|
symbol: string;
|
|
138
|
+
description: string;
|
|
139
|
+
iconUrl: string | null;
|
|
139
140
|
coinType: string;
|
|
140
141
|
};
|
|
141
142
|
symbol: string;
|
|
142
143
|
name: string;
|
|
143
|
-
iconUrl: string | null
|
|
144
|
+
iconUrl: string | null;
|
|
144
145
|
description: string;
|
|
145
146
|
totalDeposits: BigNumber;
|
|
146
147
|
};
|
|
@@ -152,7 +153,7 @@ export type StrategyLstMap = Record<string, {
|
|
|
152
153
|
suiToLstExchangeRate: BigNumber;
|
|
153
154
|
lstToSuiExchangeRate: BigNumber;
|
|
154
155
|
}>;
|
|
155
|
-
export declare const fetchStrategyLstMap: (
|
|
156
|
+
export declare const fetchStrategyLstMap: (suiGrpcClient: SuiGrpcClient) => Promise<StrategyLstMap | undefined>;
|
|
156
157
|
export declare const getStrategyLstMintFee: (lstMap: StrategyLstMap, lstCoinType: string, suiAmount: BigNumber) => BigNumber;
|
|
157
158
|
export declare const getStrategyLstRedeemFee: (lstMap: StrategyLstMap, lstCoinType: string, lstAmount: BigNumber) => BigNumber;
|
|
158
159
|
export declare const STRATEGY_TYPE_EXPOSURE_MAP: Record<StrategyType, {
|
|
@@ -259,17 +260,17 @@ export declare const getStrategyDefaultCurrencyReserve: (reserveMap: Record<stri
|
|
|
259
260
|
depositAprPercent: BigNumber;
|
|
260
261
|
utilizationPercent: BigNumber;
|
|
261
262
|
token: {
|
|
263
|
+
id: string | null;
|
|
262
264
|
decimals: number;
|
|
263
|
-
description: string;
|
|
264
|
-
iconUrl?: string | null;
|
|
265
|
-
id?: string | null;
|
|
266
265
|
name: string;
|
|
267
266
|
symbol: string;
|
|
267
|
+
description: string;
|
|
268
|
+
iconUrl: string | null;
|
|
268
269
|
coinType: string;
|
|
269
270
|
};
|
|
270
271
|
symbol: string;
|
|
271
272
|
name: string;
|
|
272
|
-
iconUrl: string | null
|
|
273
|
+
iconUrl: string | null;
|
|
273
274
|
description: string;
|
|
274
275
|
totalDeposits: BigNumber;
|
|
275
276
|
};
|
|
@@ -296,57 +297,73 @@ export declare const strategySimulateDepositAndLoopToExposure: (reserveMap: Reco
|
|
|
296
297
|
obligation: ParsedObligation;
|
|
297
298
|
};
|
|
298
299
|
export declare const fetchStrategyGlobalTvlAmountUsdMap: () => Promise<Record<StrategyType, BigNumber | null> | undefined>;
|
|
299
|
-
export declare const getStrategyUnclaimedRewardsAmount: (reserveMap: Record<string, ParsedReserve>, rewardPriceMap: Record<string, BigNumber | undefined>, rewardCoinMetadataMap: Record<string, CoinMetadata>, rewardMap: RewardMap, lstMap: StrategyLstMap, strategyType: StrategyType, obligation?: ParsedObligation) => BigNumber;
|
|
300
|
+
export declare const getStrategyUnclaimedRewardsAmount: (reserveMap: Record<string, ParsedReserve>, rewardPriceMap: Record<string, BigNumber | undefined>, rewardCoinMetadataMap: Record<string, SuiClientTypes.CoinMetadata>, rewardMap: RewardMap, lstMap: StrategyLstMap, strategyType: StrategyType, obligation?: ParsedObligation) => BigNumber;
|
|
300
301
|
export declare const getStrategyAprPercent: (reserveMap: Record<string, ParsedReserve>, lstStatsMap: Record<string, {
|
|
301
302
|
lstToSuiExchangeRate: BigNumber;
|
|
302
303
|
aprPercent: BigNumber;
|
|
303
304
|
}>, rewardMap: RewardMap, lstMap: StrategyLstMap, strategyType: StrategyType, obligation?: ParsedObligation, exposure?: BigNumber) => BigNumber;
|
|
304
305
|
export declare const getStrategyHealthPercent: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, obligation?: ParsedObligation, exposure?: BigNumber) => BigNumber;
|
|
305
306
|
export declare const getStrategyLiquidationPrice: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, obligation?: ParsedObligation, exposure?: BigNumber) => BigNumber | null;
|
|
306
|
-
export declare const strategyLoopToExposureTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType,
|
|
307
|
+
export declare const strategyLoopToExposureTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, suiGrpcClient: SuiGrpcClient, suilendClient: SuilendClient, cetusSdk: CetusSdk, cetusPartnerId: string, _address: string, strategyOwnerCapId: TransactionObjectInput, obligationId: string | undefined, _deposits: StrategyDeposit[], _borrowedAmount: BigNumber, _targetBorrowedAmount: BigNumber | undefined, _targetExposure: BigNumber | undefined, // Must be defined if _targetBorrowedAmount is undefined
|
|
307
308
|
transaction: Transaction) => Promise<{
|
|
308
309
|
deposits: StrategyDeposit[];
|
|
309
310
|
borrowedAmount: BigNumber;
|
|
310
311
|
transaction: Transaction;
|
|
311
312
|
}>;
|
|
312
|
-
export declare const strategyUnloopToExposureTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType,
|
|
313
|
-
transaction: Transaction, dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<
|
|
313
|
+
export declare const strategyUnloopToExposureTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, suiGrpcClient: SuiGrpcClient, suilendClient: SuilendClient, cetusSdk: CetusSdk, cetusPartnerId: string, _address: string, strategyOwnerCapId: TransactionObjectInput, obligationId: string, _deposits: StrategyDeposit[], _borrowedAmount: BigNumber, _targetBorrowedAmount: BigNumber | undefined, _targetExposure: BigNumber | undefined, // Must be defined if _targetBorrowedAmount is undefined
|
|
314
|
+
transaction: Transaction, dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<SuiClientTypes.SimulateTransactionResult<{
|
|
315
|
+
commandResults: true;
|
|
316
|
+
}>>) => Promise<{
|
|
314
317
|
deposits: StrategyDeposit[];
|
|
315
318
|
borrowedAmount: BigNumber;
|
|
316
319
|
transaction: Transaction;
|
|
317
320
|
}>;
|
|
318
|
-
export declare const strategyDepositTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType,
|
|
321
|
+
export declare const strategyDepositTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, suiGrpcClient: SuiGrpcClient, suilendClient: SuilendClient, cetusSdk: CetusSdk, cetusPartnerId: string, _address: string, strategyOwnerCapId: TransactionObjectInput, obligationId: string | undefined, _deposits: StrategyDeposit[], _borrowedAmount: BigNumber, deposit: StrategyDeposit, transaction: Transaction, dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<SuiClientTypes.SimulateTransactionResult<{
|
|
322
|
+
commandResults: true;
|
|
323
|
+
}>>) => Promise<{
|
|
319
324
|
deposits: StrategyDeposit[];
|
|
320
325
|
borrowedAmount: BigNumber;
|
|
321
326
|
transaction: Transaction;
|
|
322
327
|
}>;
|
|
323
|
-
export declare const strategyDepositAndLoopToExposureTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType,
|
|
328
|
+
export declare const strategyDepositAndLoopToExposureTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, suiGrpcClient: SuiGrpcClient, suilendClient: SuilendClient, cetusSdk: CetusSdk, cetusPartnerId: string, _address: string, strategyOwnerCapId: TransactionObjectInput, obligationId: string | undefined, _deposits: StrategyDeposit[], _borrowedAmount: BigNumber, deposit: StrategyDeposit, targetExposure: BigNumber, transaction: Transaction, dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<SuiClientTypes.SimulateTransactionResult<{
|
|
329
|
+
commandResults: true;
|
|
330
|
+
}>>) => Promise<{
|
|
324
331
|
deposits: StrategyDeposit[];
|
|
325
332
|
borrowedAmount: BigNumber;
|
|
326
333
|
transaction: Transaction;
|
|
327
334
|
}>;
|
|
328
|
-
export declare const strategyWithdrawTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType,
|
|
335
|
+
export declare const strategyWithdrawTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, suiGrpcClient: SuiGrpcClient, suilendClient: SuilendClient, cetusSdk: CetusSdk, cetusPartnerId: string, _address: string, strategyOwnerCapId: TransactionObjectInput, obligationId: string, _deposits: StrategyDeposit[], _borrowedAmount: BigNumber, withdraw: StrategyWithdraw, transaction: Transaction, dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<SuiClientTypes.SimulateTransactionResult<{
|
|
336
|
+
commandResults: true;
|
|
337
|
+
}>>, returnWithdrawnCoin?: boolean) => Promise<{
|
|
329
338
|
deposits: StrategyDeposit[];
|
|
330
339
|
borrowedAmount: BigNumber;
|
|
331
340
|
transaction: Transaction;
|
|
332
341
|
withdrawnCoin?: TransactionArgument;
|
|
333
342
|
}>;
|
|
334
|
-
export declare const strategyMaxWithdrawTx: (reserveMap: Record<string, ParsedReserve>,
|
|
343
|
+
export declare const strategyMaxWithdrawTx: (reserveMap: Record<string, ParsedReserve>, rewardsMap: RewardsMap, lstMap: StrategyLstMap, strategyType: StrategyType, suiGrpcClient: SuiGrpcClient, suilendClient: SuilendClient, cetusSdk: CetusSdk, cetusPartnerId: string, _address: string, strategyOwnerCapId: TransactionObjectInput, obligationId: string, _deposits: StrategyDeposit[], _borrowedAmount: BigNumber, withdrawCoinType: string, transaction: Transaction, dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<SuiClientTypes.SimulateTransactionResult<{
|
|
344
|
+
commandResults: true;
|
|
345
|
+
}>>) => Promise<{
|
|
335
346
|
deposits: StrategyDeposit[];
|
|
336
347
|
borrowedAmount: BigNumber;
|
|
337
348
|
transaction: Transaction;
|
|
338
349
|
}>;
|
|
339
|
-
export declare const strategyAdjustRepayTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType,
|
|
350
|
+
export declare const strategyAdjustRepayTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, suiGrpcClient: SuiGrpcClient, suilendClient: SuilendClient, cetusSdk: CetusSdk, cetusPartnerId: string, _address: string, strategyOwnerCapId: TransactionObjectInput, obligationId: string, _deposits: StrategyDeposit[], _borrowedAmount: BigNumber, flashLoanBorrowedAmount: BigNumber, transaction: Transaction, dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<SuiClientTypes.SimulateTransactionResult<{
|
|
351
|
+
commandResults: true;
|
|
352
|
+
}>>) => Promise<{
|
|
340
353
|
deposits: StrategyDeposit[];
|
|
341
354
|
borrowedAmount: BigNumber;
|
|
342
355
|
transaction: Transaction;
|
|
343
356
|
}>;
|
|
344
|
-
export declare const strategyDepositAdjustWithdrawTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType,
|
|
357
|
+
export declare const strategyDepositAdjustWithdrawTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, suiGrpcClient: SuiGrpcClient, suilendClient: SuilendClient, cetusSdk: CetusSdk, cetusPartnerId: string, _address: string, strategyOwnerCapId: TransactionObjectInput, obligationId: string, _deposits: StrategyDeposit[], _borrowedAmount: BigNumber, flashLoanBorrowedAmount: BigNumber, transaction: Transaction, dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<SuiClientTypes.SimulateTransactionResult<{
|
|
358
|
+
commandResults: true;
|
|
359
|
+
}>>) => Promise<{
|
|
345
360
|
deposits: StrategyDeposit[];
|
|
346
361
|
borrowedAmount: BigNumber;
|
|
347
362
|
transaction: Transaction;
|
|
348
363
|
}>;
|
|
349
|
-
export declare const strategyAdjustTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType,
|
|
364
|
+
export declare const strategyAdjustTx: (reserveMap: Record<string, ParsedReserve>, lstMap: StrategyLstMap, strategyType: StrategyType, suiGrpcClient: SuiGrpcClient, suilendClient: SuilendClient, cetusSdk: CetusSdk, cetusPartnerId: string, _address: string, strategyOwnerCapId: TransactionObjectInput, obligation: ParsedObligation, _deposits: StrategyDeposit[], _borrowedAmount: BigNumber, targetExposure: BigNumber, transaction: Transaction, dryRunTransaction: (transaction: Transaction, setGasBudget?: boolean) => Promise<SuiClientTypes.SimulateTransactionResult<{
|
|
365
|
+
commandResults: true;
|
|
366
|
+
}>>) => Promise<{
|
|
350
367
|
deposits: StrategyDeposit[];
|
|
351
368
|
borrowedAmount: BigNumber;
|
|
352
369
|
transaction: Transaction;
|