@scallop-io/sui-scallop-sdk 2.2.3-pyth-sponsored-transaction-alpha.1 → 2.3.0-lst-x-oracle-alpha.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 (74) hide show
  1. package/dist/address-CW2IpaLn.d.ts +165 -0
  2. package/dist/chunk-E3URAUAC.js +25 -0
  3. package/dist/chunk-YA77R5GT.mjs +5 -0
  4. package/dist/constants/index.d.mts +262 -0
  5. package/dist/constants/index.d.ts +262 -0
  6. package/dist/constants/index.js +86 -0
  7. package/dist/constants/index.mjs +5 -0
  8. package/dist/index.d.mts +11 -3242
  9. package/dist/index.d.ts +11 -3242
  10. package/dist/index.js +0 -47
  11. package/dist/index.mjs +0 -14
  12. package/dist/models/index.d.mts +393 -0
  13. package/dist/models/index.d.ts +393 -0
  14. package/dist/models/index.js +34 -0
  15. package/dist/models/index.mjs +16 -0
  16. package/dist/queryKeys-AaZqDYle.d.ts +43 -0
  17. package/dist/scallopUtils-BZLZd2z8.d.ts +2404 -0
  18. package/dist/types/index.d.mts +9 -0
  19. package/dist/types/index.d.ts +9 -0
  20. package/dist/types/index.js +2 -0
  21. package/dist/types/index.mjs +1 -0
  22. package/package.json +31 -4
  23. package/src/builders/borrowIncentiveBuilder.ts +2 -2
  24. package/src/builders/coreBuilder.ts +5 -14
  25. package/src/builders/index.ts +2 -2
  26. package/src/builders/oracles/error.ts +29 -0
  27. package/src/builders/oracles/index.ts +114 -365
  28. package/src/builders/oracles/oraclePackageRegistry.ts +323 -0
  29. package/src/builders/oracles/priceFeedUpdater.ts +112 -0
  30. package/src/builders/oracles/priceUpdateRequester.ts +50 -0
  31. package/src/builders/oracles/xOracleUpdateStrategy.ts +178 -0
  32. package/src/builders/oracles/xOracleUpdater.ts +160 -0
  33. package/src/builders/vescaBuilder.ts +2 -2
  34. package/src/constants/api.ts +2 -0
  35. package/src/constants/common.ts +0 -3
  36. package/src/constants/index.ts +2 -1
  37. package/src/constants/package.ts +14 -0
  38. package/src/constants/testAddress.ts +190 -105
  39. package/src/constants/xoracle.ts +8 -2
  40. package/src/index.ts +2 -12
  41. package/src/models/index.ts +2 -1
  42. package/src/models/interface.ts +6 -6
  43. package/src/models/scallopAddress.ts +24 -4
  44. package/src/models/scallopBuilder.ts +4 -4
  45. package/src/models/scallopClient.ts +1 -1
  46. package/src/models/scallopConstants.ts +2 -2
  47. package/src/models/scallopIndexer.ts +3 -2
  48. package/src/models/scallopQuery.ts +52 -36
  49. package/src/models/scallopQueryClient.ts +1 -1
  50. package/src/models/scallopSuiKit.ts +1 -1
  51. package/src/models/scallopUtils.ts +5 -8
  52. package/src/queries/borrowIncentiveQuery.ts +2 -3
  53. package/src/queries/coreQuery.ts +2 -3
  54. package/src/queries/index.ts +4 -3
  55. package/src/queries/loyaltyProgramQuery.ts +1 -1
  56. package/src/queries/portfolioQuery.ts +13 -13
  57. package/src/queries/sCoinQuery.ts +2 -2
  58. package/src/queries/spoolQuery.ts +8 -8
  59. package/src/queries/vescaQuery.ts +2 -2
  60. package/src/queries/xOracleQuery.ts +20 -3
  61. package/src/types/address.ts +85 -47
  62. package/src/types/builder/core.ts +2 -4
  63. package/src/types/constant/index.ts +2 -1
  64. package/src/types/constant/package.ts +3 -0
  65. package/src/types/constant/xOracle.ts +10 -7
  66. package/src/types/query/index.ts +0 -1
  67. package/src/utils/builder.ts +1 -1
  68. package/src/utils/index.ts +2 -2
  69. package/src/utils/query.ts +6 -6
  70. package/src/utils/util.ts +1 -1
  71. package/src/builders/oracles/pyth.ts +0 -52
  72. package/src/queries/ownerQuery.ts +0 -32
  73. package/src/types/constant/enum.ts +0 -64
  74. package/src/types/query/sCoin.ts +0 -1
