@suilend/sdk 1.1.99 → 2.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 -7
- package/_generated/_dependencies/source/0x1/ascii/structs.js +35 -75
- package/_generated/_dependencies/source/0x1/index.js +3 -6
- package/_generated/_dependencies/source/0x1/option/structs.d.ts +3 -3
- package/_generated/_dependencies/source/0x1/option/structs.js +31 -69
- package/_generated/_dependencies/source/0x1/type-name/structs.d.ts +5 -5
- package/_generated/_dependencies/source/0x1/type-name/structs.js +20 -25
- package/_generated/_dependencies/source/0x2/bag/structs.d.ts +7 -7
- package/_generated/_dependencies/source/0x2/bag/structs.js +24 -29
- package/_generated/_dependencies/source/0x2/balance/structs.d.ts +7 -7
- package/_generated/_dependencies/source/0x2/balance/structs.js +49 -56
- package/_generated/_dependencies/source/0x2/index.js +3 -6
- package/_generated/_dependencies/source/0x2/object/structs.d.ts +8 -8
- package/_generated/_dependencies/source/0x2/object/structs.js +34 -41
- package/_generated/_dependencies/source/0x2/object-table/structs.d.ts +7 -7
- package/_generated/_dependencies/source/0x2/object-table/structs.js +31 -36
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs.d.ts +5 -5
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/i64/structs.js +23 -28
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.js +4 -7
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs.d.ts +11 -11
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price/structs.js +32 -37
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs.d.ts +23 -23
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-feed/structs.js +29 -34
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.d.ts +4 -4
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.js +21 -59
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs.d.ts +55 -55
- package/_generated/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-info/structs.js +46 -53
- package/_generated/_framework/reified.d.ts +2 -2
- package/_generated/_framework/reified.js +27 -40
- package/_generated/_framework/util.js +26 -40
- package/_generated/_framework/vector.d.ts +4 -4
- package/_generated/_framework/vector.js +16 -21
- package/_generated/suilend/cell/structs.d.ts +4 -4
- package/_generated/suilend/cell/structs.js +31 -36
- package/_generated/suilend/decimal/structs.d.ts +4 -4
- package/_generated/suilend/decimal/structs.js +19 -24
- package/_generated/suilend/index.js +8 -12
- package/_generated/suilend/lending-market/functions.d.ts +1 -0
- package/_generated/suilend/lending-market/functions.js +271 -302
- package/_generated/suilend/lending-market/structs.d.ts +146 -146
- package/_generated/suilend/lending-market/structs.js +549 -617
- package/_generated/suilend/lending-market-registry/functions.js +7 -11
- package/_generated/suilend/liquidity-mining/structs.d.ts +50 -50
- package/_generated/suilend/liquidity-mining/structs.js +159 -205
- package/_generated/suilend/obligation/structs.d.ts +106 -106
- package/_generated/suilend/obligation/structs.js +313 -363
- package/_generated/suilend/rate-limiter/functions.js +23 -31
- package/_generated/suilend/rate-limiter/structs.d.ts +15 -15
- package/_generated/suilend/rate-limiter/structs.js +49 -56
- package/_generated/suilend/reserve/structs.d.ts +139 -139
- package/_generated/suilend/reserve/structs.js +397 -451
- package/_generated/suilend/reserve-config/functions.js +149 -190
- package/_generated/suilend/reserve-config/structs.d.ts +33 -33
- package/_generated/suilend/reserve-config/structs.js +109 -149
- package/api/events.js +1 -5
- package/api/index.js +1 -17
- package/client.d.ts +10 -10
- package/client.js +118 -128
- package/index.js +7 -23
- package/lib/constants.js +3 -9
- package/lib/index.js +5 -21
- package/lib/initialize.d.ts +3 -3
- package/lib/initialize.js +103 -140
- package/lib/liquidityMining.d.ts +3 -3
- package/lib/liquidityMining.js +57 -72
- package/lib/pyth.js +9 -14
- package/lib/strategyOwnerCap.js +106 -119
- package/lib/transactions.js +2 -7
- package/lib/types.js +4 -7
- package/mmt.js +2 -5
- package/package.json +1 -1
- package/parsers/apiReserveAssetDataEvent.js +25 -33
- package/parsers/index.js +5 -21
- package/parsers/lendingMarket.d.ts +1 -1
- package/parsers/lendingMarket.js +12 -19
- package/parsers/obligation.js +19 -26
- package/parsers/rateLimiter.js +11 -19
- package/parsers/reserve.d.ts +1 -1
- package/parsers/reserve.js +42 -85
- package/strategies.d.ts +11 -11
- package/strategies.js +547 -586
- package/swap/index.js +2 -18
- package/swap/quote.js +57 -65
- package/swap/transaction.d.ts +2 -2
- package/swap/transaction.js +40 -35
- package/utils/events.d.ts +3 -3
- package/utils/events.js +18 -35
- package/utils/index.js +16 -40
- package/utils/obligation.d.ts +4 -4
- package/utils/obligation.js +17 -60
- package/utils/simulate.js +118 -143
|
@@ -1,329 +1,288 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.setSpreadFeeBps = setSpreadFeeBps;
|
|
7
|
-
exports.spreadFee = spreadFee;
|
|
8
|
-
exports.borrowFee = borrowFee;
|
|
9
|
-
exports.borrowLimit = borrowLimit;
|
|
10
|
-
exports.borrowLimitUsd = borrowLimitUsd;
|
|
11
|
-
exports.borrowWeight = borrowWeight;
|
|
12
|
-
exports.build = build;
|
|
13
|
-
exports.calculateApr = calculateApr;
|
|
14
|
-
exports.calculateSupplyApr = calculateSupplyApr;
|
|
15
|
-
exports.closeLtv = closeLtv;
|
|
16
|
-
exports.createReserveConfig = createReserveConfig;
|
|
17
|
-
exports.depositLimit = depositLimit;
|
|
18
|
-
exports.depositLimitUsd = depositLimitUsd;
|
|
19
|
-
exports.isolated = isolated;
|
|
20
|
-
exports.liquidationBonus = liquidationBonus;
|
|
21
|
-
exports.openLtv = openLtv;
|
|
22
|
-
exports.protocolLiquidationFee = protocolLiquidationFee;
|
|
23
|
-
exports.setBorrowFeeBps = setBorrowFeeBps;
|
|
24
|
-
exports.setBorrowLimit = setBorrowLimit;
|
|
25
|
-
exports.setBorrowLimitUsd = setBorrowLimitUsd;
|
|
26
|
-
exports.setBorrowWeightBps = setBorrowWeightBps;
|
|
27
|
-
exports.setCloseAttributedBorrowLimitUsd = setCloseAttributedBorrowLimitUsd;
|
|
28
|
-
exports.setCloseLtvPct = setCloseLtvPct;
|
|
29
|
-
exports.setDepositLimit = setDepositLimit;
|
|
30
|
-
exports.setDepositLimitUsd = setDepositLimitUsd;
|
|
31
|
-
exports.setInterestRateAprs = setInterestRateAprs;
|
|
32
|
-
exports.setInterestRateUtils = setInterestRateUtils;
|
|
33
|
-
exports.setIsolated = setIsolated;
|
|
34
|
-
exports.setLiquidationBonusBps = setLiquidationBonusBps;
|
|
35
|
-
exports.setMaxCloseLtvPct = setMaxCloseLtvPct;
|
|
36
|
-
exports.setMaxLiquidationBonusBps = setMaxLiquidationBonusBps;
|
|
37
|
-
exports.setOpenAttributedBorrowLimitUsd = setOpenAttributedBorrowLimitUsd;
|
|
38
|
-
exports.setOpenLtvPct = setOpenLtvPct;
|
|
39
|
-
exports.setProtocolLiquidationFeeBps = setProtocolLiquidationFeeBps;
|
|
40
|
-
exports.validateReserveConfig = validateReserveConfig;
|
|
41
|
-
exports.validateUtilsAndAprs = validateUtilsAndAprs;
|
|
42
|
-
const __1 = require("..");
|
|
43
|
-
const util_1 = require("../../_framework/util");
|
|
44
|
-
function set(tx, typeArgs, args) {
|
|
45
|
-
return tx.moveCall({
|
|
46
|
-
target: `${__1.PUBLISHED_AT}::reserve_config::set`,
|
|
1
|
+
import { PUBLISHED_AT } from "..";
|
|
2
|
+
import { generic, obj, pure } from "../../_framework/util";
|
|
3
|
+
export function set(tx, typeArgs, args) {
|
|
4
|
+
return tx.moveCall({
|
|
5
|
+
target: `${PUBLISHED_AT}::reserve_config::set`,
|
|
47
6
|
typeArguments: typeArgs,
|
|
48
7
|
arguments: [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
8
|
+
obj(tx, args.builder),
|
|
9
|
+
generic(tx, `${typeArgs[0]}`, args.field),
|
|
10
|
+
generic(tx, `${typeArgs[1]}`, args.value),
|
|
52
11
|
],
|
|
53
12
|
});
|
|
54
13
|
}
|
|
55
|
-
function destroy(tx, config) {
|
|
14
|
+
export function destroy(tx, config) {
|
|
56
15
|
return tx.moveCall({
|
|
57
|
-
target: `${
|
|
58
|
-
arguments: [
|
|
16
|
+
target: `${PUBLISHED_AT}::reserve_config::destroy`,
|
|
17
|
+
arguments: [obj(tx, config)],
|
|
59
18
|
});
|
|
60
19
|
}
|
|
61
|
-
function from(tx, config) {
|
|
20
|
+
export function from(tx, config) {
|
|
62
21
|
return tx.moveCall({
|
|
63
|
-
target: `${
|
|
64
|
-
arguments: [
|
|
22
|
+
target: `${PUBLISHED_AT}::reserve_config::from`,
|
|
23
|
+
arguments: [obj(tx, config)],
|
|
65
24
|
});
|
|
66
25
|
}
|
|
67
|
-
function setSpreadFeeBps(tx, args) {
|
|
26
|
+
export function setSpreadFeeBps(tx, args) {
|
|
68
27
|
return tx.moveCall({
|
|
69
|
-
target: `${
|
|
70
|
-
arguments: [
|
|
28
|
+
target: `${PUBLISHED_AT}::reserve_config::set_spread_fee_bps`,
|
|
29
|
+
arguments: [obj(tx, args.builder), pure(tx, args.spreadFeeBps, `u64`)],
|
|
71
30
|
});
|
|
72
31
|
}
|
|
73
|
-
function spreadFee(tx, config) {
|
|
32
|
+
export function spreadFee(tx, config) {
|
|
74
33
|
return tx.moveCall({
|
|
75
|
-
target: `${
|
|
76
|
-
arguments: [
|
|
34
|
+
target: `${PUBLISHED_AT}::reserve_config::spread_fee`,
|
|
35
|
+
arguments: [obj(tx, config)],
|
|
77
36
|
});
|
|
78
37
|
}
|
|
79
|
-
function borrowFee(tx, config) {
|
|
38
|
+
export function borrowFee(tx, config) {
|
|
80
39
|
return tx.moveCall({
|
|
81
|
-
target: `${
|
|
82
|
-
arguments: [
|
|
40
|
+
target: `${PUBLISHED_AT}::reserve_config::borrow_fee`,
|
|
41
|
+
arguments: [obj(tx, config)],
|
|
83
42
|
});
|
|
84
43
|
}
|
|
85
|
-
function borrowLimit(tx, config) {
|
|
44
|
+
export function borrowLimit(tx, config) {
|
|
86
45
|
return tx.moveCall({
|
|
87
|
-
target: `${
|
|
88
|
-
arguments: [
|
|
46
|
+
target: `${PUBLISHED_AT}::reserve_config::borrow_limit`,
|
|
47
|
+
arguments: [obj(tx, config)],
|
|
89
48
|
});
|
|
90
49
|
}
|
|
91
|
-
function borrowLimitUsd(tx, config) {
|
|
50
|
+
export function borrowLimitUsd(tx, config) {
|
|
92
51
|
return tx.moveCall({
|
|
93
|
-
target: `${
|
|
94
|
-
arguments: [
|
|
52
|
+
target: `${PUBLISHED_AT}::reserve_config::borrow_limit_usd`,
|
|
53
|
+
arguments: [obj(tx, config)],
|
|
95
54
|
});
|
|
96
55
|
}
|
|
97
|
-
function borrowWeight(tx, config) {
|
|
56
|
+
export function borrowWeight(tx, config) {
|
|
98
57
|
return tx.moveCall({
|
|
99
|
-
target: `${
|
|
100
|
-
arguments: [
|
|
58
|
+
target: `${PUBLISHED_AT}::reserve_config::borrow_weight`,
|
|
59
|
+
arguments: [obj(tx, config)],
|
|
101
60
|
});
|
|
102
61
|
}
|
|
103
|
-
function build(tx, builder) {
|
|
62
|
+
export function build(tx, builder) {
|
|
104
63
|
return tx.moveCall({
|
|
105
|
-
target: `${
|
|
106
|
-
arguments: [
|
|
64
|
+
target: `${PUBLISHED_AT}::reserve_config::build`,
|
|
65
|
+
arguments: [obj(tx, builder)],
|
|
107
66
|
});
|
|
108
67
|
}
|
|
109
|
-
function calculateApr(tx, args) {
|
|
68
|
+
export function calculateApr(tx, args) {
|
|
110
69
|
return tx.moveCall({
|
|
111
|
-
target: `${
|
|
112
|
-
arguments: [
|
|
70
|
+
target: `${PUBLISHED_AT}::reserve_config::calculate_apr`,
|
|
71
|
+
arguments: [obj(tx, args.config), obj(tx, args.curUtil)],
|
|
113
72
|
});
|
|
114
73
|
}
|
|
115
|
-
function calculateSupplyApr(tx, args) {
|
|
74
|
+
export function calculateSupplyApr(tx, args) {
|
|
116
75
|
return tx.moveCall({
|
|
117
|
-
target: `${
|
|
76
|
+
target: `${PUBLISHED_AT}::reserve_config::calculate_supply_apr`,
|
|
118
77
|
arguments: [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
78
|
+
obj(tx, args.config),
|
|
79
|
+
obj(tx, args.curUtil),
|
|
80
|
+
obj(tx, args.borrowApr),
|
|
122
81
|
],
|
|
123
82
|
});
|
|
124
83
|
}
|
|
125
|
-
function closeLtv(tx, config) {
|
|
84
|
+
export function closeLtv(tx, config) {
|
|
126
85
|
return tx.moveCall({
|
|
127
|
-
target: `${
|
|
128
|
-
arguments: [
|
|
86
|
+
target: `${PUBLISHED_AT}::reserve_config::close_ltv`,
|
|
87
|
+
arguments: [obj(tx, config)],
|
|
129
88
|
});
|
|
130
89
|
}
|
|
131
|
-
function createReserveConfig(tx, args) {
|
|
90
|
+
export function createReserveConfig(tx, args) {
|
|
132
91
|
return tx.moveCall({
|
|
133
|
-
target: `${
|
|
92
|
+
target: `${PUBLISHED_AT}::reserve_config::create_reserve_config`,
|
|
134
93
|
arguments: [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
94
|
+
pure(tx, args.openLtvPct, `u8`),
|
|
95
|
+
pure(tx, args.closeLtvPct, `u8`),
|
|
96
|
+
pure(tx, args.maxCloseLtvPct, `u8`),
|
|
97
|
+
pure(tx, args.borrowWeightBps, `u64`),
|
|
98
|
+
pure(tx, args.depositLimit, `u64`),
|
|
99
|
+
pure(tx, args.borrowLimit, `u64`),
|
|
100
|
+
pure(tx, args.liquidationBonusBps, `u64`),
|
|
101
|
+
pure(tx, args.maxLiquidationBonusBps, `u64`),
|
|
102
|
+
pure(tx, args.depositLimitUsd, `u64`),
|
|
103
|
+
pure(tx, args.borrowLimitUsd, `u64`),
|
|
104
|
+
pure(tx, args.borrowFeeBps, `u64`),
|
|
105
|
+
pure(tx, args.spreadFeeBps, `u64`),
|
|
106
|
+
pure(tx, args.protocolLiquidationFeeBps, `u64`),
|
|
107
|
+
pure(tx, args.interestRateUtils, `vector<u8>`),
|
|
108
|
+
pure(tx, args.interestRateAprs, `vector<u64>`),
|
|
109
|
+
pure(tx, args.isolated, `bool`),
|
|
110
|
+
pure(tx, args.openAttributedBorrowLimitUsd, `u64`),
|
|
111
|
+
pure(tx, args.closeAttributedBorrowLimitUsd, `u64`),
|
|
153
112
|
],
|
|
154
113
|
});
|
|
155
114
|
}
|
|
156
|
-
function depositLimit(tx, config) {
|
|
115
|
+
export function depositLimit(tx, config) {
|
|
157
116
|
return tx.moveCall({
|
|
158
|
-
target: `${
|
|
159
|
-
arguments: [
|
|
117
|
+
target: `${PUBLISHED_AT}::reserve_config::deposit_limit`,
|
|
118
|
+
arguments: [obj(tx, config)],
|
|
160
119
|
});
|
|
161
120
|
}
|
|
162
|
-
function depositLimitUsd(tx, config) {
|
|
121
|
+
export function depositLimitUsd(tx, config) {
|
|
163
122
|
return tx.moveCall({
|
|
164
|
-
target: `${
|
|
165
|
-
arguments: [
|
|
123
|
+
target: `${PUBLISHED_AT}::reserve_config::deposit_limit_usd`,
|
|
124
|
+
arguments: [obj(tx, config)],
|
|
166
125
|
});
|
|
167
126
|
}
|
|
168
|
-
function isolated(tx, config) {
|
|
127
|
+
export function isolated(tx, config) {
|
|
169
128
|
return tx.moveCall({
|
|
170
|
-
target: `${
|
|
171
|
-
arguments: [
|
|
129
|
+
target: `${PUBLISHED_AT}::reserve_config::isolated`,
|
|
130
|
+
arguments: [obj(tx, config)],
|
|
172
131
|
});
|
|
173
132
|
}
|
|
174
|
-
function liquidationBonus(tx, config) {
|
|
133
|
+
export function liquidationBonus(tx, config) {
|
|
175
134
|
return tx.moveCall({
|
|
176
|
-
target: `${
|
|
177
|
-
arguments: [
|
|
135
|
+
target: `${PUBLISHED_AT}::reserve_config::liquidation_bonus`,
|
|
136
|
+
arguments: [obj(tx, config)],
|
|
178
137
|
});
|
|
179
138
|
}
|
|
180
|
-
function openLtv(tx, config) {
|
|
139
|
+
export function openLtv(tx, config) {
|
|
181
140
|
return tx.moveCall({
|
|
182
|
-
target: `${
|
|
183
|
-
arguments: [
|
|
141
|
+
target: `${PUBLISHED_AT}::reserve_config::open_ltv`,
|
|
142
|
+
arguments: [obj(tx, config)],
|
|
184
143
|
});
|
|
185
144
|
}
|
|
186
|
-
function protocolLiquidationFee(tx, config) {
|
|
145
|
+
export function protocolLiquidationFee(tx, config) {
|
|
187
146
|
return tx.moveCall({
|
|
188
|
-
target: `${
|
|
189
|
-
arguments: [
|
|
147
|
+
target: `${PUBLISHED_AT}::reserve_config::protocol_liquidation_fee`,
|
|
148
|
+
arguments: [obj(tx, config)],
|
|
190
149
|
});
|
|
191
150
|
}
|
|
192
|
-
function setBorrowFeeBps(tx, args) {
|
|
151
|
+
export function setBorrowFeeBps(tx, args) {
|
|
193
152
|
return tx.moveCall({
|
|
194
|
-
target: `${
|
|
195
|
-
arguments: [
|
|
153
|
+
target: `${PUBLISHED_AT}::reserve_config::set_borrow_fee_bps`,
|
|
154
|
+
arguments: [obj(tx, args.builder), pure(tx, args.borrowFeeBps, `u64`)],
|
|
196
155
|
});
|
|
197
156
|
}
|
|
198
|
-
function setBorrowLimit(tx, args) {
|
|
157
|
+
export function setBorrowLimit(tx, args) {
|
|
199
158
|
return tx.moveCall({
|
|
200
|
-
target: `${
|
|
201
|
-
arguments: [
|
|
159
|
+
target: `${PUBLISHED_AT}::reserve_config::set_borrow_limit`,
|
|
160
|
+
arguments: [obj(tx, args.builder), pure(tx, args.borrowLimit, `u64`)],
|
|
202
161
|
});
|
|
203
162
|
}
|
|
204
|
-
function setBorrowLimitUsd(tx, args) {
|
|
163
|
+
export function setBorrowLimitUsd(tx, args) {
|
|
205
164
|
return tx.moveCall({
|
|
206
|
-
target: `${
|
|
207
|
-
arguments: [
|
|
165
|
+
target: `${PUBLISHED_AT}::reserve_config::set_borrow_limit_usd`,
|
|
166
|
+
arguments: [obj(tx, args.builder), pure(tx, args.borrowLimitUsd, `u64`)],
|
|
208
167
|
});
|
|
209
168
|
}
|
|
210
|
-
function setBorrowWeightBps(tx, args) {
|
|
169
|
+
export function setBorrowWeightBps(tx, args) {
|
|
211
170
|
return tx.moveCall({
|
|
212
|
-
target: `${
|
|
213
|
-
arguments: [
|
|
171
|
+
target: `${PUBLISHED_AT}::reserve_config::set_borrow_weight_bps`,
|
|
172
|
+
arguments: [obj(tx, args.builder), pure(tx, args.borrowWeightBps, `u64`)],
|
|
214
173
|
});
|
|
215
174
|
}
|
|
216
|
-
function setCloseAttributedBorrowLimitUsd(tx, args) {
|
|
175
|
+
export function setCloseAttributedBorrowLimitUsd(tx, args) {
|
|
217
176
|
return tx.moveCall({
|
|
218
|
-
target: `${
|
|
177
|
+
target: `${PUBLISHED_AT}::reserve_config::set_close_attributed_borrow_limit_usd`,
|
|
219
178
|
arguments: [
|
|
220
|
-
|
|
221
|
-
|
|
179
|
+
obj(tx, args.builder),
|
|
180
|
+
pure(tx, args.closeAttributedBorrowLimitUsd, `u64`),
|
|
222
181
|
],
|
|
223
182
|
});
|
|
224
183
|
}
|
|
225
|
-
function setCloseLtvPct(tx, args) {
|
|
184
|
+
export function setCloseLtvPct(tx, args) {
|
|
226
185
|
return tx.moveCall({
|
|
227
|
-
target: `${
|
|
228
|
-
arguments: [
|
|
186
|
+
target: `${PUBLISHED_AT}::reserve_config::set_close_ltv_pct`,
|
|
187
|
+
arguments: [obj(tx, args.builder), pure(tx, args.closeLtvPct, `u8`)],
|
|
229
188
|
});
|
|
230
189
|
}
|
|
231
|
-
function setDepositLimit(tx, args) {
|
|
190
|
+
export function setDepositLimit(tx, args) {
|
|
232
191
|
return tx.moveCall({
|
|
233
|
-
target: `${
|
|
234
|
-
arguments: [
|
|
192
|
+
target: `${PUBLISHED_AT}::reserve_config::set_deposit_limit`,
|
|
193
|
+
arguments: [obj(tx, args.builder), pure(tx, args.depositLimit, `u64`)],
|
|
235
194
|
});
|
|
236
195
|
}
|
|
237
|
-
function setDepositLimitUsd(tx, args) {
|
|
196
|
+
export function setDepositLimitUsd(tx, args) {
|
|
238
197
|
return tx.moveCall({
|
|
239
|
-
target: `${
|
|
240
|
-
arguments: [
|
|
198
|
+
target: `${PUBLISHED_AT}::reserve_config::set_deposit_limit_usd`,
|
|
199
|
+
arguments: [obj(tx, args.builder), pure(tx, args.depositLimitUsd, `u64`)],
|
|
241
200
|
});
|
|
242
201
|
}
|
|
243
|
-
function setInterestRateAprs(tx, args) {
|
|
202
|
+
export function setInterestRateAprs(tx, args) {
|
|
244
203
|
return tx.moveCall({
|
|
245
|
-
target: `${
|
|
204
|
+
target: `${PUBLISHED_AT}::reserve_config::set_interest_rate_aprs`,
|
|
246
205
|
arguments: [
|
|
247
|
-
|
|
248
|
-
|
|
206
|
+
obj(tx, args.builder),
|
|
207
|
+
pure(tx, args.interestRateAprs, `vector<u64>`),
|
|
249
208
|
],
|
|
250
209
|
});
|
|
251
210
|
}
|
|
252
|
-
function setInterestRateUtils(tx, args) {
|
|
211
|
+
export function setInterestRateUtils(tx, args) {
|
|
253
212
|
return tx.moveCall({
|
|
254
|
-
target: `${
|
|
213
|
+
target: `${PUBLISHED_AT}::reserve_config::set_interest_rate_utils`,
|
|
255
214
|
arguments: [
|
|
256
|
-
|
|
257
|
-
|
|
215
|
+
obj(tx, args.builder),
|
|
216
|
+
pure(tx, args.interestRateUtils, `vector<u8>`),
|
|
258
217
|
],
|
|
259
218
|
});
|
|
260
219
|
}
|
|
261
|
-
function setIsolated(tx, args) {
|
|
220
|
+
export function setIsolated(tx, args) {
|
|
262
221
|
return tx.moveCall({
|
|
263
|
-
target: `${
|
|
264
|
-
arguments: [
|
|
222
|
+
target: `${PUBLISHED_AT}::reserve_config::set_isolated`,
|
|
223
|
+
arguments: [obj(tx, args.builder), pure(tx, args.isolated, `bool`)],
|
|
265
224
|
});
|
|
266
225
|
}
|
|
267
|
-
function setLiquidationBonusBps(tx, args) {
|
|
226
|
+
export function setLiquidationBonusBps(tx, args) {
|
|
268
227
|
return tx.moveCall({
|
|
269
|
-
target: `${
|
|
228
|
+
target: `${PUBLISHED_AT}::reserve_config::set_liquidation_bonus_bps`,
|
|
270
229
|
arguments: [
|
|
271
|
-
|
|
272
|
-
|
|
230
|
+
obj(tx, args.builder),
|
|
231
|
+
pure(tx, args.liquidationBonusBps, `u64`),
|
|
273
232
|
],
|
|
274
233
|
});
|
|
275
234
|
}
|
|
276
|
-
function setMaxCloseLtvPct(tx, args) {
|
|
235
|
+
export function setMaxCloseLtvPct(tx, args) {
|
|
277
236
|
return tx.moveCall({
|
|
278
|
-
target: `${
|
|
279
|
-
arguments: [
|
|
237
|
+
target: `${PUBLISHED_AT}::reserve_config::set_max_close_ltv_pct`,
|
|
238
|
+
arguments: [obj(tx, args.builder), pure(tx, args.maxCloseLtvPct, `u8`)],
|
|
280
239
|
});
|
|
281
240
|
}
|
|
282
|
-
function setMaxLiquidationBonusBps(tx, args) {
|
|
241
|
+
export function setMaxLiquidationBonusBps(tx, args) {
|
|
283
242
|
return tx.moveCall({
|
|
284
|
-
target: `${
|
|
243
|
+
target: `${PUBLISHED_AT}::reserve_config::set_max_liquidation_bonus_bps`,
|
|
285
244
|
arguments: [
|
|
286
|
-
|
|
287
|
-
|
|
245
|
+
obj(tx, args.builder),
|
|
246
|
+
pure(tx, args.maxLiquidationBonusBps, `u64`),
|
|
288
247
|
],
|
|
289
248
|
});
|
|
290
249
|
}
|
|
291
|
-
function setOpenAttributedBorrowLimitUsd(tx, args) {
|
|
250
|
+
export function setOpenAttributedBorrowLimitUsd(tx, args) {
|
|
292
251
|
return tx.moveCall({
|
|
293
|
-
target: `${
|
|
252
|
+
target: `${PUBLISHED_AT}::reserve_config::set_open_attributed_borrow_limit_usd`,
|
|
294
253
|
arguments: [
|
|
295
|
-
|
|
296
|
-
|
|
254
|
+
obj(tx, args.builder),
|
|
255
|
+
pure(tx, args.openAttributedBorrowLimitUsd, `u64`),
|
|
297
256
|
],
|
|
298
257
|
});
|
|
299
258
|
}
|
|
300
|
-
function setOpenLtvPct(tx, args) {
|
|
259
|
+
export function setOpenLtvPct(tx, args) {
|
|
301
260
|
return tx.moveCall({
|
|
302
|
-
target: `${
|
|
303
|
-
arguments: [
|
|
261
|
+
target: `${PUBLISHED_AT}::reserve_config::set_open_ltv_pct`,
|
|
262
|
+
arguments: [obj(tx, args.builder), pure(tx, args.openLtvPct, `u8`)],
|
|
304
263
|
});
|
|
305
264
|
}
|
|
306
|
-
function setProtocolLiquidationFeeBps(tx, args) {
|
|
265
|
+
export function setProtocolLiquidationFeeBps(tx, args) {
|
|
307
266
|
return tx.moveCall({
|
|
308
|
-
target: `${
|
|
267
|
+
target: `${PUBLISHED_AT}::reserve_config::set_protocol_liquidation_fee_bps`,
|
|
309
268
|
arguments: [
|
|
310
|
-
|
|
311
|
-
|
|
269
|
+
obj(tx, args.builder),
|
|
270
|
+
pure(tx, args.protocolLiquidationFeeBps, `u64`),
|
|
312
271
|
],
|
|
313
272
|
});
|
|
314
273
|
}
|
|
315
|
-
function validateReserveConfig(tx, config) {
|
|
274
|
+
export function validateReserveConfig(tx, config) {
|
|
316
275
|
return tx.moveCall({
|
|
317
|
-
target: `${
|
|
318
|
-
arguments: [
|
|
276
|
+
target: `${PUBLISHED_AT}::reserve_config::validate_reserve_config`,
|
|
277
|
+
arguments: [obj(tx, config)],
|
|
319
278
|
});
|
|
320
279
|
}
|
|
321
|
-
function validateUtilsAndAprs(tx, args) {
|
|
280
|
+
export function validateUtilsAndAprs(tx, args) {
|
|
322
281
|
return tx.moveCall({
|
|
323
|
-
target: `${
|
|
282
|
+
target: `${PUBLISHED_AT}::reserve_config::validate_utils_and_aprs`,
|
|
324
283
|
arguments: [
|
|
325
|
-
|
|
326
|
-
|
|
284
|
+
pure(tx, args.utils, `vector<u8>`),
|
|
285
|
+
pure(tx, args.aprs, `vector<u64>`),
|
|
327
286
|
],
|
|
328
287
|
});
|
|
329
288
|
}
|
|
@@ -4,7 +4,7 @@ import { PhantomReified, Reified, StructClass, ToField, ToTypeStr } from "../../
|
|
|
4
4
|
import { FieldsWithTypes } from "../../_framework/util";
|
|
5
5
|
import { Vector } from "../../_framework/vector";
|
|
6
6
|
import { PKG_V1 } from "../index";
|
|
7
|
-
import {
|
|
7
|
+
import { SuiJsonRpcClient, SuiObjectData, SuiParsedData } from "@mysten/sui/jsonRpc";
|
|
8
8
|
export declare function isReserveConfig(type: string): boolean;
|
|
9
9
|
export interface ReserveConfigFields {
|
|
10
10
|
openLtvPct: ToField<"u8">;
|
|
@@ -61,36 +61,36 @@ export declare class ReserveConfig implements StructClass {
|
|
|
61
61
|
static get r(): reified.StructClassReified<ReserveConfig, ReserveConfigFields>;
|
|
62
62
|
static phantom(): PhantomReified<ToTypeStr<ReserveConfig>>;
|
|
63
63
|
static get p(): reified.PhantomReified<"0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::reserve_config::ReserveConfig" | "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::reserve_config::ReserveConfig">;
|
|
64
|
-
static get bcs(): import("@mysten/
|
|
65
|
-
open_ltv_pct: import("@mysten/
|
|
66
|
-
close_ltv_pct: import("@mysten/
|
|
67
|
-
max_close_ltv_pct: import("@mysten/
|
|
68
|
-
borrow_weight_bps: import("@mysten/
|
|
69
|
-
deposit_limit: import("@mysten/
|
|
70
|
-
borrow_limit: import("@mysten/
|
|
71
|
-
liquidation_bonus_bps: import("@mysten/
|
|
72
|
-
max_liquidation_bonus_bps: import("@mysten/
|
|
73
|
-
deposit_limit_usd: import("@mysten/
|
|
74
|
-
borrow_limit_usd: import("@mysten/
|
|
75
|
-
interest_rate_utils: import("@mysten/
|
|
64
|
+
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
65
|
+
open_ltv_pct: import("@mysten/bcs").BcsType<number, number, "u8">;
|
|
66
|
+
close_ltv_pct: import("@mysten/bcs").BcsType<number, number, "u8">;
|
|
67
|
+
max_close_ltv_pct: import("@mysten/bcs").BcsType<number, number, "u8">;
|
|
68
|
+
borrow_weight_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
69
|
+
deposit_limit: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
70
|
+
borrow_limit: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
71
|
+
liquidation_bonus_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
72
|
+
max_liquidation_bonus_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
73
|
+
deposit_limit_usd: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
74
|
+
borrow_limit_usd: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
75
|
+
interest_rate_utils: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
76
76
|
length: number;
|
|
77
77
|
}, string>;
|
|
78
|
-
interest_rate_aprs: import("@mysten/
|
|
78
|
+
interest_rate_aprs: import("@mysten/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
79
79
|
length: number;
|
|
80
80
|
}, string>;
|
|
81
|
-
borrow_fee_bps: import("@mysten/
|
|
82
|
-
spread_fee_bps: import("@mysten/
|
|
83
|
-
protocol_liquidation_fee_bps: import("@mysten/
|
|
84
|
-
isolated: import("@mysten/
|
|
85
|
-
open_attributed_borrow_limit_usd: import("@mysten/
|
|
86
|
-
close_attributed_borrow_limit_usd: import("@mysten/
|
|
87
|
-
additional_fields: import("@mysten/
|
|
88
|
-
id: import("@mysten/
|
|
89
|
-
id: import("@mysten/
|
|
90
|
-
bytes: import("@mysten/
|
|
81
|
+
borrow_fee_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
82
|
+
spread_fee_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
83
|
+
protocol_liquidation_fee_bps: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
84
|
+
isolated: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
85
|
+
open_attributed_borrow_limit_usd: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
86
|
+
close_attributed_borrow_limit_usd: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
87
|
+
additional_fields: import("@mysten/bcs").BcsStruct<{
|
|
88
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
89
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
90
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
91
91
|
}, string>;
|
|
92
92
|
}, string>;
|
|
93
|
-
size: import("@mysten/
|
|
93
|
+
size: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
94
94
|
}, string>;
|
|
95
95
|
}, string>;
|
|
96
96
|
static fromFields(fields: Record<string, any>): ReserveConfig;
|
|
@@ -150,7 +150,7 @@ export declare class ReserveConfig implements StructClass {
|
|
|
150
150
|
static fromJSON(json: Record<string, any>): ReserveConfig;
|
|
151
151
|
static fromSuiParsedData(content: SuiParsedData): ReserveConfig;
|
|
152
152
|
static fromSuiObjectData(data: SuiObjectData): ReserveConfig;
|
|
153
|
-
static fetch(client:
|
|
153
|
+
static fetch(client: SuiJsonRpcClient, id: string): Promise<ReserveConfig>;
|
|
154
154
|
}
|
|
155
155
|
export declare function isReserveConfigBuilder(type: string): boolean;
|
|
156
156
|
export interface ReserveConfigBuilderFields {
|
|
@@ -172,14 +172,14 @@ export declare class ReserveConfigBuilder implements StructClass {
|
|
|
172
172
|
static get r(): reified.StructClassReified<ReserveConfigBuilder, ReserveConfigBuilderFields>;
|
|
173
173
|
static phantom(): PhantomReified<ToTypeStr<ReserveConfigBuilder>>;
|
|
174
174
|
static get p(): reified.PhantomReified<"0x1f54a9a2d71799553197e9ea24557797c6398d6a65f2d4d3818c9304b75d5e21::reserve_config::ReserveConfigBuilder" | "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::reserve_config::ReserveConfigBuilder">;
|
|
175
|
-
static get bcs(): import("@mysten/
|
|
176
|
-
fields: import("@mysten/
|
|
177
|
-
id: import("@mysten/
|
|
178
|
-
id: import("@mysten/
|
|
179
|
-
bytes: import("@mysten/
|
|
175
|
+
static get bcs(): import("@mysten/bcs").BcsStruct<{
|
|
176
|
+
fields: import("@mysten/bcs").BcsStruct<{
|
|
177
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
178
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
179
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
180
180
|
}, string>;
|
|
181
181
|
}, string>;
|
|
182
|
-
size: import("@mysten/
|
|
182
|
+
size: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
183
183
|
}, string>;
|
|
184
184
|
}, string>;
|
|
185
185
|
static fromFields(fields: Record<string, any>): ReserveConfigBuilder;
|
|
@@ -203,5 +203,5 @@ export declare class ReserveConfigBuilder implements StructClass {
|
|
|
203
203
|
static fromJSON(json: Record<string, any>): ReserveConfigBuilder;
|
|
204
204
|
static fromSuiParsedData(content: SuiParsedData): ReserveConfigBuilder;
|
|
205
205
|
static fromSuiObjectData(data: SuiObjectData): ReserveConfigBuilder;
|
|
206
|
-
static fetch(client:
|
|
206
|
+
static fetch(client: SuiJsonRpcClient, id: string): Promise<ReserveConfigBuilder>;
|
|
207
207
|
}
|