@suilend/sdk 1.1.3 → 1.1.6

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.
Files changed (120) hide show
  1. package/core/client.d.ts +117 -0
  2. package/{client.js → core/client.js} +97 -93
  3. package/{constants.d.ts → core/constants.d.ts} +4 -0
  4. package/{constants.js → core/constants.js} +6 -1
  5. package/core/parsers/deps.d.ts +15 -0
  6. package/core/parsers/deps.js +2 -0
  7. package/{parsers → core/parsers}/lendingMarket.d.ts +37 -38
  8. package/{parsers → core/parsers}/lendingMarket.js +4 -14
  9. package/{parsers → core/parsers}/obligation.d.ts +60 -60
  10. package/{parsers → core/parsers}/obligation.js +1 -1
  11. package/core/parsers/rateLimiter.d.ts +19 -0
  12. package/{parsers → core/parsers}/rateLimiter.js +3 -3
  13. package/{parsers → core/parsers}/reserve.d.ts +46 -47
  14. package/{parsers → core/parsers}/reserve.js +8 -32
  15. package/core/types.d.ts +882 -0
  16. package/core/types.js +132 -0
  17. package/core/utils/simulate.d.ts +56 -0
  18. package/core/utils/simulate.js +312 -0
  19. package/index.d.ts +1 -7
  20. package/index.js +1 -7
  21. package/{_generated → mainnet/_generated}/suilend/index.d.ts +1 -2
  22. package/{_generated → mainnet/_generated}/suilend/index.js +1 -5
  23. package/mainnet/api/events.d.ts +1 -0
  24. package/mainnet/api/events.js +17 -0
  25. package/mainnet/client.d.ts +18 -0
  26. package/mainnet/client.js +110 -0
  27. package/mainnet/constants.d.ts +3 -0
  28. package/mainnet/constants.js +20 -0
  29. package/mainnet/index.d.ts +6 -0
  30. package/mainnet/index.js +22 -0
  31. package/mainnet/parsers/apiReserveAssetDataEvent.d.ts +1 -0
  32. package/mainnet/parsers/apiReserveAssetDataEvent.js +17 -0
  33. package/{parsers → mainnet/parsers}/index.d.ts +0 -1
  34. package/{parsers → mainnet/parsers}/index.js +0 -1
  35. package/mainnet/parsers/lendingMarket.d.ts +127 -0
  36. package/mainnet/parsers/lendingMarket.js +41 -0
  37. package/mainnet/parsers/obligation.d.ts +10 -0
  38. package/mainnet/parsers/obligation.js +30 -0
  39. package/{parsers → mainnet/parsers}/rateLimiter.d.ts +9 -10
  40. package/mainnet/parsers/rateLimiter.js +32 -0
  41. package/mainnet/parsers/reserve.d.ts +166 -0
  42. package/mainnet/parsers/reserve.js +38 -0
  43. package/mainnet/types.d.ts +1 -0
  44. package/{api/index.js → mainnet/types.js} +1 -1
  45. package/mainnet/utils/events.d.ts +1 -0
  46. package/mainnet/utils/events.js +17 -0
  47. package/mainnet/utils/simulate.js +78 -0
  48. package/mainnet/utils.d.ts +1 -0
  49. package/mainnet/utils.js +17 -0
  50. package/package.json +1 -1
  51. package/api/index.d.ts +0 -1
  52. package/client.d.ts +0 -64
  53. package/types.d.ts +0 -200
  54. package/types.js +0 -15
  55. package/utils/simulate.js +0 -316
  56. /package/{api → core/api}/events.d.ts +0 -0
  57. /package/{api → core/api}/events.js +0 -0
  58. /package/{parsers → core/parsers}/apiReserveAssetDataEvent.d.ts +0 -0
  59. /package/{parsers → core/parsers}/apiReserveAssetDataEvent.js +0 -0
  60. /package/{utils → core/utils}/events.d.ts +0 -0
  61. /package/{utils → core/utils}/events.js +0 -0
  62. /package/{utils.d.ts → core/utils.d.ts} +0 -0
  63. /package/{utils.js → core/utils.js} +0 -0
  64. /package/{_generated → mainnet/_generated}/_dependencies/source/0x1/ascii/structs.d.ts +0 -0
  65. /package/{_generated → mainnet/_generated}/_dependencies/source/0x1/ascii/structs.js +0 -0
  66. /package/{_generated → mainnet/_generated}/_dependencies/source/0x1/index.d.ts +0 -0
  67. /package/{_generated → mainnet/_generated}/_dependencies/source/0x1/index.js +0 -0
  68. /package/{_generated → mainnet/_generated}/_dependencies/source/0x1/option/structs.d.ts +0 -0
  69. /package/{_generated → mainnet/_generated}/_dependencies/source/0x1/option/structs.js +0 -0
  70. /package/{_generated → mainnet/_generated}/_dependencies/source/0x1/type-name/structs.d.ts +0 -0
  71. /package/{_generated → mainnet/_generated}/_dependencies/source/0x1/type-name/structs.js +0 -0
  72. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/bag/structs.d.ts +0 -0
  73. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/bag/structs.js +0 -0
  74. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/balance/structs.d.ts +0 -0
  75. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/balance/structs.js +0 -0
  76. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/index.d.ts +0 -0
  77. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/index.js +0 -0
  78. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/object/structs.d.ts +0 -0
  79. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/object/structs.js +0 -0
  80. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/object-table/structs.d.ts +0 -0
  81. /package/{_generated → mainnet/_generated}/_dependencies/source/0x2/object-table/structs.js +0 -0
  82. /package/{_generated → mainnet/_generated}/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.d.ts +0 -0
  83. /package/{_generated → mainnet/_generated}/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/index.js +0 -0
  84. /package/{_generated → mainnet/_generated}/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.d.ts +0 -0
  85. /package/{_generated → mainnet/_generated}/_dependencies/source/0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e/price-identifier/structs.js +0 -0
  86. /package/{_generated → mainnet/_generated}/_framework/reified.d.ts +0 -0
  87. /package/{_generated → mainnet/_generated}/_framework/reified.js +0 -0
  88. /package/{_generated → mainnet/_generated}/_framework/util.d.ts +0 -0
  89. /package/{_generated → mainnet/_generated}/_framework/util.js +0 -0
  90. /package/{_generated → mainnet/_generated}/_framework/vector.d.ts +0 -0
  91. /package/{_generated → mainnet/_generated}/_framework/vector.js +0 -0
  92. /package/{_generated → mainnet/_generated}/suilend/cell/structs.d.ts +0 -0
  93. /package/{_generated → mainnet/_generated}/suilend/cell/structs.js +0 -0
  94. /package/{_generated → mainnet/_generated}/suilend/decimal/structs.d.ts +0 -0
  95. /package/{_generated → mainnet/_generated}/suilend/decimal/structs.js +0 -0
  96. /package/{_generated → mainnet/_generated}/suilend/lending-market/functions.d.ts +0 -0
  97. /package/{_generated → mainnet/_generated}/suilend/lending-market/functions.js +0 -0
  98. /package/{_generated → mainnet/_generated}/suilend/lending-market/structs.d.ts +0 -0
  99. /package/{_generated → mainnet/_generated}/suilend/lending-market/structs.js +0 -0
  100. /package/{_generated → mainnet/_generated}/suilend/lending-market-registry/functions.d.ts +0 -0
  101. /package/{_generated → mainnet/_generated}/suilend/lending-market-registry/functions.js +0 -0
  102. /package/{_generated → mainnet/_generated}/suilend/liquidity-mining/structs.d.ts +0 -0
  103. /package/{_generated → mainnet/_generated}/suilend/liquidity-mining/structs.js +0 -0
  104. /package/{_generated → mainnet/_generated}/suilend/obligation/structs.d.ts +0 -0
  105. /package/{_generated → mainnet/_generated}/suilend/obligation/structs.js +0 -0
  106. /package/{_generated → mainnet/_generated}/suilend/rate-limiter/functions.d.ts +0 -0
  107. /package/{_generated → mainnet/_generated}/suilend/rate-limiter/functions.js +0 -0
  108. /package/{_generated → mainnet/_generated}/suilend/rate-limiter/structs.d.ts +0 -0
  109. /package/{_generated → mainnet/_generated}/suilend/rate-limiter/structs.js +0 -0
  110. /package/{_generated → mainnet/_generated}/suilend/reserve/structs.d.ts +0 -0
  111. /package/{_generated → mainnet/_generated}/suilend/reserve/structs.js +0 -0
  112. /package/{_generated → mainnet/_generated}/suilend/reserve-config/functions.d.ts +0 -0
  113. /package/{_generated → mainnet/_generated}/suilend/reserve-config/functions.js +0 -0
  114. /package/{_generated → mainnet/_generated}/suilend/reserve-config/structs.d.ts +0 -0
  115. /package/{_generated → mainnet/_generated}/suilend/reserve-config/structs.js +0 -0
  116. /package/{utils → mainnet/utils}/index.d.ts +0 -0
  117. /package/{utils → mainnet/utils}/index.js +0 -0
  118. /package/{utils → mainnet/utils}/obligation.d.ts +0 -0
  119. /package/{utils → mainnet/utils}/obligation.js +0 -0
  120. /package/{utils → mainnet/utils}/simulate.d.ts +0 -0