package/dist/index.d.mts CHANGED
@@ -1,3242 +1,11 @@
1
- import * as _mysten_sui_dist_cjs_client from '@mysten/sui/dist/cjs/client';
2
- import { SuiObjectDataOptions, GetOwnedObjectsParams, GetDynamicFieldsParams, GetDynamicFieldObjectParams, SuiObjectData, SuiObjectRef } from '@mysten/sui/dist/cjs/client';
3
- import * as _scallop_io_sui_kit from '@scallop-io/sui-kit';
4
- import { SuiObjectArg, SuiTxArg, NetworkType, SuiKit, Transaction, SuiTxBlock, DerivePathParams, SuiKitParams, SuiVecTxArg, SuiAmountsArg, SuiAddressArg, TransactionResult as TransactionResult$1 } from '@scallop-io/sui-kit';
5
- import * as _tanstack_query_core from '@tanstack/query-core';
6
- import { QueryClient, QueryClientConfig, QueryKey } from '@tanstack/query-core';
7
- import { AxiosInstance, AxiosResponse, AxiosRequestConfig } from 'axios';
8
- import { SuiObjectDataOptions as SuiObjectDataOptions$1, SuiObjectResponse, SuiObjectData as SuiObjectData$1, GetOwnedObjectsParams as GetOwnedObjectsParams$1, GetDynamicFieldsParams as GetDynamicFieldsParams$1, DynamicFieldPage, GetDynamicFieldObjectParams as GetDynamicFieldObjectParams$1, CoinBalance, GetBalanceParams, DevInspectResults, SuiTransactionBlockResponse, SuiObjectRef as SuiObjectRef$1 } from '@mysten/sui/client';
9
- import { Transaction as Transaction$1, TransactionObjectArgument, TransactionResult, Argument } from '@mysten/sui/transactions';
10
-
11
- /**
12
- * Default cache options for the QueryClient.
13
- * @type {QueryClientConfig}
14
- * @description Default cache options for the QueryClient
15
- * We set the default to 5s to prevent duplicate requests from being requested (e.g. query MarketObject, etc.)
16
- */
17
- declare const DEFAULT_CACHE_OPTIONS: {
18
- defaultOptions: {
19
- queries: {
20
- staleTime: number;
21
- gcTime: number;
22
- };
23
- };
24
- };
25
-
26
- declare const API_BASE_URL: "https://sui.apis.scallop.io";
27
- declare const SDK_API_BASE_URL: "https://sdk.api.scallop.io";
28
- declare const IS_VE_SCA_TEST: boolean;
29
- declare const USE_TEST_ADDRESS: boolean;
30
- declare const SCA_COIN_TYPE: "0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524::sca::SCA" | "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";
31
- declare const OLD_BORROW_INCENTIVE_PROTOCOL_ID: "0xc63072e7f5f4983a2efaf5bdba1480d5e7d74d57948e1c7cc436f8e22cbeb410";
32
-
33
- declare namespace QueryKeys {
34
- namespace API {
35
- type GetAddresses = {
36
- addressId?: string;
37
- };
38
- }
39
- namespace RPC {
40
- type BaseType = {
41
- node?: string;
42
- };
43
- export type GetInspectTxn = BaseType & {
44
- queryTarget?: string;
45
- args?: SuiObjectArg[];
46
- typeArgs?: any[];
47
- };
48
- export type GetObject = BaseType & {
49
- objectId?: string;
50
- options?: SuiObjectDataOptions;
51
- };
52
- export type GetObjects = BaseType & {
53
- objectIds?: string[];
54
- };
55
- export type GetOwnedObjects = BaseType & Partial<GetOwnedObjectsParams>;
56
- export type GetDynamicFields = BaseType & Partial<GetDynamicFieldsParams>;
57
- export type GetDynamicFieldObject = BaseType & Partial<GetDynamicFieldObjectParams>;
58
- export type getTotalVeScaTreasuryAmount = BaseType & {
59
- refreshArgs?: any[];
60
- vescaAmountArgs?: (string | SuiObjectData | SuiTxArg)[];
61
- };
62
- export type GetAllCoinBalances = BaseType & {
63
- activeAddress?: string;
64
- };
65
- export type GetNormalizedMoveFunction = BaseType & {
66
- target?: string;
67
- };
68
- export { };
69
- }
70
- }
71
-
72
- declare const queryKeys: {
73
- api: {
74
- getAddresses: (props?: QueryKeys.API.GetAddresses) => (string | QueryKeys.API.GetAddresses | undefined)[];
75
- getWhiteList: () => string[];
76
- getPoolAddresses: () => string[];
77
- getMarket: () => string[];
78
- getSpools: () => string[];
79
- getBorrowIncentivePool: () => string[];
80
- getTotalValueLocked: () => string[];
81
- };
82
- rpc: {
83
- getInspectTxn: (props?: QueryKeys.RPC.GetInspectTxn) => (string | QueryKeys.RPC.GetInspectTxn | undefined)[];
84
- getObject: (props?: QueryKeys.RPC.GetObject) => (string | QueryKeys.RPC.GetObject | undefined)[];
85
- getObjects: (props?: QueryKeys.RPC.GetObjects) => (string | QueryKeys.RPC.GetObjects | undefined)[];
86
- getOwnedObjects: (props?: QueryKeys.RPC.GetOwnedObjects) => (string | {
87
- filter: string;
88
- node?: string;
89
- owner?: string | undefined;
90
- cursor?: string | null | undefined;
91
- limit?: number | null | undefined;
92
- signal?: AbortSignal;
93
- options?: _mysten_sui_dist_cjs_client.SuiObjectDataOptions | null;
94
- })[];
95
- getDynamicFields: (props?: QueryKeys.RPC.GetDynamicFields) => (string | QueryKeys.RPC.GetDynamicFields | undefined)[];
96
- getDynamicFieldObject: (props?: QueryKeys.RPC.GetDynamicFieldObject) => (string | QueryKeys.RPC.GetDynamicFieldObject | undefined)[];
97
- getTotalVeScaTreasuryAmount: (props?: QueryKeys.RPC.getTotalVeScaTreasuryAmount) => (string | {
98
- refreshArgs: string | undefined;
99
- vescaAmountArgs: string | undefined;
100
- node?: string;
101
- })[];
102
- getAllCoinBalances: (props?: QueryKeys.RPC.GetAllCoinBalances) => (string | QueryKeys.RPC.GetAllCoinBalances | undefined)[];
103
- getNormalizedMoveFunction: (props?: QueryKeys.RPC.GetNormalizedMoveFunction) => (string | QueryKeys.RPC.GetNormalizedMoveFunction | undefined)[];
104
- };
105
- oracle: {
106
- getPythLatestPriceFeeds: () => string[];
107
- };
108
- };
109
-
110
- declare const RPC_PROVIDERS: string[];
111
-
112
- type ScallopQueryClientParams = {
113
- queryClient?: QueryClient;
114
- queryClientConfig?: QueryClientConfig;
115
- };
116
- declare class ScallopQueryClient {
117
- private _queryClient;
118
- constructor(params?: ScallopQueryClientParams);
119
- get queryClient(): QueryClient;
120
- set queryClient(queryClient: QueryClient);
121
- get defaultQueryClientConfig(): {
122
- defaultOptions: {
123
- queries: {
124
- staleTime: number;
125
- gcTime: number;
126
- };
127
- };
128
- };
129
- }
130
-
131
- type ScallopAxiosParams = {
132
- baseUrl?: string;
133
- axiosInstance?: AxiosInstance;
134
- axiosTimeout?: number;
135
- } & ScallopQueryClientParams;
136
- declare class ScallopAxios extends ScallopQueryClient {
137
- readonly axiosInstance: AxiosInstance;
138
- constructor(params?: ScallopAxiosParams);
139
- post<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
140
- post<T = any, R = AxiosResponse<T>, D = any>(url: string, queryKey: QueryKey, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
141
- get<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
142
- get<T = any, R = AxiosResponse<T>, D = any>(url: string, queryKey: QueryKey, config?: AxiosRequestConfig<D>): Promise<R>;
143
- put<T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
144
- put<T = any, R = AxiosResponse<T>, D = any>(url: string, queryKey: QueryKey, data?: D, config?: AxiosRequestConfig<D>): Promise<R>;
145
- delete<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
146
- delete<T = any, R = AxiosResponse<T>, D = any>(url: string, queryKey: QueryKey, config?: AxiosRequestConfig<D>): Promise<R>;
147
- }
148
-
149
- type ScallopAddressParams = {
150
- addressId?: string;
151
- urls?: {
152
- addresses?: string[];
153
- };
154
- auth?: string;
155
- network?: NetworkType;
156
- forceAddressesInterface?: Partial<Record<NetworkType, AddressesInterface>>;
157
- defaultValues?: {
158
- addresses?: Partial<Record<NetworkType, AddressesInterface>>;
159
- };
160
- } & ScallopAxiosParams;
161
- declare class ScallopAddress {
162
- readonly params: ScallopAddressParams;
163
- private currentAddresses?;
164
- private addressId?;
165
- private network;
166
- private auth;
167
- readonly scallopAxios: ScallopAxios;
168
- private readonly addressMap;
169
- private readonly defaultParamValues;
170
- constructor(params?: ScallopAddressParams);
171
- private initializeForcedAddresses;
172
- get axiosClient(): ScallopAxios;
173
- get queryClient(): _tanstack_query_core.QueryClient;
174
- get defaultValues(): {
175
- addresses?: Partial<Record<NetworkType, AddressesInterface>>;
176
- } | undefined;
177
- getId(): string | undefined;
178
- /**
179
- * Get the address at the provided path.
180
- *
181
- * @param path - The path of the address to get.
182
- * @return The address at the provided path.
183
- */
184
- get(path: AddressStringPath): any;
185
- /**
186
- * Sets the address for the specified path, it does not interact with the API.
187
- *
188
- * @param path - The path of the address to set.
189
- * @param address - The address be setted to the tartget path.
190
- * @return The addresses.
191
- */
192
- set(path: AddressStringPath, address: string): AddressesInterface | undefined;
193
- /**
194
- * Synchronize the specified network addresses from the addresses map to the
195
- * current addresses and change the default network to specified network.
196
- *
197
- * @param network - Specifies which network's addresses you want to get.
198
- * @return Current addresses.
199
- */
200
- switchCurrentAddresses(network: NetworkType): AddressesInterface | undefined;
201
- /**
202
- * Get the addresses, If `network` is not provided, returns the current
203
- * addresses or the default network addresses in the addresses map.
204
- *
205
- * @param network - Specifies which network's addresses you want to get.
206
- */
207
- getAddresses(network?: NetworkType): AddressesInterface | undefined;
208
- /**
209
- * Set the addresses into addresses map. If the specified network is the same
210
- * as the current network, the current addresses will be updated at the same time.
211
- *
212
- * @param addresses - The addresses be setted to the tartget network.
213
- * @param network - Specifies which network's addresses you want to set.
214
- * @return The addresses.
215
- */
216
- setAddresses(addresses: AddressesInterface, network?: NetworkType): void;
217
- /**
218
- * Get all addresses.
219
- *
220
- * @return All addresses.
221
- */
222
- getAllAddresses(): {
223
- [k: string]: AddressesInterface;
224
- };
225
- /**
226
- * Create a new addresses through the API and synchronize it back to the
227
- * instance.
228
- *
229
- * @description
230
- * If the `network` is not specified, the mainnet is used by default.
231
- * If no `addresses` from instance or parameter is provided, an addresses with
232
- * all empty strings is created by default.
233
- *
234
- * This function only allows for one addresses to be input into a specific network
235
- * at a time, and does not provide an addresses map for setting addresses
236
- * across all networks at once.
237
- *
238
- * @param params.addresses - The addresses be setted to the tartget network.
239
- * @param params.network - Specifies which network's addresses you want to set.
240
- * @param params.auth - The authentication API key.
241
- * @param params.memo - Add memo to the addresses created in the API.
242
- * @return All addresses.
243
- */
244
- create(params?: {
245
- addresses?: AddressesInterface | undefined;
246
- network?: NetworkType | undefined;
247
- auth?: string | undefined;
248
- memo?: string | undefined;
249
- }): Promise<{
250
- [k: string]: AddressesInterface;
251
- }>;
252
- protected readApi<T>({ url, queryKey, config, }: {
253
- url: string;
254
- queryKey: QueryKey;
255
- config?: AxiosRequestConfig;
256
- }): Promise<T>;
257
- /**
258
- * Read and synchronizes all addresses from the API into instance.
259
- *
260
- * @param id - The id of the addresses to get.
261
- * @return All addresses.
262
- */
263
- read(id?: string): Promise<{
264
- [k: string]: AddressesInterface;
265
- }>;
266
- /**
267
- * Update the addresses through the API and synchronize it back to the
268
- * instance.
269
- *
270
- * @description
271
- * If the `network` is not specified, the mainnet is used by default.
272
- * If no `addresses` from instance or parameter is provided, an addresses with
273
- * all empty strings is created by default.
274
- *
275
- * This function only allows for one addresses to be input into a specific network
276
- * at a time, and does not provide an addresses map for setting addresses
277
- * across all networks at once.
278
- *
279
- * @param params.id - The id of the addresses to update.
280
- * @param params.addresses - The addresses be setted to the tartget network.
281
- * @param params.network - Specifies which network's addresses you want to set.
282
- * @param params.auth - The authentication api key.
283
- * @param params.memo - Add memo to the addresses created in the API.
284
- * @return All addresses.
285
- */
286
- update(params?: {
287
- id?: string;
288
- addresses?: AddressesInterface | undefined;
289
- network?: NetworkType | undefined;
290
- auth?: string | undefined;
291
- memo?: string | undefined;
292
- }): Promise<{
293
- [k: string]: AddressesInterface;
294
- }>;
295
- /**
296
- * Deletes all addresses of a specified id through the API and clear all
297
- * addresses in the instance.
298
- *
299
- * @param id - The id of the addresses to delete.
300
- * @param auth - The authentication API key.
301
- */
302
- delete(id?: string, auth?: string): Promise<void>;
303
- }
304
-
305
- type CoinName = string;
306
- type CoinType = string;
307
- type SCoinType = string;
308
- type OldMarketCoinType = string;
309
- /**
310
- * @description `scallop_sui`, `scallop_usdt`, etc (parsed directly from coin type, ex: `0x...::scallop_sui::SCALLOP_SUI`)
311
- */
312
- type SCoinRawName = string;
313
- /**
314
- * @description `ssui`, `susdc`, etc..
315
- */
316
- type SCoinName = string;
317
- type ScallopConstantsParams = {
318
- urls?: {
319
- poolAddresses?: string[];
320
- whitelist?: string[];
321
- };
322
- forcePoolAddressInterface?: Record<string, PoolAddress>;
323
- forceWhitelistInterface?: Whitelist | Record<string, any>;
324
- defaultValues?: {
325
- poolAddresses?: Record<string, PoolAddress>;
326
- whitelist?: Whitelist | Record<string, any>;
327
- };
328
- } & ScallopAddressParams;
329
- declare class ScallopConstants extends ScallopAddress {
330
- readonly params: ScallopConstantsParams;
331
- private _poolAddresses;
332
- private _whitelist;
333
- /**
334
- * @description coin names to coin decimal map
335
- */
336
- coinDecimals: Record<CoinName, number | undefined>;
337
- coinNameToOldMarketCoinTypeMap: Record<CoinName, OldMarketCoinType | undefined>;
338
- scoinRawNameToSCoinNameMap: Record<SCoinRawName, SCoinName | undefined>;
339
- scoinTypeToSCoinNameMap: Record<SCoinType, SCoinName | undefined>;
340
- wormholeCoinTypeToCoinNameMap: Record<CoinType, CoinName | undefined>;
341
- voloCoinTypeToCoinNameMap: Record<CoinType, CoinName | undefined>;
342
- suiBridgeCoinTypeToCoinNameMap: Record<CoinType, CoinName | undefined>;
343
- /**
344
- * @description coin names to coin types map
345
- */
346
- coinTypes: Record<CoinName, CoinType | undefined>;
347
- /**
348
- * @description scoin names to scoin types map
349
- */
350
- sCoinTypes: Record<SCoinName, SCoinType | undefined>;
351
- coinTypeToCoinNameMap: Record<CoinType, CoinName | undefined>;
352
- /**
353
- * @description Supported borrow incentive reward coin names
354
- */
355
- supportedBorrowIncentiveRewards: Set<CoinName>;
356
- constructor(params?: ScallopConstantsParams);
357
- get protocolObjectId(): string;
358
- get isInitialized(): boolean;
359
- get whitelist(): Whitelist;
360
- get poolAddresses(): Record<string, PoolAddress | undefined>;
361
- get defaultValues(): ({
362
- poolAddresses?: Record<string, PoolAddress>;
363
- whitelist?: Whitelist | Record<string, any>;
364
- } & {
365
- addresses?: Partial<Record<NetworkType, AddressesInterface>>;
366
- }) | undefined;
367
- private isAddressInitialized;
368
- parseToOldMarketCoin(coinType: string): string;
369
- init({ networkType, force, addressId, constantsParams, }?: {
370
- networkType?: NetworkType;
371
- force?: boolean;
372
- addressId?: string;
373
- constantsParams?: Partial<ScallopConstantsParams>;
374
- }): Promise<void>;
375
- private initConstants;
376
- readWhiteList(): Promise<Whitelist>;
377
- readPoolAddresses(): Promise<Record<string, PoolAddress>>;
378
- }
379
-
380
- type ScallopIndexerParams = {
381
- indexerApiUrl?: string;
382
- } & ScallopAxiosParams;
383
- declare class ScallopIndexer extends ScallopAxios {
384
- constructor(params?: ScallopIndexerParams);
385
- /**
386
- * Get market index data.
387
- *
388
- * @return Market data.
389
- */
390
- getMarket(): Promise<Pick<Market, 'pools' | 'collaterals'>>;
391
- /**
392
- * Get market pools index data.
393
- *
394
- * @return Market pools data.
395
- */
396
- getMarketPools(): Promise<Required<MarketPools>>;
397
- /**
398
- * Get market pool index data.
399
- *
400
- * @return Market pool data.
401
- */
402
- getMarketPool(poolCoinName: string): Promise<MarketPool>;
403
- /**
404
- * Get market collaterals index data.
405
- *
406
- * @return Market collaterals data.
407
- */
408
- getMarketCollaterals(): Promise<Required<MarketCollaterals>>;
409
- /**
410
- * Get market collateral index data.
411
- *
412
- * @return Market collateral data.
413
- */
414
- getMarketCollateral(collateralCoinName: string): Promise<MarketCollateral>;
415
- /**
416
- * Get spools index data.
417
- *
418
- * @return Spools data.
419
- */
420
- getSpools(): Promise<Required<Spools>>;
421
- /**
422
- * Get spool index data.
423
- *
424
- * @return Spool data.
425
- */
426
- getSpool(marketCoinName: string): Promise<Spool>;
427
- /**
428
- * Get borrow incentive pools index data.
429
- *
430
- * @return Borrow incentive pools data.
431
- */
432
- getBorrowIncentivePools(): Promise<Required<BorrowIncentivePools>>;
433
- /**
434
- * Get borrow incentive pool index data.
435
- *
436
- * @return Borrow incentive pool data.
437
- */
438
- getBorrowIncentivePool(borrowIncentiveCoinName: string): Promise<BorrowIncentivePool>;
439
- /**
440
- * Get total value locked index data.
441
- *
442
- * @return Total value locked.
443
- */
444
- getTotalValueLocked(): Promise<TotalValueLocked & {
445
- totalValueChangeRatio: number;
446
- borrowValueChangeRatio: number;
447
- supplyValueChangeRatio: number;
448
- }>;
449
- /**
450
- * Get coin price index data.
451
- *
452
- * @return price data.
453
- */
454
- getCoinPrice(poolCoinName: string): Promise<number>;
455
- getCoinPrices(): Promise<Record<string, number>>;
456
- }
457
-
458
- type QueryInspectTxnParams = {
459
- queryTarget: string;
460
- args: SuiObjectArg[];
461
- typeArgs?: any[];
462
- };
463
- type ScallopSuiKitParams = {
464
- suiKit?: SuiKit;
465
- tokensPerSecond?: number;
466
- walletAddress?: string;
467
- } & SuiKitParams & ScallopQueryClientParams;
468
- declare class ScallopSuiKit extends ScallopQueryClient {
469
- readonly suiKit: SuiKit;
470
- private _walletAddress;
471
- private _tokensPerSecond;
472
- private rateLimiter;
473
- constructor(params?: ScallopSuiKitParams);
474
- switchFullNodes(fullNodes: string[]): void;
475
- get client(): _mysten_sui_dist_cjs_client.SuiClient;
476
- get walletAddress(): string;
477
- set walletAddress(value: string);
478
- get tokensPerSecond(): number;
479
- set tokensPerSecond(value: number);
480
- get currentFullNode(): string;
481
- signAndSendTxn(tx: Uint8Array | Transaction | SuiTxBlock, derivePathParams?: DerivePathParams): Promise<_mysten_sui_dist_cjs_client.SuiTransactionBlockResponse>;
482
- private callWithRateLimiter;
483
- private queryGetNormalizedMoveFunction;
484
- /**
485
- * @description Provides cache for getObject of the SuiKit.
486
- * @param objectId
487
- * @param QueryObjectParams
488
- * @returns Promise<SuiObjectResponse>
489
- */
490
- queryGetObject(objectId: string, options?: SuiObjectDataOptions$1): Promise<SuiObjectResponse>;
491
- /**
492
- * @description Provides cache for getObjects of the SuiKit.
493
- * @param objectIds
494
- * @returns Promise<SuiObjectData[]>
495
- */
496
- queryGetObjects(objectIds: string[], options?: SuiObjectDataOptions$1): Promise<SuiObjectData$1[]>;
497
- /**
498
- * @description Provides cache for getOwnedObjects of the SuiKit.
499
- * @param input
500
- * @returns Promise<PaginatedObjectsResponse>
501
- */
502
- queryGetOwnedObjects(input: GetOwnedObjectsParams$1): Promise<_mysten_sui_dist_cjs_client.PaginatedObjectsResponse>;
503
- queryGetDynamicFields(input: GetDynamicFieldsParams$1): Promise<DynamicFieldPage | null>;
504
- queryGetDynamicFieldObject(input: GetDynamicFieldObjectParams$1): Promise<SuiObjectResponse | null>;
505
- queryGetAllCoinBalances(owner: string): Promise<{
506
- [k: string]: CoinBalance;
507
- }>;
508
- queryGetCoinBalance(input: GetBalanceParams): Promise<CoinBalance | null>;
509
- /**
510
- * @description Provides cache for inspectTxn of the SuiKit.
511
- * @param QueryInspectTxnParams
512
- * @param txBlock
513
- * @returns Promise<DevInspectResults>
514
- */
515
- queryInspectTxn({ queryTarget, args, typeArgs, }: QueryInspectTxnParams): Promise<DevInspectResults | null>;
516
- }
517
-
518
- type ScallopQueryParams = {
519
- indexer?: ScallopIndexer;
520
- utils?: ScallopUtils;
521
- } & ScallopUtilsParams & ScallopIndexerParams;
522
- declare class ScallopQuery implements ScallopQueryInterface {
523
- readonly indexer: ScallopIndexer;
524
- readonly utils: ScallopUtils;
525
- constructor(params: ScallopQueryParams);
526
- initIndexerFallback(): void;
527
- /**
528
- * Request the scallop API to initialize data.
529
- *
530
- * @param force - Whether to force initialization.
531
- */
532
- init(force?: boolean): Promise<void>;
533
- get constants(): ScallopConstants;
534
- get walletAddress(): string;
535
- get scallopSuiKit(): ScallopSuiKit;
536
- get address(): ScallopConstants;
537
- /**
538
- * @deprecated use getMarketPools
539
- * Query market data.
540
- * @param indexer - Whether to use indexer.
541
- * @return Market data.
542
- */
543
- queryMarket(args?: {
544
- coinPrices?: CoinPrices;
545
- indexer?: boolean;
546
- }): Promise<Market>;
547
- /**
548
- * Get market pools.
549
- *
550
- * @description
551
- * To obtain all market pools at once, it is recommended to use
552
- * the `queryMarket` method to reduce time consumption.
553
- *
554
- * @param poolCoinNames - Specific an array of support pool coin name.
555
- * @param indexer - Whether to use indexer.
556
- * @return Market pools data.
557
- */
558
- getMarketPools(poolCoinNames?: string[], args?: {
559
- coinPrices?: CoinPrices;
560
- indexer?: boolean;
561
- }): Promise<{
562
- pools: MarketPools;
563
- collaterals: MarketCollaterals;
564
- }>;
565
- /**
566
- * Get market pool
567
- *
568
- * @param poolCoinName - Specific support pool coin name.
569
- * @param indexer - Whether to use indexer.
570
- * @return Market pool data.
571
- */
572
- getMarketPool(poolCoinName: string, args?: {
573
- coinPrice?: number;
574
- indexer?: boolean;
575
- }): Promise<MarketPool | undefined>;
576
- /**
577
- * Get market collaterals.
578
- *
579
- * @description
580
- * To obtain all market collaterals at once, it is recommended to use
581
- * the `queryMarket` method to reduce time consumption.
582
- *
583
- * @param collateralCoinNames - Specific an array of support collateral coin name.
584
- * @param indexer - Whether to use indexer.
585
- * @return Market collaterals data.
586
- */
587
- getMarketCollaterals(collateralCoinNames?: string[], args?: {
588
- indexer?: boolean;
589
- }): Promise<{
590
- [x: string]: MarketCollateral | undefined;
591
- }>;
592
- /**
593
- * Get market collateral
594
- *
595
- * @param collateralCoinName - Specific support collateral coin name.
596
- * @param indexer - Whether to use indexer.
597
- * @return Market collateral data.
598
- */
599
- getMarketCollateral(collateralCoinName: string, args?: {
600
- indexer?: boolean;
601
- }): Promise<MarketCollateral | undefined>;
602
- /**
603
- * Get obligations data.
604
- *
605
- * @param ownerAddress - The owner address.
606
- * @return Obligations data.
607
- */
608
- getObligations(ownerAddress?: string): Promise<Obligation[]>;
609
- /**
610
- * Query obligation data.
611
- *
612
- * @param obligationId - The obligation id.
613
- * @return Obligation data.
614
- */
615
- queryObligation(obligationId: SuiObjectArg): Promise<ObligationQueryInterface | undefined>;
616
- /**
617
- * Get all asset coin amounts.
618
- *
619
- * @param assetCoinNames - Specific an array of support asset coin name.
620
- * @param ownerAddress - The owner address.
621
- * @return All coin amounts.
622
- */
623
- getCoinAmounts(assetCoinNames?: string[], ownerAddress?: string): Promise<OptionalKeys<Record<string, number>>>;
624
- /**
625
- * Get asset coin amount.
626
- *
627
- * @param assetCoinName - Specific support asset coin name.
628
- * @param ownerAddress - The owner address.
629
- * @return Coin amount.
630
- */
631
- getCoinAmount(assetCoinName: string, ownerAddress?: string): Promise<number>;
632
- /**
633
- * Get all market coin amounts.
634
- *
635
- * @param coinNames - Specific an array of support market coin name.
636
- * @param ownerAddress - The owner address.
637
- * @return All market market coin amounts.
638
- */
639
- getMarketCoinAmounts(marketCoinNames?: string[], ownerAddress?: string): Promise<OptionalKeys<Record<string, number>>>;
640
- /**
641
- * Get market coin amount.
642
- *
643
- * @param coinNames - Specific support market coin name.
644
- * @param ownerAddress - The owner address.
645
- * @return Market market coin amount.
646
- */
647
- getMarketCoinAmount(marketCoinName: string, ownerAddress?: string): Promise<number>;
648
- /**
649
- * Get price from pyth fee object.
650
- *
651
- * @param assetCoinName - Specific support asset coin name.
652
- * @return Asset coin price.
653
- */
654
- getPriceFromPyth(assetCoinName: string): Promise<number>;
655
- /**
656
- * Get prices from pyth fee object.
657
- *
658
- * @param assetCoinNames - Array of supported asset coin names.
659
- * @return Array of asset coin prices.
660
- */
661
- getPricesFromPyth(assetCoinNames: string[]): Promise<Record<string, number>>;
662
- /**
663
- * Get spools data.
664
- *
665
- * @param stakeMarketCoinNames - Specific an array of support stake market coin name.
666
- * @param indexer - Whether to use indexer.
667
- * @return Spools data.
668
- */
669
- getSpools(stakeMarketCoinNames?: string[], args?: {
670
- marketPools?: MarketPools;
671
- coinPrices?: CoinPrices;
672
- indexer?: boolean;
673
- }): Promise<{
674
- [x: string]: Spool | undefined;
675
- }>;
676
- /**
677
- * Get spool data.
678
- *
679
- * @param stakeMarketCoinName - Specific support stake market coin name.
680
- * @param indexer - Whether to use indexer.
681
- * @return Spool data.
682
- */
683
- getSpool(stakeMarketCoinName: string, args?: {
684
- marketPool?: MarketPool;
685
- coinPrices?: CoinPrices;
686
- indexer?: boolean;
687
- }): Promise<Spool | undefined>;
688
- /**
689
- * Get stake accounts data for all stake pools (spools).
690
- *
691
- * @param ownerAddress - The owner address.
692
- * @return All Stake accounts data.
693
- */
694
- getAllStakeAccounts(ownerAddress?: string): Promise<StakeAccounts>;
695
- /**
696
- * Get stake accounts data for specific stake pool (spool).
697
- *
698
- * @param stakeMarketCoinName - Specific support stake market coin name.
699
- * @param ownerAddress - The owner address.
700
- * @return Stake accounts data.
701
- */
702
- getStakeAccounts(stakeMarketCoinName: string, ownerAddress?: string): Promise<StakeAccount[]>;
703
- /**
704
- * Get stake pools (spools) data.
705
- *
706
- * @description
707
- * For backward compatible, it is recommended to use `getSpools` method
708
- * to get all spools data.
709
- *
710
- * @param stakeMarketCoinNames - Specific an array of support stake market coin name.
711
- * @return Stake pools data.
712
- */
713
- getStakePools(stakeMarketCoinNames?: string[]): Promise<{
714
- [x: string]: StakePool | undefined;
715
- }>;
716
- /**
717
- * Get stake pool (spool) data.
718
- *
719
- * @description
720
- * For backward compatible, it is recommended to use `getSpool` method
721
- * to get all spool data.
722
- *
723
- * @param stakeMarketCoinName - Specific support stake market coin name.
724
- * @return Stake pool data.
725
- */
726
- getStakePool(stakeMarketCoinName: string): Promise<StakePool | undefined>;
727
- /**
728
- * Get stake reward pools data.
729
- *
730
- * @description
731
- * For backward compatible, it is recommended to use `getSpools` method
732
- * to get all spools data.
733
- *
734
- * @param stakeMarketCoinNames - Specific an array of stake market coin name.
735
- * @return Stake reward pools data.
736
- */
737
- getStakeRewardPools(stakeMarketCoinNames?: string[]): Promise<{
738
- [x: string]: StakeRewardPool | undefined;
739
- }>;
740
- /**
741
- * Get stake reward pool data.
742
- *
743
- * @description
744
- * For backward compatible, it is recommended to use `getSpool` method
745
- * to get spool data.
746
- *
747
- * @param marketCoinName - Specific support stake market coin name.
748
- * @return Stake reward pool data.
749
- */
750
- getStakeRewardPool(stakeMarketCoinName: string): Promise<StakeRewardPool | undefined>;
751
- /**
752
- * Get borrow incentive pools data.
753
- *
754
- * @param coinNames - Specific an array of support borrow incentive coin name.
755
- * @param indexer - Whether to use indexer.
756
- * @return Borrow incentive pools data.
757
- */
758
- getBorrowIncentivePools(coinNames?: string[], args?: {
759
- coinPrices?: CoinPrices;
760
- indexer?: boolean;
761
- marketPools?: MarketPools;
762
- }): Promise<{
763
- [x: string]: BorrowIncentivePool | undefined;
764
- }>;
765
- /**
766
- * Get borrow incentive accounts data.
767
- *
768
- * @param coinNames - Specific support borrow incentive coin name.
769
- * @param ownerAddress - The owner address.
770
- * @return Borrow incentive accounts data.
771
- */
772
- getBorrowIncentiveAccounts(obligationId: string | SuiObjectRef, coinNames?: string[]): Promise<{
773
- [x: string]: ParsedBorrowIncentiveAccountData | undefined;
774
- }>;
775
- /**
776
- * Get user lending and spool infomation for specific pools.
777
- *
778
- * @param poolCoinNames - Specific an array of support pool coin name.
779
- * @param ownerAddress - The owner address.
780
- * @param indexer - Whether to use indexer.
781
- * @return All lending and spool infomation.
782
- */
783
- getLendings(poolCoinNames?: string[], ownerAddress?: string, args?: {
784
- indexer?: boolean;
785
- marketPools?: MarketPools;
786
- coinPrices?: CoinPrices;
787
- }): Promise<{
788
- [x: string]: Lending | undefined;
789
- }>;
790
- /**
791
- * Get user lending and spool information for specific pool.
792
- *
793
- * @param poolCoinName - Specific support pool coin name.
794
- * @param ownerAddress - The owner address.
795
- * @param indexer - Whether to use indexer.
796
- * @return Lending pool data.
797
- */
798
- getLending(poolCoinName: string, ownerAddress?: string, args?: {
799
- indexer?: boolean;
800
- }): Promise<Lending>;
801
- /**
802
- * Get user all obligation accounts information.
803
- *
804
- * @description
805
- * All collateral and borrowing information in all obligation accounts owned by the user.
806
- *
807
- * @param ownerAddress - The owner address.
808
- * @param indexer - Whether to use indexer.
809
- * @return All obligation accounts information.
810
- */
811
- getObligationAccounts(ownerAddress?: string, args?: {
812
- indexer?: boolean;
813
- market?: {
814
- collaterals: MarketCollaterals;
815
- pools: MarketPools;
816
- };
817
- coinPrices?: CoinPrices;
818
- }): Promise<{
819
- [x: string]: ObligationAccount | undefined;
820
- }>;
821
- /**
822
- * Get obligation account information for specific id.
823
- *
824
- * @description
825
- * borrowing and obligation information for specific pool.
826
- *
827
- * @param obligationId - The obligation id.
828
- * @param ownerAddress - The owner address.
829
- * @param indexer - Whether to use indexer.
830
- * @return Borrowing and collateral information.
831
- */
832
- getObligationAccount(obligationId: string, ownerAddress?: string, args?: {
833
- indexer?: boolean;
834
- }): Promise<ObligationAccount | undefined>;
835
- /**
836
- * Get total value locked.
837
- *
838
- * @param indexer - Whether to use indexer.
839
- * @description
840
- * Include total supplied value and total borrowed value.
841
- *
842
- * @return Total value locked.
843
- */
844
- getTvl(args?: {
845
- indexer?: boolean;
846
- }): Promise<TotalValueLocked>;
847
- /**
848
- * Get veSca data.
849
- * @param veScaKey
850
- * @returns veSca
851
- */
852
- getVeSca(veScaKey: string | SuiObjectData): Promise<Vesca | undefined>;
853
- /**
854
- * Get all veSca from walletAdddress
855
- * @param walletAddress
856
- * @returns array of veSca
857
- */
858
- getVeScas({ walletAddress, excludeEmpty, }?: {
859
- walletAddress?: string;
860
- excludeEmpty?: boolean;
861
- }): Promise<Vesca[]>;
862
- /**
863
- * Get total vesca treasury with movecall
864
- * @returns Promise<string | undefined>
865
- */
866
- getVeScaTreasuryInfo(): Promise<VeScaTreasuryInfo | null>;
867
- /**
868
- * Return binded referrer veScaKeyId of referee walletAddress if exist
869
- * @param walletAddress
870
- * @returns veScaKeyId
871
- */
872
- getVeScaKeyIdFromReferralBindings(walletAddress?: string): Promise<string | null>;
873
- /**
874
- * Get binded obligationId from a veScaKey if it exists.
875
- * @param veScaKey
876
- * @returns obligationId
877
- */
878
- getBindedObligationId(veScaKey: string): Promise<string | null>;
879
- /**
880
- * Get binded veSCA key from a obligationId if it exists.
881
- * @param obligationId
882
- * @returns veScaKey
883
- */
884
- getBindedVeScaKey(obligationId: string): Promise<string | null>;
885
- /**
886
- * Get user's veSCA loyalty program informations
887
- * @param veScaKey
888
- * @returns Loyalty program information
889
- */
890
- getLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<LoyaltyProgramInfo | null>;
891
- /**
892
- * Get user's veSCA rewards informations from loyalty program
893
- * @param veScaKey
894
- * @returns Loyalty program information
895
- */
896
- getVeScaLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<VeScaLoyaltyProgramInfo | null>;
897
- /**
898
- * Get total supply of sCoin
899
- * @param sCoinName - Supported sCoin name
900
- * @returns Total Supply
901
- */
902
- getSCoinTotalSupply(sCoinName: string): Promise<number>;
903
- /**
904
- * Get all sCoin amounts.
905
- *
906
- * @param sCoinNames - Specific an array of support sCoin name.
907
- * @param ownerAddress - The owner address.
908
- * @return All market sCoin amounts.
909
- */
910
- getSCoinAmounts(sCoinNames?: string[], ownerAddress?: string): Promise<OptionalKeys<Record<string, number>>>;
911
- /**
912
- * Get sCoin amount.
913
- *
914
- * @param coinNames - Specific support sCoin name.
915
- * @param ownerAddress - The owner address.
916
- * @return sCoin amount.
917
- */
918
- getSCoinAmount(sCoinName: string | string, ownerAddress?: string): Promise<number>;
919
- /**
920
- * Get swap rate from sCoin A to sCoin B
921
- * @param assetCoinNames
922
- * @returns
923
- */
924
- getSCoinSwapRate(fromSCoin: string, toSCoin: string): Promise<number>;
925
- getFlashLoanFees(assetCoinNames?: string[]): Promise<Record<string, number>>;
926
- /**
927
- * Get supply limit of lending pool
928
- */
929
- getPoolSupplyLimit(poolName: string): Promise<string | null>;
930
- /**
931
- * Get borrow limit of borrow pool
932
- */
933
- getPoolBorrowLimit(poolName: string): Promise<string | null>;
934
- /**
935
- * Get list of isolated assets
936
- */
937
- getIsolatedAssets(useOnChainQuery?: boolean): Promise<string[]>;
938
- /**
939
- * Check if asset is an isolated asset
940
- */
941
- isIsolatedAsset(assetCoinName: string): Promise<boolean>;
942
- /**
943
- * Get pool coin price from indexer
944
- * @param coinName
945
- * @returns price data
946
- */
947
- getCoinPriceByIndexer(poolName: string): Promise<number>;
948
- /**
949
- * Get all supported pool price from indexer
950
- * @returns prices data
951
- */
952
- getCoinPricesByIndexer(): Promise<Record<string, number>>;
953
- /**
954
- * Get all coin prices, including sCoin
955
- * @returns prices data
956
- */
957
- getAllCoinPrices(args?: {
958
- marketPools?: MarketPools;
959
- coinPrices?: CoinPrices;
960
- indexer?: boolean;
961
- }): Promise<{
962
- [x: string]: number | undefined;
963
- }>;
964
- /**
965
- * Query all address (lending pool, collateral pool, borrow dynamics, interest models, etc.) of all pool
966
- * @returns
967
- */
968
- getPoolAddresses(apiAddressId?: string | undefined): Promise<OptionalKeys<Record<string, PoolAddress>>>;
969
- /**
970
- * Get user portfolio
971
- */
972
- getUserPortfolio(args?: {
973
- walletAddress?: string;
974
- indexer?: boolean;
975
- }): Promise<{
976
- totalLockedScaValue: number;
977
- lendings: {
978
- suppliedCoin: number;
979
- suppliedValue: number;
980
- stakedCoin: number;
981
- coinName: string;
982
- symbol: string;
983
- coinType: string;
984
- coinPrice: number;
985
- coinDecimals: number;
986
- supplyApr: number;
987
- supplyApy: number;
988
- incentiveApr: number;
989
- }[];
990
- borrowings: {
991
- obligationId: string;
992
- totalDebtsInUsd: number;
993
- totalCollateralInUsd: number;
994
- riskLevel: number;
995
- availableCollateralInUsd: number;
996
- totalUnhealthyCollateralInUsd: number;
997
- collaterals: {
998
- coinName: string;
999
- symbol: string;
1000
- coinDecimals: number;
1001
- coinType: string;
1002
- coinPrice: number;
1003
- depositedCoin: number;
1004
- depositedValueInUsd: number;
1005
- }[];
1006
- borrowedPools: {
1007
- coinName: string;
1008
- symbol: string;
1009
- coinDecimals: number;
1010
- coinType: string;
1011
- coinPrice: number;
1012
- borrowedCoin: number;
1013
- borrowedValueInUsd: number;
1014
- borrowApr: number | undefined;
1015
- borrowApy: number | undefined;
1016
- incentiveInfos: {
1017
- coinName: string;
1018
- symbol: string;
1019
- coinType: string;
1020
- incentiveApr: number;
1021
- }[];
1022
- }[];
1023
- }[];
1024
- pendingRewards: {
1025
- lendings: any;
1026
- borrowIncentives: any;
1027
- };
1028
- veScas: {
1029
- veScaKey: string;
1030
- coinPrice: number;
1031
- lockedScaInCoin: number;
1032
- lockedScaInUsd: number;
1033
- currentVeScaBalance: number;
1034
- remainingLockPeriodInDays: number;
1035
- unlockAt: number;
1036
- }[];
1037
- totalDebtValue: number;
1038
- totalCollateralValue: number;
1039
- totalSupplyValue: number;
1040
- }>;
1041
- /**
1042
- * Get both primary and secondary price update policy objects
1043
- * @returns price update policies
1044
- */
1045
- getPriceUpdatePolicies(): Promise<{
1046
- primary: _mysten_sui_dist_cjs_client.SuiObjectResponse | null;
1047
- secondary: _mysten_sui_dist_cjs_client.SuiObjectResponse | null;
1048
- }>;
1049
- /**
1050
- * Return the supported primary and secondary oracles for all supported pool assets
1051
- * @returns
1052
- */
1053
- getAssetOracles(): Promise<Record<string, xOracleRules>>;
1054
- /**
1055
- * Get switchboard on-demand aggregator object id based on coinType
1056
- * @param coinType
1057
- * @returns
1058
- */
1059
- getSwitchboardOnDemandAggregatorObjectIds(coinName: string[]): Promise<string[]>;
1060
- }
1061
-
1062
- type ScallopBuilderParams = {
1063
- query?: ScallopQuery;
1064
- usePythPullModel?: boolean;
1065
- sponsoredFeeds?: string[];
1066
- useOnChainXOracleList?: boolean;
1067
- } & ScallopQueryParams;
1068
- /**
1069
- * @description
1070
- * It provides methods for operating the transaction block, making it more convenient to organize transaction combinations.
1071
- *
1072
- * @example
1073
- * ```typescript
1074
- * const scallopBuilder = new ScallopBuilder(<parameters>);
1075
- * await scallopBuilder.init();
1076
- * const txBlock = scallopBuilder.<builder functions>();
1077
- * ```
1078
- */
1079
- declare class ScallopBuilder implements ScallopBuilderInterface {
1080
- readonly query: ScallopQuery;
1081
- readonly usePythPullModel: boolean;
1082
- readonly useOnChainXOracleList: boolean;
1083
- readonly sponsoredFeeds: string[];
1084
- constructor(params: ScallopBuilderParams);
1085
- get utils(): ScallopUtils;
1086
- get constants(): ScallopConstants;
1087
- get walletAddress(): string;
1088
- get scallopSuiKit(): ScallopSuiKit;
1089
- get suiKit(): _scallop_io_sui_kit.SuiKit;
1090
- get address(): ScallopConstants;
1091
- /**
1092
- * Request the scallop API to initialize data.
1093
- *
1094
- * @param force - Whether to force initialization.
1095
- */
1096
- init(force?: boolean): Promise<void>;
1097
- /**
1098
- * Create a scallop txBlock instance that enhances transaction block.
1099
- *
1100
- * @param txBlock - Scallop txBlock, txBlock created by SuiKit, or original transaction block.
1101
- * @return Scallop txBlock.
1102
- */
1103
- createTxBlock(txBlock?: ScallopTxBlock | SuiTxBlock | Transaction$1): ScallopTxBlock;
1104
- /**
1105
- * Specifying the sender's amount of coins to get coins args from transaction result.
1106
- *
1107
- * @param txBlock - Scallop txBlock or txBlock created by SuiKit .
1108
- * @param assetCoinName - Specific support asset coin name.
1109
- * @param amount - Amount of coins to be selected.
1110
- * @param sender - Sender address.
1111
- * @return Take coin and left coin.
1112
- */
1113
- selectCoin<T extends string>(txBlock: ScallopTxBlock | SuiTxBlock, assetCoinName: T, amount: number, sender?: string): Promise<SelectCoinReturnType<T>>;
1114
- /**
1115
- * Specifying the sender's amount of market coins to get coins args from transaction result.
1116
- *
1117
- * @param txBlock - Scallop txBlock or txBlock created by SuiKit .
1118
- * @param marketCoinName - Specific support market coin name.
1119
- * @param amount - Amount of coins to be selected.
1120
- * @param sender - Sender address.
1121
- * @return Take coin and left coin.
1122
- */
1123
- selectMarketCoin(txBlock: ScallopTxBlock | SuiTxBlock, marketCoinName: string, amount: number, sender?: string): Promise<{
1124
- takeCoin: TransactionObjectArgument;
1125
- leftCoin: TransactionObjectArgument;
1126
- totalAmount: number;
1127
- }>;
1128
- /**
1129
- * Specifying the sender's amount of sCoins to get coins args from transaction result.
1130
- *
1131
- * @param txBlock - Scallop txBlock or txBlock created by SuiKit .
1132
- * @param marketCoinName - Specific support sCoin name.
1133
- * @param amount - Amount of coins to be selected.
1134
- * @param sender - Sender address.
1135
- * @return Take coin and left coin.
1136
- */
1137
- selectSCoin(txBlock: ScallopTxBlock | SuiTxBlock, sCoinName: string, amount: number, sender?: string): Promise<{
1138
- takeCoin: TransactionObjectArgument;
1139
- leftCoin: TransactionObjectArgument;
1140
- totalAmount: number;
1141
- }>;
1142
- /**
1143
- * Select sCoin or market coin automatically. Prioritize sCoin first
1144
- */
1145
- selectSCoinOrMarketCoin(txBlock: ScallopTxBlock | SuiTxBlock, sCoinName: string, amount: number, sender?: string): Promise<{
1146
- sCoin: TransactionObjectArgument | undefined;
1147
- marketCoin: TransactionObjectArgument | undefined;
1148
- }>;
1149
- /**
1150
- * Execute Scallop txBlock using the `signAndSendTxn` methods in suikit.
1151
- *
1152
- * @param txBlock - Scallop txBlock, txBlock created by SuiKit, or original transaction block.
1153
- */
1154
- signAndSendTxBlock(txBlock: ScallopTxBlock | SuiTxBlock | Transaction$1): Promise<SuiTransactionBlockResponse>;
1155
- moveCall(txb: ScallopTxBlock | SuiTxBlock, target: string, args?: (SuiTxArg | SuiVecTxArg | SuiObjectArg | SuiAmountsArg)[], typeArgs?: string[]): _scallop_io_sui_kit.TransactionResult;
1156
- }
1157
-
1158
- interface ScallopBaseInterface {
1159
- scallopSuiKit: ScallopSuiKit;
1160
- constants: ScallopConstants;
1161
- walletAddress: string;
1162
- init: () => Promise<void>;
1163
- }
1164
- interface ScallopUtilsInterface extends ScallopBaseInterface {
1165
- address: ScallopAddress;
1166
- }
1167
- interface ScallopQueryInterface extends ScallopUtilsInterface {
1168
- utils: ScallopUtils;
1169
- }
1170
- interface ScallopBuilderInterface extends ScallopQueryInterface {
1171
- query: ScallopQuery;
1172
- }
1173
- interface ScallopClientInterface extends ScallopBaseInterface {
1174
- builder: ScallopBuilder;
1175
- }
1176
-
1177
- type ScallopUtilsParams = {
1178
- pythEndpoints?: string[];
1179
- scallopSuiKit?: ScallopSuiKit;
1180
- scallopConstants?: ScallopConstants;
1181
- } & ScallopSuiKitParams & ScallopConstantsParams;
1182
- declare class ScallopUtils implements ScallopUtilsInterface {
1183
- pythEndpoints: string[];
1184
- readonly scallopSuiKit: ScallopSuiKit;
1185
- readonly constants: ScallopConstants;
1186
- constructor(params?: ScallopUtilsParams);
1187
- get walletAddress(): string;
1188
- get suiKit(): _scallop_io_sui_kit.SuiKit;
1189
- get queryClient(): _tanstack_query_core.QueryClient;
1190
- get address(): ScallopConstants;
1191
- isSuiBridgeAsset(coinName: any): boolean;
1192
- isWormholeAsset(coinName: any): boolean;
1193
- isMarketCoin(coinName: string): boolean;
1194
- init({ force }?: {
1195
- force?: boolean;
1196
- }): Promise<void>;
1197
- /**
1198
- * Convert market coin name to coin name.
1199
- *
1200
- * @param marketCoinName - Specific support market coin name.
1201
- * @return Coin Name.
1202
- */
1203
- parseCoinName<T extends string>(marketCoinName: string): T;
1204
- /**
1205
- * Convert coin name to symbol.
1206
- *
1207
- * @param coinName - Specific support coin name.
1208
- * @return Symbol string.
1209
- */
1210
- parseSymbol(coinName: string): string;
1211
- /**
1212
- * Convert coin name to coin type.
1213
- *
1214
- * @description
1215
- * The Coin type of wormhole is fixed `coin:Coin`. Here using package id
1216
- * to determine and return the type.
1217
- *
1218
- * @param coinPackageId - Package id of coin.
1219
- * @param coinName - Specific support coin name.
1220
- * @return Coin type.
1221
- */
1222
- parseCoinType(coinName: string, useOldMarketCoin?: boolean): string;
1223
- /**
1224
- * Convert coin name to sCoin name.
1225
- *
1226
- * @param coinName - Specific support coin name.
1227
- * @return sCoin name.
1228
- */
1229
- parseSCoinName<T extends string>(coinName: string): T | undefined;
1230
- /**
1231
- * Convert sCoin name to market coin name.
1232
- * This function will parse new sCoin name `scallop_...` to its old market coin name which is shorter
1233
- * e.g: `scallop_sui -> ssui
1234
- * if no `scallop_...` is encountered, return coinName
1235
- * @return sCoin name
1236
- */
1237
- parseSCoinTypeNameToMarketCoinName(coinName: string): string;
1238
- /**
1239
- * Convert sCoin name into sCoin type
1240
- * @param sCoinName
1241
- * @returns sCoin type
1242
- */
1243
- parseSCoinType(sCoinName: string): string;
1244
- /**
1245
- * Convert sCoinType into sCoin name
1246
- * @param sCoinType
1247
- * @returns sCoin name
1248
- */
1249
- parseSCoinNameFromType(sCoinType: string): string | undefined;
1250
- /**
1251
- * Convert sCoin name into its underlying coin type
1252
- * @param sCoinName
1253
- * @returns coin type
1254
- */
1255
- parseUnderlyingSCoinType(sCoinName: string): string;
1256
- /**
1257
- * Get sCoin treasury id from sCoin name
1258
- * @param sCoinName
1259
- * @returns sCoin treasury id
1260
- */
1261
- getSCoinTreasury(sCoinName: string): any;
1262
- /**
1263
- * Convert coin name to market coin type.
1264
- *
1265
- * @param coinPackageId - Package id of coin.
1266
- * @param coinName - Specific support coin name.
1267
- * @return Market coin type.
1268
- */
1269
- parseMarketCoinType(coinName: string): string;
1270
- /**
1271
- * Convert coin name to market coin name.
1272
- *
1273
- * @param coinName - Specific support coin name.
1274
- * @return Market coin name.
1275
- */
1276
- parseMarketCoinName<T extends string>(coinName: string): T;
1277
- /**
1278
- * Get reward type of spool.
1279
- *
1280
- * @param stakeMarketCoinName - Support stake market coin.
1281
- * @return Spool reward coin name.
1282
- */
1283
- getSpoolRewardCoinName: () => string;
1284
- /**
1285
- * Get coin decimal.
1286
- *
1287
- * return Coin decimal.
1288
- */
1289
- getCoinDecimal(coinName: string): number;
1290
- /**
1291
- * Get coin wrapped type.
1292
- *
1293
- * return Coin wrapped type.
1294
- */
1295
- getCoinWrappedType(assetCoinName: string): CoinWrappedType;
1296
- /**
1297
- * Convert coin type to coin name.
1298
- *
1299
- * @description
1300
- * The coin name cannot be obtained directly from the wormhole type. Here
1301
- * the package id is used to determine and return a specific name.
1302
- *
1303
- * @param coinType - Specific support coin type.
1304
- * @return Coin Name.
1305
- */
1306
- parseCoinNameFromType(coinType: string): string;
1307
- /**
1308
- * Select coin id that add up to the given amount as transaction arguments.
1309
- *
1310
- * @param ownerAddress - The address of the owner.
1311
- * @param amount - The amount that including coin decimals.
1312
- * @param coinType - The coin type, default is 0x2::SUI::SUI.
1313
- * @return The selected transaction coin arguments.
1314
- */
1315
- selectCoins(amount: number, coinType?: string, ownerAddress?: string): Promise<{
1316
- objectId: string;
1317
- digest: string;
1318
- version: string;
1319
- balance: string;
1320
- }[]>;
1321
- /**
1322
- * Merge coins with type `coinType` to dest
1323
- * @param txBlock
1324
- * @param dest
1325
- * @param coinType
1326
- * @param sender
1327
- */
1328
- mergeSimilarCoins(txBlock: SuiTxBlock | Transaction, dest: SuiObjectArg, coinType: string, sender?: string): Promise<void>;
1329
- /**
1330
- * Get all asset coin names in the obligation record by obligation id.
1331
- *
1332
- * @description
1333
- * This can often be used to determine which assets in an obligation require
1334
- * price updates before interacting with specific instructions of the Scallop contract.
1335
- *
1336
- * @param obligationId - The obligation id.
1337
- * @return Asset coin Names.
1338
- */
1339
- getObligationCoinNames(obligationId: SuiObjectArg): Promise<string[] | undefined>;
1340
- private parseDataFromPythPriceFeed;
1341
- getPythPrice(assetCoinName: string, priceFeedObject?: SuiObjectData | null): Promise<number>;
1342
- getPythPrices(assetCoinNames: string[]): Promise<Record<string, number>>;
1343
- /**
1344
- * Get asset coin price.
1345
- *
1346
- * @description
1347
- * The strategy for obtaining the price is to get it through API first,
1348
- * and then on-chain data if API cannot be retrieved.
1349
- * Currently, we only support obtaining from pyth protocol, other
1350
- * oracles will be supported in the future.
1351
- *
1352
- * @param assetCoinNames - Specific an array of support asset coin name.
1353
- * @return Asset coin price.
1354
- */
1355
- getCoinPrices(coinNames?: string[]): Promise<OptionalKeys<Record<string, number>>>;
1356
- /**
1357
- * Convert apr to apy.
1358
- *
1359
- * @param apr The annual percentage rate (APR).
1360
- * @param compoundFrequency How often interest is compounded per year. Default is daily (365 times a year).
1361
- * @return The equivalent annual percentage yield (APY) for the given APR and compounding frequency.
1362
- */
1363
- parseAprToApy(apr: number, compoundFrequency?: number): number;
1364
- /**
1365
- * Convert apy to apr.
1366
- *
1367
- * @param apr The equivalent annual percentage yield (APY).
1368
- * @param compoundFrequency How often interest is compounded per year. Default is daily (365 times a year).
1369
- * @return The equivalent annual percentage rate (APR) for the given APY and compounding frequency.
1370
- */
1371
- parseApyToApr(apy: number, compoundFrequency?: number): number;
1372
- /**
1373
- * Give extend lock period to get unlock at in seconds timestamp.
1374
- *
1375
- * @description
1376
- * - When the user without remaining unlock period, If the extended unlock day is not specified,
1377
- * the unlock period will be increased by one day by default.
1378
- * - When the given extended day plus the user's remaining unlock period exceeds the maximum
1379
- * unlock period, the maximum unlock period is used as unlock period.
1380
- *
1381
- * @param extendLockPeriodInDay The extend lock period in day.
1382
- * @param unlockAtInSecondTimestamp The unlock timestamp from veSca object.
1383
- * @return New unlock at in seconds timestamp.
1384
- */
1385
- getUnlockAt(extendLockPeriodInDay?: number, unlockAtInMillisTimestamp?: number): number;
1386
- /**
1387
- * Get detailed contract address and price id information for supported pool in Scallop
1388
- * @returns Supported pool informations
1389
- */
1390
- getSupportedPoolAddresses(): PoolAddress[];
1391
- }
1392
-
1393
- type ScallopClientParams = {
1394
- networkType?: NetworkType;
1395
- builder?: ScallopBuilder;
1396
- } & ScallopBuilderParams;
1397
- type ScallopClientFnReturnType<T extends boolean> = T extends true ? SuiTransactionBlockResponse : Transaction$1;
1398
- type ScallopClientVeScaReturnType<T extends boolean> = T extends true ? SuiTransactionBlockResponse : {
1399
- tx: Transaction$1;
1400
- scaCoin: TransactionResult;
1401
- };
1402
- /**
1403
- * @description
1404
- * It provides contract interaction operations for general users.
1405
- *
1406
- * @example
1407
- * ```typescript
1408
- * const scallopClient = new ScallopClient(<parameters>);
1409
- * await scallopClient.init();
1410
- * scallopClient.<client functions>();
1411
- * await scallopClient.<client async functions>();
1412
- * ```
1413
- */
1414
- declare class ScallopClient implements ScallopClientInterface {
1415
- readonly builder: ScallopBuilder;
1416
- networkType: NetworkType;
1417
- constructor(params: ScallopClientParams);
1418
- get query(): ScallopQuery;
1419
- get utils(): ScallopUtils;
1420
- get constants(): ScallopConstants;
1421
- get walletAddress(): string;
1422
- get scallopSuiKit(): ScallopSuiKit;
1423
- get address(): ScallopConstants;
1424
- /**
1425
- * Request the scallop API to initialize data.
1426
- *
1427
- * @param force - Whether to force initialization.
1428
- */
1429
- init(force?: boolean): Promise<void>;
1430
- /**
1431
- * Query market data.
1432
- *
1433
- * @description
1434
- * This method might be @deprecated in the future, please use the {@link ScallopQuery} query instance instead.
1435
- *
1436
- * @return Market data.
1437
- */
1438
- queryMarket(): Promise<Market>;
1439
- /**
1440
- * Get obligations data.
1441
- *
1442
- * @description
1443
- * This method might be @deprecated in the future, please use the {@link ScallopQuery} query instance instead.
1444
- *
1445
- * @param ownerAddress - The owner address.
1446
- * @return Obligations data.
1447
- */
1448
- getObligations(ownerAddress?: string): Promise<Obligation[]>;
1449
- /**
1450
- * Query obligation data.
1451
- *
1452
- * @description
1453
- * This method might be @deprecated in the future, please use the {@link ScallopQuery} query instance instead.
1454
- *
1455
- * @param obligationId - The obligation id.
1456
- * @return Obligation data.
1457
- */
1458
- queryObligation(obligationId: string): Promise<ObligationQueryInterface | undefined>;
1459
- /**
1460
- * Query all stake accounts data.
1461
- *
1462
- * @description
1463
- * This method might be @deprecated in the future, please use the {@link ScallopQuery} query instance instead.
1464
- *
1465
- * @param ownerAddress - The owner address.
1466
- * @return All stake accounts data.
1467
- */
1468
- getAllStakeAccounts(ownerAddress?: string): Promise<StakeAccounts>;
1469
- /**
1470
- * Query stake account data.
1471
- *
1472
- * @description
1473
- * This method might be @deprecated in the future, please use the {@link ScallopQuery} query instance instead.
1474
- *
1475
- * @param stakeMarketCoinName - Support stake market coin.
1476
- * @param ownerAddress - The owner address.
1477
- * @return Stake accounts data.
1478
- */
1479
- getStakeAccounts(stakeMarketCoinName: string, ownerAddress?: string): Promise<StakeAccount[]>;
1480
- /**
1481
- * Query stake pool data.
1482
- *
1483
- * @description
1484
- * This method might be @deprecated in the future, please use the {@link ScallopQuery} query instance instead.
1485
- *
1486
- * @param stakeMarketCoinName - Support stake market coin.
1487
- * @return Stake pool data.
1488
- */
1489
- getStakePool(stakeMarketCoinName: string): Promise<StakePool | undefined>;
1490
- /**
1491
- * Query reward pool data.
1492
- *
1493
- * @description
1494
- * This method might be @deprecated in the future, please use the {@link ScallopQuery} query instance instead.
1495
- *
1496
- * @param stakeMarketCoinName - Support stake market coin.
1497
- * @return Reward pool data.
1498
- */
1499
- getStakeRewardPool(stakeMarketCoinName: string): Promise<StakeRewardPool | undefined>;
1500
- /**
1501
- * Open obligation.
1502
- *
1503
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1504
- * @return Transaction block response or transaction block.
1505
- */
1506
- openObligation(): Promise<SuiTransactionBlockResponse>;
1507
- openObligation<S extends boolean>(sign?: S): Promise<ScallopClientFnReturnType<S>>;
1508
- /**
1509
- * Deposit collateral into the specific pool.
1510
- *
1511
- * @param collateralCoinName - Types of collateral coin.
1512
- * @param amount - The amount of coins would deposit.
1513
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1514
- * @param obligationId - The obligation object.
1515
- * @param walletAddress - The wallet address of the owner.
1516
- * @return Transaction block response or transaction block.
1517
- */
1518
- depositCollateral(collateralCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1519
- depositCollateral<S extends boolean>(collateralCoinName: string, amount: number, sign?: S, obligationId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1520
- /**
1521
- * Withdraw collateral from the specific pool.
1522
- *
1523
- * @param collateralCoinName - Types of collateral coin.
1524
- * @param amount - The amount of coins would deposit.
1525
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1526
- * @param obligationId - The obligation object.
1527
- * @param obligationKey - The obligation key object to verifying obligation authority.
1528
- * @param walletAddress - The wallet address of the owner.
1529
- * @return Transaction block response or transaction block.
1530
- */
1531
- withdrawCollateral<S extends boolean>(collateralCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1532
- /**
1533
- * Deposit asset into the specific pool.
1534
- *
1535
- * @param poolCoinName - Types of pool coin.
1536
- * @param amount - The amount of coins would deposit.
1537
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1538
- * @param walletAddress - The wallet address of the owner.
1539
- * @return Transaction block response or transaction block.
1540
- */
1541
- deposit(poolCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1542
- deposit<S extends boolean>(poolCoinName: string, amount: number, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1543
- /**
1544
- * Deposit asset into the specific pool and Stake market coin into the corresponding spool.
1545
- *
1546
- * @param stakeCoinName - Types of stake coin.
1547
- * @param amount - The amount of coins would deposit.
1548
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1549
- * @param stakeAccountId - The stake account object.
1550
- * @param walletAddress - The wallet address of the owner.
1551
- * @return Transaction block response or transaction block.
1552
- */
1553
- depositAndStake(stakeCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1554
- depositAndStake<S extends boolean>(stakeCoinName: string, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1555
- /**
1556
- * Withdraw asset from the specific pool, must return market coin.
1557
- *
1558
- * @param poolCoinName - Specific support pool coin name.
1559
- * @param amount - The amount of coins would withdraw.
1560
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1561
- * @param walletAddress - The wallet address of the owner.
1562
- * @return Transaction block response or transaction block.
1563
- */
1564
- withdraw(poolCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1565
- withdraw<S extends boolean>(poolCoinName: string, amount: number, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1566
- /**
1567
- * Borrow asset from the specific pool.
1568
- *
1569
- * @param poolCoinName - Specific support pool coin name.
1570
- * @param amount - The amount of coins would borrow.
1571
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1572
- * @param obligationId - The obligation object.
1573
- * @param obligationKey - The obligation key object to verifying obligation authority.
1574
- * @param walletAddress - The wallet address of the owner.
1575
- * @return Transaction block response or transaction block.
1576
- */
1577
- borrow<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1578
- /**
1579
- * Repay asset into the specific pool.
1580
- *
1581
- * @param poolCoinName - Specific support pool coin name.
1582
- * @param amount - The amount of coins would repay.
1583
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1584
- * @param obligationId - The obligation object.
1585
- * @param walletAddress - The wallet address of the owner.
1586
- * @return Transaction block response or transaction block.
1587
- */
1588
- repay<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1589
- /**
1590
- * FlashLoan asset from the specific pool.
1591
- *
1592
- * @param poolCoinName - Specific support pool coin name..
1593
- * @param amount - The amount of coins would repay.
1594
- * @param callback - The callback function to build transaction block and return coin argument.
1595
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1596
- * @return Transaction block response or transaction block.
1597
- */
1598
- flashLoan(poolCoinName: string, amount: number, callback: (txBlock: ScallopTxBlock, coin: TransactionObjectArgument | string) => SuiObjectArg): Promise<SuiTransactionBlockResponse>;
1599
- flashLoan<S extends boolean>(poolCoinName: string, amount: number, callback: (txBlock: ScallopTxBlock, coin: TransactionObjectArgument | string) => SuiObjectArg, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1600
- /**
1601
- * Create stake account.
1602
- *
1603
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1604
- * @param walletAddress - The wallet address of the owner.
1605
- * @return Transaction block response or transaction block.
1606
- */
1607
- createStakeAccount(marketCoinName: string): Promise<SuiTransactionBlockResponse>;
1608
- createStakeAccount<S extends boolean>(marketCoinName: string, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1609
- /**
1610
- * Stake market coin into the specific spool.
1611
- *
1612
- * @param marketCoinName - Types of market coin.
1613
- * @param amount - The amount of coins would deposit.
1614
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1615
- * @param stakeAccountId - The stake account object.
1616
- * @param walletAddress - The wallet address of the owner.
1617
- * @return Transaction block response or transaction block.
1618
- */
1619
- stake(stakeMarketCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1620
- stake<S extends boolean>(stakeMarketCoinName: string, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1621
- /**
1622
- * Unstake market coin from the specific spool.
1623
- *
1624
- * @param stakeMarketCoinName - Types of mak coin.
1625
- * @param amount - The amount of coins would deposit.
1626
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1627
- * @param accountId - The stake account object.
1628
- * @param walletAddress - The wallet address of the owner.
1629
- * @return Transaction block response or transaction block.
1630
- */
1631
- unstake(stakeMarketCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1632
- unstake<S extends boolean>(stakeMarketCoinName: string, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1633
- /**
1634
- * Unstake market coin from the specific spool and withdraw asset from the corresponding pool.
1635
- *
1636
- * @param marketCoinName - Types of mak coin.
1637
- * @param amount - The amount of coins would deposit.
1638
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1639
- * @param accountId - The stake account object.
1640
- * @param walletAddress - The wallet address of the owner.
1641
- * @return Transaction block response or transaction block.
1642
- */
1643
- unstakeAndWithdraw(stakeMarketCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1644
- unstakeAndWithdraw<S extends boolean>(stakeMarketCoinName: string, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1645
- /**
1646
- * Claim reward coin from the specific spool.
1647
- *
1648
- * @param stakeMarketCoinName - Types of mak coin.
1649
- * @param amount - The amount of coins would deposit.
1650
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1651
- * @param accountId - The stake account object.
1652
- * @param walletAddress - The wallet address of the owner.
1653
- * @return Transaction block response or transaction block.
1654
- */
1655
- claim(stakeMarketCoinName: string): Promise<SuiTransactionBlockResponse>;
1656
- claim<S extends boolean>(stakeMarketCoinName: string, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1657
- /**
1658
- * stake obligaion.
1659
- *
1660
- * @param obligationId - The obligation account object.
1661
- * @param obligationKeyId - The obligation key account object.
1662
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1663
- * @param walletAddress - The wallet address of the owner.
1664
- * @return Transaction block response or transaction block
1665
- */
1666
- stakeObligation<S extends boolean>(obligationId: string, obligationKeyId: string, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1667
- /**
1668
- * unstake obligaion.
1669
- *
1670
- * @param obligationId - The obligation account object.
1671
- * @param obligationKeyId - The obligation key account object.
1672
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1673
- * @param walletAddress - The wallet address of the owner.
1674
- * @return Transaction block response or transaction block
1675
- */
1676
- unstakeObligation<S extends boolean>(obligationId: string, obligationKeyId: string, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1677
- /**
1678
- * Claim borrow incentive reward.
1679
- *
1680
- * @param poolName
1681
- * @param amount - The amount of coins would deposit.
1682
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1683
- * @param accountId - The stake account object.
1684
- * @param walletAddress - The wallet address of the owner.
1685
- * @return Transaction block response or transaction block
1686
- */
1687
- claimBorrowIncentive<S extends boolean>(obligationId: string, obligationKeyId: string, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1688
- /**
1689
- * Function to migrate all market coin in user wallet into sCoin
1690
- * @returns Transaction response
1691
- */
1692
- migrateAllMarketCoin<S extends boolean>(includeStakePool?: boolean, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1693
- /**
1694
- * Claim unlocked SCA from all veSCA accounts.
1695
- */
1696
- claimAllUnlockedSca(): Promise<SuiTransactionBlockResponse>;
1697
- claimAllUnlockedSca<S extends boolean>(sign?: S, walletAddress?: string): Promise<ScallopClientVeScaReturnType<S>>;
1698
- /**
1699
- * Mint and get test coin.
1700
- *
1701
- * @remarks
1702
- * Only be used on the test network.
1703
- *
1704
- * @param assetCoinName - Specific asset coin name.
1705
- * @param amount - The amount of coins minted and received.
1706
- * @param receiveAddress - The wallet address that receives the coins.
1707
- * @param sign - Decide to directly sign the transaction or return the transaction block.
1708
- * @return Transaction block response or transaction block.
1709
- */
1710
- mintTestCoin(assetCoinName: Exclude<string, 'sui'>, amount: number): Promise<SuiTransactionBlockResponse>;
1711
- mintTestCoin<S extends boolean>(assetCoinName: Exclude<string, 'sui'>, amount: number, sign?: S, receiveAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1712
- }
1713
-
1714
- /**
1715
- * @argument params - The parameters for the Scallop instance.
1716
- * @argument cacheOptions - The cache options for the QueryClient.
1717
- *
1718
- * @description
1719
- * The main instance that controls interaction with the Scallop contract.
1720
- *
1721
- * @example
1722
- * ```typescript
1723
- * const sdk = new Scallop(<parameters>);
1724
- * const scallopAddress = await sdk.getScallopAddress();
1725
- * const scallopBuilder = await sdk.createScallopBuilder();
1726
- * const scallopClient = await sdk.createScallopClient();
1727
- * const scallopIndexer= await sdk.createScallopIndexer();
1728
- * const scallopUtils= await sdk.createScallopUtils();
1729
- * ```
1730
- */
1731
- type ScallopParams = {
1732
- client?: ScallopClient;
1733
- } & ScallopClientParams;
1734
- declare class Scallop {
1735
- readonly client: ScallopClient;
1736
- constructor(params: ScallopParams);
1737
- init(force?: boolean): Promise<void>;
1738
- /**
1739
- * Create a scallop client instance that already has initial data.
1740
- *
1741
- * @return Scallop Client.
1742
- */
1743
- createScallopClient(): Promise<ScallopClient>;
1744
- /**
1745
- * Create a scallop builder instance that already has initial data.
1746
- *
1747
- * @return Scallop Builder.
1748
- */
1749
- createScallopBuilder(): Promise<ScallopBuilder>;
1750
- /**
1751
- * Create a scallop query instance.
1752
- *
1753
- * @return Scallop Query.
1754
- */
1755
- createScallopQuery(): Promise<ScallopQuery>;
1756
- /**
1757
- * Create a scallop utils instance.
1758
- *
1759
- * @return Scallop Utils.
1760
- */
1761
- createScallopUtils(): Promise<ScallopUtils>;
1762
- /**
1763
- * Create a scallop indexer instance.
1764
- *
1765
- * @return Scallop Indexer.
1766
- */
1767
- createScallopIndexer(): Promise<ScallopIndexer>;
1768
- /**
1769
- * Get a scallop constants instance that already has initial data.
1770
- * @returns Scallop Constants
1771
- */
1772
- getScallopConstants(): Promise<ScallopConstants>;
1773
- }
1774
-
1775
- type CoreIds = {
1776
- protocolPkg: string;
1777
- market: string;
1778
- version: string;
1779
- coinDecimalsRegistry: string;
1780
- xOracle: string;
1781
- };
1782
- type NestedResult = Extract<Argument, {
1783
- $kind: 'NestedResult';
1784
- }>;
1785
- type Obligation$1 = NestedResult;
1786
- type ObligationKey = NestedResult;
1787
- type ObligationHotPotato = NestedResult;
1788
- type CoreNormalMethods = {
1789
- openObligation: () => [Obligation$1, ObligationKey, ObligationHotPotato];
1790
- returnObligation: (obligation: SuiObjectArg, obligationHotPotato: SuiObjectArg) => void;
1791
- openObligationEntry: () => void;
1792
- addCollateral: (obligation: SuiObjectArg, coin: SuiObjectArg, collateralCoinName: string) => void;
1793
- takeCollateral: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, amount: number, collateralCoinName: string) => TransactionResult;
1794
- deposit: (coin: SuiObjectArg, poolCoinName: string) => TransactionResult;
1795
- depositEntry: (coin: SuiObjectArg, poolCoinName: string) => TransactionResult;
1796
- withdraw: (marketCoin: SuiObjectArg, poolCoinName: string) => TransactionResult;
1797
- withdrawEntry: (marketCoin: SuiObjectArg, poolCoinName: string) => TransactionResult;
1798
- borrow: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, amount: number, poolCoinName: string) => TransactionResult;
1799
- borrowWithReferral: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, borrowReferral: SuiObjectArg, amount: number | SuiTxArg, poolCoinName: string) => TransactionResult;
1800
- borrowEntry: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, amount: number, poolCoinName: string) => TransactionResult;
1801
- repay: (obligation: SuiObjectArg, coin: SuiObjectArg, poolCoinName: string) => void;
1802
- borrowFlashLoan: (amount: number | SuiTxArg, poolCoinName: string) => TransactionResult;
1803
- repayFlashLoan: (coin: SuiObjectArg, loan: SuiObjectArg, poolCoinName: string) => void;
1804
- };
1805
- type CoreQuickMethods = {
1806
- addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg) => Promise<void>;
1807
- takeCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg) => Promise<TransactionResult>;
1808
- borrowQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<TransactionResult>;
1809
- borrowWithReferralQuick: (amount: number, poolCoinName: string, borrowReferral: SuiObjectArg, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg, isSponsoredTx?: boolean) => Promise<TransactionResult>;
1810
- depositQuick: (amount: number, poolCoinName: string, returnSCoin?: boolean) => Promise<TransactionResult>;
1811
- withdrawQuick: (amount: number, poolCoinName: string) => Promise<TransactionResult>;
1812
- repayQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg) => Promise<void>;
1813
- updateAssetPricesQuick: (assetCoinNames?: string[]) => Promise<void>;
1814
- };
1815
- type SuiTxBlockWithCoreNormalMethods = SuiTxBlock & SuiTxBlockWithSpool & CoreNormalMethods;
1816
- type CoreTxBlock = SuiTxBlockWithCoreNormalMethods & CoreQuickMethods;
1817
- type GenerateCoreNormalMethod = (params: {
1818
- builder: ScallopBuilder;
1819
- txBlock: SuiTxBlock;
1820
- }) => CoreNormalMethods;
1821
- type GenerateCoreQuickMethod = (params: {
1822
- builder: ScallopBuilder;
1823
- txBlock: SuiTxBlockWithCoreNormalMethods;
1824
- }) => CoreQuickMethods;
1825
-
1826
- type SpoolIds = {
1827
- spoolPkg: string;
1828
- };
1829
- type SpoolNormalMethods = {
1830
- createStakeAccount: (stakeMarketCoinName: string) => TransactionResult;
1831
- stake: (stakeAccount: SuiAddressArg, coin: SuiObjectArg, stakeMarketCoinName: string) => void;
1832
- unstake: (stakeAccount: SuiAddressArg, amount: number, stakeMarketCoinName: string) => TransactionResult;
1833
- claim: (stakeAccount: SuiAddressArg, stakeMarketCoinName: string) => TransactionResult;
1834
- };
1835
- type SpoolQuickMethods = {
1836
- stakeQuick(amountOrMarketCoin: SuiObjectArg | number, stakeMarketCoinName: string, stakeAccountId?: SuiAddressArg): Promise<void>;
1837
- unstakeQuick(amount: number, stakeMarketCoinName: string, stakeAccountId?: SuiAddressArg, returnSCoin?: boolean): Promise<TransactionResult | undefined>;
1838
- claimQuick(stakeMarketCoinName: string, stakeAccountId?: SuiAddressArg): Promise<TransactionResult[]>;
1839
- };
1840
- type SuiTxBlockWithSpoolNormalMethods = SuiTxBlock & SuiTxBlockWithSCoin & SpoolNormalMethods;
1841
- type SpoolTxBlock = SuiTxBlockWithSpoolNormalMethods & SpoolQuickMethods;
1842
- type GenerateSpoolNormalMethod = (params: {
1843
- builder: ScallopBuilder;
1844
- txBlock: SuiTxBlock;
1845
- }) => SpoolNormalMethods;
1846
- type GenerateSpoolQuickMethod = (params: {
1847
- builder: ScallopBuilder;
1848
- txBlock: SuiTxBlockWithSpoolNormalMethods;
1849
- }) => SpoolQuickMethods;
1850
-
1851
- type BorrowIncentiveIds = {
1852
- borrowIncentivePkg: string;
1853
- query: string;
1854
- config: string;
1855
- incentivePools: string;
1856
- incentiveAccounts: string;
1857
- obligationAccessStore: string;
1858
- };
1859
- type BorrowIncentiveNormalMethods = {
1860
- stakeObligation: (obligation: SuiObjectArg, obligationKey: SuiObjectArg) => void;
1861
- stakeObligationWithVesca: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, veScaKey: SuiObjectArg) => void;
1862
- unstakeObligation: (obligation: SuiObjectArg, obligationKey: SuiObjectArg) => void;
1863
- claimBorrowIncentive: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, rewardType: string) => TransactionResult;
1864
- deactivateBoost: (obligation: SuiObjectArg, veScaKey: SuiObjectArg) => void;
1865
- };
1866
- type BorrowIncentiveQuickMethods = {
1867
- stakeObligationQuick(obligation?: string, obligationKey?: string): Promise<void>;
1868
- stakeObligationWithVeScaQuick(obligation?: string, obligationKey?: string, veScaKey?: string): Promise<void>;
1869
- unstakeObligationQuick(obligation?: string, obligationKey?: string): Promise<void>;
1870
- claimBorrowIncentiveQuick(rewardType: string, obligation?: string, obligationKey?: string): Promise<TransactionResult>;
1871
- };
1872
- type SuiTxBlockWithBorrowIncentiveNormalMethods = SuiTxBlock & BorrowIncentiveNormalMethods;
1873
- type BorrowIncentiveTxBlock = SuiTxBlockWithBorrowIncentiveNormalMethods & BorrowIncentiveQuickMethods;
1874
- type GenerateBorrowIncentiveNormalMethod = (params: {
1875
- builder: ScallopBuilder;
1876
- txBlock: SuiTxBlock;
1877
- }) => BorrowIncentiveNormalMethods;
1878
- type GenerateBorrowIncentiveQuickMethod = (params: {
1879
- builder: ScallopBuilder;
1880
- txBlock: SuiTxBlockWithBorrowIncentiveNormalMethods;
1881
- }) => BorrowIncentiveQuickMethods;
1882
-
1883
- type VeScaNormalMethods = {
1884
- lockSca: (scaCoin: SuiObjectArg, unlockAtInSecondTimestamp: number) => TransactionResult;
1885
- extendLockPeriod: (veScaKey: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
1886
- extendLockAmount: (veScaKey: SuiObjectArg, scaCoin: SuiObjectArg) => void;
1887
- renewExpiredVeSca: (veScaKey: SuiObjectArg, scaCoin: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
1888
- redeemSca: (veScaKey: SuiObjectArg) => TransactionResult;
1889
- mintEmptyVeSca: () => TransactionResult;
1890
- splitVeSca: (veScaKey: SuiObjectArg, splitAmount: string) => TransactionResult;
1891
- mergeVeSca: (targetVeScaKey: SuiObjectArg, sourceVeScaKey: SuiObjectArg) => void;
1892
- };
1893
- type QuickMethodReturnType<T extends boolean> = T extends true ? void : TransactionResult;
1894
- type VeScaQuickMethods = {
1895
- /**
1896
- * Quick methods to automate
1897
- * lock initial SCA, extend lock period, lock more SCA, renew expired VeSCA, and redeem SCA
1898
- *
1899
- * **Flow:**
1900
- * - If only `amountOrCoin` is provided, it will lock the amount of existing not expired veSCA
1901
- * - If only `lockPeriodInDays` is provided, it will extend the lock period of existing not expired veSCA
1902
- *
1903
- * **Note:**
1904
- * - If one or both flow above is used on a expired veSCA, it will claim the unlocked SCA
1905
- * and renew the veSCA first, and then flow continues
1906
- * - If users has no veSCA yet, they need to provide both `amountOrCoin` and `lockPeriodInDays` for initial lock
1907
- * @param amountOrCoin
1908
- * @param lockPeriodInDays
1909
- * @param autoCheck
1910
- */
1911
- lockScaQuick(params: {
1912
- amountOrCoin?: SuiObjectArg | number;
1913
- lockPeriodInDays?: number;
1914
- autoCheck?: boolean;
1915
- veScaKey?: SuiObjectData$1 | string;
1916
- }): Promise<void>;
1917
- extendLockPeriodQuick: (params: {
1918
- lockPeriodInDays: number;
1919
- autoCheck?: boolean;
1920
- veScaKey?: SuiObjectData$1 | string;
1921
- }) => Promise<void>;
1922
- extendLockAmountQuick: (params: {
1923
- scaAmount: number;
1924
- autoCheck?: boolean;
1925
- veScaKey?: SuiObjectData$1 | string;
1926
- }) => Promise<void>;
1927
- renewExpiredVeScaQuick: (params: {
1928
- scaAmount: number;
1929
- lockPeriodInDays: number;
1930
- autoCheck?: boolean;
1931
- veScaKey?: SuiObjectData$1 | string;
1932
- }) => Promise<void>;
1933
- redeemScaQuick: <T extends boolean>(params: {
1934
- veScaKey?: SuiObjectData$1 | string;
1935
- transferSca?: T;
1936
- }) => Promise<QuickMethodReturnType<T> | undefined>;
1937
- splitVeScaQuick: <T extends boolean>(params: {
1938
- splitAmount: string;
1939
- veScaKey: string;
1940
- transferVeScaKey?: T;
1941
- }) => Promise<QuickMethodReturnType<T> | undefined>;
1942
- mergeVeScaQuick: (params: {
1943
- targetVeScaKey: string;
1944
- sourceVeScaKey: string;
1945
- }) => Promise<void>;
1946
- };
1947
- type SuiTxBlockWithVeScaNormalMethods = SuiTxBlock & VeScaNormalMethods;
1948
- type VeScaTxBlock = SuiTxBlockWithVeScaNormalMethods & VeScaQuickMethods;
1949
- type GenerateVeScaNormalMethod = (params: {
1950
- builder: ScallopBuilder;
1951
- txBlock: SuiTxBlock;
1952
- }) => VeScaNormalMethods;
1953
- type GenerateVeScaQuickMethod = (params: {
1954
- builder: ScallopBuilder;
1955
- txBlock: SuiTxBlockWithVeScaNormalMethods;
1956
- }) => VeScaQuickMethods;
1957
-
1958
- type ReferralNormalMethods = {
1959
- bindToReferral: (veScaKeyId: string) => void;
1960
- claimReferralTicket: (poolCoinName: string) => TransactionResult$1;
1961
- burnReferralTicket: (ticket: SuiObjectArg, poolCoinName: string) => void;
1962
- claimReferralRevenue: (veScaKey: SuiObjectArg, poolCoinName: string) => TransactionResult$1;
1963
- };
1964
- type ReferralQuickMethods = {
1965
- claimReferralRevenueQuick: (veScaKey: SuiObjectArg, coinNames: string[]) => Promise<void>;
1966
- };
1967
- type SuiTxBlockWithReferralNormalMethods = SuiTxBlock & ReferralNormalMethods;
1968
- type ReferralTxBlock = SuiTxBlockWithReferralNormalMethods & ReferralQuickMethods;
1969
-
1970
- type LoyaltyProgramNormalMethods = {
1971
- claimLoyaltyRevenue: (veScaKey: SuiObjectArg) => TransactionResult$1;
1972
- claimVeScaLoyaltyReward: (veScaKey: SuiObjectArg) => TransactionResult$1;
1973
- };
1974
- type LoyaltyProgramQuickMethods = {
1975
- claimLoyaltyRevenueQuick: (veScaKey?: SuiObjectArg) => Promise<void>;
1976
- claimVeScaLoyaltyRewardQuick: (veScaKey?: SuiObjectArg) => Promise<void>;
1977
- };
1978
- type SuiTxBlockWithLoyaltyProgramNormalMethods = SuiTxBlock & LoyaltyProgramNormalMethods;
1979
- type LoyaltyProgramTxBlock = SuiTxBlockWithLoyaltyProgramNormalMethods & LoyaltyProgramQuickMethods;
1980
- type GenerateLoyaltyProgramNormalMethod = (params: {
1981
- builder: ScallopBuilder;
1982
- txBlock: SuiTxBlock;
1983
- }) => LoyaltyProgramNormalMethods;
1984
- type GenerateLoyaltyProgramQuickMethod = (params: {
1985
- builder: ScallopBuilder;
1986
- txBlock: SuiTxBlockWithLoyaltyProgramNormalMethods;
1987
- }) => LoyaltyProgramQuickMethods;
1988
-
1989
- type sCoinPkgIds = {
1990
- pkgId: string;
1991
- };
1992
- type sCoinNormalMethods = {
1993
- /**
1994
- * Lock marketCoin and return sCoin
1995
- * @param marketCoinName
1996
- * @param marketCoin
1997
- * @returns
1998
- */
1999
- mintSCoin: (marketCoinName: string, marketCoin: SuiObjectArg) => TransactionResult$1;
2000
- /**
2001
- * Burn sCoin and return marketCoin
2002
- * @param sCoinName
2003
- * @param sCoin
2004
- * @returns
2005
- */
2006
- burnSCoin: (sCoinName: string, sCoin: SuiObjectArg) => TransactionResult$1;
2007
- };
2008
- type sCoinQuickMethods = {
2009
- mintSCoinQuick: (marketCoinName: string, amount: number) => Promise<TransactionResult$1>;
2010
- burnSCoinQuick: (sCoinName: string, amount: number) => Promise<TransactionResult$1>;
2011
- };
2012
- type SuiTxBlockWithSCoinNormalMethods = SuiTxBlock & BaseScallopTxBlock & sCoinNormalMethods;
2013
- type SCoinTxBlock = SuiTxBlockWithSCoinNormalMethods & sCoinQuickMethods;
2014
- type GenerateSCoinNormalMethod = (params: {
2015
- builder: ScallopBuilder;
2016
- txBlock: SuiTxBlock;
2017
- }) => sCoinNormalMethods;
2018
- type GenerateSCoinQuickMethod = (params: {
2019
- builder: ScallopBuilder;
2020
- txBlock: SuiTxBlockWithSCoinNormalMethods;
2021
- }) => sCoinQuickMethods;
2022
-
2023
- type BaseScallopTxBlock = ReferralTxBlock & LoyaltyProgramTxBlock & BorrowIncentiveTxBlock & VeScaTxBlock;
2024
- type SuiTxBlockWithSCoin = BaseScallopTxBlock & SCoinTxBlock;
2025
- type SuiTxBlockWithSpool = SuiTxBlockWithSCoin & SpoolTxBlock;
2026
- type ScallopTxBlock = SuiTxBlockWithSpool & CoreTxBlock;
2027
- type SelectCoinReturnType<T extends string> = T extends 'sui' ? {
2028
- takeCoin: NestedResult;
2029
- } : {
2030
- takeCoin: NestedResult;
2031
- leftCoin: NestedResult;
2032
- };
2033
-
2034
- type PoolAddress = {
2035
- coinName: string;
2036
- symbol: string;
2037
- coinType: string;
2038
- coinMetadataId: string;
2039
- decimals: number;
2040
- isIsolated: boolean;
2041
- pythFeed?: string;
2042
- pythFeedObjectId?: string;
2043
- lendingPoolAddress?: string;
2044
- borrowDynamic?: string;
2045
- interestModel?: string;
2046
- borrowFeeKey?: string;
2047
- flashloanFeeObject?: string;
2048
- coinGeckoId?: string;
2049
- collateralPoolAddress?: string;
2050
- riskModel?: string;
2051
- supplyLimitKey?: string;
2052
- borrowLimitKey?: string;
2053
- sCoinType?: string;
2054
- sCoinName?: string;
2055
- sCoinSymbol?: string;
2056
- sCoinMetadataId?: string;
2057
- sCoinTreasury?: string;
2058
- isolatedAssetKey: string;
2059
- spool?: string;
2060
- spoolReward?: string;
2061
- spoolName?: string;
2062
- };
2063
- type Whitelist = {
2064
- lending: Set<string>;
2065
- borrowing: Set<string>;
2066
- collateral: Set<string>;
2067
- packages: Set<string>;
2068
- spool: Set<string>;
2069
- scoin: Set<string>;
2070
- suiBridge: Set<string>;
2071
- wormhole: Set<string>;
2072
- oracles: Set<string>;
2073
- borrowIncentiveRewards: Set<string>;
2074
- rewardsAsPoint: Set<string>;
2075
- pythEndpoints: Set<string>;
2076
- deprecated: Set<string>;
2077
- emerging: Set<string>;
2078
- };
2079
- type CoinWrappedType = {
2080
- from: string;
2081
- type: string;
2082
- } | undefined;
2083
-
2084
- type Coins = {
2085
- [K in string]: K;
2086
- };
2087
- type AssetCoins = {
2088
- [K in string]: K;
2089
- };
2090
- type MarketCoins = {
2091
- [K in string]: K;
2092
- };
2093
- type SCoins = {
2094
- [K in string]: K;
2095
- };
2096
- type StakeMarketCoins = {
2097
- [K in string]: K;
2098
- };
2099
- type StakeRewardCoins = {
2100
- [key in string]: string;
2101
- };
2102
- type SuiBridgeCoins = {
2103
- [K in string]: K;
2104
- };
2105
- type BorrowIncentiveRewardCoins = {
2106
- [key in string]: string[];
2107
- };
2108
- type AssetCoinIds = {
2109
- [key in string]: string;
2110
- };
2111
- type SCoinIds = {
2112
- [key in string]: string;
2113
- };
2114
- type SCoinTreasuryCaps = {
2115
- [key in string]: string;
2116
- };
2117
- type SCoinConverterTreasury = {
2118
- [key in string]: string;
2119
- };
2120
- type PickFromUnion<T, K extends string> = K extends T ? K : never;
2121
- type WormholeCoinIds = {
2122
- [key in PickFromUnion<string, 'weth' | 'wbtc' | 'wusdc' | 'wusdt' | 'wapt' | 'wsol'>]: string;
2123
- };
2124
- type VoloCoinIds = {
2125
- [key in PickFromUnion<string, 'vsui'>]: string;
2126
- };
2127
- type SuiBridgedCoinPackageIds = {
2128
- [key in string]: string;
2129
- };
2130
-
2131
- declare const _SUPPORT_ORACLES: readonly ["supra", "switchboard", "pyth"];
2132
- type SupportOracleType = (typeof _SUPPORT_ORACLES)[number];
2133
- type xOracleRules = {
2134
- primary: SupportOracleType[];
2135
- secondary: SupportOracleType[];
2136
- };
2137
- type xOracleRuleType = keyof xOracleRules;
2138
- type xOracleListType = {
2139
- [key in string]: xOracleRules;
2140
- };
2141
-
2142
- interface BorrowIncentiveAccountKey {
2143
- id: string;
2144
- onwerId: string;
2145
- }
2146
- type OptionalKeys$4<T> = {
2147
- [K in keyof T]?: T[K];
2148
- };
2149
- type BorrowIncentivePools = OptionalKeys$4<Record<string, BorrowIncentivePool>>;
2150
- type BorrowIncentivePoolPoints = {
2151
- symbol: string;
2152
- coinName: string;
2153
- coinType: string;
2154
- coinDecimal: number;
2155
- coinPrice: number;
2156
- } & Required<Pick<ParsedBorrowIncentivePoolPointData, 'points' | 'distributedPoint' | 'weightedAmount'>> & CalculatedBorrowIncentivePoolPointData;
2157
- type BorrowIncentivePool = {
2158
- coinName: string;
2159
- symbol: string;
2160
- coinType: string;
2161
- coinDecimal: number;
2162
- coinPrice: number;
2163
- stakedAmount: number;
2164
- stakedCoin: number;
2165
- stakedValue: number;
2166
- points: OptionalKeys$4<Record<string, BorrowIncentivePoolPoints>>;
2167
- };
2168
- type OriginBorrowIncentivePoolPointData = {
2169
- point_type: {
2170
- name: string;
2171
- };
2172
- distributed_point_per_period: string;
2173
- point_distribution_time: string;
2174
- distributed_point: string;
2175
- points: string;
2176
- index: string;
2177
- base_weight: string;
2178
- weighted_amount: string;
2179
- last_update: string;
2180
- created_at: string;
2181
- };
2182
- type OriginBorrowIncentivePoolData = {
2183
- pool_type: {
2184
- name: string;
2185
- };
2186
- points: OriginBorrowIncentivePoolPointData[];
2187
- min_stakes: string;
2188
- max_stakes: string;
2189
- stakes: string;
2190
- created_at: string;
2191
- };
2192
- type ParsedBorrowIncentivePoolPointData = {
2193
- pointType: string;
2194
- distributedPointPerPeriod: number;
2195
- period: number;
2196
- distributedPoint: number;
2197
- points: number;
2198
- index: number;
2199
- baseWeight: number;
2200
- weightedAmount: number;
2201
- lastUpdate: number;
2202
- createdAt: number;
2203
- };
2204
- type ParsedBorrowIncentivePoolData = {
2205
- poolType: string;
2206
- poolPoints: OptionalKeys$4<Record<string, ParsedBorrowIncentivePoolPointData>>;
2207
- minStakes: number;
2208
- maxStakes: number;
2209
- staked: number;
2210
- };
2211
- type CalculatedBorrowIncentivePoolPointData = {
2212
- baseWeight: number;
2213
- weightedStakedAmount: number;
2214
- weightedStakedCoin: number;
2215
- weightedStakedValue: number;
2216
- distributedPointPerSec: number;
2217
- accumulatedPoints: number;
2218
- currentPointIndex: number;
2219
- currentTotalDistributedPoint: number;
2220
- rewardApr: number;
2221
- rewardPerSec: number;
2222
- };
2223
- type BorrowIncentiveAccounts = OptionalKeys$4<Record<string, ParsedBorrowIncentiveAccountData>>;
2224
- type OriginBorrowIncentiveAccountPoolData = {
2225
- point_type: {
2226
- name: string;
2227
- };
2228
- weighted_amount: string;
2229
- points: string;
2230
- total_points: string;
2231
- index: string;
2232
- };
2233
- type OriginBorrowIncentiveAccountData = {
2234
- points_list: OriginBorrowIncentiveAccountPoolData[];
2235
- pool_type: {
2236
- name: string;
2237
- };
2238
- debt_amount: string;
2239
- };
2240
- type ParsedBorrowIncentiveAccountPoolData = {
2241
- pointType: string;
2242
- weightedAmount: number;
2243
- points: number;
2244
- totalPoints: number;
2245
- index: number;
2246
- };
2247
- type ParsedBorrowIncentiveAccountData = {
2248
- pointList: OptionalKeys$4<Record<string, ParsedBorrowIncentiveAccountPoolData>>;
2249
- poolType: string;
2250
- debtAmount: number;
2251
- };
2252
- /**
2253
- * The query interface for `incentive_pools_query::incentive_pools_data` inspectTxn.
2254
- */
2255
- interface BorrowIncentivePoolsQueryInterface {
2256
- incentive_pools: OriginBorrowIncentivePoolData[];
2257
- }
2258
- /**
2259
- * The query interface for `incentive_account_query::incentive_account_data` inspectTxn.
2260
- */
2261
- interface BorrowIncentiveAccountsQueryInterface {
2262
- pool_records: OriginBorrowIncentiveAccountData[];
2263
- }
2264
-
2265
- type OptionalKeys$3<T> = {
2266
- [K in keyof T]?: T[K];
2267
- };
2268
- type MarketPools = OptionalKeys$3<Record<string, MarketPool>>;
2269
- type MarketCollaterals = OptionalKeys$3<Record<string, MarketCollateral>>;
2270
- type CoinAmounts = OptionalKeys$3<Record<string, number>>;
2271
- type MarketCoinAmounts = OptionalKeys$3<Record<string, number>>;
2272
- type SCoinAmounts = OptionalKeys$3<Record<string, number>>;
2273
- type BalanceSheet = {
2274
- cash: string;
2275
- debt: string;
2276
- market_coin_supply: string;
2277
- revenue: string;
2278
- };
2279
- type BorrowDynamic = {
2280
- borrow_index: string;
2281
- interest_rate: {
2282
- fields: {
2283
- value: string;
2284
- };
2285
- };
2286
- interest_rate_scale: string;
2287
- last_updated: string;
2288
- };
2289
- type BorrowFee = {
2290
- value: string;
2291
- };
2292
- type InterestModel = {
2293
- base_borrow_rate_per_sec: {
2294
- fields: {
2295
- value: string;
2296
- };
2297
- };
2298
- borrow_rate_on_high_kink: {
2299
- fields: {
2300
- value: string;
2301
- };
2302
- };
2303
- borrow_rate_on_mid_kink: {
2304
- fields: {
2305
- value: string;
2306
- };
2307
- };
2308
- borrow_weight: {
2309
- fields: {
2310
- value: string;
2311
- };
2312
- };
2313
- borrow_fee_rate: {
2314
- fields: {
2315
- value: string;
2316
- };
2317
- };
2318
- high_kink: {
2319
- fields: {
2320
- value: string;
2321
- };
2322
- };
2323
- interest_rate_scale: string;
2324
- max_borrow_rate: {
2325
- fields: {
2326
- value: string;
2327
- };
2328
- };
2329
- mid_kink: {
2330
- fields: {
2331
- value: string;
2332
- };
2333
- };
2334
- min_borrow_amount: string;
2335
- revenue_factor: {
2336
- fields: {
2337
- value: string;
2338
- };
2339
- };
2340
- type: {
2341
- fields: {
2342
- name: string;
2343
- };
2344
- };
2345
- };
2346
- type RiskModel = {
2347
- collateral_factor: {
2348
- fields: {
2349
- value: string;
2350
- };
2351
- };
2352
- liquidation_discount: {
2353
- fields: {
2354
- value: string;
2355
- };
2356
- };
2357
- liquidation_factor: {
2358
- fields: {
2359
- value: string;
2360
- };
2361
- };
2362
- liquidation_penalty: {
2363
- fields: {
2364
- value: string;
2365
- };
2366
- };
2367
- liquidation_revenue_factor: {
2368
- fields: {
2369
- value: string;
2370
- };
2371
- };
2372
- max_collateral_amount: string;
2373
- type: {
2374
- fields: {
2375
- name: string;
2376
- };
2377
- };
2378
- };
2379
- type CollateralStat = {
2380
- amount: string;
2381
- };
2382
- type MarketPool = {
2383
- coinName: string;
2384
- symbol: string;
2385
- coinType: string;
2386
- marketCoinType: string;
2387
- sCoinType: string;
2388
- coinWrappedType: CoinWrappedType;
2389
- coinDecimal: number;
2390
- coinPrice: number;
2391
- maxSupplyCoin: number;
2392
- maxBorrowCoin: number;
2393
- isIsolated: boolean;
2394
- } & Required<Pick<ParsedMarketPoolData, 'highKink' | 'midKink' | 'reserveFactor' | 'borrowWeight' | 'borrowFee' | 'marketCoinSupplyAmount' | 'minBorrowAmount'>> & CalculatedMarketPoolData;
2395
- type MarketCollateral = {
2396
- coinName: string;
2397
- symbol: string;
2398
- coinType: string;
2399
- marketCoinType: string;
2400
- coinWrappedType: CoinWrappedType;
2401
- coinDecimal: number;
2402
- coinPrice: number;
2403
- isIsolated: boolean;
2404
- } & Required<Pick<ParsedMarketCollateralData, 'collateralFactor' | 'liquidationFactor' | 'liquidationDiscount' | 'liquidationPenalty' | 'liquidationReserveFactor'>> & CalculatedMarketCollateralData;
2405
- type OriginMarketPoolData = {
2406
- type: {
2407
- name: string;
2408
- };
2409
- maxBorrowRate: {
2410
- value: string;
2411
- };
2412
- interestRate: {
2413
- value: string;
2414
- };
2415
- interestRateScale: string;
2416
- borrowIndex: string;
2417
- lastUpdated: string;
2418
- cash: string;
2419
- debt: string;
2420
- marketCoinSupply: string;
2421
- reserve: string;
2422
- reserveFactor: {
2423
- value: string;
2424
- };
2425
- borrowWeight: {
2426
- value: string;
2427
- };
2428
- borrowFeeRate: {
2429
- value: string;
2430
- };
2431
- baseBorrowRatePerSec: {
2432
- value: string;
2433
- };
2434
- borrowRateOnHighKink: {
2435
- value: string;
2436
- };
2437
- borrowRateOnMidKink: {
2438
- value: string;
2439
- };
2440
- highKink: {
2441
- value: string;
2442
- };
2443
- midKink: {
2444
- value: string;
2445
- };
2446
- minBorrowAmount: string;
2447
- isIsolated: boolean;
2448
- supplyLimit: string;
2449
- borrowLimit: string;
2450
- };
2451
- type ParsedMarketPoolData = {
2452
- coinType: string;
2453
- maxBorrowRate: number;
2454
- borrowRate: number;
2455
- borrowRateScale: number;
2456
- borrowIndex: number;
2457
- lastUpdated: number;
2458
- cashAmount: number;
2459
- debtAmount: number;
2460
- marketCoinSupplyAmount: number;
2461
- reserveAmount: number;
2462
- reserveFactor: number;
2463
- borrowWeight: number;
2464
- borrowFee: number;
2465
- baseBorrowRate: number;
2466
- borrowRateOnHighKink: number;
2467
- borrowRateOnMidKink: number;
2468
- highKink: number;
2469
- midKink: number;
2470
- minBorrowAmount: number;
2471
- isIsolated: boolean;
2472
- supplyLimit: number;
2473
- borrowLimit: number;
2474
- };
2475
- type CalculatedMarketPoolData = {
2476
- baseBorrowApr: number;
2477
- baseBorrowApy: number;
2478
- borrowAprOnHighKink: number;
2479
- borrowApyOnHighKink: number;
2480
- borrowAprOnMidKink: number;
2481
- borrowApyOnMidKink: number;
2482
- coinDecimal: number;
2483
- conversionRate: number;
2484
- maxBorrowApr: number;
2485
- maxBorrowApy: number;
2486
- borrowApr: number;
2487
- borrowApy: number;
2488
- borrowIndex: number;
2489
- growthInterest: number;
2490
- supplyAmount: number;
2491
- supplyCoin: number;
2492
- borrowAmount: number;
2493
- borrowCoin: number;
2494
- reserveAmount: number;
2495
- reserveCoin: number;
2496
- utilizationRate: number;
2497
- supplyApr: number;
2498
- supplyApy: number;
2499
- isIsolated: boolean;
2500
- maxSupplyCoin: number;
2501
- maxBorrowCoin: number;
2502
- };
2503
- type OriginMarketCollateralData = {
2504
- type: {
2505
- name: string;
2506
- };
2507
- isIsolated: boolean;
2508
- collateralFactor: {
2509
- value: string;
2510
- };
2511
- liquidationFactor: {
2512
- value: string;
2513
- };
2514
- liquidationDiscount: {
2515
- value: string;
2516
- };
2517
- liquidationPenalty: {
2518
- value: string;
2519
- };
2520
- liquidationReserveFactor: {
2521
- value: string;
2522
- };
2523
- maxCollateralAmount: string;
2524
- totalCollateralAmount: string;
2525
- };
2526
- type ParsedMarketCollateralData = {
2527
- coinType: string;
2528
- collateralFactor: number;
2529
- liquidationFactor: number;
2530
- liquidationDiscount: number;
2531
- liquidationPenalty: number;
2532
- liquidationReserveFactor: number;
2533
- maxCollateralAmount: number;
2534
- totalCollateralAmount: number;
2535
- isIsolated: boolean;
2536
- };
2537
- type CalculatedMarketCollateralData = {
2538
- coinDecimal: number;
2539
- isIsolated: boolean;
2540
- maxDepositAmount: number;
2541
- maxDepositCoin: number;
2542
- depositAmount: number;
2543
- depositCoin: number;
2544
- };
2545
- type Market = {
2546
- pools: MarketPools;
2547
- collaterals: MarketCollaterals;
2548
- data?: MarketQueryInterface;
2549
- };
2550
- type Obligation = {
2551
- id: string;
2552
- keyId: string;
2553
- locked: boolean;
2554
- };
2555
- /**
2556
- * The query interface for `market_query::market_data` inspectTxn.
2557
- */
2558
- interface MarketQueryInterface {
2559
- collaterals: {
2560
- collateralFactor: {
2561
- value: string;
2562
- };
2563
- liquidationDiscount: {
2564
- value: string;
2565
- };
2566
- liquidationFactor: {
2567
- value: string;
2568
- };
2569
- liquidationPanelty: {
2570
- value: string;
2571
- };
2572
- liquidationReserveFactor: {
2573
- value: string;
2574
- };
2575
- maxCollateralAmount: string;
2576
- totalCollateralAmount: string;
2577
- type: {
2578
- name: string;
2579
- };
2580
- }[];
2581
- pools: {
2582
- baseBorrowRatePerSec: {
2583
- value: string;
2584
- };
2585
- borrowRateOnHighKink: {
2586
- value: string;
2587
- };
2588
- borrowRateOnMidKink: {
2589
- value: string;
2590
- };
2591
- maxBorrowRate: {
2592
- value: string;
2593
- };
2594
- highKink: {
2595
- value: string;
2596
- };
2597
- midKink: {
2598
- value: string;
2599
- };
2600
- interestRate: {
2601
- value: string;
2602
- };
2603
- interestRateScale: string;
2604
- borrowIndex: string;
2605
- lastUpdated: string;
2606
- cash: string;
2607
- debt: string;
2608
- marketCoinSupply: string;
2609
- minBorrowAmount: string;
2610
- reserve: string;
2611
- reserveFactor: {
2612
- value: string;
2613
- };
2614
- borrowWeight: {
2615
- value: string;
2616
- };
2617
- borrowFeeRate: {
2618
- value: string;
2619
- };
2620
- type: {
2621
- name: string;
2622
- };
2623
- }[];
2624
- }
2625
- /**
2626
- * The query interface for `obligation_query::obligation_data` inspectTxn.
2627
- */
2628
- interface ObligationQueryInterface {
2629
- collaterals: {
2630
- type: {
2631
- name: string;
2632
- };
2633
- amount: string;
2634
- }[];
2635
- debts: {
2636
- type: {
2637
- name: string;
2638
- };
2639
- amount: string;
2640
- borrowIndex: string;
2641
- }[];
2642
- }
2643
-
2644
- type LoyaltyProgramInfo = {
2645
- pendingReward: number;
2646
- totalPoolReward: number;
2647
- isClaimEnabled: boolean;
2648
- };
2649
- type VeScaLoyaltyProgramInfo = {
2650
- pendingVeScaReward: number;
2651
- pendingScaReward: number;
2652
- totalPoolReward: number;
2653
- isClaimEnabled: boolean;
2654
- };
2655
-
2656
- type OptionalKeys$2<T> = {
2657
- [K in keyof T]?: T[K];
2658
- };
2659
- type Spools = OptionalKeys$2<Record<string, Spool>>;
2660
- type Spool = {
2661
- marketCoinName: string;
2662
- symbol: string;
2663
- coinType: string;
2664
- marketCoinType: string;
2665
- rewardCoinType: string;
2666
- sCoinType: string;
2667
- coinDecimal: number;
2668
- rewardCoinDecimal: number;
2669
- coinPrice: number;
2670
- marketCoinPrice: number;
2671
- rewardCoinPrice: number;
2672
- } & Required<Pick<ParsedSpoolData, 'maxPoint' | 'distributedPoint' | 'maxStake'>> & CalculatedSpoolData & SpoolRewardPool;
2673
- type OriginSpoolData = {
2674
- stakeType: {
2675
- fields: {
2676
- name: string;
2677
- };
2678
- };
2679
- maxDistributedPoint: string;
2680
- distributedPoint: string;
2681
- distributedPointPerPeriod: string;
2682
- pointDistributionTime: string;
2683
- maxStake: string;
2684
- stakes: string;
2685
- index: string;
2686
- createdAt: string;
2687
- lastUpdate: string;
2688
- };
2689
- type SpoolData = {
2690
- created_at: string;
2691
- distributed_point: string;
2692
- distributed_point_per_period: string;
2693
- id: {
2694
- id: string;
2695
- };
2696
- index: string;
2697
- last_update: string;
2698
- max_distributed_point: string;
2699
- max_stakes: string;
2700
- point_distribution_time: string;
2701
- stake_type: {
2702
- type: string;
2703
- fields: {
2704
- name: string;
2705
- };
2706
- };
2707
- stakes: string;
2708
- };
2709
- type ParsedSpoolData = {
2710
- stakeType: string;
2711
- maxPoint: number;
2712
- distributedPoint: number;
2713
- pointPerPeriod: number;
2714
- period: number;
2715
- maxStake: number;
2716
- staked: number;
2717
- index: number;
2718
- createdAt: number;
2719
- lastUpdate: number;
2720
- };
2721
- type CalculatedSpoolData = {
2722
- stakedAmount: number;
2723
- stakedCoin: number;
2724
- stakedValue: number;
2725
- distributedPointPerSec: number;
2726
- accumulatedPoints: number;
2727
- currentPointIndex: number;
2728
- currentTotalDistributedPoint: number;
2729
- startDate: Date;
2730
- endDate: Date;
2731
- };
2732
- type SpoolRewardPool = Required<Pick<ParsedSpoolRewardPoolData, 'exchangeRateNumerator' | 'exchangeRateDenominator'>> & CalculatedSpoolRewardPoolData;
2733
- type OriginSpoolRewardPoolData = {
2734
- claimed_rewards: string;
2735
- exchange_rate_denominator: string;
2736
- exchange_rate_numerator: string;
2737
- rewards: string;
2738
- spool_id: string;
2739
- };
2740
- type ParsedSpoolRewardPoolData = {
2741
- claimedRewards: number;
2742
- exchangeRateDenominator: number;
2743
- exchangeRateNumerator: number;
2744
- rewards: number;
2745
- spoolId: string;
2746
- };
2747
- type CalculatedSpoolRewardPoolData = {
2748
- rewardApr: number;
2749
- totalRewardAmount: number;
2750
- totalRewardCoin: number;
2751
- totalRewardValue: number;
2752
- remaindRewardAmount: number;
2753
- remaindRewardCoin: number;
2754
- remaindRewardValue: number;
2755
- claimedRewardAmount: number;
2756
- claimedRewardCoin: number;
2757
- claimedRewardValue: number;
2758
- rewardPerSec: number;
2759
- };
2760
- type StakePools = OptionalKeys$2<Record<string, StakePool>>;
2761
- type StakeRewardPools = OptionalKeys$2<Record<string, StakeRewardPool>>;
2762
- type StakeAccounts = Record<string, StakeAccount[]>;
2763
- interface StakeAccount {
2764
- id: string;
2765
- type: string;
2766
- stakePoolId: string;
2767
- stakeType: string;
2768
- staked: number;
2769
- index: number;
2770
- points: number;
2771
- totalPoints: number;
2772
- }
2773
- interface StakePool {
2774
- id: string;
2775
- type: string;
2776
- maxPoint: number;
2777
- distributedPoint: number;
2778
- pointPerPeriod: number;
2779
- period: number;
2780
- maxStake: number;
2781
- stakeType: string;
2782
- totalStaked: number;
2783
- index: number;
2784
- createdAt: number;
2785
- lastUpdate: number;
2786
- }
2787
- interface StakeRewardPool {
2788
- id: string;
2789
- type: string;
2790
- stakePoolId: string;
2791
- ratioDenominator: number;
2792
- ratioNumerator: number;
2793
- rewards: number;
2794
- claimedRewards: number;
2795
- }
2796
-
2797
- type OptionalKeys$1<T> = {
2798
- [K in keyof T]?: T[K];
2799
- };
2800
- type Lendings = OptionalKeys$1<Record<string, Lending>>;
2801
- type ObligationAccounts = OptionalKeys$1<Record<string, ObligationAccount>>;
2802
- type Lending = Required<Pick<MarketPool, 'coinName' | 'symbol' | 'coinType' | 'marketCoinType' | 'sCoinType' | 'coinDecimal' | 'coinPrice' | 'conversionRate' | 'isIsolated'> & Pick<Spool, 'marketCoinPrice'>> & {
2803
- supplyApr: number;
2804
- supplyApy: number;
2805
- rewardApr: number;
2806
- suppliedAmount: number;
2807
- suppliedCoin: number;
2808
- suppliedValue: number;
2809
- stakedMarketAmount: number;
2810
- stakedMarketCoin: number;
2811
- stakedAmount: number;
2812
- stakedCoin: number;
2813
- stakedValue: number;
2814
- unstakedMarketAmount: number;
2815
- unstakedMarketCoin: number;
2816
- unstakedAmount: number;
2817
- unstakedCoin: number;
2818
- unstakedValue: number;
2819
- availableSupplyAmount: number;
2820
- availableSupplyCoin: number;
2821
- availableWithdrawAmount: number;
2822
- availableWithdrawCoin: number;
2823
- availableStakeAmount: number;
2824
- availableStakeCoin: number;
2825
- availableUnstakeAmount: number;
2826
- availableUnstakeCoin: number;
2827
- availableClaimAmount: number;
2828
- availableClaimCoin: number;
2829
- };
2830
- type ObligationAccount = {
2831
- obligationId: string;
2832
- totalDepositedValue: number;
2833
- totalBorrowedValue: number;
2834
- totalBalanceValue: number;
2835
- totalBorrowCapacityValue: number;
2836
- totalAvailableCollateralValue: number;
2837
- totalBorrowedValueWithWeight: number;
2838
- totalRequiredCollateralValue: number;
2839
- totalUnhealthyCollateralValue: number;
2840
- totalRiskLevel: number;
2841
- totalDepositedPools: number;
2842
- totalBorrowedPools: number;
2843
- totalRewardedPools: number;
2844
- collaterals: OptionalKeys$1<Record<string, ObligationCollateral>>;
2845
- debts: OptionalKeys$1<Record<string, ObligationDebt>>;
2846
- borrowIncentives: OptionalKeys$1<Record<string, ObligationBorrowIncentive>>;
2847
- };
2848
- type ObligationCollateral = {
2849
- coinName: string;
2850
- coinType: string;
2851
- symbol: string;
2852
- coinDecimal: number;
2853
- coinPrice: number;
2854
- depositedAmount: number;
2855
- depositedCoin: number;
2856
- depositedValue: number;
2857
- borrowCapacityValue: number;
2858
- requiredCollateralValue: number;
2859
- availableDepositAmount: number;
2860
- availableDepositCoin: number;
2861
- availableWithdrawAmount: number;
2862
- availableWithdrawCoin: number;
2863
- };
2864
- type ObligationDebt = {
2865
- coinName: string;
2866
- coinType: string;
2867
- symbol: string;
2868
- coinDecimal: number;
2869
- coinPrice: number;
2870
- borrowedAmount: number;
2871
- borrowedCoin: number;
2872
- borrowedValue: number;
2873
- borrowedValueWithWeight: number;
2874
- borrowIndex: number;
2875
- requiredRepayAmount: number;
2876
- requiredRepayCoin: number;
2877
- availableBorrowAmount: number;
2878
- availableBorrowCoin: number;
2879
- availableRepayAmount: number;
2880
- availableRepayCoin: number;
2881
- };
2882
- type ObligationBorrowIncentiveReward = {
2883
- coinName: string;
2884
- coinType: string;
2885
- symbol: string;
2886
- coinDecimal: number;
2887
- coinPrice: number;
2888
- weightedBorrowAmount: number;
2889
- availableClaimCoin: number;
2890
- availableClaimAmount: number;
2891
- boostValue: number;
2892
- };
2893
- type ObligationBorrowIncentive = {
2894
- coinName: string;
2895
- coinType: string;
2896
- symbol: string;
2897
- coinDecimal: number;
2898
- coinPrice: number;
2899
- rewards: ObligationBorrowIncentiveReward[];
2900
- };
2901
- type TotalValueLocked = {
2902
- supplyLendingValue: number;
2903
- supplyCollateralValue: number;
2904
- supplyValue: number;
2905
- borrowValue: number;
2906
- totalValue: number;
2907
- supplyValueChangeRatio?: number;
2908
- supplyLendingValueChangeRatio?: number;
2909
- supplyCollateralValueChangeRatio?: number;
2910
- borrowValueChangeRatio?: number;
2911
- totalValueChangeRatio?: number;
2912
- };
2913
-
2914
- type sCoinBalance = number;
2915
-
2916
- type Vesca = {
2917
- id: string;
2918
- keyId: string;
2919
- keyObject?: SuiObjectRef$1;
2920
- object: SuiObjectRef$1;
2921
- lockedScaAmount: string;
2922
- lockedScaCoin: number;
2923
- currentVeScaBalance: number;
2924
- unlockAt: number;
2925
- };
2926
- type VeScaTreasuryFields = {
2927
- total_ve_sca_amount: string;
2928
- sca_balance: string;
2929
- unlock_schedule: {
2930
- fields: {
2931
- locked_sca_amount: string;
2932
- };
2933
- };
2934
- };
2935
- type VeScaTreasuryInfo = {
2936
- totalLockedSca: number;
2937
- totalVeSca: number;
2938
- averageLockingPeriod: number;
2939
- averageLockingPeriodUnit: string;
2940
- };
2941
-
2942
- interface AddressesInterface {
2943
- id?: string;
2944
- core: {
2945
- version: string;
2946
- versionCap: string;
2947
- object: string;
2948
- market: string;
2949
- adminCap: string;
2950
- coinDecimalsRegistry: string;
2951
- obligationAccessStore: string;
2952
- coins: Partial<Record<string, {
2953
- id: string;
2954
- treasury: string;
2955
- metaData: string;
2956
- coinType: string;
2957
- symbol: string;
2958
- decimals: number;
2959
- oracle: {
2960
- [K in SupportOracleType]: K extends (typeof _SUPPORT_ORACLES)[0] ? string : K extends (typeof _SUPPORT_ORACLES)[1] ? string : K extends (typeof _SUPPORT_ORACLES)[2] ? {
2961
- feed: string;
2962
- feedObject: string;
2963
- } : never;
2964
- };
2965
- }>>;
2966
- oracles: {
2967
- [K in SupportOracleType]: K extends (typeof _SUPPORT_ORACLES)[0] ? {
2968
- registry: string;
2969
- registryCap: string;
2970
- holder: string;
2971
- } : K extends (typeof _SUPPORT_ORACLES)[1] ? {
2972
- registry: string;
2973
- registryCap: string;
2974
- registryTableId: string;
2975
- state: string;
2976
- } : K extends (typeof _SUPPORT_ORACLES)[2] ? {
2977
- registry: string;
2978
- registryCap: string;
2979
- state: string;
2980
- wormhole: string;
2981
- wormholeState: string;
2982
- } : never;
2983
- } & {
2984
- xOracle: string;
2985
- xOracleCap: string;
2986
- primaryPriceUpdatePolicyObject: string;
2987
- secondaryPriceUpdatePolicyObject: string;
2988
- primaryPriceUpdatePolicyVecsetId: string;
2989
- secondaryPriceUpdatePolicyVecsetId: string;
2990
- };
2991
- packages: Partial<Record<string, {
2992
- id: string;
2993
- object?: string;
2994
- upgradeCap: string;
2995
- }>>;
2996
- };
2997
- spool: {
2998
- id: string;
2999
- adminCap: string;
3000
- object: string;
3001
- config: string;
3002
- pools: Partial<Record<string, {
3003
- id: string;
3004
- rewardPoolId: string;
3005
- }>>;
3006
- };
3007
- borrowIncentive: {
3008
- id: string;
3009
- adminCap: string;
3010
- object: string;
3011
- query: string;
3012
- config: string;
3013
- incentivePools: string;
3014
- incentiveAccounts: string;
3015
- };
3016
- vesca: {
3017
- id: string;
3018
- object: string;
3019
- adminCap: string;
3020
- tableId: string;
3021
- table: string;
3022
- treasury: string;
3023
- config: string;
3024
- subsTable: string;
3025
- subsTableId: string;
3026
- subsWhitelist: string;
3027
- };
3028
- referral: {
3029
- id: string;
3030
- version: string;
3031
- object: string;
3032
- adminCap: string;
3033
- referralBindings: string;
3034
- bindingTableId: string;
3035
- referralRevenuePool: string;
3036
- revenueTableId: string;
3037
- referralTiers: string;
3038
- tiersTableId: string;
3039
- authorizedWitnessList: string;
3040
- };
3041
- loyaltyProgram: {
3042
- id: string;
3043
- adminCap?: string;
3044
- object: string;
3045
- rewardPool: string;
3046
- userRewardTableId: string;
3047
- };
3048
- veScaLoyaltyProgram: {
3049
- id: string;
3050
- adminCap?: string;
3051
- object: string;
3052
- veScaRewardPool: string;
3053
- veScaRewardTableId: string;
3054
- };
3055
- scoin: {
3056
- id: string;
3057
- coins: Partial<Record<string, {
3058
- coinType: string;
3059
- symbol: string;
3060
- treasury: string;
3061
- metaData: string;
3062
- }>>;
3063
- };
3064
- }
3065
- type AddressPathsProps<T> = T extends string ? [] : {
3066
- [K in Extract<keyof T, string>]: [K, ...AddressPathsProps<T[K]>];
3067
- }[Extract<keyof T, string>];
3068
- type Join<T extends string[], D extends string> = T extends [] ? never : T extends [infer F] ? F : T extends [infer F, ...infer R] ? F extends string ? `${F}${D}${Join<Extract<R, string[]>, D>}` : never : string;
3069
- type AddressStringPath = Join<AddressPathsProps<AddressesInterface>, '.'>;
3070
-
3071
- type OptionalKeys<T> = {
3072
- [K in keyof T]?: T[K];
3073
- };
3074
- type CoinPrices = OptionalKeys<Record<string, number>>;
3075
-
3076
- declare const TEST_ADDRESSES: AddressesInterface;
3077
- declare const WHITELIST: {
3078
- lending: Set<string>;
3079
- collateral: Set<string>;
3080
- borrowing: Set<string>;
3081
- packages: Set<string>;
3082
- spool: Set<string>;
3083
- scoin: Set<string>;
3084
- suiBridge: Set<string>;
3085
- wormhole: Set<string>;
3086
- oracles: Set<string>;
3087
- pythEndpoints: Set<string>;
3088
- deprecated: Set<string>;
3089
- borrowIncentiveRewards: Set<string>;
3090
- rewardsAsPoint: Set<string>;
3091
- emerging: Set<string>;
3092
- };
3093
- declare const POOL_ADDRESSES: {
3094
- usdc: {
3095
- coinName: string;
3096
- symbol: string;
3097
- lendingPoolAddress: string;
3098
- collateralPoolAddress: string;
3099
- borrowDynamic: string;
3100
- interestModel: string;
3101
- riskModel: string;
3102
- borrowFeeKey: string;
3103
- supplyLimitKey: string;
3104
- borrowLimitKey: string;
3105
- isolatedAssetKey: string;
3106
- isIsolated: boolean;
3107
- spool: string;
3108
- spoolReward: string;
3109
- sCoinType: string;
3110
- sCoinTreasury: string;
3111
- sCoinMetadataId: string;
3112
- sCoinSymbol: string;
3113
- sCoinName: string;
3114
- coinMetadataId: string;
3115
- coinType: string;
3116
- spoolName: string;
3117
- decimals: number;
3118
- pythFeed: string;
3119
- pythFeedObjectId: string;
3120
- flashloanFeeObject: string;
3121
- };
3122
- sui: {
3123
- coinName: string;
3124
- symbol: string;
3125
- lendingPoolAddress: string;
3126
- collateralPoolAddress: string;
3127
- borrowDynamic: string;
3128
- interestModel: string;
3129
- riskModel: string;
3130
- borrowFeeKey: string;
3131
- supplyLimitKey: string;
3132
- borrowLimitKey: string;
3133
- isolatedAssetKey: string;
3134
- isIsolated: boolean;
3135
- spool: string;
3136
- spoolReward: string;
3137
- sCoinType: string;
3138
- sCoinTreasury: string;
3139
- sCoinMetadataId: string;
3140
- sCoinSymbol: string;
3141
- sCoinName: string;
3142
- coinMetadataId: string;
3143
- coinType: string;
3144
- spoolName: string;
3145
- decimals: number;
3146
- pythFeed: string;
3147
- pythFeedObjectId: string;
3148
- flashloanFeeObject: string;
3149
- };
3150
- sca: {
3151
- coinName: string;
3152
- symbol: string;
3153
- lendingPoolAddress: string;
3154
- collateralPoolAddress: string;
3155
- borrowDynamic: string;
3156
- interestModel: string;
3157
- riskModel: string;
3158
- borrowFeeKey: string;
3159
- supplyLimitKey: string;
3160
- borrowLimitKey: string;
3161
- isolatedAssetKey: string;
3162
- isIsolated: boolean;
3163
- spool: string;
3164
- spoolReward: string;
3165
- sCoinType: string;
3166
- sCoinTreasury: string;
3167
- sCoinMetadataId: string;
3168
- sCoinSymbol: string;
3169
- sCoinName: string;
3170
- coinMetadataId: string;
3171
- coinType: string;
3172
- spoolName: string;
3173
- decimals: number;
3174
- pythFeed: string;
3175
- pythFeedObjectId: string;
3176
- flashloanFeeObject: string;
3177
- };
3178
- fud: {
3179
- coinName: string;
3180
- symbol: string;
3181
- lendingPoolAddress: string;
3182
- collateralPoolAddress: string;
3183
- borrowDynamic: string;
3184
- interestModel: string;
3185
- borrowFeeKey: string;
3186
- supplyLimitKey: string;
3187
- borrowLimitKey: string;
3188
- isolatedAssetKey: string;
3189
- isIsolated: boolean;
3190
- spool: string;
3191
- spoolReward: string;
3192
- sCoinType: string;
3193
- sCoinTreasury: string;
3194
- sCoinMetadataId: string;
3195
- sCoinSymbol: string;
3196
- sCoinName: string;
3197
- coinMetadataId: string;
3198
- coinType: string;
3199
- spoolName: string;
3200
- decimals: number;
3201
- pythFeed: string;
3202
- pythFeedObjectId: string;
3203
- flashloanFeeObject: string;
3204
- };
3205
- deep: {
3206
- coinName: string;
3207
- symbol: string;
3208
- lendingPoolAddress: string;
3209
- collateralPoolAddress: string;
3210
- borrowDynamic: string;
3211
- interestModel: string;
3212
- borrowFeeKey: string;
3213
- supplyLimitKey: string;
3214
- borrowLimitKey: string;
3215
- isolatedAssetKey: string;
3216
- isIsolated: boolean;
3217
- spool: string;
3218
- spoolReward: string;
3219
- sCoinType: string;
3220
- sCoinTreasury: string;
3221
- sCoinMetadataId: string;
3222
- sCoinSymbol: string;
3223
- sCoinName: string;
3224
- coinMetadataId: string;
3225
- coinType: string;
3226
- spoolName: string;
3227
- decimals: number;
3228
- pythFeed: string;
3229
- pythFeedObjectId: string;
3230
- flashloanFeeObject: string;
3231
- };
3232
- };
3233
-
3234
- declare const UNLOCK_ROUND_DURATION: number;
3235
- declare const MAX_LOCK_ROUNDS: 1460;
3236
- declare const MAX_LOCK_DURATION: number;
3237
- declare const MIN_INITIAL_LOCK_AMOUNT: 10000000000;
3238
- declare const MIN_TOP_UP_AMOUNT: 1000000000;
3239
-
3240
- declare const xOracleList: xOracleListType;
3241
-
3242
- export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, type BalanceSheet, type BaseScallopTxBlock, type BorrowDynamic, type BorrowFee, type BorrowIncentiveAccountKey, type BorrowIncentiveAccounts, type BorrowIncentiveAccountsQueryInterface, type BorrowIncentiveIds, type BorrowIncentiveNormalMethods, type BorrowIncentivePool, type BorrowIncentivePoolPoints, type BorrowIncentivePools, type BorrowIncentivePoolsQueryInterface, type BorrowIncentiveQuickMethods, type BorrowIncentiveRewardCoins, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type Coins, type CollateralStat, type CoreIds, type CoreNormalMethods, type CoreQuickMethods, type CoreTxBlock, DEFAULT_CACHE_OPTIONS, type GenerateBorrowIncentiveNormalMethod, type GenerateBorrowIncentiveQuickMethod, type GenerateCoreNormalMethod, type GenerateCoreQuickMethod, type GenerateLoyaltyProgramNormalMethod, type GenerateLoyaltyProgramQuickMethod, type GenerateSCoinNormalMethod, type GenerateSCoinQuickMethod, type GenerateSpoolNormalMethod, type GenerateSpoolQuickMethod, type GenerateVeScaNormalMethod, type GenerateVeScaQuickMethod, IS_VE_SCA_TEST, type InterestModel, type Lending, type Lendings, type LoyaltyProgramInfo, type LoyaltyProgramNormalMethods, type LoyaltyProgramQuickMethods, type LoyaltyProgramTxBlock, MAX_LOCK_DURATION, MAX_LOCK_ROUNDS, MIN_INITIAL_LOCK_AMOUNT, MIN_TOP_UP_AMOUNT, type Market, type MarketCoinAmounts, type MarketCoins, type MarketCollateral, type MarketCollaterals, type MarketPool, type MarketPools, type MarketQueryInterface, type NestedResult, OLD_BORROW_INCENTIVE_PROTOCOL_ID, type Obligation, type ObligationAccount, type ObligationAccounts, type ObligationBorrowIncentive, type ObligationBorrowIncentiveReward, type ObligationCollateral, type ObligationDebt, type ObligationQueryInterface, type OptionalKeys, type OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, POOL_ADDRESSES, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, type QuickMethodReturnType, RPC_PROVIDERS, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinConverterTreasury, type SCoinIds, type SCoinTreasuryCaps, type SCoinTxBlock, type SCoins, SDK_API_BASE_URL, Scallop, ScallopAddress, ScallopBuilder, ScallopClient, ScallopConstants, ScallopIndexer, ScallopQuery, ScallopSuiKit, type ScallopTxBlock, ScallopUtils, type SelectCoinReturnType, type Spool, type SpoolData, type SpoolIds, type SpoolNormalMethods, type SpoolQuickMethods, type SpoolRewardPool, type SpoolTxBlock, type Spools, type StakeAccount, type StakeAccounts, type StakeMarketCoins, type StakePool, type StakePools, type StakeRewardCoins, type StakeRewardPool, type StakeRewardPools, type SuiBridgeCoins, type SuiBridgedCoinPackageIds, type SuiTxBlockWithBorrowIncentiveNormalMethods, type SuiTxBlockWithCoreNormalMethods, type SuiTxBlockWithLoyaltyProgramNormalMethods, type SuiTxBlockWithSCoin, type SuiTxBlockWithSCoinNormalMethods, type SuiTxBlockWithSpool, type SuiTxBlockWithSpoolNormalMethods, type SuiTxBlockWithVeScaNormalMethods, type SupportOracleType, TEST_ADDRESSES, type TotalValueLocked, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, type VeScaLoyaltyProgramInfo, type VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type VoloCoinIds, WHITELIST, type Whitelist, type WormholeCoinIds, _SUPPORT_ORACLES, queryKeys, type sCoinBalance, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, xOracleList, type xOracleListType, type xOracleRuleType, type xOracleRules };
1
+ export { API_BASE_URL, DEFAULT_CACHE_OPTIONS, IS_VE_SCA_TEST, MAX_LOCK_DURATION, MAX_LOCK_ROUNDS, MIN_INITIAL_LOCK_AMOUNT, MIN_TOP_UP_AMOUNT, OLD_BORROW_INCENTIVE_PROTOCOL_ID, POOL_ADDRESSES, RPC_PROVIDERS, SCA_COIN_TYPE, SDK_API_BASE_URL, TEST_ADDRESSES, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, WHITELIST, queryKeys } from './constants/index.mjs';
2
+ export { l as AddressStringPath, A as AddressesInterface, B as BasePackage, k as OracleLst, j as OracleLstConfig, O as OracleLstPackage, P as PACKAGE_NAMES, h as PackageName, S as SUPPORT_ORACLES, a as SUPPORT_ORACLE_LST, b as SUPPORT_SUI_LST, i as SupportOracleLst, d as SupportOracleType, g as SupportedOracleSuiLst, c as X_ORACLE_LIST, X as X_ORACLE_RULES, f as xOracleListType, x as xOracleRuleType, e as xOracleRules } from './address-CW2IpaLn.js';
3
+ export { Scallop, ScallopClient } from './models/index.mjs';
4
+ export { aq as BalanceSheet, B as BaseScallopTxBlock, ar as BorrowDynamic, as as BorrowFee, a5 as BorrowIncentiveAccountKey, ae as BorrowIncentiveAccounts, ak as BorrowIncentiveAccountsQueryInterface, y as BorrowIncentiveIds, z as BorrowIncentiveNormalMethods, a8 as BorrowIncentivePool, a7 as BorrowIncentivePoolPoints, a6 as BorrowIncentivePools, aj as BorrowIncentivePoolsQueryInterface, A as BorrowIncentiveQuickMethods, E as BorrowIncentiveTxBlock, ad as CalculatedBorrowIncentivePoolPointData, aD as CalculatedMarketCollateralData, aA as CalculatedMarketPoolData, aY as CalculatedSpoolData, b0 as CalculatedSpoolRewardPoolData, an as CoinAmounts, bb as CoinPrices, a4 as CoinWrappedType, av as CollateralStat, C as CoreIds, m as CoreNormalMethods, n as CoreQuickMethods, p as CoreTxBlock, F as GenerateBorrowIncentiveNormalMethod, H as GenerateBorrowIncentiveQuickMethod, G as GenerateCoreNormalMethod, q as GenerateCoreQuickMethod, U as GenerateLoyaltyProgramNormalMethod, W as GenerateLoyaltyProgramQuickMethod, a0 as GenerateSCoinNormalMethod, a1 as GenerateSCoinQuickMethod, w as GenerateSpoolNormalMethod, x as GenerateSpoolQuickMethod, L as GenerateVeScaNormalMethod, M as GenerateVeScaQuickMethod, at as InterestModel, aM as Lending, aK as Lendings, aI as LoyaltyProgramInfo, O as LoyaltyProgramNormalMethods, P as LoyaltyProgramQuickMethods, T as LoyaltyProgramTxBlock, aE as Market, ao as MarketCoinAmounts, ax as MarketCollateral, am as MarketCollaterals, aw as MarketPool, al as MarketPools, aG as MarketQueryInterface, N as NestedResult, aF as Obligation, aN as ObligationAccount, aL as ObligationAccounts, aR as ObligationBorrowIncentive, aQ as ObligationBorrowIncentiveReward, aO as ObligationCollateral, aP as ObligationDebt, aH as ObligationQueryInterface, ba as OptionalKeys, ag as OriginBorrowIncentiveAccountData, af as OriginBorrowIncentiveAccountPoolData, aa as OriginBorrowIncentivePoolData, a9 as OriginBorrowIncentivePoolPointData, aB as OriginMarketCollateralData, ay as OriginMarketPoolData, aV as OriginSpoolData, a_ as OriginSpoolRewardPoolData, ai as ParsedBorrowIncentiveAccountData, ah as ParsedBorrowIncentiveAccountPoolData, ac as ParsedBorrowIncentivePoolData, ab as ParsedBorrowIncentivePoolPointData, aC as ParsedMarketCollateralData, az as ParsedMarketPoolData, aX as ParsedSpoolData, a$ as ParsedSpoolRewardPoolData, a2 as PoolAddress, Q as QuickMethodReturnType, au as RiskModel, ap as SCoinAmounts, $ as SCoinTxBlock, a as ScallopAddress, b as ScallopAxios, S as ScallopBuilder, c as ScallopConstants, d as ScallopIndexer, e as ScallopQuery, f as ScallopQueryClient, h as ScallopSuiKit, k as ScallopTxBlock, g as ScallopUtils, l as SelectCoinReturnType, aU as Spool, aW as SpoolData, r as SpoolIds, s as SpoolNormalMethods, t as SpoolQuickMethods, aZ as SpoolRewardPool, v as SpoolTxBlock, aT as Spools, b4 as StakeAccount, b3 as StakeAccounts, b5 as StakePool, b1 as StakePools, b6 as StakeRewardPool, b2 as StakeRewardPools, D as SuiTxBlockWithBorrowIncentiveNormalMethods, o as SuiTxBlockWithCoreNormalMethods, R as SuiTxBlockWithLoyaltyProgramNormalMethods, i as SuiTxBlockWithSCoin, _ as SuiTxBlockWithSCoinNormalMethods, j as SuiTxBlockWithSpool, u as SuiTxBlockWithSpoolNormalMethods, J as SuiTxBlockWithVeScaNormalMethods, aS as TotalValueLocked, aJ as VeScaLoyaltyProgramInfo, V as VeScaNormalMethods, I as VeScaQuickMethods, b8 as VeScaTreasuryFields, b9 as VeScaTreasuryInfo, K as VeScaTxBlock, b7 as Vesca, a3 as Whitelist, Y as sCoinNormalMethods, X as sCoinPkgIds, Z as sCoinQuickMethods } from './scallopUtils-BZLZd2z8.js';
5
+ export { Q as QueryKeys } from './queryKeys-AaZqDYle.js';
6
+ import '@mysten/sui/dist/cjs/client';
7
+ import '@scallop-io/sui-kit';
8
+ import '@mysten/sui/client';
9
+ import '@mysten/sui/transactions';
10
+ import '@tanstack/query-core';
11
+ import 'axios';