@scallop-io/sui-scallop-sdk 1.3.4-alpha.6 → 1.3.4-isolated-asset.2

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 (99) hide show
  1. package/dist/builders/borrowIncentiveBuilder.d.ts +12 -0
  2. package/dist/builders/coreBuilder.d.ts +12 -0
  3. package/dist/builders/index.d.ts +12 -0
  4. package/dist/builders/loyaltyProgramBuilder.d.ts +12 -0
  5. package/dist/builders/oracle.d.ts +14 -0
  6. package/dist/builders/referralBuilder.d.ts +12 -0
  7. package/dist/builders/sCoinBuilder.d.ts +4 -0
  8. package/dist/builders/spoolBuilder.d.ts +12 -0
  9. package/dist/builders/vescaBuilder.d.ts +25 -0
  10. package/dist/constants/cache.d.ts +14 -0
  11. package/dist/constants/coinGecko.d.ts +2 -0
  12. package/dist/constants/common.d.ts +20 -0
  13. package/dist/constants/enum.d.ts +14 -0
  14. package/dist/constants/flashloan.d.ts +2 -0
  15. package/dist/constants/index.d.ts +13 -0
  16. package/dist/constants/poolAddress.d.ts +5 -0
  17. package/dist/constants/pyth.d.ts +5 -0
  18. package/dist/constants/queryKeys.d.ts +56 -0
  19. package/dist/constants/rpc.d.ts +1 -0
  20. package/dist/constants/testAddress.d.ts +2 -0
  21. package/dist/constants/tokenBucket.d.ts +2 -0
  22. package/dist/constants/vesca.d.ts +5 -0
  23. package/dist/index.d.ts +3 -0
  24. package/dist/index.js +438 -331
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.mjs +438 -331
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/models/index.d.ts +8 -0
  29. package/dist/models/scallop.d.ts +74 -0
  30. package/dist/models/scallopAddress.d.ts +150 -0
  31. package/dist/models/scallopBuilder.d.ts +89 -0
  32. package/dist/models/scallopCache.d.ts +74 -0
  33. package/dist/models/scallopClient.d.ts +321 -0
  34. package/dist/models/scallopIndexer.d.ts +89 -0
  35. package/dist/models/scallopQuery.d.ts +497 -0
  36. package/dist/models/scallopUtils.d.ts +227 -0
  37. package/dist/models/suiKit.d.ts +2 -0
  38. package/dist/queries/borrowIncentiveQuery.d.ts +61 -0
  39. package/dist/queries/borrowLimitQuery.d.ts +9 -0
  40. package/dist/queries/coreQuery.d.ts +169 -0
  41. package/dist/queries/index.d.ts +12 -0
  42. package/dist/queries/isolatedAssetQuery.d.ts +14 -0
  43. package/dist/queries/loyaltyProgramQuery.d.ts +10 -0
  44. package/dist/queries/portfolioQuery.d.ts +75 -0
  45. package/dist/queries/priceQuery.d.ts +16 -0
  46. package/dist/queries/referralQuery.d.ts +7 -0
  47. package/dist/queries/sCoinQuery.d.ts +41 -0
  48. package/dist/queries/spoolQuery.d.ts +70 -0
  49. package/dist/queries/supplyLimitQuery.d.ts +9 -0
  50. package/dist/queries/vescaQuery.d.ts +36 -0
  51. package/dist/types/address.d.ts +107 -0
  52. package/dist/types/builder/borrowIncentive.d.ts +35 -0
  53. package/dist/types/builder/core.d.ts +56 -0
  54. package/dist/types/builder/index.d.ts +24 -0
  55. package/dist/types/builder/loyaltyProgram.d.ts +23 -0
  56. package/dist/types/builder/referral.d.ts +30 -0
  57. package/dist/types/builder/sCoin.d.ts +37 -0
  58. package/dist/types/builder/spool.d.ts +29 -0
  59. package/dist/types/builder/vesca.d.ts +51 -0
  60. package/dist/types/constant/common.d.ts +24 -0
  61. package/dist/types/constant/enum.d.ts +48 -0
  62. package/dist/types/constant/index.d.ts +2 -0
  63. package/dist/types/index.d.ts +6 -0
  64. package/dist/types/model.d.ts +54 -0
  65. package/dist/types/query/borrowIncentive.d.ts +124 -0
  66. package/dist/types/query/core.d.ts +363 -0
  67. package/dist/types/query/index.d.ts +7 -0
  68. package/dist/types/query/loyaltyProgram.d.ts +5 -0
  69. package/dist/types/query/portfolio.d.ts +115 -0
  70. package/dist/types/query/sCoin.d.ts +1 -0
  71. package/dist/types/query/spool.d.ts +122 -0
  72. package/dist/types/query/vesca.d.ts +26 -0
  73. package/dist/types/utils.d.ts +21 -0
  74. package/dist/utils/builder.d.ts +15 -0
  75. package/dist/utils/index.d.ts +5 -0
  76. package/dist/utils/indexer.d.ts +17 -0
  77. package/dist/utils/query.d.ts +62 -0
  78. package/dist/utils/tokenBucket.d.ts +11 -0
  79. package/dist/utils/util.d.ts +26 -0
  80. package/package.json +2 -2
  81. package/src/constants/coinGecko.ts +4 -2
  82. package/src/constants/common.ts +2 -0
  83. package/src/constants/enum.ts +25 -4
  84. package/src/constants/index.ts +1 -0
  85. package/src/constants/poolAddress.ts +7 -1
  86. package/src/constants/pyth.ts +2 -0
  87. package/src/constants/testAddress.ts +76 -35
  88. package/src/models/scallopBuilder.ts +2 -3
  89. package/src/models/scallopQuery.ts +26 -18
  90. package/src/models/scallopUtils.ts +5 -6
  91. package/src/queries/borrowLimitQuery.ts +53 -0
  92. package/src/queries/coreQuery.ts +238 -229
  93. package/src/queries/index.ts +1 -0
  94. package/src/queries/isolatedAssetQuery.ts +5 -5
  95. package/src/queries/referralQuery.ts +0 -1
  96. package/src/queries/spoolQuery.ts +1 -1
  97. package/src/queries/supplyLimitQuery.ts +23 -18
  98. package/src/types/query/core.ts +2 -0
  99. package/src/types/utils.ts +1 -1