@@ -0,0 +1,882 @@
1
+ import { BcsType, InferBcsType } from "@mysten/bcs";
2
+ import { SuiClient } from "@mysten/sui/client";
3
+ import { TransactionArgument, TransactionObjectInput } from "@mysten/sui/transactions";
4
+ export declare const ID: BcsType<{
5
+ bytes: string;
6
+ }, {
7
+ bytes: string;
8
+ }>;
9
+ export declare const UID: BcsType<{
10
+ id: {
11
+ bytes: string;
12
+ };
13
+ }, {
14
+ id: {
15
+ bytes: string;
16
+ };
17
+ }>;
18
+ export declare const ObligationOwnerCap: BcsType<{
19
+ id: {
20
+ id: {
21
+ bytes: string;
22
+ };
23
+ };
24
+ obligation_id: {
25
+ bytes: string;
26
+ };
27
+ }, {
28
+ id: {
29
+ id: {
30
+ bytes: string;
31
+ };
32
+ };
33
+ obligation_id: {
34
+ bytes: string;
35
+ };
36
+ }>;
37
+ export declare const Decimal: BcsType<{
38
+ value: string;
39
+ }, {
40
+ value: string | number | bigint;
41
+ }>;
42
+ export declare const Borrow: BcsType<{
43
+ reserve_id: string;
44
+ borrowed_amount: {
45
+ value: string;
46
+ };
47
+ cumulative_borrow_rate: {
48
+ value: string;
49
+ };
50
+ market_value: {
51
+ value: string;
52
+ };
53
+ }, {
54
+ reserve_id: string | number | bigint;
55
+ borrowed_amount: {
56
+ value: string | number | bigint;
57
+ };
58
+ cumulative_borrow_rate: {
59
+ value: string | number | bigint;
60
+ };
61
+ market_value: {
62
+ value: string | number | bigint;
63
+ };
64
+ }>;
65
+ export declare const Deposit: BcsType<{
66
+ reserve_id: string;
67
+ deposited_ctoken_amount: string;
68
+ market_value: {
69
+ value: string;
70
+ };
71
+ }, {
72
+ reserve_id: string | number | bigint;
73
+ deposited_ctoken_amount: string | number | bigint;
74
+ market_value: {
75
+ value: string | number | bigint;
76
+ };
77
+ }>;
78
+ export declare const Bag: BcsType<{
79
+ id: {
80
+ id: {
81
+ bytes: string;
82
+ };
83
+ };
84
+ size: string;
85
+ }, {
86
+ id: {
87
+ id: {
88
+ bytes: string;
89
+ };
90
+ };
91
+ size: string | number | bigint;
92
+ }>;
93
+ export declare const Obligation: BcsType<{
94
+ id: {
95
+ id: {
96
+ bytes: string;
97
+ };
98
+ };
99
+ owner: string;
100
+ deposits: {
101
+ reserve_id: string;
102
+ deposited_ctoken_amount: string;
103
+ market_value: {
104
+ value: string;
105
+ };
106
+ }[];
107
+ borrows: {
108
+ reserve_id: string;
109
+ borrowed_amount: {
110
+ value: string;
111
+ };
112
+ cumulative_borrow_rate: {
113
+ value: string;
114
+ };
115
+ market_value: {
116
+ value: string;
117
+ };
118
+ }[];
119
+ balances: {
120
+ id: {
121
+ id: {
122
+ bytes: string;
123
+ };
124
+ };
125
+ size: string;
126
+ };
127
+ deposited_value_usd: {
128
+ value: string;
129
+ };
130
+ allowed_borrow_value_usd: {
131
+ value: string;
132
+ };
133
+ unhealthy_borrow_value_usd: {
134
+ value: string;
135
+ };
136
+ unweighted_borrowed_value_usd: {
137
+ value: string;
138
+ };
139
+ weighted_borrowed_value_usd: {
140
+ value: string;
141
+ };
142
+ }, {
143
+ id: {
144
+ id: {
145
+ bytes: string;
146
+ };
147
+ };
148
+ owner: string;
149
+ deposits: Iterable<{
150
+ reserve_id: string | number | bigint;
151
+ deposited_ctoken_amount: string | number | bigint;
152
+ market_value: {
153
+ value: string | number | bigint;
154
+ };
155
+ }> & {
156
+ length: number;
157
+ };
158
+ borrows: Iterable<{
159
+ reserve_id: string | number | bigint;
160
+ borrowed_amount: {
161
+ value: string | number | bigint;
162
+ };
163
+ cumulative_borrow_rate: {
164
+ value: string | number | bigint;
165
+ };
166
+ market_value: {
167
+ value: string | number | bigint;
168
+ };
169
+ }> & {
170
+ length: number;
171
+ };
172
+ balances: {
173
+ id: {
174
+ id: {
175
+ bytes: string;
176
+ };
177
+ };
178
+ size: string | number | bigint;
179
+ };
180
+ deposited_value_usd: {
181
+ value: string | number | bigint;
182
+ };
183
+ allowed_borrow_value_usd: {
184
+ value: string | number | bigint;
185
+ };
186
+ unhealthy_borrow_value_usd: {
187
+ value: string | number | bigint;
188
+ };
189
+ unweighted_borrowed_value_usd: {
190
+ value: string | number | bigint;
191
+ };
192
+ weighted_borrowed_value_usd: {
193
+ value: string | number | bigint;
194
+ };
195
+ }>;
196
+ export type ObligationType = typeof Obligation.$inferType;
197
+ export type ReserveType = typeof Reserve.$inferType;
198
+ export type LendingMarketType = typeof LendingMarket.$inferType;
199
+ export declare const InterestRateModel: BcsType<{
200
+ utils: number[];
201
+ aprs: string[];
202
+ }, {
203
+ utils: Iterable<number> & {
204
+ length: number;
205
+ };
206
+ aprs: Iterable<string | number | bigint> & {
207
+ length: number;
208
+ };
209
+ }>;
210
+ export declare const ReserveConfig: BcsType<{
211
+ id: {
212
+ id: {
213
+ bytes: string;
214
+ };
215
+ };
216
+ open_ltv_pct: number;
217
+ close_ltv_pct: number;
218
+ borrow_weight_bps: string;
219
+ deposit_limit: string;
220
+ borrow_limit: string;
221
+ liquidation_bonus_pct: number;
222
+ borrow_fee_bps: string;
223
+ spread_fee_bps: string;
224
+ liquidation_fee_bps: string;
225
+ interest_rate: {
226
+ utils: number[];
227
+ aprs: string[];
228
+ };
229
+ }, {
230
+ id: {
231
+ id: {
232
+ bytes: string;
233
+ };
234
+ };
235
+ open_ltv_pct: number;
236
+ close_ltv_pct: number;
237
+ borrow_weight_bps: string | number | bigint;
238
+ deposit_limit: string | number | bigint;
239
+ borrow_limit: string | number | bigint;
240
+ liquidation_bonus_pct: number;
241
+ borrow_fee_bps: string | number | bigint;
242
+ spread_fee_bps: string | number | bigint;
243
+ liquidation_fee_bps: string | number | bigint;
244
+ interest_rate: {
245
+ utils: Iterable<number> & {
246
+ length: number;
247
+ };
248
+ aprs: Iterable<string | number | bigint> & {
249
+ length: number;
250
+ };
251
+ };
252
+ }>;
253
+ export declare const PriceIdentifier: BcsType<{
254
+ bytes: number[];
255
+ }, {
256
+ bytes: Iterable<number> & {
257
+ length: number;
258
+ };
259
+ }>;
260
+ export declare const Reserve: BcsType<{
261
+ config: {
262
+ vec: {
263
+ id: {
264
+ id: {
265
+ bytes: string;
266
+ };
267
+ };
268
+ open_ltv_pct: number;
269
+ close_ltv_pct: number;
270
+ borrow_weight_bps: string | number | bigint;
271
+ deposit_limit: string | number | bigint;
272
+ borrow_limit: string | number | bigint;
273
+ liquidation_bonus_pct: number;
274
+ borrow_fee_bps: string | number | bigint;
275
+ spread_fee_bps: string | number | bigint;
276
+ liquidation_fee_bps: string | number | bigint;
277
+ interest_rate: {
278
+ utils: Iterable<number> & {
279
+ length: number;
280
+ };
281
+ aprs: Iterable<string | number | bigint> & {
282
+ length: number;
283
+ };
284
+ };
285
+ }[];
286
+ };
287
+ mint_decimals: number;
288
+ price_identifier: {
289
+ bytes: number[];
290
+ };
291
+ price: {
292
+ value: string;
293
+ };
294
+ price_last_update_timestamp_s: string;
295
+ available_amount: string;
296
+ ctoken_supply: string;
297
+ borrowed_amount: {
298
+ value: string;
299
+ };
300
+ cumulative_borrow_rate: {
301
+ value: string;
302
+ };
303
+ interest_last_update_timestamp_s: string;
304
+ fees_accumulated: {
305
+ value: string;
306
+ };
307
+ }, {
308
+ config: {
309
+ vec: Iterable<{
310
+ id: {
311
+ id: {
312
+ bytes: string;
313
+ };
314
+ };
315
+ open_ltv_pct: number;
316
+ close_ltv_pct: number;
317
+ borrow_weight_bps: string | number | bigint;
318
+ deposit_limit: string | number | bigint;
319
+ borrow_limit: string | number | bigint;
320
+ liquidation_bonus_pct: number;
321
+ borrow_fee_bps: string | number | bigint;
322
+ spread_fee_bps: string | number | bigint;
323
+ liquidation_fee_bps: string | number | bigint;
324
+ interest_rate: {
325
+ utils: Iterable<number> & {
326
+ length: number;
327
+ };
328
+ aprs: Iterable<string | number | bigint> & {
329
+ length: number;
330
+ };
331
+ };
332
+ }> & {
333
+ length: number;
334
+ };
335
+ };
336
+ mint_decimals: number;
337
+ price_identifier: {
338
+ bytes: Iterable<number> & {
339
+ length: number;
340
+ };
341
+ };
342
+ price: {
343
+ value: string | number | bigint;
344
+ };
345
+ price_last_update_timestamp_s: string | number | bigint;
346
+ available_amount: string | number | bigint;
347
+ ctoken_supply: string | number | bigint;
348
+ borrowed_amount: {
349
+ value: string | number | bigint;
350
+ };
351
+ cumulative_borrow_rate: {
352
+ value: string | number | bigint;
353
+ };
354
+ interest_last_update_timestamp_s: string | number | bigint;
355
+ fees_accumulated: {
356
+ value: string | number | bigint;
357
+ };
358
+ }>;
359
+ export declare const ObjectBag: BcsType<{
360
+ id: {
361
+ id: {
362
+ bytes: string;
363
+ };
364
+ };
365
+ size: string;
366
+ }, {
367
+ id: {
368
+ id: {
369
+ bytes: string;
370
+ };
371
+ };
372
+ size: string | number | bigint;
373
+ }>;
374
+ export declare const LendingMarket: BcsType<{
375
+ id: {
376
+ id: {
377
+ bytes: string;
378
+ };
379
+ };
380
+ reserves: {
381
+ config: {
382
+ vec: {
383
+ id: {
384
+ id: {
385
+ bytes: string;
386
+ };
387
+ };
388
+ open_ltv_pct: number;
389
+ close_ltv_pct: number;
390
+ borrow_weight_bps: string | number | bigint;
391
+ deposit_limit: string | number | bigint;
392
+ borrow_limit: string | number | bigint;
393
+ liquidation_bonus_pct: number;
394
+ borrow_fee_bps: string | number | bigint;
395
+ spread_fee_bps: string | number | bigint;
396
+ liquidation_fee_bps: string | number | bigint;
397
+ interest_rate: {
398
+ utils: Iterable<number> & {
399
+ length: number;
400
+ };
401
+ aprs: Iterable<string | number | bigint> & {
402
+ length: number;
403
+ };
404
+ };
405
+ }[];
406
+ };
407
+ mint_decimals: number;
408
+ price_identifier: {
409
+ bytes: number[];
410
+ };
411
+ price: {
412
+ value: string;
413
+ };
414
+ price_last_update_timestamp_s: string;
415
+ available_amount: string;
416
+ ctoken_supply: string;
417
+ borrowed_amount: {
418
+ value: string;
419
+ };
420
+ cumulative_borrow_rate: {
421
+ value: string;
422
+ };
423
+ interest_last_update_timestamp_s: string;
424
+ fees_accumulated: {
425
+ value: string;
426
+ };
427
+ }[];
428
+ reserve_treasuries: {
429
+ id: {
430
+ id: {
431
+ bytes: string;
432
+ };
433
+ };
434
+ size: string;
435
+ };
436
+ obligations: {
437
+ id: {
438
+ id: {
439
+ bytes: string;
440
+ };
441
+ };
442
+ size: string;
443
+ };
444
+ }, {
445
+ id: {
446
+ id: {
447
+ bytes: string;
448
+ };
449
+ };
450
+ reserves: Iterable<{
451
+ config: {
452
+ vec: Iterable<{
453
+ id: {
454
+ id: {
455
+ bytes: string;
456
+ };
457
+ };
458
+ open_ltv_pct: number;
459
+ close_ltv_pct: number;
460
+ borrow_weight_bps: string | number | bigint;
461
+ deposit_limit: string | number | bigint;
462
+ borrow_limit: string | number | bigint;
463
+ liquidation_bonus_pct: number;
464
+ borrow_fee_bps: string | number | bigint;
465
+ spread_fee_bps: string | number | bigint;
466
+ liquidation_fee_bps: string | number | bigint;
467
+ interest_rate: {
468
+ utils: Iterable<number> & {
469
+ length: number;
470
+ };
471
+ aprs: Iterable<string | number | bigint> & {
472
+ length: number;
473
+ };
474
+ };
475
+ }> & {
476
+ length: number;
477
+ };
478
+ };
479
+ mint_decimals: number;
480
+ price_identifier: {
481
+ bytes: Iterable<number> & {
482
+ length: number;
483
+ };
484
+ };
485
+ price: {
486
+ value: string | number | bigint;
487
+ };
488
+ price_last_update_timestamp_s: string | number | bigint;
489
+ available_amount: string | number | bigint;
490
+ ctoken_supply: string | number | bigint;
491
+ borrowed_amount: {
492
+ value: string | number | bigint;
493
+ };
494
+ cumulative_borrow_rate: {
495
+ value: string | number | bigint;
496
+ };
497
+ interest_last_update_timestamp_s: string | number | bigint;
498
+ fees_accumulated: {
499
+ value: string | number | bigint;
500
+ };
501
+ }> & {
502
+ length: number;
503
+ };
504
+ reserve_treasuries: {
505
+ id: {
506
+ id: {
507
+ bytes: string;
508
+ };
509
+ };
510
+ size: string | number | bigint;
511
+ };
512
+ obligations: {
513
+ id: {
514
+ id: {
515
+ bytes: string;
516
+ };
517
+ };
518
+ size: string | number | bigint;
519
+ };
520
+ }>;
521
+ export declare function load<T>(client: SuiClient, type: BcsType<T>, id: string): Promise<InferBcsType<BcsType<T>>>;
522
+ export declare enum Side {
523
+ DEPOSIT = "deposit",
524
+ BORROW = "borrow"
525
+ }
526
+ export declare enum Action {
527
+ DEPOSIT = "deposit",
528
+ WITHDRAW = "withdraw",
529
+ BORROW = "borrow",
530
+ REPAY = "repay"
531
+ }
532
+ export interface PhantomReified<P> {
533
+ phantomType: P;
534
+ kind: "PhantomReified";
535
+ }
536
+ export interface AddReserveArgs {
537
+ lendingMarketOwnerCap: TransactionObjectInput;
538
+ lendingMarket: TransactionObjectInput;
539
+ priceInfo: TransactionObjectInput;
540
+ config: TransactionObjectInput;
541
+ coinMetadata: TransactionObjectInput;
542
+ clock: TransactionObjectInput;
543
+ }
544
+ export interface CreateReserveConfigArgs {
545
+ openLtvPct: number | TransactionArgument;
546
+ closeLtvPct: number | TransactionArgument;
547
+ maxCloseLtvPct: number | TransactionArgument;
548
+ borrowWeightBps: bigint | TransactionArgument;
549
+ depositLimit: bigint | TransactionArgument;
550
+ borrowLimit: bigint | TransactionArgument;
551
+ liquidationBonusBps: bigint | TransactionArgument;
552
+ maxLiquidationBonusBps: bigint | TransactionArgument;
553
+ depositLimitUsd: bigint | TransactionArgument;
554
+ borrowLimitUsd: bigint | TransactionArgument;
555
+ borrowFeeBps: bigint | TransactionArgument;
556
+ spreadFeeBps: bigint | TransactionArgument;
557
+ protocolLiquidationFeeBps: bigint | TransactionArgument;
558
+ interestRateUtils: Array<number | TransactionArgument> | TransactionArgument;
559
+ interestRateAprs: Array<bigint | TransactionArgument> | TransactionArgument;
560
+ isolated: boolean | TransactionArgument;
561
+ openAttributedBorrowLimitUsd: bigint | TransactionArgument;
562
+ closeAttributedBorrowLimitUsd: bigint | TransactionArgument;
563
+ }
564
+ export interface UpdateReserveConfigArgs {
565
+ lendingMarketOwnerCap: TransactionObjectInput;
566
+ lendingMarket: TransactionObjectInput;
567
+ reserveArrayIndex: bigint | TransactionArgument;
568
+ config: TransactionObjectInput;
569
+ }
570
+ export interface ChangeReservePriceFeedArgs {
571
+ lendingMarketOwnerCap: TransactionObjectInput;
572
+ lendingMarket: TransactionObjectInput;
573
+ reserveArrayIndex: bigint | TransactionArgument;
574
+ priceInfoObj: TransactionObjectInput;
575
+ clock: TransactionObjectInput;
576
+ }
577
+ export interface AddPoolRewardArgs {
578
+ lendingMarketOwnerCap: TransactionObjectInput;
579
+ lendingMarket: TransactionObjectInput;
580
+ reserveArrayIndex: bigint | TransactionArgument;
581
+ isDepositReward: boolean | TransactionArgument;
582
+ rewards: TransactionObjectInput;
583
+ startTimeMs: bigint | TransactionArgument;
584
+ endTimeMs: bigint | TransactionArgument;
585
+ clock: TransactionObjectInput;
586
+ }
587
+ export interface CancelPoolRewardArgs {
588
+ lendingMarketOwnerCap: TransactionObjectInput;
589
+ lendingMarket: TransactionObjectInput;
590
+ reserveArrayIndex: bigint | TransactionArgument;
591
+ isDepositReward: boolean | TransactionArgument;
592
+ rewardIndex: bigint | TransactionArgument;
593
+ clock: TransactionObjectInput;
594
+ }
595
+ export interface ClosePoolRewardArgs {
596
+ lendingMarketOwnerCap: TransactionObjectInput;
597
+ lendingMarket: TransactionObjectInput;
598
+ reserveArrayIndex: bigint | TransactionArgument;
599
+ isDepositReward: boolean | TransactionArgument;
600
+ rewardIndex: bigint | TransactionArgument;
601
+ clock: TransactionObjectInput;
602
+ }
603
+ export interface ClaimRewardsArgs {
604
+ lendingMarket: TransactionObjectInput;
605
+ cap: TransactionObjectInput;
606
+ clock: TransactionObjectInput;
607
+ reserveId: bigint | TransactionArgument;
608
+ rewardIndex: bigint | TransactionArgument;
609
+ isDepositReward: boolean | TransactionArgument;
610
+ }
611
+ export interface ClaimRewardsAndDepositArgs {
612
+ lendingMarket: TransactionObjectInput;
613
+ obligationId: string | TransactionArgument;
614
+ clock: TransactionObjectInput;
615
+ rewardReserveId: bigint | TransactionArgument;
616
+ rewardIndex: bigint | TransactionArgument;
617
+ isDepositReward: boolean | TransactionArgument;
618
+ depositReserveId: bigint | TransactionArgument;
619
+ }
620
+ export interface CreateRateLimiterConfigArgs {
621
+ windowDuration: bigint | TransactionArgument;
622
+ maxOutflow: bigint | TransactionArgument;
623
+ }
624
+ export interface UpdateRateLimiterConfigArgs {
625
+ lendingMarketOwnerCap: TransactionObjectInput;
626
+ lendingMarket: TransactionObjectInput;
627
+ clock: TransactionObjectInput;
628
+ config: TransactionObjectInput;
629
+ }
630
+ export interface RefreshReservePriceArgs {
631
+ lendingMarket: TransactionObjectInput;
632
+ reserveArrayIndex: bigint | TransactionArgument;
633
+ clock: TransactionObjectInput;
634
+ priceInfo: TransactionObjectInput;
635
+ }
636
+ export interface DepositLiquidityAndMintCtokensArgs {
637
+ lendingMarket: TransactionObjectInput;
638
+ reserveArrayIndex: bigint | TransactionArgument;
639
+ clock: TransactionObjectInput;
640
+ deposit: TransactionObjectInput;
641
+ }
642
+ export interface DepositCtokensIntoObligationArgs {
643
+ lendingMarket: TransactionObjectInput;
644
+ reserveArrayIndex: bigint | TransactionArgument;
645
+ obligationOwnerCap: TransactionObjectInput;
646
+ clock: TransactionObjectInput;
647
+ deposit: TransactionObjectInput;
648
+ }
649
+ export interface WithdrawCtokensArgs {
650
+ lendingMarket: TransactionObjectInput;
651
+ reserveArrayIndex: bigint | TransactionArgument;
652
+ obligationOwnerCap: TransactionObjectInput;
653
+ clock: TransactionObjectInput;
654
+ amount: bigint | TransactionArgument;
655
+ }
656
+ export interface BorrowArgs {
657
+ lendingMarket: TransactionObjectInput;
658
+ reserveArrayIndex: bigint | TransactionArgument;
659
+ obligationOwnerCap: TransactionObjectInput;
660
+ clock: TransactionObjectInput;
661
+ amount: bigint | TransactionArgument;
662
+ }
663
+ export interface RepayArgs {
664
+ lendingMarket: TransactionObjectInput;
665
+ reserveArrayIndex: bigint | TransactionArgument;
666
+ obligationId: string | TransactionArgument;
667
+ clock: TransactionObjectInput;
668
+ maxRepayCoins: TransactionObjectInput;
669
+ }
670
+ export interface LiquidateArgs {
671
+ lendingMarket: TransactionObjectInput;
672
+ obligationId: string | TransactionArgument;
673
+ repayReserveArrayIndex: bigint | TransactionArgument;
674
+ withdrawReserveArrayIndex: bigint | TransactionArgument;
675
+ clock: TransactionObjectInput;
676
+ repayCoins: TransactionObjectInput;
677
+ }
678
+ export interface MigrateArgs {
679
+ lendingMarketOwnerCap: TransactionObjectInput;
680
+ lendingMarket: TransactionObjectInput;
681
+ }
682
+ export interface ClaimFeesArgs {
683
+ lendingMarket: TransactionObjectInput;
684
+ reserveArrayIndex: bigint | TransactionArgument;
685
+ }
686
+ export interface RedeemCtokensAndWithdrawLiquidityArgs {
687
+ lendingMarket: TransactionObjectInput;
688
+ reserveArrayIndex: bigint | TransactionArgument;
689
+ clock: TransactionObjectInput;
690
+ ctokens: TransactionObjectInput;
691
+ rateLimiterExemption: TransactionObjectInput | TransactionArgument | null;
692
+ }
693
+ export type ApiInterestUpdateEvent = {
694
+ id: number;
695
+ lendingMarketId: string;
696
+ coinType: string;
697
+ reserveId: string;
698
+ cumulativeBorrowRate: string;
699
+ availableAmount: string;
700
+ borrowedAmount: string;
701
+ unclaimedSpreadFees: string;
702
+ ctokenSupply: string;
703
+ borrowInterestPaid: string;
704
+ spreadFee: string;
705
+ supplyInterestEarned: string;
706
+ borrowInterestPaidUsdEstimate: string;
707
+ protocolFeeUsdEstimate: string;
708
+ supplyInterestEarnedUsdEstimate: string;
709
+ timestamp: number;
710
+ digest: string;
711
+ eventIndex: number;
712
+ sender: string;
713
+ };
714
+ export type ApiReserveAssetDataEvent = {
715
+ id: number;
716
+ lendingMarketId: string;
717
+ coinType: string;
718
+ reserveId: string;
719
+ availableAmount: string;
720
+ supplyAmount: string;
721
+ borrowedAmount: string;
722
+ availableAmountUsdEstimate: string;
723
+ supplyAmountUsdEstimate: string;
724
+ borrowedAmountUsdEstimate: string;
725
+ borrowApr: string;
726
+ supplyApr: string;
727
+ ctokenSupply: string;
728
+ cumulativeBorrowRate: string;
729
+ price: string;
730
+ smoothedPrice: string;
731
+ priceLastUpdateTimestampS: number;
732
+ timestamp: number;
733
+ digest: string;
734
+ eventIndex: number;
735
+ sender: string;
736
+ };
737
+ export type DownsampledApiReserveAssetDataEvent = ApiReserveAssetDataEvent & {
738
+ sampletimestamp: number;
739
+ };
740
+ export type ApiMintEvent = {
741
+ id: number;
742
+ lendingMarketId: string;
743
+ coinType: string;
744
+ reserveId: string;
745
+ liquidityAmount: string;
746
+ ctokenAmount: string;
747
+ timestamp: number;
748
+ digest: string;
749
+ eventIndex: number;
750
+ sender: string;
751
+ };
752
+ export type ApiRedeemEvent = {
753
+ id: number;
754
+ lendingMarketId: string;
755
+ coinType: string;
756
+ reserveId: string;
757
+ ctokenAmount: string;
758
+ liquidityAmount: string;
759
+ timestamp: number;
760
+ digest: string;
761
+ eventIndex: number;
762
+ sender: string;
763
+ };
764
+ export type ApiDepositEvent = {
765
+ id: number;
766
+ lendingMarketId: string;
767
+ coinType: string;
768
+ reserveId: string;
769
+ obligationId: string;
770
+ ctokenAmount: string;
771
+ timestamp: number;
772
+ digest: string;
773
+ eventIndex: number;
774
+ sender: string;
775
+ };
776
+ export type ApiWithdrawEvent = {
777
+ id: number;
778
+ lendingMarketId: string;
779
+ coinType: string;
780
+ reserveId: string;
781
+ obligationId: string;
782
+ ctokenAmount: string;
783
+ timestamp: number;
784
+ digest: string;
785
+ eventIndex: number;
786
+ sender: string;
787
+ };
788
+ export type ApiBorrowEvent = {
789
+ id: number;
790
+ lendingMarketId: string;
791
+ coinType: string;
792
+ reserveId: string;
793
+ obligationId: string;
794
+ liquidityAmount: string;
795
+ originationFeeAmount: string;
796
+ timestamp: number;
797
+ digest: string;
798
+ eventIndex: number;
799
+ sender: string;
800
+ };
801
+ export type ApiRepayEvent = {
802
+ id: number;
803
+ lendingMarketId: string;
804
+ coinType: string;
805
+ reserveId: string;
806
+ obligationId: string;
807
+ liquidityAmount: string;
808
+ timestamp: number;
809
+ digest: string;
810
+ eventIndex: number;
811
+ sender: string;
812
+ };
813
+ export type ApiLiquidateEvent = {
814
+ id: number;
815
+ lendingMarketId: string;
816
+ repayReserveId: string;
817
+ withdrawReserveId: string;
818
+ obligationId: string;
819
+ repayAmount: string;
820
+ withdrawAmount: string;
821
+ protocolFeeAmount: string;
822
+ liquidatorBonusAmount: string;
823
+ timestamp: number;
824
+ digest: string;
825
+ eventIndex: number;
826
+ sender: string;
827
+ };
828
+ export type ApiClaimRewardEvent = {
829
+ id: number;
830
+ lendingMarketId: string;
831
+ reserveId: string;
832
+ obligationId: string;
833
+ isDepositReward: boolean;
834
+ poolRewardId: string;
835
+ coinType: string;
836
+ liquidityAmount: string;
837
+ timestamp: number;
838
+ digest: string;
839
+ eventIndex: number;
840
+ sender: string;
841
+ };
842
+ export type ApiObligationDataEvent = {
843
+ id: number;
844
+ lendingMarketId: string;
845
+ obligationId: string;
846
+ depositedValueUsd: string;
847
+ allowedBorrowValueUsd: string;
848
+ unhealthyBorrowValueUsd: string;
849
+ superUnhealthyBorrowValueUsd: string;
850
+ unweightedBorrowedValueUsd: string;
851
+ weightedBorrowedValueUsd: string;
852
+ weightedBorrowedValueUpperBoundUsd: string;
853
+ borrowingIsolatedAsset: boolean;
854
+ badDebtUsd: string;
855
+ closable: boolean;
856
+ timestamp: number;
857
+ digest: string;
858
+ eventIndex: number;
859
+ sender: string;
860
+ /**
861
+ * {
862
+ * coin_type: TypeName;
863
+ * reserve_array_index: u64;
864
+ * deposited_ctoken_amount: u64;
865
+ * market_value: Decimal;
866
+ * user_reward_manager_index: u64;
867
+ * attributed_borrow_value: Decimal;
868
+ * }[]
869
+ */
870
+ depositsJson: string;
871
+ /**
872
+ * {
873
+ * coin_type: TypeName;
874
+ * reserve_array_index: u64;
875
+ * borrowed_amount: Decimal;
876
+ * cumulative_borrow_rate: Decimal;
877
+ * market_value: Decimal;
878
+ * user_reward_manager_index: u64;
879
+ * }[]
880
+ */
881
+ borrowsJson: string;
882
+ };