@suilend/sdk 15.0.0 → 16.0.0
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/pyth-2/price-identifier/structs.d.ts +5 -1
- package/_generated/_dependencies/std/ascii/structs.d.ts +8 -2
- package/_generated/_dependencies/std/option/structs.d.ts +6 -1
- package/_generated/_dependencies/std/type-name/structs.d.ts +7 -1
- package/_generated/_dependencies/sui/bag/structs.d.ts +8 -1
- package/_generated/_dependencies/sui/balance/structs.d.ts +6 -2
- package/_generated/_dependencies/sui/object/structs.d.ts +8 -2
- package/_generated/_dependencies/sui/object-table/structs.d.ts +8 -1
- package/_generated/_envs/mainnet.js +39 -3
- package/_generated/suilend/cell/structs.d.ts +8 -1
- package/_generated/suilend/decimal/structs.d.ts +3 -1
- package/_generated/suilend/lending-market/functions.d.ts +185 -64
- package/_generated/suilend/lending-market/functions.js +227 -65
- package/_generated/suilend/lending-market/structs.d.ts +764 -25
- package/_generated/suilend/lending-market/structs.js +491 -3
- package/_generated/suilend/liquidity-mining/structs.d.ts +169 -5
- package/_generated/suilend/obligation/structs.d.ts +338 -7
- package/_generated/suilend/rate-limiter/functions.d.ts +6 -0
- package/_generated/suilend/rate-limiter/functions.js +12 -0
- package/_generated/suilend/rate-limiter/structs.d.ts +17 -2
- package/_generated/suilend/reserve/structs.d.ts +664 -17
- package/_generated/suilend/reserve/structs.js +623 -4
- package/_generated/suilend/reserve-config/functions.d.ts +64 -9
- package/_generated/suilend/reserve-config/functions.js +88 -11
- package/_generated/suilend/reserve-config/structs.d.ts +45 -3
- package/package.json +1 -1
|
@@ -45,7 +45,90 @@ export declare class PoolRewardManager implements StructClass {
|
|
|
45
45
|
static get r(): PoolRewardManagerReified;
|
|
46
46
|
static phantom(): PhantomReified<ToTypeStr<PoolRewardManager>>;
|
|
47
47
|
static get p(): PhantomReified<ToTypeStr<PoolRewardManager>>;
|
|
48
|
-
|
|
48
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
49
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
50
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
51
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
52
|
+
}, string>;
|
|
53
|
+
}, string>;
|
|
54
|
+
total_shares: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
55
|
+
pool_rewards: import("@mysten/bcs").BcsType<{
|
|
56
|
+
vec: {
|
|
57
|
+
id: {
|
|
58
|
+
id: {
|
|
59
|
+
bytes: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
pool_reward_manager_id: {
|
|
63
|
+
bytes: string;
|
|
64
|
+
};
|
|
65
|
+
coin_type: {
|
|
66
|
+
name: {
|
|
67
|
+
bytes: number[];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
start_time_ms: string;
|
|
71
|
+
end_time_ms: string;
|
|
72
|
+
total_rewards: string;
|
|
73
|
+
allocated_rewards: {
|
|
74
|
+
value: string;
|
|
75
|
+
};
|
|
76
|
+
cumulative_rewards_per_share: {
|
|
77
|
+
value: string;
|
|
78
|
+
};
|
|
79
|
+
num_user_reward_managers: string;
|
|
80
|
+
additional_fields: {
|
|
81
|
+
id: {
|
|
82
|
+
id: {
|
|
83
|
+
bytes: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
size: string;
|
|
87
|
+
};
|
|
88
|
+
}[];
|
|
89
|
+
}[], Iterable<{
|
|
90
|
+
vec: Iterable<{
|
|
91
|
+
id: {
|
|
92
|
+
id: {
|
|
93
|
+
bytes: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
pool_reward_manager_id: {
|
|
97
|
+
bytes: string;
|
|
98
|
+
};
|
|
99
|
+
coin_type: {
|
|
100
|
+
name: {
|
|
101
|
+
bytes: Iterable<number> & {
|
|
102
|
+
length: number;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
start_time_ms: string | number | bigint;
|
|
107
|
+
end_time_ms: string | number | bigint;
|
|
108
|
+
total_rewards: string | number | bigint;
|
|
109
|
+
allocated_rewards: {
|
|
110
|
+
value: string | number | bigint;
|
|
111
|
+
};
|
|
112
|
+
cumulative_rewards_per_share: {
|
|
113
|
+
value: string | number | bigint;
|
|
114
|
+
};
|
|
115
|
+
num_user_reward_managers: string | number | bigint;
|
|
116
|
+
additional_fields: {
|
|
117
|
+
id: {
|
|
118
|
+
id: {
|
|
119
|
+
bytes: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
size: string | number | bigint;
|
|
123
|
+
};
|
|
124
|
+
}> & {
|
|
125
|
+
length: number;
|
|
126
|
+
};
|
|
127
|
+
}> & {
|
|
128
|
+
length: number;
|
|
129
|
+
}, string>;
|
|
130
|
+
last_update_time_ms: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
131
|
+
}, string>;
|
|
49
132
|
private static cachedBcs;
|
|
50
133
|
static get bcs(): ReturnType<typeof PoolRewardManager.instantiateBcs>;
|
|
51
134
|
static fromFields(fields: Record<string, any>): PoolRewardManager;
|
|
@@ -116,7 +199,41 @@ export declare class PoolReward implements StructClass {
|
|
|
116
199
|
static get r(): PoolRewardReified;
|
|
117
200
|
static phantom(): PhantomReified<ToTypeStr<PoolReward>>;
|
|
118
201
|
static get p(): PhantomReified<ToTypeStr<PoolReward>>;
|
|
119
|
-
|
|
202
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
203
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
204
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
205
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
206
|
+
}, string>;
|
|
207
|
+
}, string>;
|
|
208
|
+
pool_reward_manager_id: import("@mysten/bcs").BcsStruct<{
|
|
209
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
210
|
+
}, string>;
|
|
211
|
+
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
212
|
+
name: import("@mysten/bcs").BcsStruct<{
|
|
213
|
+
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
214
|
+
length: number;
|
|
215
|
+
}, string>;
|
|
216
|
+
}, string>;
|
|
217
|
+
}, string>;
|
|
218
|
+
start_time_ms: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
219
|
+
end_time_ms: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
220
|
+
total_rewards: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
221
|
+
allocated_rewards: import("@mysten/bcs").BcsStruct<{
|
|
222
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
223
|
+
}, string>;
|
|
224
|
+
cumulative_rewards_per_share: import("@mysten/bcs").BcsStruct<{
|
|
225
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
226
|
+
}, string>;
|
|
227
|
+
num_user_reward_managers: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
228
|
+
additional_fields: import("@mysten/bcs").BcsStruct<{
|
|
229
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
230
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
231
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
232
|
+
}, string>;
|
|
233
|
+
}, string>;
|
|
234
|
+
size: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
235
|
+
}, string>;
|
|
236
|
+
}, string>;
|
|
120
237
|
private static cachedBcs;
|
|
121
238
|
static get bcs(): ReturnType<typeof PoolReward.instantiateBcs>;
|
|
122
239
|
static fromFields(fields: Record<string, any>): PoolReward;
|
|
@@ -158,7 +275,9 @@ export declare class RewardBalance<T extends PhantomTypeArgument> implements Str
|
|
|
158
275
|
static get r(): typeof RewardBalance.reified;
|
|
159
276
|
static phantom<T extends PhantomReified<PhantomTypeArgument>>(T: T): PhantomReified<ToTypeStr<RewardBalance<ToPhantomTypeArgument<T>>>>;
|
|
160
277
|
static get p(): typeof RewardBalance.phantom;
|
|
161
|
-
|
|
278
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
279
|
+
dummy_field: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
280
|
+
}, string>;
|
|
162
281
|
private static cachedBcs;
|
|
163
282
|
static get bcs(): ReturnType<typeof RewardBalance.instantiateBcs>;
|
|
164
283
|
static fromFields<T extends PhantomReified<PhantomTypeArgument>>(typeArg: T, fields: Record<string, any>): RewardBalance<ToPhantomTypeArgument<T>>;
|
|
@@ -209,7 +328,42 @@ export declare class UserRewardManager implements StructClass {
|
|
|
209
328
|
static get r(): UserRewardManagerReified;
|
|
210
329
|
static phantom(): PhantomReified<ToTypeStr<UserRewardManager>>;
|
|
211
330
|
static get p(): PhantomReified<ToTypeStr<UserRewardManager>>;
|
|
212
|
-
|
|
331
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
332
|
+
pool_reward_manager_id: import("@mysten/bcs").BcsStruct<{
|
|
333
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
334
|
+
}, string>;
|
|
335
|
+
share: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
336
|
+
rewards: import("@mysten/bcs").BcsType<{
|
|
337
|
+
vec: {
|
|
338
|
+
pool_reward_id: {
|
|
339
|
+
bytes: string;
|
|
340
|
+
};
|
|
341
|
+
earned_rewards: {
|
|
342
|
+
value: string;
|
|
343
|
+
};
|
|
344
|
+
cumulative_rewards_per_share: {
|
|
345
|
+
value: string;
|
|
346
|
+
};
|
|
347
|
+
}[];
|
|
348
|
+
}[], Iterable<{
|
|
349
|
+
vec: Iterable<{
|
|
350
|
+
pool_reward_id: {
|
|
351
|
+
bytes: string;
|
|
352
|
+
};
|
|
353
|
+
earned_rewards: {
|
|
354
|
+
value: string | number | bigint;
|
|
355
|
+
};
|
|
356
|
+
cumulative_rewards_per_share: {
|
|
357
|
+
value: string | number | bigint;
|
|
358
|
+
};
|
|
359
|
+
}> & {
|
|
360
|
+
length: number;
|
|
361
|
+
};
|
|
362
|
+
}> & {
|
|
363
|
+
length: number;
|
|
364
|
+
}, string>;
|
|
365
|
+
last_update_time_ms: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
366
|
+
}, string>;
|
|
213
367
|
private static cachedBcs;
|
|
214
368
|
static get bcs(): ReturnType<typeof UserRewardManager.instantiateBcs>;
|
|
215
369
|
static fromFields(fields: Record<string, any>): UserRewardManager;
|
|
@@ -257,7 +411,17 @@ export declare class UserReward implements StructClass {
|
|
|
257
411
|
static get r(): UserRewardReified;
|
|
258
412
|
static phantom(): PhantomReified<ToTypeStr<UserReward>>;
|
|
259
413
|
static get p(): PhantomReified<ToTypeStr<UserReward>>;
|
|
260
|
-
|
|
414
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
415
|
+
pool_reward_id: import("@mysten/bcs").BcsStruct<{
|
|
416
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
417
|
+
}, string>;
|
|
418
|
+
earned_rewards: import("@mysten/bcs").BcsStruct<{
|
|
419
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
420
|
+
}, string>;
|
|
421
|
+
cumulative_rewards_per_share: import("@mysten/bcs").BcsStruct<{
|
|
422
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
423
|
+
}, string>;
|
|
424
|
+
}, string>;
|
|
261
425
|
private static cachedBcs;
|
|
262
426
|
static get bcs(): ReturnType<typeof UserReward.instantiateBcs>;
|
|
263
427
|
static fromFields(fields: Record<string, any>): UserReward;
|
|
@@ -129,7 +129,161 @@ export declare class Obligation<P extends PhantomTypeArgument> implements Struct
|
|
|
129
129
|
static get r(): typeof Obligation.reified;
|
|
130
130
|
static phantom<P extends PhantomReified<PhantomTypeArgument>>(P: P): PhantomReified<ToTypeStr<Obligation<ToPhantomTypeArgument<P>>>>;
|
|
131
131
|
static get p(): typeof Obligation.phantom;
|
|
132
|
-
|
|
132
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
133
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
134
|
+
id: import("@mysten/bcs").BcsStruct<{
|
|
135
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
136
|
+
}, string>;
|
|
137
|
+
}, string>;
|
|
138
|
+
lending_market_id: import("@mysten/bcs").BcsStruct<{
|
|
139
|
+
bytes: import("@mysten/bcs").BcsType<string, string, string>;
|
|
140
|
+
}, string>;
|
|
141
|
+
deposits: import("@mysten/bcs").BcsType<{
|
|
142
|
+
coin_type: {
|
|
143
|
+
name: {
|
|
144
|
+
bytes: number[];
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
reserve_array_index: string;
|
|
148
|
+
deposited_ctoken_amount: string;
|
|
149
|
+
market_value: {
|
|
150
|
+
value: string;
|
|
151
|
+
};
|
|
152
|
+
user_reward_manager_index: string;
|
|
153
|
+
attributed_borrow_value: {
|
|
154
|
+
value: string;
|
|
155
|
+
};
|
|
156
|
+
}[], Iterable<{
|
|
157
|
+
coin_type: {
|
|
158
|
+
name: {
|
|
159
|
+
bytes: Iterable<number> & {
|
|
160
|
+
length: number;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
reserve_array_index: string | number | bigint;
|
|
165
|
+
deposited_ctoken_amount: string | number | bigint;
|
|
166
|
+
market_value: {
|
|
167
|
+
value: string | number | bigint;
|
|
168
|
+
};
|
|
169
|
+
user_reward_manager_index: string | number | bigint;
|
|
170
|
+
attributed_borrow_value: {
|
|
171
|
+
value: string | number | bigint;
|
|
172
|
+
};
|
|
173
|
+
}> & {
|
|
174
|
+
length: number;
|
|
175
|
+
}, string>;
|
|
176
|
+
borrows: import("@mysten/bcs").BcsType<{
|
|
177
|
+
coin_type: {
|
|
178
|
+
name: {
|
|
179
|
+
bytes: number[];
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
reserve_array_index: string;
|
|
183
|
+
borrowed_amount: {
|
|
184
|
+
value: string;
|
|
185
|
+
};
|
|
186
|
+
cumulative_borrow_rate: {
|
|
187
|
+
value: string;
|
|
188
|
+
};
|
|
189
|
+
market_value: {
|
|
190
|
+
value: string;
|
|
191
|
+
};
|
|
192
|
+
user_reward_manager_index: string;
|
|
193
|
+
}[], Iterable<{
|
|
194
|
+
coin_type: {
|
|
195
|
+
name: {
|
|
196
|
+
bytes: Iterable<number> & {
|
|
197
|
+
length: number;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
reserve_array_index: string | number | bigint;
|
|
202
|
+
borrowed_amount: {
|
|
203
|
+
value: string | number | bigint;
|
|
204
|
+
};
|
|
205
|
+
cumulative_borrow_rate: {
|
|
206
|
+
value: string | number | bigint;
|
|
207
|
+
};
|
|
208
|
+
market_value: {
|
|
209
|
+
value: string | number | bigint;
|
|
210
|
+
};
|
|
211
|
+
user_reward_manager_index: string | number | bigint;
|
|
212
|
+
}> & {
|
|
213
|
+
length: number;
|
|
214
|
+
}, string>;
|
|
215
|
+
deposited_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
216
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
217
|
+
}, string>;
|
|
218
|
+
allowed_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
219
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
220
|
+
}, string>;
|
|
221
|
+
unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
222
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
223
|
+
}, string>;
|
|
224
|
+
super_unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
225
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
226
|
+
}, string>;
|
|
227
|
+
unweighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
228
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
229
|
+
}, string>;
|
|
230
|
+
weighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
231
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
232
|
+
}, string>;
|
|
233
|
+
weighted_borrowed_value_upper_bound_usd: import("@mysten/bcs").BcsStruct<{
|
|
234
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
235
|
+
}, string>;
|
|
236
|
+
borrowing_isolated_asset: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
237
|
+
user_reward_managers: import("@mysten/bcs").BcsType<{
|
|
238
|
+
pool_reward_manager_id: {
|
|
239
|
+
bytes: string;
|
|
240
|
+
};
|
|
241
|
+
share: string;
|
|
242
|
+
rewards: {
|
|
243
|
+
vec: {
|
|
244
|
+
pool_reward_id: {
|
|
245
|
+
bytes: string;
|
|
246
|
+
};
|
|
247
|
+
earned_rewards: {
|
|
248
|
+
value: string;
|
|
249
|
+
};
|
|
250
|
+
cumulative_rewards_per_share: {
|
|
251
|
+
value: string;
|
|
252
|
+
};
|
|
253
|
+
}[];
|
|
254
|
+
}[];
|
|
255
|
+
last_update_time_ms: string;
|
|
256
|
+
}[], Iterable<{
|
|
257
|
+
pool_reward_manager_id: {
|
|
258
|
+
bytes: string;
|
|
259
|
+
};
|
|
260
|
+
share: string | number | bigint;
|
|
261
|
+
rewards: Iterable<{
|
|
262
|
+
vec: Iterable<{
|
|
263
|
+
pool_reward_id: {
|
|
264
|
+
bytes: string;
|
|
265
|
+
};
|
|
266
|
+
earned_rewards: {
|
|
267
|
+
value: string | number | bigint;
|
|
268
|
+
};
|
|
269
|
+
cumulative_rewards_per_share: {
|
|
270
|
+
value: string | number | bigint;
|
|
271
|
+
};
|
|
272
|
+
}> & {
|
|
273
|
+
length: number;
|
|
274
|
+
};
|
|
275
|
+
}> & {
|
|
276
|
+
length: number;
|
|
277
|
+
};
|
|
278
|
+
last_update_time_ms: string | number | bigint;
|
|
279
|
+
}> & {
|
|
280
|
+
length: number;
|
|
281
|
+
}, string>;
|
|
282
|
+
bad_debt_usd: import("@mysten/bcs").BcsStruct<{
|
|
283
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
284
|
+
}, string>;
|
|
285
|
+
closable: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
286
|
+
}, string>;
|
|
133
287
|
private static cachedBcs;
|
|
134
288
|
static get bcs(): ReturnType<typeof Obligation.instantiateBcs>;
|
|
135
289
|
static fromFields<P extends PhantomReified<PhantomTypeArgument>>(typeArg: P, fields: Record<string, any>): Obligation<ToPhantomTypeArgument<P>>;
|
|
@@ -188,7 +342,24 @@ export declare class Deposit implements StructClass {
|
|
|
188
342
|
static get r(): DepositReified;
|
|
189
343
|
static phantom(): PhantomReified<ToTypeStr<Deposit>>;
|
|
190
344
|
static get p(): PhantomReified<ToTypeStr<Deposit>>;
|
|
191
|
-
|
|
345
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
346
|
+
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
347
|
+
name: import("@mysten/bcs").BcsStruct<{
|
|
348
|
+
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
349
|
+
length: number;
|
|
350
|
+
}, string>;
|
|
351
|
+
}, string>;
|
|
352
|
+
}, string>;
|
|
353
|
+
reserve_array_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
354
|
+
deposited_ctoken_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
355
|
+
market_value: import("@mysten/bcs").BcsStruct<{
|
|
356
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
357
|
+
}, string>;
|
|
358
|
+
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
359
|
+
attributed_borrow_value: import("@mysten/bcs").BcsStruct<{
|
|
360
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
361
|
+
}, string>;
|
|
362
|
+
}, string>;
|
|
192
363
|
private static cachedBcs;
|
|
193
364
|
static get bcs(): ReturnType<typeof Deposit.instantiateBcs>;
|
|
194
365
|
static fromFields(fields: Record<string, any>): Deposit;
|
|
@@ -245,7 +416,26 @@ export declare class Borrow implements StructClass {
|
|
|
245
416
|
static get r(): BorrowReified;
|
|
246
417
|
static phantom(): PhantomReified<ToTypeStr<Borrow>>;
|
|
247
418
|
static get p(): PhantomReified<ToTypeStr<Borrow>>;
|
|
248
|
-
|
|
419
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
420
|
+
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
421
|
+
name: import("@mysten/bcs").BcsStruct<{
|
|
422
|
+
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
423
|
+
length: number;
|
|
424
|
+
}, string>;
|
|
425
|
+
}, string>;
|
|
426
|
+
}, string>;
|
|
427
|
+
reserve_array_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
428
|
+
borrowed_amount: import("@mysten/bcs").BcsStruct<{
|
|
429
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
430
|
+
}, string>;
|
|
431
|
+
cumulative_borrow_rate: import("@mysten/bcs").BcsStruct<{
|
|
432
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
433
|
+
}, string>;
|
|
434
|
+
market_value: import("@mysten/bcs").BcsStruct<{
|
|
435
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
436
|
+
}, string>;
|
|
437
|
+
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
438
|
+
}, string>;
|
|
249
439
|
private static cachedBcs;
|
|
250
440
|
static get bcs(): ReturnType<typeof Borrow.instantiateBcs>;
|
|
251
441
|
static fromFields(fields: Record<string, any>): Borrow;
|
|
@@ -287,7 +477,9 @@ export declare class ExistStaleOracles implements StructClass {
|
|
|
287
477
|
static get r(): ExistStaleOraclesReified;
|
|
288
478
|
static phantom(): PhantomReified<ToTypeStr<ExistStaleOracles>>;
|
|
289
479
|
static get p(): PhantomReified<ToTypeStr<ExistStaleOracles>>;
|
|
290
|
-
|
|
480
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
481
|
+
dummy_field: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
482
|
+
}, string>;
|
|
291
483
|
private static cachedBcs;
|
|
292
484
|
static get bcs(): ReturnType<typeof ExistStaleOracles.instantiateBcs>;
|
|
293
485
|
static fromFields(fields: Record<string, any>): ExistStaleOracles;
|
|
@@ -368,7 +560,110 @@ export declare class ObligationDataEvent implements StructClass {
|
|
|
368
560
|
static get r(): ObligationDataEventReified;
|
|
369
561
|
static phantom(): PhantomReified<ToTypeStr<ObligationDataEvent>>;
|
|
370
562
|
static get p(): PhantomReified<ToTypeStr<ObligationDataEvent>>;
|
|
371
|
-
|
|
563
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
564
|
+
lending_market_id: import("@mysten/bcs").BcsType<string, string, string>;
|
|
565
|
+
obligation_id: import("@mysten/bcs").BcsType<string, string, string>;
|
|
566
|
+
deposits: import("@mysten/bcs").BcsType<{
|
|
567
|
+
coin_type: {
|
|
568
|
+
name: {
|
|
569
|
+
bytes: number[];
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
reserve_array_index: string;
|
|
573
|
+
deposited_ctoken_amount: string;
|
|
574
|
+
market_value: {
|
|
575
|
+
value: string;
|
|
576
|
+
};
|
|
577
|
+
user_reward_manager_index: string;
|
|
578
|
+
attributed_borrow_value: {
|
|
579
|
+
value: string;
|
|
580
|
+
};
|
|
581
|
+
}[], Iterable<{
|
|
582
|
+
coin_type: {
|
|
583
|
+
name: {
|
|
584
|
+
bytes: Iterable<number> & {
|
|
585
|
+
length: number;
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
reserve_array_index: string | number | bigint;
|
|
590
|
+
deposited_ctoken_amount: string | number | bigint;
|
|
591
|
+
market_value: {
|
|
592
|
+
value: string | number | bigint;
|
|
593
|
+
};
|
|
594
|
+
user_reward_manager_index: string | number | bigint;
|
|
595
|
+
attributed_borrow_value: {
|
|
596
|
+
value: string | number | bigint;
|
|
597
|
+
};
|
|
598
|
+
}> & {
|
|
599
|
+
length: number;
|
|
600
|
+
}, string>;
|
|
601
|
+
borrows: import("@mysten/bcs").BcsType<{
|
|
602
|
+
coin_type: {
|
|
603
|
+
name: {
|
|
604
|
+
bytes: number[];
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
reserve_array_index: string;
|
|
608
|
+
borrowed_amount: {
|
|
609
|
+
value: string;
|
|
610
|
+
};
|
|
611
|
+
cumulative_borrow_rate: {
|
|
612
|
+
value: string;
|
|
613
|
+
};
|
|
614
|
+
market_value: {
|
|
615
|
+
value: string;
|
|
616
|
+
};
|
|
617
|
+
user_reward_manager_index: string;
|
|
618
|
+
}[], Iterable<{
|
|
619
|
+
coin_type: {
|
|
620
|
+
name: {
|
|
621
|
+
bytes: Iterable<number> & {
|
|
622
|
+
length: number;
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
reserve_array_index: string | number | bigint;
|
|
627
|
+
borrowed_amount: {
|
|
628
|
+
value: string | number | bigint;
|
|
629
|
+
};
|
|
630
|
+
cumulative_borrow_rate: {
|
|
631
|
+
value: string | number | bigint;
|
|
632
|
+
};
|
|
633
|
+
market_value: {
|
|
634
|
+
value: string | number | bigint;
|
|
635
|
+
};
|
|
636
|
+
user_reward_manager_index: string | number | bigint;
|
|
637
|
+
}> & {
|
|
638
|
+
length: number;
|
|
639
|
+
}, string>;
|
|
640
|
+
deposited_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
641
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
642
|
+
}, string>;
|
|
643
|
+
allowed_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
644
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
645
|
+
}, string>;
|
|
646
|
+
unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
647
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
648
|
+
}, string>;
|
|
649
|
+
super_unhealthy_borrow_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
650
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
651
|
+
}, string>;
|
|
652
|
+
unweighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
653
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
654
|
+
}, string>;
|
|
655
|
+
weighted_borrowed_value_usd: import("@mysten/bcs").BcsStruct<{
|
|
656
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
657
|
+
}, string>;
|
|
658
|
+
weighted_borrowed_value_upper_bound_usd: import("@mysten/bcs").BcsStruct<{
|
|
659
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
660
|
+
}, string>;
|
|
661
|
+
borrowing_isolated_asset: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
662
|
+
bad_debt_usd: import("@mysten/bcs").BcsStruct<{
|
|
663
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
664
|
+
}, string>;
|
|
665
|
+
closable: import("@mysten/bcs").BcsType<boolean, boolean, "bool">;
|
|
666
|
+
}, string>;
|
|
372
667
|
private static cachedBcs;
|
|
373
668
|
static get bcs(): ReturnType<typeof ObligationDataEvent.instantiateBcs>;
|
|
374
669
|
static fromFields(fields: Record<string, any>): ObligationDataEvent;
|
|
@@ -427,7 +722,24 @@ export declare class DepositRecord implements StructClass {
|
|
|
427
722
|
static get r(): DepositRecordReified;
|
|
428
723
|
static phantom(): PhantomReified<ToTypeStr<DepositRecord>>;
|
|
429
724
|
static get p(): PhantomReified<ToTypeStr<DepositRecord>>;
|
|
430
|
-
|
|
725
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
726
|
+
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
727
|
+
name: import("@mysten/bcs").BcsStruct<{
|
|
728
|
+
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
729
|
+
length: number;
|
|
730
|
+
}, string>;
|
|
731
|
+
}, string>;
|
|
732
|
+
}, string>;
|
|
733
|
+
reserve_array_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
734
|
+
deposited_ctoken_amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
735
|
+
market_value: import("@mysten/bcs").BcsStruct<{
|
|
736
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
737
|
+
}, string>;
|
|
738
|
+
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
739
|
+
attributed_borrow_value: import("@mysten/bcs").BcsStruct<{
|
|
740
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
741
|
+
}, string>;
|
|
742
|
+
}, string>;
|
|
431
743
|
private static cachedBcs;
|
|
432
744
|
static get bcs(): ReturnType<typeof DepositRecord.instantiateBcs>;
|
|
433
745
|
static fromFields(fields: Record<string, any>): DepositRecord;
|
|
@@ -484,7 +796,26 @@ export declare class BorrowRecord implements StructClass {
|
|
|
484
796
|
static get r(): BorrowRecordReified;
|
|
485
797
|
static phantom(): PhantomReified<ToTypeStr<BorrowRecord>>;
|
|
486
798
|
static get p(): PhantomReified<ToTypeStr<BorrowRecord>>;
|
|
487
|
-
|
|
799
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
800
|
+
coin_type: import("@mysten/bcs").BcsStruct<{
|
|
801
|
+
name: import("@mysten/bcs").BcsStruct<{
|
|
802
|
+
bytes: import("@mysten/bcs").BcsType<number[], Iterable<number> & {
|
|
803
|
+
length: number;
|
|
804
|
+
}, string>;
|
|
805
|
+
}, string>;
|
|
806
|
+
}, string>;
|
|
807
|
+
reserve_array_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
808
|
+
borrowed_amount: import("@mysten/bcs").BcsStruct<{
|
|
809
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
810
|
+
}, string>;
|
|
811
|
+
cumulative_borrow_rate: import("@mysten/bcs").BcsStruct<{
|
|
812
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
813
|
+
}, string>;
|
|
814
|
+
market_value: import("@mysten/bcs").BcsStruct<{
|
|
815
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
816
|
+
}, string>;
|
|
817
|
+
user_reward_manager_index: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
818
|
+
}, string>;
|
|
488
819
|
private static cachedBcs;
|
|
489
820
|
static get bcs(): ReturnType<typeof BorrowRecord.instantiateBcs>;
|
|
490
821
|
static fromFields(fields: Record<string, any>): BorrowRecord;
|
|
@@ -45,6 +45,12 @@ export interface NewArgs {
|
|
|
45
45
|
export declare function new_(tx: Transaction, args: NewArgs, options?: {
|
|
46
46
|
env?: EnvConfig;
|
|
47
47
|
}): TransactionResult;
|
|
48
|
+
export declare function windowDuration(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
49
|
+
env?: EnvConfig;
|
|
50
|
+
}): TransactionResult;
|
|
51
|
+
export declare function maxOutflow(tx: Transaction, config: TransactionObjectInput, options?: {
|
|
52
|
+
env?: EnvConfig;
|
|
53
|
+
}): TransactionResult;
|
|
48
54
|
export interface UpdateInternalArgs {
|
|
49
55
|
rateLimiter: TransactionObjectInput;
|
|
50
56
|
curTime: bigint | TransactionArgument;
|
|
@@ -49,6 +49,18 @@ export function new_(tx, args, options) {
|
|
|
49
49
|
],
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
+
export function windowDuration(tx, config, options) {
|
|
53
|
+
return tx.moveCall({
|
|
54
|
+
target: `${getPublishedAt('suilend', options?.env)}::rate_limiter::window_duration`,
|
|
55
|
+
arguments: [obj(tx, config)],
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export function maxOutflow(tx, config, options) {
|
|
59
|
+
return tx.moveCall({
|
|
60
|
+
target: `${getPublishedAt('suilend', options?.env)}::rate_limiter::max_outflow`,
|
|
61
|
+
arguments: [obj(tx, config)],
|
|
62
|
+
});
|
|
63
|
+
}
|
|
52
64
|
/**
|
|
53
65
|
* Updates the rate limiter's state based on the current time.
|
|
54
66
|
*
|
|
@@ -47,7 +47,19 @@ export declare class RateLimiter implements StructClass {
|
|
|
47
47
|
static get r(): RateLimiterReified;
|
|
48
48
|
static phantom(): PhantomReified<ToTypeStr<RateLimiter>>;
|
|
49
49
|
static get p(): PhantomReified<ToTypeStr<RateLimiter>>;
|
|
50
|
-
|
|
50
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
51
|
+
config: import("@mysten/bcs").BcsStruct<{
|
|
52
|
+
window_duration: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
53
|
+
max_outflow: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
54
|
+
}, string>;
|
|
55
|
+
prev_qty: import("@mysten/bcs").BcsStruct<{
|
|
56
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
57
|
+
}, string>;
|
|
58
|
+
window_start: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
59
|
+
cur_qty: import("@mysten/bcs").BcsStruct<{
|
|
60
|
+
value: import("@mysten/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
61
|
+
}, string>;
|
|
62
|
+
}, string>;
|
|
51
63
|
private static cachedBcs;
|
|
52
64
|
static get bcs(): ReturnType<typeof RateLimiter.instantiateBcs>;
|
|
53
65
|
static fromFields(fields: Record<string, any>): RateLimiter;
|
|
@@ -97,7 +109,10 @@ export declare class RateLimiterConfig implements StructClass {
|
|
|
97
109
|
static get r(): RateLimiterConfigReified;
|
|
98
110
|
static phantom(): PhantomReified<ToTypeStr<RateLimiterConfig>>;
|
|
99
111
|
static get p(): PhantomReified<ToTypeStr<RateLimiterConfig>>;
|
|
100
|
-
|
|
112
|
+
protected static instantiateBcs(): import("@mysten/bcs").BcsStruct<{
|
|
113
|
+
window_duration: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
114
|
+
max_outflow: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
115
|
+
}, string>;
|
|
101
116
|
private static cachedBcs;
|
|
102
117
|
static get bcs(): ReturnType<typeof RateLimiterConfig.instantiateBcs>;
|
|
103
118
|
static fromFields(fields: Record<string, any>): RateLimiterConfig;
|