@@ -0,0 +1,497 @@
1
+ import { SuiKit } from '@scallop-io/sui-kit';
2
+ import { ScallopQueryParams, SupportStakeMarketCoins, SupportAssetCoins, SupportPoolCoins, SupportCollateralCoins, SupportMarketCoins, SupportBorrowIncentiveCoins, SupportSCoin, ScallopQueryInstanceParams, MarketPool, CoinPrices, MarketPools } from '../types';
3
+ import { ScallopAddress } from './scallopAddress';
4
+ import { ScallopUtils } from './scallopUtils';
5
+ import { ScallopIndexer } from './scallopIndexer';
6
+ import { ScallopCache } from './scallopCache';
7
+ import { SuiObjectData } from '@mysten/sui/client';
8
+ /**
9
+ * @description
10
+ * It provides methods for getting on-chain data from the Scallop contract.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const scallopQuery = new ScallopQuery(<parameters>);
15
+ * await scallopQuery.init();
16
+ * scallopQuery.<query functions>();
17
+ * await scallopQuery.<query functions>();
18
+ * ```
19
+ */
20
+ export declare class ScallopQuery {
21
+ readonly params: ScallopQueryParams;
22
+ suiKit: SuiKit;
23
+ address: ScallopAddress;
24
+ utils: ScallopUtils;
25
+ indexer: ScallopIndexer;
26
+ cache: ScallopCache;
27
+ walletAddress: string;
28
+ constructor(params: ScallopQueryParams, instance?: ScallopQueryInstanceParams);
29
+ /**
30
+ * Request the scallop API to initialize data.
31
+ *
32
+ * @param force - Whether to force initialization.
33
+ * @param address - ScallopAddress instance.
34
+ */
35
+ init(force?: boolean, address?: ScallopAddress): Promise<void>;
36
+ /**
37
+ * Query market data.
38
+ * @param indexer - Whether to use indexer.
39
+ * @return Market data.
40
+ */
41
+ queryMarket(indexer?: boolean, args?: {
42
+ coinPrices: CoinPrices;
43
+ }): Promise<import("../types").Market>;
44
+ /**
45
+ * Get market pools.
46
+ *
47
+ * @description
48
+ * To obtain all market pools at once, it is recommended to use
49
+ * the `queryMarket` method to reduce time consumption.
50
+ *
51
+ * @param poolCoinNames - Specific an array of support pool coin name.
52
+ * @param indexer - Whether to use indexer.
53
+ * @return Market pools data.
54
+ */
55
+ getMarketPools(poolCoinNames?: SupportPoolCoins[], indexer?: boolean, args?: {
56
+ coinPrices?: CoinPrices;
57
+ }): Promise<{
58
+ usdc?: MarketPool | undefined;
59
+ sbeth?: MarketPool | undefined;
60
+ weth?: MarketPool | undefined;
61
+ wbtc?: MarketPool | undefined;
62
+ wusdc?: MarketPool | undefined;
63
+ wusdt?: MarketPool | undefined;
64
+ sui?: MarketPool | undefined;
65
+ wapt?: MarketPool | undefined;
66
+ wsol?: MarketPool | undefined;
67
+ cetus?: MarketPool | undefined;
68
+ afsui?: MarketPool | undefined;
69
+ hasui?: MarketPool | undefined;
70
+ vsui?: MarketPool | undefined;
71
+ sca?: MarketPool | undefined;
72
+ fud?: MarketPool | undefined;
73
+ deep?: MarketPool | undefined;
74
+ }>;
75
+ /**
76
+ * Get market pool
77
+ *
78
+ * @param poolCoinName - Specific support pool coin name.
79
+ * @param indexer - Whether to use indexer.
80
+ * @return Market pool data.
81
+ */
82
+ getMarketPool(poolCoinName: SupportPoolCoins, indexer?: boolean, args?: {
83
+ marketObject?: SuiObjectData | null;
84
+ coinPrice?: number;
85
+ }): Promise<MarketPool | undefined>;
86
+ /**
87
+ * Get market collaterals.
88
+ *
89
+ * @description
90
+ * To obtain all market collaterals at once, it is recommended to use
91
+ * the `queryMarket` method to reduce time consumption.
92
+ *
93
+ * @param collateralCoinNames - Specific an array of support collateral coin name.
94
+ * @param indexer - Whether to use indexer.
95
+ * @return Market collaterals data.
96
+ */
97
+ getMarketCollaterals(collateralCoinNames?: SupportCollateralCoins[], indexer?: boolean): Promise<{
98
+ usdc?: import("../types").MarketCollateral | undefined;
99
+ sbeth?: import("../types").MarketCollateral | undefined;
100
+ weth?: import("../types").MarketCollateral | undefined;
101
+ wbtc?: import("../types").MarketCollateral | undefined;
102
+ wusdc?: import("../types").MarketCollateral | undefined;
103
+ wusdt?: import("../types").MarketCollateral | undefined;
104
+ sui?: import("../types").MarketCollateral | undefined;
105
+ wapt?: import("../types").MarketCollateral | undefined;
106
+ wsol?: import("../types").MarketCollateral | undefined;
107
+ cetus?: import("../types").MarketCollateral | undefined;
108
+ afsui?: import("../types").MarketCollateral | undefined;
109
+ hasui?: import("../types").MarketCollateral | undefined;
110
+ vsui?: import("../types").MarketCollateral | undefined;
111
+ sca?: import("../types").MarketCollateral | undefined;
112
+ }>;
113
+ /**
114
+ * Get market collateral
115
+ *
116
+ * @param collateralCoinName - Specific support collateral coin name.
117
+ * @param indexer - Whether to use indexer.
118
+ * @return Market collateral data.
119
+ */
120
+ getMarketCollateral(collateralCoinName: SupportCollateralCoins, indexer?: boolean): Promise<import("../types").MarketCollateral | undefined>;
121
+ /**
122
+ * Get obligations data.
123
+ *
124
+ * @param ownerAddress - The owner address.
125
+ * @return Obligations data.
126
+ */
127
+ getObligations(ownerAddress?: string): Promise<import("../types").Obligation[]>;
128
+ /**
129
+ * Query obligation data.
130
+ *
131
+ * @param obligationId - The obligation id.
132
+ * @return Obligation data.
133
+ */
134
+ queryObligation(obligationId: string): Promise<import("../types").ObligationQueryInterface | undefined>;
135
+ /**
136
+ * Get all asset coin amounts.
137
+ *
138
+ * @param assetCoinNames - Specific an array of support asset coin name.
139
+ * @param ownerAddress - The owner address.
140
+ * @return All coin amounts.
141
+ */
142
+ getCoinAmounts(assetCoinNames?: SupportAssetCoins[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<SupportAssetCoins, number>>>;
143
+ /**
144
+ * Get asset coin amount.
145
+ *
146
+ * @param assetCoinName - Specific support asset coin name.
147
+ * @param ownerAddress - The owner address.
148
+ * @return Coin amount.
149
+ */
150
+ getCoinAmount(assetCoinName: SupportAssetCoins, ownerAddress?: string): Promise<number>;
151
+ /**
152
+ * Get all market coin amounts.
153
+ *
154
+ * @param coinNames - Specific an array of support market coin name.
155
+ * @param ownerAddress - The owner address.
156
+ * @return All market market coin amounts.
157
+ */
158
+ getMarketCoinAmounts(marketCoinNames?: SupportMarketCoins[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<SupportMarketCoins, number>>>;
159
+ /**
160
+ * Get market coin amount.
161
+ *
162
+ * @param coinNames - Specific support market coin name.
163
+ * @param ownerAddress - The owner address.
164
+ * @return Market market coin amount.
165
+ */
166
+ getMarketCoinAmount(marketCoinName: SupportMarketCoins, ownerAddress?: string): Promise<number>;
167
+ /**
168
+ * Get price from pyth fee object.
169
+ *
170
+ * @param assetCoinName - Specific support asset coin name.
171
+ * @return Asset coin price.
172
+ */
173
+ getPriceFromPyth(assetCoinName: SupportAssetCoins): Promise<number>;
174
+ /**
175
+ * Get prices from pyth fee object.
176
+ *
177
+ * @param assetCoinNames - Array of supported asset coin names.
178
+ * @return Array of asset coin prices.
179
+ */
180
+ getPricesFromPyth(assetCoinNames: SupportAssetCoins[]): Promise<Record<SupportAssetCoins, number>>;
181
+ /**
182
+ * Get spools data.
183
+ *
184
+ * @param stakeMarketCoinNames - Specific an array of support stake market coin name.
185
+ * @param indexer - Whether to use indexer.
186
+ * @return Spools data.
187
+ */
188
+ getSpools(stakeMarketCoinNames?: SupportStakeMarketCoins[], indexer?: boolean, args?: {
189
+ marketPools?: MarketPools;
190
+ coinPrices?: CoinPrices;
191
+ }): Promise<{
192
+ susdc?: import("../types").Spool | undefined;
193
+ sweth?: import("../types").Spool | undefined;
194
+ swusdc?: import("../types").Spool | undefined;
195
+ swusdt?: import("../types").Spool | undefined;
196
+ ssui?: import("../types").Spool | undefined;
197
+ scetus?: import("../types").Spool | undefined;
198
+ safsui?: import("../types").Spool | undefined;
199
+ shasui?: import("../types").Spool | undefined;
200
+ svsui?: import("../types").Spool | undefined;
201
+ }>;
202
+ /**
203
+ * Get spool data.
204
+ *
205
+ * @param stakeMarketCoinName - Specific support stake market coin name.
206
+ * @param indexer - Whether to use indexer.
207
+ * @return Spool data.
208
+ */
209
+ getSpool(stakeMarketCoinName: SupportStakeMarketCoins, indexer?: boolean, args?: {
210
+ marketPool?: MarketPool;
211
+ coinPrices?: CoinPrices;
212
+ }): Promise<import("../types").Spool | undefined>;
213
+ /**
214
+ * Get stake accounts data for all stake pools (spools).
215
+ *
216
+ * @param ownerAddress - The owner address.
217
+ * @return All Stake accounts data.
218
+ */
219
+ getAllStakeAccounts(ownerAddress?: string): Promise<import("../types").StakeAccounts>;
220
+ /**
221
+ * Get stake accounts data for specific stake pool (spool).
222
+ *
223
+ * @param stakeMarketCoinName - Specific support stake market coin name.
224
+ * @param ownerAddress - The owner address.
225
+ * @return Stake accounts data.
226
+ */
227
+ getStakeAccounts(stakeMarketCoinName: SupportStakeMarketCoins, ownerAddress?: string): Promise<import("../types").StakeAccount[]>;
228
+ /**
229
+ * Get stake pools (spools) data.
230
+ *
231
+ * @description
232
+ * For backward compatible, it is recommended to use `getSpools` method
233
+ * to get all spools data.
234
+ *
235
+ * @param stakeMarketCoinNames - Specific an array of support stake market coin name.
236
+ * @return Stake pools data.
237
+ */
238
+ getStakePools(stakeMarketCoinNames?: SupportStakeMarketCoins[]): Promise<{
239
+ susdc?: import("../types").StakePool | undefined;
240
+ sweth?: import("../types").StakePool | undefined;
241
+ swusdc?: import("../types").StakePool | undefined;
242
+ swusdt?: import("../types").StakePool | undefined;
243
+ ssui?: import("../types").StakePool | undefined;
244
+ scetus?: import("../types").StakePool | undefined;
245
+ safsui?: import("../types").StakePool | undefined;
246
+ shasui?: import("../types").StakePool | undefined;
247
+ svsui?: import("../types").StakePool | undefined;
248
+ }>;
249
+ /**
250
+ * Get stake pool (spool) data.
251
+ *
252
+ * @description
253
+ * For backward compatible, it is recommended to use `getSpool` method
254
+ * to get all spool data.
255
+ *
256
+ * @param stakeMarketCoinName - Specific support stake market coin name.
257
+ * @return Stake pool data.
258
+ */
259
+ getStakePool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("../types").StakePool | undefined>;
260
+ /**
261
+ * Get stake reward pools data.
262
+ *
263
+ * @description
264
+ * For backward compatible, it is recommended to use `getSpools` method
265
+ * to get all spools data.
266
+ *
267
+ * @param stakeMarketCoinNames - Specific an array of stake market coin name.
268
+ * @return Stake reward pools data.
269
+ */
270
+ getStakeRewardPools(stakeMarketCoinNames?: SupportStakeMarketCoins[]): Promise<{
271
+ susdc?: import("../types").StakeRewardPool | undefined;
272
+ sweth?: import("../types").StakeRewardPool | undefined;
273
+ swusdc?: import("../types").StakeRewardPool | undefined;
274
+ swusdt?: import("../types").StakeRewardPool | undefined;
275
+ ssui?: import("../types").StakeRewardPool | undefined;
276
+ scetus?: import("../types").StakeRewardPool | undefined;
277
+ safsui?: import("../types").StakeRewardPool | undefined;
278
+ shasui?: import("../types").StakeRewardPool | undefined;
279
+ svsui?: import("../types").StakeRewardPool | undefined;
280
+ }>;
281
+ /**
282
+ * Get stake reward pool data.
283
+ *
284
+ * @description
285
+ * For backward compatible, it is recommended to use `getSpool` method
286
+ * to get spool data.
287
+ *
288
+ * @param marketCoinName - Specific support stake market coin name.
289
+ * @return Stake reward pool data.
290
+ */
291
+ getStakeRewardPool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<import("../types").StakeRewardPool | undefined>;
292
+ /**
293
+ * Get borrow incentive pools data.
294
+ *
295
+ * @param coinNames - Specific an array of support borrow incentive coin name.
296
+ * @param indexer - Whether to use indexer.
297
+ * @return Borrow incentive pools data.
298
+ */
299
+ getBorrowIncentivePools(coinNames?: SupportBorrowIncentiveCoins[], indexer?: boolean, args?: {
300
+ coinPrices: CoinPrices;
301
+ }): Promise<{
302
+ usdc?: import("../types").BorrowIncentivePool | undefined;
303
+ sbeth?: import("../types").BorrowIncentivePool | undefined;
304
+ weth?: import("../types").BorrowIncentivePool | undefined;
305
+ wusdc?: import("../types").BorrowIncentivePool | undefined;
306
+ wusdt?: import("../types").BorrowIncentivePool | undefined;
307
+ sui?: import("../types").BorrowIncentivePool | undefined;
308
+ afsui?: import("../types").BorrowIncentivePool | undefined;
309
+ hasui?: import("../types").BorrowIncentivePool | undefined;
310
+ vsui?: import("../types").BorrowIncentivePool | undefined;
311
+ sca?: import("../types").BorrowIncentivePool | undefined;
312
+ }>;
313
+ /**
314
+ * Get borrow incentive accounts data.
315
+ *
316
+ * @param coinNames - Specific support borrow incentive coin name.
317
+ * @param ownerAddress - The owner address.
318
+ * @return Borrow incentive accounts data.
319
+ */
320
+ getBorrowIncentiveAccounts(obligationId: string, coinNames?: SupportBorrowIncentiveCoins[]): Promise<{
321
+ usdc?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
322
+ sbeth?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
323
+ weth?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
324
+ wusdc?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
325
+ wusdt?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
326
+ sui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
327
+ afsui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
328
+ hasui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
329
+ vsui?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
330
+ sca?: import("../types").ParsedBorrowIncentiveAccountData | undefined;
331
+ }>;
332
+ /**
333
+ * Get user lending and spool infomation for specific pools.
334
+ *
335
+ * @param poolCoinNames - Specific an array of support pool coin name.
336
+ * @param ownerAddress - The owner address.
337
+ * @param indexer - Whether to use indexer.
338
+ * @return All lending and spool infomation.
339
+ */
340
+ getLendings(poolCoinNames?: SupportPoolCoins[], ownerAddress?: string, indexer?: boolean): Promise<{
341
+ usdc?: import("../types").Lending | undefined;
342
+ sbeth?: import("../types").Lending | undefined;
343
+ weth?: import("../types").Lending | undefined;
344
+ wbtc?: import("../types").Lending | undefined;
345
+ wusdc?: import("../types").Lending | undefined;
346
+ wusdt?: import("../types").Lending | undefined;
347
+ sui?: import("../types").Lending | undefined;
348
+ wapt?: import("../types").Lending | undefined;
349
+ wsol?: import("../types").Lending | undefined;
350
+ cetus?: import("../types").Lending | undefined;
351
+ afsui?: import("../types").Lending | undefined;
352
+ hasui?: import("../types").Lending | undefined;
353
+ vsui?: import("../types").Lending | undefined;
354
+ sca?: import("../types").Lending | undefined;
355
+ fud?: import("../types").Lending | undefined;
356
+ deep?: import("../types").Lending | undefined;
357
+ }>;
358
+ /**
359
+ * Get user lending and spool information for specific pool.
360
+ *
361
+ * @param poolCoinName - Specific support pool coin name.
362
+ * @param ownerAddress - The owner address.
363
+ * @param indexer - Whether to use indexer.
364
+ * @return Lending pool data.
365
+ */
366
+ getLending(poolCoinName: SupportPoolCoins, ownerAddress?: string, indexer?: boolean): Promise<import("../types").Lending>;
367
+ /**
368
+ * Get user all obligation accounts information.
369
+ *
370
+ * @description
371
+ * All collateral and borrowing information in all obligation accounts owned by the user.
372
+ *
373
+ * @param ownerAddress - The owner address.
374
+ * @param indexer - Whether to use indexer.
375
+ * @return All obligation accounts information.
376
+ */
377
+ getObligationAccounts(ownerAddress?: string, indexer?: boolean): Promise<{
378
+ [x: string]: import("../types").ObligationAccount | undefined;
379
+ }>;
380
+ /**
381
+ * Get obligation account information for specific id.
382
+ *
383
+ * @description
384
+ * borrowing and obligation information for specific pool.
385
+ *
386
+ * @param obligationId - The obligation id.
387
+ * @param ownerAddress - The owner address.
388
+ * @param indexer - Whether to use indexer.
389
+ * @return Borrowing and collateral information.
390
+ */
391
+ getObligationAccount(obligationId: string, ownerAddress?: string, indexer?: boolean): Promise<import("../types").ObligationAccount>;
392
+ /**
393
+ * Get total value locked.
394
+ *
395
+ * @param indexer - Whether to use indexer.
396
+ * @description
397
+ * Include total supplied value and total borrowed value.
398
+ *
399
+ * @return Total value locked.
400
+ */
401
+ getTvl(indexer?: boolean): Promise<import("../types").TotalValueLocked>;
402
+ /**
403
+ * Get veSca data.
404
+ * @param veScaKey
405
+ * @returns veSca
406
+ */
407
+ getVeSca(veScaKey: string | SuiObjectData): Promise<import("../types").Vesca | undefined>;
408
+ /**
409
+ * Get all veSca from walletAdddress
410
+ * @param walletAddress
411
+ * @returns array of veSca
412
+ */
413
+ getVeScas({ walletAddress, excludeEmpty, }?: {
414
+ walletAddress?: string;
415
+ excludeEmpty?: boolean;
416
+ }): Promise<import("../types").Vesca[]>;
417
+ /**
418
+ * Get total vesca treasury with movecall
419
+ * @returns Promise<string | undefined>
420
+ */
421
+ getVeScaTreasuryInfo(): Promise<import("../types").VeScaTreasuryInfo | null>;
422
+ /**
423
+ * Return binded referrer veScaKeyId of referee walletAddress if exist
424
+ * @param walletAddress
425
+ * @returns veScaKeyId
426
+ */
427
+ getVeScaKeyIdFromReferralBindings(walletAddress?: string): Promise<string | null>;
428
+ /**
429
+ * Get binded obligationId from a veScaKey if it exists.
430
+ * @param veScaKey
431
+ * @returns obligationId
432
+ */
433
+ getBindedObligationId(veScaKey: string): Promise<string | null>;
434
+ /**
435
+ * Get binded veSCA key from a obligationId if it exists.
436
+ * @param obligationId
437
+ * @returns veScaKey
438
+ */
439
+ getBindedVeScaKey(obligationId: string): Promise<string | null>;
440
+ /**
441
+ * Get user's veSCA loyalty program informations
442
+ * @param walletAddress
443
+ * @returns Loyalty program information
444
+ */
445
+ getLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<import("../types").LoyaltyProgramInfo | null>;
446
+ /**
447
+ * Get total supply of sCoin
448
+ * @param sCoinName - Supported sCoin name
449
+ * @returns Total Supply
450
+ */
451
+ getSCoinTotalSupply(sCoinName: SupportSCoin): Promise<number>;
452
+ /**
453
+ * Get all sCoin amounts.
454
+ *
455
+ * @param sCoinNames - Specific an array of support sCoin name.
456
+ * @param ownerAddress - The owner address.
457
+ * @return All market sCoin amounts.
458
+ */
459
+ getSCoinAmounts(sCoinNames?: SupportSCoin[], ownerAddress?: string): Promise<import("../types").OptionalKeys<Record<"susdc" | "ssbeth" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca", number>>>;
460
+ /**
461
+ * Get sCoin amount.
462
+ *
463
+ * @param coinNames - Specific support sCoin name.
464
+ * @param ownerAddress - The owner address.
465
+ * @return sCoin amount.
466
+ */
467
+ getSCoinAmount(sCoinName: SupportSCoin | SupportMarketCoins, ownerAddress?: string): Promise<number>;
468
+ /**
469
+ * Get swap rate from sCoin A to sCoin B
470
+ * @param assetCoinNames
471
+ * @returns
472
+ */
473
+ getSCoinSwapRate(fromSCoin: SupportSCoin, toSCoin: SupportSCoin): Promise<number>;
474
+ getFlashLoanFees(assetCoinNames?: SupportAssetCoins[]): Promise<Record<"usdc" | "sbeth" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep", number>>;
475
+ /**
476
+ * Get supply limit of lending pool
477
+ */
478
+ getPoolSupplyLimit(poolName: SupportPoolCoins): Promise<string | null>;
479
+ /**
480
+ * Get borrow limit of borrow pool
481
+ */
482
+ getPoolBorrowLimit(poolName: SupportPoolCoins): Promise<string | null>;
483
+ /**
484
+ * Get list of isolated assets
485
+ */
486
+ getIsolatedAssets(): Promise<string[]>;
487
+ /**
488
+ * Check if asset is an isolated asset
489
+ */
490
+ isIsolatedAsset(assetCoinName: SupportAssetCoins): Promise<boolean>;
491
+ /**
492
+ * Get pool coin price from indexer
493
+ * @param coinName
494
+ * @returns price data
495
+ */
496
+ getCoinPriceByIndexer(poolName: SupportPoolCoins): Promise<number>;
497
+ }