@scallop-io/sui-scallop-sdk 1.5.3 → 2.0.0-alpha.10

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 (66) hide show
  1. package/dist/index.d.mts +509 -602
  2. package/dist/index.d.ts +509 -602
  3. package/dist/index.js +28 -59
  4. package/dist/index.mjs +7 -7
  5. package/package.json +1 -1
  6. package/src/builders/coreBuilder.ts +33 -33
  7. package/src/builders/loyaltyProgramBuilder.ts +5 -3
  8. package/src/builders/{oracle.ts → oracles/index.ts} +48 -60
  9. package/src/builders/oracles/pyth.ts +44 -0
  10. package/src/builders/oracles/switchboard.ts +270 -0
  11. package/src/builders/referralBuilder.ts +5 -9
  12. package/src/builders/sCoinBuilder.ts +9 -8
  13. package/src/builders/spoolBuilder.ts +4 -6
  14. package/src/constants/common.ts +114 -126
  15. package/src/constants/index.ts +0 -5
  16. package/src/constants/pyth.ts +25 -34
  17. package/src/constants/queryKeys.ts +2 -0
  18. package/src/constants/testAddress.ts +36 -487
  19. package/src/models/index.ts +1 -0
  20. package/src/models/scallop.ts +23 -19
  21. package/src/models/scallopAddress.ts +17 -5
  22. package/src/models/scallopBuilder.ts +36 -41
  23. package/src/models/scallopCache.ts +3 -3
  24. package/src/models/scallopClient.ts +93 -98
  25. package/src/models/scallopConstants.ts +399 -0
  26. package/src/models/scallopIndexer.ts +11 -24
  27. package/src/models/scallopQuery.ts +76 -79
  28. package/src/models/scallopUtils.ts +126 -250
  29. package/src/queries/borrowIncentiveQuery.ts +25 -58
  30. package/src/queries/borrowLimitQuery.ts +3 -6
  31. package/src/queries/coreQuery.ts +98 -114
  32. package/src/queries/flashloanFeeQuery.ts +86 -0
  33. package/src/queries/index.ts +1 -0
  34. package/src/queries/isolatedAssetQuery.ts +12 -11
  35. package/src/queries/poolAddressesQuery.ts +211 -117
  36. package/src/queries/portfolioQuery.ts +60 -70
  37. package/src/queries/priceQuery.ts +16 -22
  38. package/src/queries/sCoinQuery.ts +15 -16
  39. package/src/queries/spoolQuery.ts +49 -59
  40. package/src/queries/supplyLimitQuery.ts +2 -6
  41. package/src/queries/switchboardQuery.ts +64 -0
  42. package/src/queries/xOracleQuery.ts +29 -32
  43. package/src/types/address.ts +21 -19
  44. package/src/types/builder/borrowIncentive.ts +2 -3
  45. package/src/types/builder/core.ts +20 -27
  46. package/src/types/builder/index.ts +1 -2
  47. package/src/types/builder/referral.ts +4 -8
  48. package/src/types/builder/sCoin.ts +4 -8
  49. package/src/types/builder/spool.ts +7 -10
  50. package/src/types/constant/common.ts +44 -49
  51. package/src/types/constant/enum.ts +15 -27
  52. package/src/types/constant/xOracle.ts +3 -2
  53. package/src/types/model.ts +49 -28
  54. package/src/types/query/borrowIncentive.ts +7 -24
  55. package/src/types/query/core.ts +8 -18
  56. package/src/types/query/portfolio.ts +9 -17
  57. package/src/types/query/spool.ts +5 -11
  58. package/src/types/utils.ts +1 -21
  59. package/src/utils/core.ts +1 -1
  60. package/src/utils/query.ts +15 -23
  61. package/src/utils/util.ts +6 -84
  62. package/src/constants/coinGecko.ts +0 -34
  63. package/src/constants/enum.ts +0 -268
  64. package/src/constants/flashloan.ts +0 -18
  65. package/src/constants/poolAddress.ts +0 -898
  66. package/src/models/scallopPrice.ts +0 -0
package/dist/index.d.mts CHANGED
@@ -1,9 +1,11 @@
1
- import { DevInspectResults, SuiObjectDataOptions, SuiObjectResponse, SuiObjectData, GetOwnedObjectsParams, GetDynamicFieldsParams, DynamicFieldPage, GetDynamicFieldObjectParams, CoinBalance, GetBalanceParams, SuiObjectRef, SuiTransactionBlockResponse } from '@mysten/sui/client';
1
+ import { SuiObjectDataOptions, GetOwnedObjectsParams, GetDynamicFieldsParams, GetDynamicFieldObjectParams, SuiObjectData, DevInspectResults, SuiObjectResponse, DynamicFieldPage, CoinBalance, GetBalanceParams, SuiObjectRef, SuiTransactionBlockResponse } from '@mysten/sui/client';
2
2
  import * as _scallop_io_sui_kit from '@scallop-io/sui-kit';
3
- import { SuiKit, SuiObjectArg, NetworkType, SuiTxBlock, SuiTxArg, SuiVecTxArg, SuiAmountsArg, SuiAddressArg, TransactionResult as TransactionResult$1, SuiKitParams } from '@scallop-io/sui-kit';
3
+ import { SuiObjectArg, SuiTxArg, SuiKit, NetworkType, SuiTxBlock, SuiVecTxArg, SuiAmountsArg, SuiAddressArg, TransactionResult as TransactionResult$1, SuiKitParams } from '@scallop-io/sui-kit';
4
4
  import * as _mysten_sui_dist_cjs_client from '@mysten/sui/dist/cjs/client';
5
+ import * as _tanstack_query_core from '@tanstack/query-core';
5
6
  import { QueryClient, QueryClientConfig } from '@tanstack/query-core';
6
7
  import { Transaction, TransactionObjectArgument, Argument, TransactionResult } from '@mysten/sui/transactions';
8
+ import { AxiosInstance } from 'axios';
7
9
 
8
10
  /**
9
11
  * Default cache options for the QueryClient.
@@ -20,51 +22,69 @@ declare const DEFAULT_CACHE_OPTIONS: {
20
22
  };
21
23
  };
22
24
 
23
- type ParseMarketCoins<T extends string> = `s${T}`;
24
- type ParseCoins<T extends string> = T extends `s${infer R}` ? R : never;
25
- type SupportCoins = SupportAssetCoins | SupportMarketCoins | SupportStakeMarketCoins | SupportSCoin;
26
- type SupportAssetCoins = SupportPoolCoins | SupportCollateralCoins | SupportStakeRewardCoins;
27
- type SupportPoolCoins = (typeof SUPPORT_POOLS)[number];
28
- type SupportCollateralCoins = (typeof SUPPORT_COLLATERALS)[number];
29
- type SupportMarketCoins = ParseMarketCoins<SupportPoolCoins> | SupportStakeMarketCoins;
30
- type SupportStakeMarketCoins = (typeof SUPPORT_SPOOLS)[number];
31
- type SupportSuiBridgeCoins = (typeof SUPPORT_SUI_BRIDGE)[number];
32
- type SupportWormholeCoins = (typeof SUPPORT_WORMHOLE)[number];
33
- type SupportStakeCoins = Extract<SupportPoolCoins, ParseCoins<SupportStakeMarketCoins>>;
34
- type SupportStakeRewardCoins = (typeof SUPPORT_SPOOLS_REWARDS)[number];
35
- type SupportBorrowIncentiveCoins = (typeof SUPPORT_BORROW_INCENTIVE_POOLS)[number];
36
- type SupportBorrowIncentiveRewardCoins = (typeof SUPPORT_BORROW_INCENTIVE_REWARDS)[number];
37
- type SupportSCoin = (typeof SUPPORT_SCOIN)[number];
38
- type SupportOracleType = (typeof SUPPORT_ORACLES)[number];
39
- type SupportPackageType = (typeof SUPPORT_PACKAGES)[number];
40
- type SupportCoinDecimals = Record<SupportCoins, number>;
41
- type CoinWrappedType = {
42
- from: string;
43
- type: string;
44
- } | undefined;
45
-
46
- declare const COIN_GECKGO_IDS: Record<SupportPoolCoins, string>;
47
-
48
25
  declare const API_BASE_URL: "https://sui.apis.scallop.io";
49
26
  declare const SDK_API_BASE_URL: "https://sdk.api.scallop.io";
50
27
  declare const IS_VE_SCA_TEST: boolean;
51
28
  declare const USE_TEST_ADDRESS: boolean;
52
- declare const ADDRESS_ID: "65fb07c39c845425d71d7b18" | "67c44a103fe1b8c454eb9699";
53
- declare const PROTOCOL_OBJECT_ID: "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" | "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
54
- declare const BORROW_FEE_PROTOCOL_ID: "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" | "0xc38f849e81cfe46d4e4320f508ea7dda42934a329d5a6571bb4c3cb6ea63f5da";
55
29
  declare const SCA_COIN_TYPE: "0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524::sca::SCA" | "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";
56
30
  declare const OLD_BORROW_INCENTIVE_PROTOCOL_ID: "0xc63072e7f5f4983a2efaf5bdba1480d5e7d74d57948e1c7cc436f8e22cbeb410";
57
- declare const SUPPORT_POOLS: readonly ["usdc", "sbeth", "sbusdt", "sbwbtc", "weth", "wbtc", "wusdc", "wusdt", "sui", "wapt", "wsol", "cetus", "afsui", "hasui", "vsui", "sca", "fud", "deep", "fdusd", "blub", "musd", "ns", "usdy"];
58
- declare const SUPPORT_COLLATERALS: readonly ["usdc", "sbeth", "sbusdt", "sbwbtc", "weth", "wbtc", "wusdc", "wusdt", "sui", "wapt", "wsol", "cetus", "afsui", "hasui", "vsui", "sca", "fdusd", "usdy"];
59
- declare const SUPPORT_SPOOLS: readonly ["susdc", "sweth", "ssui", "swusdc", "swusdt", "scetus", "safsui", "shasui", "svsui"];
60
- declare const SUPPORT_SCOIN: readonly ["susdc", "ssbeth", "ssbusdt", "ssbwbtc", "ssui", "swusdc", "swusdt", "safsui", "shasui", "svsui", "sweth", "ssca", "scetus", "swsol", "swbtc", "sdeep", "sfud", "sfdusd", "sblub", "smusd", "sns", "susdy"];
61
- declare const SUPPORT_SUI_BRIDGE: readonly ["sbeth", "sbusdt", "sbwbtc"];
62
- declare const SUPPORT_WORMHOLE: readonly ["wusdc", "wusdt", "weth", "wbtc", "wapt", "wsol"];
63
- declare const SUPPORT_SPOOLS_REWARDS: readonly ["sui"];
64
- declare const SUPPORT_BORROW_INCENTIVE_POOLS: readonly ["usdc", "sbeth", "sbusdt", "sbwbtc", "weth", "wbtc", "wusdc", "wusdt", "sui", "wapt", "wsol", "cetus", "afsui", "hasui", "vsui", "sca", "fud", "deep", "fdusd", "blub", "musd", "ns", "usdy"];
65
- declare const SUPPORT_BORROW_INCENTIVE_REWARDS: readonly ["usdc", "sbeth", "sbusdt", "sbwbtc", "weth", "wbtc", "wusdc", "wusdt", "sui", "wapt", "wsol", "cetus", "afsui", "hasui", "vsui", "sca", "fud", "deep", "fdusd", "blub", "musd", "ns", "usdy", "susdc", "ssbeth", "ssbusdt", "ssbwbtc", "ssui", "swusdc", "swusdt", "safsui", "shasui", "svsui", "sweth", "ssca", "scetus", "swsol", "swbtc", "sdeep", "sfud", "sfdusd", "sblub", "smusd", "sns", "susdy"];
66
- declare const SUPPORT_ORACLES: readonly ["supra", "switchboard", "pyth"];
67
- declare const SUPPORT_PACKAGES: readonly ["coinDecimalsRegistry", "math", "whitelist", "x", "protocol", "protocolWhitelist", "query", "supra", "pyth", "switchboard", "xOracle", "testCoin"];
31
+
32
+ declare const queryKeys: {
33
+ api: {
34
+ getAddresses: (addressId?: string) => (string | {
35
+ addressId: string | undefined;
36
+ })[];
37
+ getWhiteList: () => string[];
38
+ getPoolAddresses: () => string[];
39
+ getMarket: () => string[];
40
+ getSpools: () => string[];
41
+ getBorrowIncentivePool: () => string[];
42
+ getTotalValueLocked: () => string[];
43
+ };
44
+ rpc: {
45
+ getInspectTxn: (queryTarget?: string, args?: SuiObjectArg[], typeArgs?: any[]) => (string | {
46
+ queryTarget: string | undefined;
47
+ args: string;
48
+ typeArgs: string | undefined;
49
+ })[];
50
+ getObject: (objectId?: string, options?: SuiObjectDataOptions) => (string | {
51
+ objectId: string | undefined;
52
+ options: SuiObjectDataOptions | undefined;
53
+ })[];
54
+ getObjects: (objectIds?: string[]) => (string | {
55
+ objectIds: string;
56
+ })[];
57
+ getOwnedObjects: (input?: Partial<GetOwnedObjectsParams>) => (string | {
58
+ walletAddress: string | undefined;
59
+ cursor: string | undefined;
60
+ options: SuiObjectDataOptions | undefined;
61
+ filter: string;
62
+ limit: number | undefined;
63
+ })[];
64
+ getDynamicFields: (input?: Partial<GetDynamicFieldsParams>) => (string | {
65
+ parentId: string | undefined;
66
+ cursor: string | undefined;
67
+ limit: number | undefined;
68
+ })[];
69
+ getDynamicFieldObject: (input?: Partial<GetDynamicFieldObjectParams>) => (string | {
70
+ parentId: string | undefined;
71
+ name: string;
72
+ })[];
73
+ getTotalVeScaTreasuryAmount: (refreshArgs?: any[], vescaAmountArgs?: (string | SuiObjectData | SuiTxArg)[]) => (string | {
74
+ refreshArgs: string;
75
+ vescaAmountArgs: string;
76
+ })[];
77
+ getAllCoinBalances: (owner?: string) => (string | {
78
+ owner: string | undefined;
79
+ })[];
80
+ getNormalizedMoveFunction: (target?: string) => (string | undefined)[];
81
+ };
82
+ oracle: {
83
+ getPythLatestPriceFeeds: () => string[];
84
+ };
85
+ };
86
+
87
+ declare const RPC_PROVIDERS: string[];
68
88
 
69
89
  type QueryInspectTxnParams = {
70
90
  queryTarget: string;
@@ -290,6 +310,105 @@ declare class ScallopAddress {
290
310
  delete(id?: string, auth?: string): Promise<void>;
291
311
  }
292
312
 
313
+ /**
314
+ * @description
315
+ * It provides methods to construct constants for Scallop SDK instances.
316
+ *
317
+ * @example
318
+ * ```typescript
319
+ * const scallopConstants = new ScallopConstants();
320
+ * await scallopConstants.init();
321
+ * ```
322
+ */
323
+ declare class ScallopConstants {
324
+ readonly params: ScallopConstantsParams;
325
+ private readonly _requestClient;
326
+ address: ScallopAddress;
327
+ cache: ScallopCache;
328
+ private _poolAddresses;
329
+ private _whitelist;
330
+ private _coinDecimals;
331
+ private _coinNameToOldMarketCoinTypeMap;
332
+ private _scoinRawNameToSCoinNameMap;
333
+ private _scoinTypeToSCoinNameMap;
334
+ private _wormholeCoinTypeToCoinNameMap;
335
+ private _voloCoinTypeToCoinNameMap;
336
+ private _suiBridgeCoinTypeToCoinNameMap;
337
+ private _coinTypes;
338
+ private _sCoinTypes;
339
+ private _coinTypeToCoinNameMap;
340
+ private _supportedBorrowIncentiveRewards;
341
+ constructor(params: ScallopConstantsParams, instance?: ScallopConstantsInstanceParams);
342
+ get isAddressInitialized(): boolean;
343
+ get isInitialized(): boolean;
344
+ get queryClient(): _tanstack_query_core.QueryClient;
345
+ get poolAddresses(): Record<string, PoolAddress | undefined>;
346
+ get whitelist(): Whitelist;
347
+ parseToOldMarketCoin(coinType: string): string;
348
+ get protocolObjectId(): string;
349
+ /**
350
+ * @description
351
+ * Return maps of coin names to coin decimals.
352
+ */
353
+ get coinDecimals(): Record<string, number | undefined>;
354
+ /**
355
+ * @description
356
+ * Return maps of coin names to coin types.
357
+ */
358
+ get coinTypes(): Record<string, string | undefined>;
359
+ /**
360
+ * @description
361
+ * Return maps of coin types to its coin name
362
+ */
363
+ get coinTypeToCoinNameMap(): Record<string, string | undefined>;
364
+ /**
365
+ * @description
366
+ * Return maps of wormhole coin types to its coin name.
367
+ */
368
+ get wormholeCoinTypeToCoinName(): Record<string, string | undefined>;
369
+ /**
370
+ * @description
371
+ * Return maps of coin name to its old market coin type (...::reserve::MarketCoin<coinType>)
372
+ */
373
+ get coinNameToOldMarketCoinTypeMap(): Record<string, string | undefined>;
374
+ /**
375
+ * @description
376
+ * Return maps of sCoin raw name from its type to its sCoin name. (e.g. 'scallop_sui' -> 'ssui')
377
+ */
378
+ get sCoinRawNameToScoinNameMap(): Record<string, string | undefined>;
379
+ /**
380
+ * @description
381
+ * Return maps of scoin type to its sCoin name
382
+ */
383
+ get sCoinTypeToSCoinNameMap(): Record<string, string | undefined>;
384
+ /**
385
+ * @description
386
+ * Return maps of volo coin type to its coin name
387
+ */
388
+ get voloCoinTypeToCoinNameMap(): Record<string, string | undefined>;
389
+ /**
390
+ * @description
391
+ * Return maps of sui bridge coin type to its coin name
392
+ */
393
+ get suiBridgeCoinTypeToCoinNameMap(): Record<string, string | undefined>;
394
+ /**
395
+ * @description
396
+ * Return maps of sCoin coin name to its coin type
397
+ */
398
+ get sCoinTypes(): Record<string, string | undefined>;
399
+ /**
400
+ * @description
401
+ * Return set of supported coin types for borrow incentive rewards
402
+ * (all supported pools + sCoins + custom coins from `whitelist.borrowIncentiveRewards`)
403
+ */
404
+ get supportedBorrowIncentiveRewards(): Set<string>;
405
+ private isEmptyObject;
406
+ private readApi;
407
+ readWhiteList(): Promise<Whitelist>;
408
+ readPoolAddresses(): Promise<Record<string, PoolAddress>>;
409
+ init(params?: Partial<ScallopConstantsParams>): Promise<void>;
410
+ }
411
+
293
412
  /**
294
413
  * @description
295
414
  * Integrates some helper functions frequently used in interactions with the Scallop contract.
@@ -304,28 +423,30 @@ declare class ScallopAddress {
304
423
  */
305
424
  declare class ScallopUtils {
306
425
  readonly params: ScallopUtilsParams;
307
- readonly isTestnet: boolean;
308
426
  suiKit: SuiKit;
309
427
  address: ScallopAddress;
310
428
  cache: ScallopCache;
429
+ constants: ScallopConstants;
311
430
  walletAddress: string;
312
431
  constructor(params: ScallopUtilsParams, instance?: ScallopUtilsInstanceParams);
313
- isSuiBridgeAsset(coinName: any): coinName is SupportSuiBridgeCoins;
314
- isWormholeAsset(coinName: any): coinName is SupportWormholeCoins;
432
+ get whitelist(): Whitelist;
433
+ isSuiBridgeAsset(coinName: any): boolean;
434
+ isWormholeAsset(coinName: any): boolean;
435
+ isMarketCoin(coinName: string): boolean;
315
436
  /**
316
437
  * Request the scallop API to initialize data.
317
438
  *
318
439
  * @param force - Whether to force initialization.
319
440
  * @param address - ScallopAddress instance.
320
441
  */
321
- init(force?: boolean, address?: ScallopAddress): Promise<void>;
442
+ init(force?: boolean): Promise<void>;
322
443
  /**
323
444
  * Convert coin name to symbol.
324
445
  *
325
446
  * @param coinName - Specific support coin name.
326
447
  * @return Symbol string.
327
448
  */
328
- parseSymbol(coinName: SupportCoins): string;
449
+ parseSymbol(coinName: string): string;
329
450
  /**
330
451
  * Convert coin name to coin type.
331
452
  *
@@ -337,14 +458,14 @@ declare class ScallopUtils {
337
458
  * @param coinName - Specific support coin name.
338
459
  * @return Coin type.
339
460
  */
340
- parseCoinType(coinName: SupportCoins, useOldMarketCoin?: boolean): string;
461
+ parseCoinType(coinName: string, useOldMarketCoin?: boolean): string;
341
462
  /**
342
463
  * Convert coin name to sCoin name.
343
464
  *
344
465
  * @param coinName - Specific support coin name.
345
466
  * @return sCoin name.
346
467
  */
347
- parseSCoinName<T extends SupportSCoin>(coinName: SupportCoins | SupportMarketCoins): T | undefined;
468
+ parseSCoinName<T extends string>(coinName: string): T | undefined;
348
469
  /**
349
470
  * Convert sCoin name to market coin name.
350
471
  * This function will parse new sCoin name `scallop_...` to its old market coin name which is shorter
@@ -352,31 +473,31 @@ declare class ScallopUtils {
352
473
  * if no `scallop_...` is encountered, return coinName
353
474
  * @return sCoin name
354
475
  */
355
- parseSCoinTypeNameToMarketCoinName(coinName: string): "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd" | "sns" | "susdy";
476
+ parseSCoinTypeNameToMarketCoinName(coinName: string): string;
356
477
  /**
357
478
  * Convert sCoin name into sCoin type
358
479
  * @param sCoinName
359
480
  * @returns sCoin type
360
481
  */
361
- parseSCoinType(sCoinName: SupportSCoin): string;
482
+ parseSCoinType(sCoinName: string): string;
362
483
  /**
363
484
  * Convert sCoinType into sCoin name
364
485
  * @param sCoinType
365
486
  * @returns sCoin name
366
487
  */
367
- parseSCoinNameFromType(sCoinType: string): "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd" | "sns" | "susdy";
488
+ parseSCoinNameFromType(sCoinType: string): string | undefined;
368
489
  /**
369
490
  * Convert sCoin name into its underlying coin type
370
491
  * @param sCoinName
371
492
  * @returns coin type
372
493
  */
373
- parseUnderlyingSCoinType(sCoinName: SupportSCoin): string;
494
+ parseUnderlyingSCoinType(sCoinName: string): string;
374
495
  /**
375
496
  * Get sCoin treasury id from sCoin name
376
497
  * @param sCoinName
377
498
  * @returns sCoin treasury id
378
499
  */
379
- getSCoinTreasury(sCoinName: SupportSCoin): any;
500
+ getSCoinTreasury(sCoinName: string): any;
380
501
  /**
381
502
  * Convert coin name to market coin type.
382
503
  *
@@ -384,7 +505,7 @@ declare class ScallopUtils {
384
505
  * @param coinName - Specific support coin name.
385
506
  * @return Market coin type.
386
507
  */
387
- parseMarketCoinType(coinName: SupportCoins): string;
508
+ parseMarketCoinType(coinName: string): string;
388
509
  /**
389
510
  * Convert coin type to coin name.
390
511
  *
@@ -395,43 +516,40 @@ declare class ScallopUtils {
395
516
  * @param coinType - Specific support coin type.
396
517
  * @return Coin Name.
397
518
  */
398
- parseCoinNameFromType<T extends SupportAssetCoins>(coinType: string): T extends SupportAssetCoins ? T : SupportAssetCoins;
399
- parseCoinNameFromType<T extends SupportMarketCoins>(coinType: string): T extends SupportMarketCoins ? T : SupportMarketCoins;
400
- parseCoinNameFromType<T extends SupportCoins>(coinType: string): T extends SupportCoins ? T : SupportCoins;
401
- parseCoinNameFromType<T extends SupportSCoin>(coinType: string): T extends SupportSCoin ? T : SupportSCoin;
519
+ parseCoinNameFromType(coinType: string): string;
402
520
  /**
403
521
  * Convert market coin name to coin name.
404
522
  *
405
523
  * @param marketCoinName - Specific support market coin name.
406
524
  * @return Coin Name.
407
525
  */
408
- parseCoinName<T extends SupportAssetCoins>(marketCoinName: string): T;
526
+ parseCoinName<T extends string>(marketCoinName: string): T;
409
527
  /**
410
528
  * Convert coin name to market coin name.
411
529
  *
412
530
  * @param coinName - Specific support coin name.
413
531
  * @return Market coin name.
414
532
  */
415
- parseMarketCoinName<T extends SupportMarketCoins>(coinName: SupportCoins): T;
533
+ parseMarketCoinName<T extends string>(coinName: string): T;
416
534
  /**
417
535
  * Get reward type of spool.
418
536
  *
419
537
  * @param stakeMarketCoinName - Support stake market coin.
420
538
  * @return Spool reward coin name.
421
539
  */
422
- getSpoolRewardCoinName: (stakeMarketCoinName: SupportStakeMarketCoins) => "sui";
540
+ getSpoolRewardCoinName: () => string;
423
541
  /**
424
542
  * Get coin decimal.
425
543
  *
426
544
  * return Coin decimal.
427
545
  */
428
- getCoinDecimal(coinName: SupportCoins): number;
546
+ getCoinDecimal(coinName: string): number;
429
547
  /**
430
548
  * Get coin wrapped type.
431
549
  *
432
550
  * return Coin wrapped type.
433
551
  */
434
- getCoinWrappedType(assetCoinName: SupportAssetCoins): CoinWrappedType;
552
+ getCoinWrappedType(assetCoinName: string): CoinWrappedType;
435
553
  /**
436
554
  * Select coin id that add up to the given amount as transaction arguments.
437
555
  *
@@ -464,7 +582,7 @@ declare class ScallopUtils {
464
582
  * @param obligationId - The obligation id.
465
583
  * @return Asset coin Names.
466
584
  */
467
- getObligationCoinNames(obligationId: SuiObjectArg): Promise<SupportAssetCoins[] | undefined>;
585
+ getObligationCoinNames(obligationId: SuiObjectArg): Promise<string[] | undefined>;
468
586
  /**
469
587
  * Get asset coin price.
470
588
  *
@@ -477,7 +595,7 @@ declare class ScallopUtils {
477
595
  * @param assetCoinNames - Specific an array of support asset coin name.
478
596
  * @return Asset coin price.
479
597
  */
480
- getCoinPrices(_?: SupportAssetCoins[]): Promise<OptionalKeys<Record<SupportCoins, number>>>;
598
+ getCoinPrices(coinNames?: string[]): Promise<OptionalKeys<Record<string, number>>>;
481
599
  /**
482
600
  * Convert apr to apy.
483
601
  *
@@ -512,7 +630,7 @@ declare class ScallopUtils {
512
630
  * Get detailed contract address and price id information for supported pool in Scallop
513
631
  * @returns Supported pool informations
514
632
  */
515
- getSupportedPoolAddresses(): PoolAddressInfo[];
633
+ getSupportedPoolAddresses(): PoolAddress[];
516
634
  }
517
635
 
518
636
  /**
@@ -529,9 +647,9 @@ declare class ScallopUtils {
529
647
  */
530
648
  declare class ScallopIndexer {
531
649
  private readonly cache;
532
- readonly params: ScallopQueryParams;
650
+ readonly params: ScallopIndexerParams;
533
651
  private readonly _requestClient;
534
- constructor(params?: ScallopParams, instance?: ScallopIndexerInstanceParams);
652
+ constructor(params: ScallopIndexerParams, instance?: ScallopIndexerInstanceParams);
535
653
  /**
536
654
  * Get market index data.
537
655
  *
@@ -549,7 +667,7 @@ declare class ScallopIndexer {
549
667
  *
550
668
  * @return Market pool data.
551
669
  */
552
- getMarketPool(poolCoinName: SupportPoolCoins): Promise<MarketPool>;
670
+ getMarketPool(poolCoinName: string): Promise<MarketPool>;
553
671
  /**
554
672
  * Get market collaterals index data.
555
673
  *
@@ -561,7 +679,7 @@ declare class ScallopIndexer {
561
679
  *
562
680
  * @return Market collateral data.
563
681
  */
564
- getMarketCollateral(collateralCoinName: SupportCollateralCoins): Promise<MarketCollateral>;
682
+ getMarketCollateral(collateralCoinName: string): Promise<MarketCollateral>;
565
683
  /**
566
684
  * Get spools index data.
567
685
  *
@@ -573,7 +691,7 @@ declare class ScallopIndexer {
573
691
  *
574
692
  * @return Spool data.
575
693
  */
576
- getSpool(marketCoinName: SupportStakeMarketCoins): Promise<Spool>;
694
+ getSpool(marketCoinName: string): Promise<Spool>;
577
695
  /**
578
696
  * Get borrow incentive pools index data.
579
697
  *
@@ -585,7 +703,7 @@ declare class ScallopIndexer {
585
703
  *
586
704
  * @return Borrow incentive pool data.
587
705
  */
588
- getBorrowIncentivePool(borrowIncentiveCoinName: SupportBorrowIncentiveCoins): Promise<BorrowIncentivePool>;
706
+ getBorrowIncentivePool(borrowIncentiveCoinName: string): Promise<BorrowIncentivePool>;
589
707
  /**
590
708
  * Get total value locked index data.
591
709
  *
@@ -601,7 +719,7 @@ declare class ScallopIndexer {
601
719
  *
602
720
  * @return price data.
603
721
  */
604
- getCoinPrice(poolCoinName: SupportPoolCoins): Promise<number>;
722
+ getCoinPrice(poolCoinName: string): Promise<number>;
605
723
  getCoinPrices(): Promise<Record<string, number>>;
606
724
  }
607
725
 
@@ -622,17 +740,18 @@ declare class ScallopQuery {
622
740
  suiKit: SuiKit;
623
741
  address: ScallopAddress;
624
742
  utils: ScallopUtils;
743
+ constants: ScallopConstants;
625
744
  indexer: ScallopIndexer;
626
745
  cache: ScallopCache;
627
746
  walletAddress: string;
628
- constructor(params?: ScallopQueryParams, instance?: ScallopQueryInstanceParams);
747
+ constructor(params: ScallopQueryParams, instance?: ScallopQueryInstanceParams);
629
748
  /**
630
749
  * Request the scallop API to initialize data.
631
750
  *
632
751
  * @param force - Whether to force initialization.
633
752
  * @param address - ScallopAddress instance.
634
753
  */
635
- init(force?: boolean, address?: ScallopAddress): Promise<void>;
754
+ init(force?: boolean): Promise<void>;
636
755
  /**
637
756
  * @deprecated use getMarketPools
638
757
  * Query market data.
@@ -654,7 +773,7 @@ declare class ScallopQuery {
654
773
  * @param indexer - Whether to use indexer.
655
774
  * @return Market pools data.
656
775
  */
657
- getMarketPools(poolCoinNames?: SupportPoolCoins[], args?: {
776
+ getMarketPools(poolCoinNames?: string[], args?: {
658
777
  coinPrices?: CoinPrices;
659
778
  indexer?: boolean;
660
779
  }): Promise<{
@@ -668,7 +787,7 @@ declare class ScallopQuery {
668
787
  * @param indexer - Whether to use indexer.
669
788
  * @return Market pool data.
670
789
  */
671
- getMarketPool(poolCoinName: SupportPoolCoins, args?: {
790
+ getMarketPool(poolCoinName: string, args?: {
672
791
  coinPrice?: number;
673
792
  indexer?: boolean;
674
793
  }): Promise<MarketPool | undefined>;
@@ -683,27 +802,10 @@ declare class ScallopQuery {
683
802
  * @param indexer - Whether to use indexer.
684
803
  * @return Market collaterals data.
685
804
  */
686
- getMarketCollaterals(collateralCoinNames?: SupportCollateralCoins[], args?: {
805
+ getMarketCollaterals(collateralCoinNames?: string[], args?: {
687
806
  indexer?: boolean;
688
807
  }): Promise<{
689
- usdc?: MarketCollateral | undefined;
690
- sbeth?: MarketCollateral | undefined;
691
- sbusdt?: MarketCollateral | undefined;
692
- sbwbtc?: MarketCollateral | undefined;
693
- weth?: MarketCollateral | undefined;
694
- wbtc?: MarketCollateral | undefined;
695
- wusdc?: MarketCollateral | undefined;
696
- wusdt?: MarketCollateral | undefined;
697
- sui?: MarketCollateral | undefined;
698
- wapt?: MarketCollateral | undefined;
699
- wsol?: MarketCollateral | undefined;
700
- cetus?: MarketCollateral | undefined;
701
- afsui?: MarketCollateral | undefined;
702
- hasui?: MarketCollateral | undefined;
703
- vsui?: MarketCollateral | undefined;
704
- sca?: MarketCollateral | undefined;
705
- fdusd?: MarketCollateral | undefined;
706
- usdy?: MarketCollateral | undefined;
808
+ [x: string]: MarketCollateral | undefined;
707
809
  }>;
708
810
  /**
709
811
  * Get market collateral
@@ -712,7 +814,7 @@ declare class ScallopQuery {
712
814
  * @param indexer - Whether to use indexer.
713
815
  * @return Market collateral data.
714
816
  */
715
- getMarketCollateral(collateralCoinName: SupportCollateralCoins, args?: {
817
+ getMarketCollateral(collateralCoinName: string, args?: {
716
818
  indexer?: boolean;
717
819
  }): Promise<MarketCollateral | undefined>;
718
820
  /**
@@ -736,7 +838,7 @@ declare class ScallopQuery {
736
838
  * @param ownerAddress - The owner address.
737
839
  * @return All coin amounts.
738
840
  */
739
- getCoinAmounts(assetCoinNames?: SupportAssetCoins[], ownerAddress?: string): Promise<OptionalKeys<Record<SupportAssetCoins, number>>>;
841
+ getCoinAmounts(assetCoinNames?: string[], ownerAddress?: string): Promise<OptionalKeys<Record<string, number>>>;
740
842
  /**
741
843
  * Get asset coin amount.
742
844
  *
@@ -744,7 +846,7 @@ declare class ScallopQuery {
744
846
  * @param ownerAddress - The owner address.
745
847
  * @return Coin amount.
746
848
  */
747
- getCoinAmount(assetCoinName: SupportAssetCoins, ownerAddress?: string): Promise<number>;
849
+ getCoinAmount(assetCoinName: string, ownerAddress?: string): Promise<number>;
748
850
  /**
749
851
  * Get all market coin amounts.
750
852
  *
@@ -752,7 +854,7 @@ declare class ScallopQuery {
752
854
  * @param ownerAddress - The owner address.
753
855
  * @return All market market coin amounts.
754
856
  */
755
- getMarketCoinAmounts(marketCoinNames?: SupportMarketCoins[], ownerAddress?: string): Promise<OptionalKeys<Record<SupportMarketCoins, number>>>;
857
+ getMarketCoinAmounts(marketCoinNames?: string[], ownerAddress?: string): Promise<OptionalKeys<Record<string, number>>>;
756
858
  /**
757
859
  * Get market coin amount.
758
860
  *
@@ -760,21 +862,21 @@ declare class ScallopQuery {
760
862
  * @param ownerAddress - The owner address.
761
863
  * @return Market market coin amount.
762
864
  */
763
- getMarketCoinAmount(marketCoinName: SupportMarketCoins, ownerAddress?: string): Promise<number>;
865
+ getMarketCoinAmount(marketCoinName: string, ownerAddress?: string): Promise<number>;
764
866
  /**
765
867
  * Get price from pyth fee object.
766
868
  *
767
869
  * @param assetCoinName - Specific support asset coin name.
768
870
  * @return Asset coin price.
769
871
  */
770
- getPriceFromPyth(assetCoinName: SupportAssetCoins): Promise<number>;
872
+ getPriceFromPyth(assetCoinName: string): Promise<number>;
771
873
  /**
772
874
  * Get prices from pyth fee object.
773
875
  *
774
876
  * @param assetCoinNames - Array of supported asset coin names.
775
877
  * @return Array of asset coin prices.
776
878
  */
777
- getPricesFromPyth(assetCoinNames: SupportAssetCoins[]): Promise<Record<SupportAssetCoins, number>>;
879
+ getPricesFromPyth(assetCoinNames: string[]): Promise<Record<string, number>>;
778
880
  /**
779
881
  * Get spools data.
780
882
  *
@@ -782,20 +884,12 @@ declare class ScallopQuery {
782
884
  * @param indexer - Whether to use indexer.
783
885
  * @return Spools data.
784
886
  */
785
- getSpools(stakeMarketCoinNames?: SupportStakeMarketCoins[], args?: {
887
+ getSpools(stakeMarketCoinNames?: string[], args?: {
786
888
  marketPools?: MarketPools;
787
889
  coinPrices?: CoinPrices;
788
890
  indexer?: boolean;
789
891
  }): Promise<{
790
- susdc?: Spool | undefined;
791
- sweth?: Spool | undefined;
792
- swusdc?: Spool | undefined;
793
- swusdt?: Spool | undefined;
794
- ssui?: Spool | undefined;
795
- scetus?: Spool | undefined;
796
- safsui?: Spool | undefined;
797
- shasui?: Spool | undefined;
798
- svsui?: Spool | undefined;
892
+ [x: string]: Spool | undefined;
799
893
  }>;
800
894
  /**
801
895
  * Get spool data.
@@ -804,7 +898,7 @@ declare class ScallopQuery {
804
898
  * @param indexer - Whether to use indexer.
805
899
  * @return Spool data.
806
900
  */
807
- getSpool(stakeMarketCoinName: SupportStakeMarketCoins, args?: {
901
+ getSpool(stakeMarketCoinName: string, args?: {
808
902
  marketPool?: MarketPool;
809
903
  coinPrices?: CoinPrices;
810
904
  indexer?: boolean;
@@ -823,7 +917,7 @@ declare class ScallopQuery {
823
917
  * @param ownerAddress - The owner address.
824
918
  * @return Stake accounts data.
825
919
  */
826
- getStakeAccounts(stakeMarketCoinName: SupportStakeMarketCoins, ownerAddress?: string): Promise<StakeAccount[]>;
920
+ getStakeAccounts(stakeMarketCoinName: string, ownerAddress?: string): Promise<StakeAccount[]>;
827
921
  /**
828
922
  * Get stake pools (spools) data.
829
923
  *
@@ -834,16 +928,8 @@ declare class ScallopQuery {
834
928
  * @param stakeMarketCoinNames - Specific an array of support stake market coin name.
835
929
  * @return Stake pools data.
836
930
  */
837
- getStakePools(stakeMarketCoinNames?: SupportStakeMarketCoins[]): Promise<{
838
- susdc?: StakePool | undefined;
839
- sweth?: StakePool | undefined;
840
- swusdc?: StakePool | undefined;
841
- swusdt?: StakePool | undefined;
842
- ssui?: StakePool | undefined;
843
- scetus?: StakePool | undefined;
844
- safsui?: StakePool | undefined;
845
- shasui?: StakePool | undefined;
846
- svsui?: StakePool | undefined;
931
+ getStakePools(stakeMarketCoinNames?: string[]): Promise<{
932
+ [x: string]: StakePool | undefined;
847
933
  }>;
848
934
  /**
849
935
  * Get stake pool (spool) data.
@@ -855,7 +941,7 @@ declare class ScallopQuery {
855
941
  * @param stakeMarketCoinName - Specific support stake market coin name.
856
942
  * @return Stake pool data.
857
943
  */
858
- getStakePool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<StakePool | undefined>;
944
+ getStakePool(stakeMarketCoinName: string): Promise<StakePool | undefined>;
859
945
  /**
860
946
  * Get stake reward pools data.
861
947
  *
@@ -866,16 +952,8 @@ declare class ScallopQuery {
866
952
  * @param stakeMarketCoinNames - Specific an array of stake market coin name.
867
953
  * @return Stake reward pools data.
868
954
  */
869
- getStakeRewardPools(stakeMarketCoinNames?: SupportStakeMarketCoins[]): Promise<{
870
- susdc?: StakeRewardPool | undefined;
871
- sweth?: StakeRewardPool | undefined;
872
- swusdc?: StakeRewardPool | undefined;
873
- swusdt?: StakeRewardPool | undefined;
874
- ssui?: StakeRewardPool | undefined;
875
- scetus?: StakeRewardPool | undefined;
876
- safsui?: StakeRewardPool | undefined;
877
- shasui?: StakeRewardPool | undefined;
878
- svsui?: StakeRewardPool | undefined;
955
+ getStakeRewardPools(stakeMarketCoinNames?: string[]): Promise<{
956
+ [x: string]: StakeRewardPool | undefined;
879
957
  }>;
880
958
  /**
881
959
  * Get stake reward pool data.
@@ -887,7 +965,7 @@ declare class ScallopQuery {
887
965
  * @param marketCoinName - Specific support stake market coin name.
888
966
  * @return Stake reward pool data.
889
967
  */
890
- getStakeRewardPool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<StakeRewardPool | undefined>;
968
+ getStakeRewardPool(stakeMarketCoinName: string): Promise<StakeRewardPool | undefined>;
891
969
  /**
892
970
  * Get borrow incentive pools data.
893
971
  *
@@ -895,34 +973,12 @@ declare class ScallopQuery {
895
973
  * @param indexer - Whether to use indexer.
896
974
  * @return Borrow incentive pools data.
897
975
  */
898
- getBorrowIncentivePools(coinNames?: SupportBorrowIncentiveCoins[], args?: {
976
+ getBorrowIncentivePools(coinNames?: string[], args?: {
899
977
  coinPrices?: CoinPrices;
900
978
  indexer?: boolean;
901
979
  marketPools?: MarketPools;
902
980
  }): Promise<{
903
- usdc?: BorrowIncentivePool | undefined;
904
- sbeth?: BorrowIncentivePool | undefined;
905
- sbusdt?: BorrowIncentivePool | undefined;
906
- sbwbtc?: BorrowIncentivePool | undefined;
907
- weth?: BorrowIncentivePool | undefined;
908
- wbtc?: BorrowIncentivePool | undefined;
909
- wusdc?: BorrowIncentivePool | undefined;
910
- wusdt?: BorrowIncentivePool | undefined;
911
- sui?: BorrowIncentivePool | undefined;
912
- wapt?: BorrowIncentivePool | undefined;
913
- wsol?: BorrowIncentivePool | undefined;
914
- cetus?: BorrowIncentivePool | undefined;
915
- afsui?: BorrowIncentivePool | undefined;
916
- hasui?: BorrowIncentivePool | undefined;
917
- vsui?: BorrowIncentivePool | undefined;
918
- sca?: BorrowIncentivePool | undefined;
919
- fud?: BorrowIncentivePool | undefined;
920
- deep?: BorrowIncentivePool | undefined;
921
- fdusd?: BorrowIncentivePool | undefined;
922
- blub?: BorrowIncentivePool | undefined;
923
- musd?: BorrowIncentivePool | undefined;
924
- ns?: BorrowIncentivePool | undefined;
925
- usdy?: BorrowIncentivePool | undefined;
981
+ [x: string]: BorrowIncentivePool | undefined;
926
982
  }>;
927
983
  /**
928
984
  * Get borrow incentive accounts data.
@@ -931,30 +987,8 @@ declare class ScallopQuery {
931
987
  * @param ownerAddress - The owner address.
932
988
  * @return Borrow incentive accounts data.
933
989
  */
934
- getBorrowIncentiveAccounts(obligationId: string | SuiObjectRef, coinNames?: SupportBorrowIncentiveCoins[]): Promise<{
935
- usdc?: ParsedBorrowIncentiveAccountData | undefined;
936
- sbeth?: ParsedBorrowIncentiveAccountData | undefined;
937
- sbusdt?: ParsedBorrowIncentiveAccountData | undefined;
938
- sbwbtc?: ParsedBorrowIncentiveAccountData | undefined;
939
- weth?: ParsedBorrowIncentiveAccountData | undefined;
940
- wbtc?: ParsedBorrowIncentiveAccountData | undefined;
941
- wusdc?: ParsedBorrowIncentiveAccountData | undefined;
942
- wusdt?: ParsedBorrowIncentiveAccountData | undefined;
943
- sui?: ParsedBorrowIncentiveAccountData | undefined;
944
- wapt?: ParsedBorrowIncentiveAccountData | undefined;
945
- wsol?: ParsedBorrowIncentiveAccountData | undefined;
946
- cetus?: ParsedBorrowIncentiveAccountData | undefined;
947
- afsui?: ParsedBorrowIncentiveAccountData | undefined;
948
- hasui?: ParsedBorrowIncentiveAccountData | undefined;
949
- vsui?: ParsedBorrowIncentiveAccountData | undefined;
950
- sca?: ParsedBorrowIncentiveAccountData | undefined;
951
- fud?: ParsedBorrowIncentiveAccountData | undefined;
952
- deep?: ParsedBorrowIncentiveAccountData | undefined;
953
- fdusd?: ParsedBorrowIncentiveAccountData | undefined;
954
- blub?: ParsedBorrowIncentiveAccountData | undefined;
955
- musd?: ParsedBorrowIncentiveAccountData | undefined;
956
- ns?: ParsedBorrowIncentiveAccountData | undefined;
957
- usdy?: ParsedBorrowIncentiveAccountData | undefined;
990
+ getBorrowIncentiveAccounts(obligationId: string | SuiObjectRef, coinNames?: string[]): Promise<{
991
+ [x: string]: ParsedBorrowIncentiveAccountData | undefined;
958
992
  }>;
959
993
  /**
960
994
  * Get user lending and spool infomation for specific pools.
@@ -964,34 +998,12 @@ declare class ScallopQuery {
964
998
  * @param indexer - Whether to use indexer.
965
999
  * @return All lending and spool infomation.
966
1000
  */
967
- getLendings(poolCoinNames?: SupportPoolCoins[], ownerAddress?: string, args?: {
1001
+ getLendings(poolCoinNames?: string[], ownerAddress?: string, args?: {
968
1002
  indexer?: boolean;
969
1003
  marketPools?: MarketPools;
970
1004
  coinPrices?: CoinPrices;
971
1005
  }): Promise<{
972
- usdc?: Lending | undefined;
973
- sbeth?: Lending | undefined;
974
- sbusdt?: Lending | undefined;
975
- sbwbtc?: Lending | undefined;
976
- weth?: Lending | undefined;
977
- wbtc?: Lending | undefined;
978
- wusdc?: Lending | undefined;
979
- wusdt?: Lending | undefined;
980
- sui?: Lending | undefined;
981
- wapt?: Lending | undefined;
982
- wsol?: Lending | undefined;
983
- cetus?: Lending | undefined;
984
- afsui?: Lending | undefined;
985
- hasui?: Lending | undefined;
986
- vsui?: Lending | undefined;
987
- sca?: Lending | undefined;
988
- fud?: Lending | undefined;
989
- deep?: Lending | undefined;
990
- fdusd?: Lending | undefined;
991
- blub?: Lending | undefined;
992
- musd?: Lending | undefined;
993
- ns?: Lending | undefined;
994
- usdy?: Lending | undefined;
1006
+ [x: string]: Lending | undefined;
995
1007
  }>;
996
1008
  /**
997
1009
  * Get user lending and spool information for specific pool.
@@ -1001,7 +1013,7 @@ declare class ScallopQuery {
1001
1013
  * @param indexer - Whether to use indexer.
1002
1014
  * @return Lending pool data.
1003
1015
  */
1004
- getLending(poolCoinName: SupportPoolCoins, ownerAddress?: string, args?: {
1016
+ getLending(poolCoinName: string, ownerAddress?: string, args?: {
1005
1017
  indexer?: boolean;
1006
1018
  }): Promise<Lending>;
1007
1019
  /**
@@ -1099,7 +1111,7 @@ declare class ScallopQuery {
1099
1111
  * @param sCoinName - Supported sCoin name
1100
1112
  * @returns Total Supply
1101
1113
  */
1102
- getSCoinTotalSupply(sCoinName: SupportSCoin): Promise<number>;
1114
+ getSCoinTotalSupply(sCoinName: string): Promise<number>;
1103
1115
  /**
1104
1116
  * Get all sCoin amounts.
1105
1117
  *
@@ -1107,7 +1119,7 @@ declare class ScallopQuery {
1107
1119
  * @param ownerAddress - The owner address.
1108
1120
  * @return All market sCoin amounts.
1109
1121
  */
1110
- getSCoinAmounts(sCoinNames?: SupportSCoin[], ownerAddress?: string): Promise<OptionalKeys<Record<"susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd" | "sns" | "susdy", number>>>;
1122
+ getSCoinAmounts(sCoinNames?: string[], ownerAddress?: string): Promise<OptionalKeys<Record<string, number>>>;
1111
1123
  /**
1112
1124
  * Get sCoin amount.
1113
1125
  *
@@ -1115,22 +1127,22 @@ declare class ScallopQuery {
1115
1127
  * @param ownerAddress - The owner address.
1116
1128
  * @return sCoin amount.
1117
1129
  */
1118
- getSCoinAmount(sCoinName: SupportSCoin | SupportMarketCoins, ownerAddress?: string): Promise<number>;
1130
+ getSCoinAmount(sCoinName: string | string, ownerAddress?: string): Promise<number>;
1119
1131
  /**
1120
1132
  * Get swap rate from sCoin A to sCoin B
1121
1133
  * @param assetCoinNames
1122
1134
  * @returns
1123
1135
  */
1124
- getSCoinSwapRate(fromSCoin: SupportSCoin, toSCoin: SupportSCoin): Promise<number>;
1125
- getFlashLoanFees(assetCoinNames?: SupportAssetCoins[]): Promise<Record<"usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd" | "ns" | "usdy", number>>;
1136
+ getSCoinSwapRate(fromSCoin: string, toSCoin: string): Promise<number>;
1137
+ getFlashLoanFees(assetCoinNames?: string[]): Promise<Record<string, number>>;
1126
1138
  /**
1127
1139
  * Get supply limit of lending pool
1128
1140
  */
1129
- getPoolSupplyLimit(poolName: SupportPoolCoins): Promise<string | null>;
1141
+ getPoolSupplyLimit(poolName: string): Promise<string | null>;
1130
1142
  /**
1131
1143
  * Get borrow limit of borrow pool
1132
1144
  */
1133
- getPoolBorrowLimit(poolName: SupportPoolCoins): Promise<string | null>;
1145
+ getPoolBorrowLimit(poolName: string): Promise<string | null>;
1134
1146
  /**
1135
1147
  * Get list of isolated assets
1136
1148
  */
@@ -1138,13 +1150,13 @@ declare class ScallopQuery {
1138
1150
  /**
1139
1151
  * Check if asset is an isolated asset
1140
1152
  */
1141
- isIsolatedAsset(assetCoinName: SupportAssetCoins): Promise<boolean>;
1153
+ isIsolatedAsset(assetCoinName: string): Promise<boolean>;
1142
1154
  /**
1143
1155
  * Get pool coin price from indexer
1144
1156
  * @param coinName
1145
1157
  * @returns price data
1146
1158
  */
1147
- getCoinPriceByIndexer(poolName: SupportPoolCoins): Promise<number>;
1159
+ getCoinPriceByIndexer(poolName: string): Promise<number>;
1148
1160
  /**
1149
1161
  * Get all supported pool price from indexer
1150
1162
  * @returns prices data
@@ -1159,84 +1171,13 @@ declare class ScallopQuery {
1159
1171
  coinPrices?: CoinPrices;
1160
1172
  indexer?: boolean;
1161
1173
  }): Promise<{
1162
- susdc?: number | undefined;
1163
- ssbeth?: number | undefined;
1164
- ssbusdt?: number | undefined;
1165
- ssbwbtc?: number | undefined;
1166
- sweth?: number | undefined;
1167
- swbtc?: number | undefined;
1168
- swusdc?: number | undefined;
1169
- swusdt?: number | undefined;
1170
- ssui?: number | undefined;
1171
- swsol?: number | undefined;
1172
- scetus?: number | undefined;
1173
- safsui?: number | undefined;
1174
- shasui?: number | undefined;
1175
- svsui?: number | undefined;
1176
- ssca?: number | undefined;
1177
- sfud?: number | undefined;
1178
- sdeep?: number | undefined;
1179
- sfdusd?: number | undefined;
1180
- sblub?: number | undefined;
1181
- smusd?: number | undefined;
1182
- sns?: number | undefined;
1183
- susdy?: number | undefined;
1184
- usdc?: number | undefined;
1185
- sbeth?: number | undefined;
1186
- sbusdt?: number | undefined;
1187
- sbwbtc?: number | undefined;
1188
- weth?: number | undefined;
1189
- wbtc?: number | undefined;
1190
- wusdc?: number | undefined;
1191
- wusdt?: number | undefined;
1192
- sui?: number | undefined;
1193
- wapt?: number | undefined;
1194
- wsol?: number | undefined;
1195
- cetus?: number | undefined;
1196
- afsui?: number | undefined;
1197
- hasui?: number | undefined;
1198
- vsui?: number | undefined;
1199
- sca?: number | undefined;
1200
- fud?: number | undefined;
1201
- deep?: number | undefined;
1202
- fdusd?: number | undefined;
1203
- blub?: number | undefined;
1204
- musd?: number | undefined;
1205
- ns?: number | undefined;
1206
- usdy?: number | undefined;
1207
- swapt?: number | undefined;
1174
+ [x: string]: number | undefined;
1208
1175
  }>;
1209
1176
  /**
1210
1177
  * Query all address (lending pool, collateral pool, borrow dynamics, interest models, etc.) of all pool
1211
1178
  * @returns
1212
1179
  */
1213
- getPoolAddresses(pools?: SupportPoolCoins[]): Promise<OptionalKeys<Record<"usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd" | "ns" | "usdy", {
1214
- coinName: string;
1215
- symbol: string;
1216
- lendingPoolAddress?: string;
1217
- collateralPoolAddress?: string;
1218
- borrowDynamic?: string;
1219
- spoolReward?: string;
1220
- spool?: string;
1221
- sCoinType?: string;
1222
- sCoinName?: string;
1223
- sCoinSymbol?: string;
1224
- sCoinTreasury?: string;
1225
- interestModel?: string;
1226
- riskModel?: string;
1227
- borrowFeeKey?: string;
1228
- supplyLimitKey?: string;
1229
- borrowLimitKey?: string;
1230
- isolatedAssetKey?: string;
1231
- coinMetadataId?: string;
1232
- borrowIncentivePoolId?: string;
1233
- coinType?: string;
1234
- sCoinMetadataId?: string;
1235
- spoolName?: string;
1236
- decimals: number;
1237
- pythFeed?: string;
1238
- pythFeedObjectId?: string;
1239
- }>>>;
1180
+ getPoolAddresses(apiAddressId?: string | undefined): Promise<OptionalKeys<Record<string, PoolAddress>>>;
1240
1181
  /**
1241
1182
  * Get user portfolio
1242
1183
  */
@@ -1249,7 +1190,7 @@ declare class ScallopQuery {
1249
1190
  suppliedCoin: number;
1250
1191
  suppliedValue: number;
1251
1192
  stakedCoin: number;
1252
- coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd" | "ns" | "usdy";
1193
+ coinName: string;
1253
1194
  symbol: string;
1254
1195
  coinType: string;
1255
1196
  coinPrice: number;
@@ -1266,7 +1207,7 @@ declare class ScallopQuery {
1266
1207
  availableCollateralInUsd: number;
1267
1208
  totalUnhealthyCollateralInUsd: number;
1268
1209
  borrowedPools: {
1269
- coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd" | "ns" | "usdy";
1210
+ coinName: string;
1270
1211
  symbol: string;
1271
1212
  coinDecimals: number;
1272
1213
  coinType: string;
@@ -1276,7 +1217,7 @@ declare class ScallopQuery {
1276
1217
  borrowApr: number | undefined;
1277
1218
  borrowApy: number | undefined;
1278
1219
  incentiveInfos: {
1279
- coinName: "usdc" | "sbeth" | "sbusdt" | "sbwbtc" | "weth" | "wbtc" | "wusdc" | "wusdt" | "sui" | "wapt" | "wsol" | "cetus" | "afsui" | "hasui" | "vsui" | "sca" | "fud" | "deep" | "fdusd" | "blub" | "musd" | "ns" | "usdy" | "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd" | "sns" | "susdy";
1220
+ coinName: string;
1280
1221
  symbol: string;
1281
1222
  coinType: string;
1282
1223
  incentiveApr: number;
@@ -1312,7 +1253,13 @@ declare class ScallopQuery {
1312
1253
  * Return the supported primary and secondary oracles for all supported pool assets
1313
1254
  * @returns
1314
1255
  */
1315
- getAssetOracles(): Promise<Record<SupportAssetCoins, xOracleRules>>;
1256
+ getAssetOracles(): Promise<Record<string, xOracleRules>>;
1257
+ /**
1258
+ * Get switchboard on-demand aggregator object id based on coinType
1259
+ * @param coinType
1260
+ * @returns
1261
+ */
1262
+ getSwitchboardOnDemandAggregatorObjectIds(coinName: string[]): Promise<string[]>;
1316
1263
  }
1317
1264
 
1318
1265
  /**
@@ -1331,18 +1278,19 @@ declare class ScallopBuilder {
1331
1278
  readonly isTestnet: boolean;
1332
1279
  suiKit: SuiKit;
1333
1280
  address: ScallopAddress;
1281
+ constants: ScallopConstants;
1334
1282
  query: ScallopQuery;
1335
1283
  utils: ScallopUtils;
1336
1284
  walletAddress: string;
1337
1285
  cache: ScallopCache;
1338
- constructor(params?: ScallopBuilderParams, instance?: ScallopBuilderInstanceParams);
1286
+ constructor(params: ScallopBuilderParams, instance?: ScallopBuilderInstanceParams);
1339
1287
  /**
1340
1288
  * Request the scallop API to initialize data.
1341
1289
  *
1342
1290
  * @param force - Whether to force initialization.
1343
1291
  * @param address - ScallopAddress instance.
1344
1292
  */
1345
- init(force?: boolean, address?: ScallopAddress): Promise<void>;
1293
+ init(force?: boolean): Promise<void>;
1346
1294
  /**
1347
1295
  * Create a scallop txBlock instance that enhances transaction block.
1348
1296
  *
@@ -1359,7 +1307,7 @@ declare class ScallopBuilder {
1359
1307
  * @param sender - Sender address.
1360
1308
  * @return Take coin and left coin.
1361
1309
  */
1362
- selectCoin<T extends SupportAssetCoins>(txBlock: ScallopTxBlock | SuiTxBlock, assetCoinName: T, amount: number, sender?: string): Promise<SelectCoinReturnType<T>>;
1310
+ selectCoin<T extends string>(txBlock: ScallopTxBlock | SuiTxBlock, assetCoinName: T, amount: number, sender?: string): Promise<SelectCoinReturnType<T>>;
1363
1311
  /**
1364
1312
  * Specifying the sender's amount of market coins to get coins args from transaction result.
1365
1313
  *
@@ -1369,7 +1317,7 @@ declare class ScallopBuilder {
1369
1317
  * @param sender - Sender address.
1370
1318
  * @return Take coin and left coin.
1371
1319
  */
1372
- selectMarketCoin(txBlock: ScallopTxBlock | SuiTxBlock, marketCoinName: SupportMarketCoins, amount: number, sender?: string): Promise<{
1320
+ selectMarketCoin(txBlock: ScallopTxBlock | SuiTxBlock, marketCoinName: string, amount: number, sender?: string): Promise<{
1373
1321
  takeCoin: _scallop_io_sui_kit.TransactionObjectArgument;
1374
1322
  leftCoin: _scallop_io_sui_kit.TransactionObjectArgument;
1375
1323
  totalAmount: number;
@@ -1383,7 +1331,7 @@ declare class ScallopBuilder {
1383
1331
  * @param sender - Sender address.
1384
1332
  * @return Take coin and left coin.
1385
1333
  */
1386
- selectSCoin(txBlock: ScallopTxBlock | SuiTxBlock, sCoinName: SupportSCoin, amount: number, sender?: string): Promise<{
1334
+ selectSCoin(txBlock: ScallopTxBlock | SuiTxBlock, sCoinName: string, amount: number, sender?: string): Promise<{
1387
1335
  takeCoin: _scallop_io_sui_kit.TransactionObjectArgument;
1388
1336
  leftCoin: _scallop_io_sui_kit.TransactionObjectArgument;
1389
1337
  totalAmount: number;
@@ -1413,12 +1361,13 @@ declare class ScallopClient {
1413
1361
  readonly params: ScallopClientParams;
1414
1362
  suiKit: SuiKit;
1415
1363
  address: ScallopAddress;
1364
+ constants: ScallopConstants;
1416
1365
  builder: ScallopBuilder;
1417
1366
  query: ScallopQuery;
1418
1367
  utils: ScallopUtils;
1419
1368
  cache: ScallopCache;
1420
1369
  walletAddress: string;
1421
- constructor(params?: ScallopClientParams, instance?: ScallopClientInstanceParams);
1370
+ constructor(params: ScallopClientParams, instance?: ScallopClientInstanceParams);
1422
1371
  /**
1423
1372
  * Request the scallop API to initialize data.
1424
1373
  *
@@ -1474,7 +1423,7 @@ declare class ScallopClient {
1474
1423
  * @param ownerAddress - The owner address.
1475
1424
  * @return Stake accounts data.
1476
1425
  */
1477
- getStakeAccounts(stakeMarketCoinName: SupportStakeMarketCoins, ownerAddress?: string): Promise<StakeAccount[]>;
1426
+ getStakeAccounts(stakeMarketCoinName: string, ownerAddress?: string): Promise<StakeAccount[]>;
1478
1427
  /**
1479
1428
  * Query stake pool data.
1480
1429
  *
@@ -1484,7 +1433,7 @@ declare class ScallopClient {
1484
1433
  * @param stakeMarketCoinName - Support stake market coin.
1485
1434
  * @return Stake pool data.
1486
1435
  */
1487
- getStakePool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<StakePool | undefined>;
1436
+ getStakePool(stakeMarketCoinName: string): Promise<StakePool | undefined>;
1488
1437
  /**
1489
1438
  * Query reward pool data.
1490
1439
  *
@@ -1494,7 +1443,7 @@ declare class ScallopClient {
1494
1443
  * @param stakeMarketCoinName - Support stake market coin.
1495
1444
  * @return Reward pool data.
1496
1445
  */
1497
- getStakeRewardPool(stakeMarketCoinName: SupportStakeMarketCoins): Promise<StakeRewardPool | undefined>;
1446
+ getStakeRewardPool(stakeMarketCoinName: string): Promise<StakeRewardPool | undefined>;
1498
1447
  /**
1499
1448
  * Open obligation.
1500
1449
  *
@@ -1513,8 +1462,8 @@ declare class ScallopClient {
1513
1462
  * @param walletAddress - The wallet address of the owner.
1514
1463
  * @return Transaction block response or transaction block.
1515
1464
  */
1516
- depositCollateral(collateralCoinName: SupportCollateralCoins, amount: number): Promise<SuiTransactionBlockResponse>;
1517
- depositCollateral<S extends boolean>(collateralCoinName: SupportCollateralCoins, amount: number, sign?: S, obligationId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1465
+ depositCollateral(collateralCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1466
+ depositCollateral<S extends boolean>(collateralCoinName: string, amount: number, sign?: S, obligationId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1518
1467
  /**
1519
1468
  * Withdraw collateral from the specific pool.
1520
1469
  *
@@ -1526,7 +1475,7 @@ declare class ScallopClient {
1526
1475
  * @param walletAddress - The wallet address of the owner.
1527
1476
  * @return Transaction block response or transaction block.
1528
1477
  */
1529
- withdrawCollateral<S extends boolean>(collateralCoinName: SupportCollateralCoins, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1478
+ withdrawCollateral<S extends boolean>(collateralCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1530
1479
  /**
1531
1480
  * Deposit asset into the specific pool.
1532
1481
  *
@@ -1536,8 +1485,8 @@ declare class ScallopClient {
1536
1485
  * @param walletAddress - The wallet address of the owner.
1537
1486
  * @return Transaction block response or transaction block.
1538
1487
  */
1539
- deposit(poolCoinName: SupportPoolCoins, amount: number): Promise<SuiTransactionBlockResponse>;
1540
- deposit<S extends boolean>(poolCoinName: SupportPoolCoins, amount: number, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1488
+ deposit(poolCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1489
+ deposit<S extends boolean>(poolCoinName: string, amount: number, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1541
1490
  /**
1542
1491
  * Deposit asset into the specific pool and Stake market coin into the corresponding spool.
1543
1492
  *
@@ -1548,8 +1497,8 @@ declare class ScallopClient {
1548
1497
  * @param walletAddress - The wallet address of the owner.
1549
1498
  * @return Transaction block response or transaction block.
1550
1499
  */
1551
- depositAndStake(stakeCoinName: SupportStakeCoins, amount: number): Promise<SuiTransactionBlockResponse>;
1552
- depositAndStake<S extends boolean>(stakeCoinName: SupportStakeCoins, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1500
+ depositAndStake(stakeCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1501
+ depositAndStake<S extends boolean>(stakeCoinName: string, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1553
1502
  /**
1554
1503
  * Withdraw asset from the specific pool, must return market coin.
1555
1504
  *
@@ -1559,8 +1508,8 @@ declare class ScallopClient {
1559
1508
  * @param walletAddress - The wallet address of the owner.
1560
1509
  * @return Transaction block response or transaction block.
1561
1510
  */
1562
- withdraw(poolCoinName: SupportPoolCoins, amount: number): Promise<SuiTransactionBlockResponse>;
1563
- withdraw<S extends boolean>(poolCoinName: SupportPoolCoins, amount: number, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1511
+ withdraw(poolCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1512
+ withdraw<S extends boolean>(poolCoinName: string, amount: number, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1564
1513
  /**
1565
1514
  * Borrow asset from the specific pool.
1566
1515
  *
@@ -1572,7 +1521,7 @@ declare class ScallopClient {
1572
1521
  * @param walletAddress - The wallet address of the owner.
1573
1522
  * @return Transaction block response or transaction block.
1574
1523
  */
1575
- borrow<S extends boolean>(poolCoinName: SupportPoolCoins, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1524
+ borrow<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1576
1525
  /**
1577
1526
  * Repay asset into the specific pool.
1578
1527
  *
@@ -1583,7 +1532,7 @@ declare class ScallopClient {
1583
1532
  * @param walletAddress - The wallet address of the owner.
1584
1533
  * @return Transaction block response or transaction block.
1585
1534
  */
1586
- repay<S extends boolean>(poolCoinName: SupportPoolCoins, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1535
+ repay<S extends boolean>(poolCoinName: string, amount: number, sign: S | undefined, obligationId: string, obligationKey: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1587
1536
  /**
1588
1537
  * FlashLoan asset from the specific pool.
1589
1538
  *
@@ -1593,8 +1542,8 @@ declare class ScallopClient {
1593
1542
  * @param sign - Decide to directly sign the transaction or return the transaction block.
1594
1543
  * @return Transaction block response or transaction block.
1595
1544
  */
1596
- flashLoan(poolCoinName: SupportPoolCoins, amount: number, callback: (txBlock: ScallopTxBlock, coin: TransactionObjectArgument | string) => SuiObjectArg): Promise<SuiTransactionBlockResponse>;
1597
- flashLoan<S extends boolean>(poolCoinName: SupportPoolCoins, amount: number, callback: (txBlock: ScallopTxBlock, coin: TransactionObjectArgument | string) => SuiObjectArg, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1545
+ flashLoan(poolCoinName: string, amount: number, callback: (txBlock: ScallopTxBlock, coin: TransactionObjectArgument | string) => SuiObjectArg): Promise<SuiTransactionBlockResponse>;
1546
+ flashLoan<S extends boolean>(poolCoinName: string, amount: number, callback: (txBlock: ScallopTxBlock, coin: TransactionObjectArgument | string) => SuiObjectArg, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1598
1547
  /**
1599
1548
  * Create stake account.
1600
1549
  *
@@ -1602,8 +1551,8 @@ declare class ScallopClient {
1602
1551
  * @param walletAddress - The wallet address of the owner.
1603
1552
  * @return Transaction block response or transaction block.
1604
1553
  */
1605
- createStakeAccount(marketCoinName: SupportStakeMarketCoins): Promise<SuiTransactionBlockResponse>;
1606
- createStakeAccount<S extends boolean>(marketCoinName: SupportStakeMarketCoins, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1554
+ createStakeAccount(marketCoinName: string): Promise<SuiTransactionBlockResponse>;
1555
+ createStakeAccount<S extends boolean>(marketCoinName: string, sign?: S, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1607
1556
  /**
1608
1557
  * Stake market coin into the specific spool.
1609
1558
  *
@@ -1614,8 +1563,8 @@ declare class ScallopClient {
1614
1563
  * @param walletAddress - The wallet address of the owner.
1615
1564
  * @return Transaction block response or transaction block.
1616
1565
  */
1617
- stake(stakeMarketCoinName: SupportStakeMarketCoins, amount: number): Promise<SuiTransactionBlockResponse>;
1618
- stake<S extends boolean>(stakeMarketCoinName: SupportStakeMarketCoins, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1566
+ stake(stakeMarketCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1567
+ stake<S extends boolean>(stakeMarketCoinName: string, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1619
1568
  /**
1620
1569
  * Unstake market coin from the specific spool.
1621
1570
  *
@@ -1626,8 +1575,8 @@ declare class ScallopClient {
1626
1575
  * @param walletAddress - The wallet address of the owner.
1627
1576
  * @return Transaction block response or transaction block.
1628
1577
  */
1629
- unstake(stakeMarketCoinName: SupportStakeMarketCoins, amount: number): Promise<SuiTransactionBlockResponse>;
1630
- unstake<S extends boolean>(stakeMarketCoinName: SupportStakeMarketCoins, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1578
+ unstake(stakeMarketCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1579
+ unstake<S extends boolean>(stakeMarketCoinName: string, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1631
1580
  /**
1632
1581
  * Unstake market coin from the specific spool and withdraw asset from the corresponding pool.
1633
1582
  *
@@ -1638,8 +1587,8 @@ declare class ScallopClient {
1638
1587
  * @param walletAddress - The wallet address of the owner.
1639
1588
  * @return Transaction block response or transaction block.
1640
1589
  */
1641
- unstakeAndWithdraw(stakeMarketCoinName: SupportStakeMarketCoins, amount: number): Promise<SuiTransactionBlockResponse>;
1642
- unstakeAndWithdraw<S extends boolean>(stakeMarketCoinName: SupportStakeMarketCoins, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1590
+ unstakeAndWithdraw(stakeMarketCoinName: string, amount: number): Promise<SuiTransactionBlockResponse>;
1591
+ unstakeAndWithdraw<S extends boolean>(stakeMarketCoinName: string, amount: number, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1643
1592
  /**
1644
1593
  * Claim reward coin from the specific spool.
1645
1594
  *
@@ -1650,8 +1599,8 @@ declare class ScallopClient {
1650
1599
  * @param walletAddress - The wallet address of the owner.
1651
1600
  * @return Transaction block response or transaction block.
1652
1601
  */
1653
- claim(stakeMarketCoinName: SupportStakeMarketCoins): Promise<SuiTransactionBlockResponse>;
1654
- claim<S extends boolean>(stakeMarketCoinName: SupportStakeMarketCoins, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1602
+ claim(stakeMarketCoinName: string): Promise<SuiTransactionBlockResponse>;
1603
+ claim<S extends boolean>(stakeMarketCoinName: string, sign?: S, stakeAccountId?: string, walletAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1655
1604
  /**
1656
1605
  * stake obligaion.
1657
1606
  *
@@ -1705,8 +1654,8 @@ declare class ScallopClient {
1705
1654
  * @param sign - Decide to directly sign the transaction or return the transaction block.
1706
1655
  * @return Transaction block response or transaction block.
1707
1656
  */
1708
- mintTestCoin(assetCoinName: Exclude<SupportAssetCoins, 'sui'>, amount: number): Promise<SuiTransactionBlockResponse>;
1709
- mintTestCoin<S extends boolean>(assetCoinName: Exclude<SupportAssetCoins, 'sui'>, amount: number, sign?: S, receiveAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1657
+ mintTestCoin(assetCoinName: Exclude<string, 'sui'>, amount: number): Promise<SuiTransactionBlockResponse>;
1658
+ mintTestCoin<S extends boolean>(assetCoinName: Exclude<string, 'sui'>, amount: number, sign?: S, receiveAddress?: string): Promise<ScallopClientFnReturnType<S>>;
1710
1659
  }
1711
1660
 
1712
1661
  /**
@@ -1731,7 +1680,9 @@ declare class Scallop {
1731
1680
  suiKit: SuiKit;
1732
1681
  cache: ScallopCache;
1733
1682
  private address;
1683
+ private constants;
1734
1684
  constructor(params: ScallopParams, cacheOptions?: QueryClientConfig, queryClient?: QueryClient);
1685
+ private initConstants;
1735
1686
  /**
1736
1687
  * Get a scallop address instance that already has read addresses.
1737
1688
  *
@@ -1744,20 +1695,20 @@ declare class Scallop {
1744
1695
  *
1745
1696
  * @return Scallop Builder.
1746
1697
  */
1747
- createScallopBuilder(params?: ScallopBuilderParams): Promise<ScallopBuilder>;
1698
+ createScallopBuilder(params?: Partial<ScallopBuilderParams>): Promise<ScallopBuilder>;
1748
1699
  /**
1749
1700
  * Create a scallop client instance that already has initial data.
1750
1701
  *
1751
1702
  * @param walletAddress - When user cannot provide a secret key or mnemonic, the scallop client cannot directly derive the address of the transaction the user wants to sign. This argument specifies the wallet address for signing the transaction.
1752
1703
  * @return Scallop Client.
1753
1704
  */
1754
- createScallopClient(params?: ScallopClientParams): Promise<ScallopClient>;
1705
+ createScallopClient(params?: Partial<ScallopClientParams>): Promise<ScallopClient>;
1755
1706
  /**
1756
1707
  * Create a scallop query instance.
1757
1708
  *
1758
1709
  * @return Scallop Query.
1759
1710
  */
1760
- createScallopQuery(params?: ScallopQueryParams): Promise<ScallopQuery>;
1711
+ createScallopQuery(params?: Partial<ScallopQueryParams>): Promise<ScallopQuery>;
1761
1712
  /**
1762
1713
  * Create a scallop indexer instance.
1763
1714
  *
@@ -1769,65 +1720,9 @@ declare class Scallop {
1769
1720
  *
1770
1721
  * @return Scallop Utils.
1771
1722
  */
1772
- createScallopUtils(params?: ScallopUtilsParams): Promise<ScallopUtils>;
1723
+ createScallopUtils(params?: Partial<ScallopUtilsParams>): Promise<ScallopUtils>;
1773
1724
  }
1774
1725
 
1775
- type Coins = {
1776
- [K in SupportCoins]: K;
1777
- };
1778
- type AssetCoins = {
1779
- [K in SupportAssetCoins]: K;
1780
- };
1781
- type MarketCoins = {
1782
- [K in SupportMarketCoins]: K;
1783
- };
1784
- type SCoins = {
1785
- [K in SupportSCoin]: K;
1786
- };
1787
- type StakeMarketCoins = {
1788
- [K in SupportStakeMarketCoins]: K;
1789
- };
1790
- type StakeRewardCoins = {
1791
- [key in SupportStakeMarketCoins]: SupportStakeRewardCoins;
1792
- };
1793
- type SuiBridgeCoins = {
1794
- [K in SupportSuiBridgeCoins]: K;
1795
- };
1796
- type BorrowIncentiveRewardCoins = {
1797
- [key in SupportBorrowIncentiveCoins]: SupportBorrowIncentiveRewardCoins[];
1798
- };
1799
- type AssetCoinIds = {
1800
- [key in SupportAssetCoins]: string;
1801
- };
1802
- type SCoinIds = {
1803
- [key in SupportSCoin]: string;
1804
- };
1805
- type SCoinTreasuryCaps = {
1806
- [key in SupportSCoin]: string;
1807
- };
1808
- type SCoinConverterTreasury = {
1809
- [key in SupportSCoin]: string;
1810
- };
1811
- type PickFromUnion<T, K extends string> = K extends T ? K : never;
1812
- type WormholeCoinIds = {
1813
- [key in PickFromUnion<SupportAssetCoins, 'weth' | 'wbtc' | 'wusdc' | 'wusdt' | 'wapt' | 'wsol'>]: string;
1814
- };
1815
- type VoloCoinIds = {
1816
- [key in PickFromUnion<SupportAssetCoins, 'vsui'>]: string;
1817
- };
1818
- type SuiBridgedCoinPackageIds = {
1819
- [key in SupportSuiBridgeCoins]: string;
1820
- };
1821
-
1822
- type xOracleRules = {
1823
- primary: SupportOracleType[];
1824
- secondary: SupportOracleType[];
1825
- };
1826
- type xOracleRuleType = keyof xOracleRules;
1827
- type xOracleListType = {
1828
- [key in SupportAssetCoins]: xOracleRules;
1829
- };
1830
-
1831
1726
  type CoreIds = {
1832
1727
  protocolPkg: string;
1833
1728
  market: string;
@@ -1845,28 +1740,28 @@ type CoreNormalMethods = {
1845
1740
  openObligation: () => [Obligation$1, ObligationKey, ObligationHotPotato];
1846
1741
  returnObligation: (obligation: SuiObjectArg, obligationHotPotato: SuiObjectArg) => void;
1847
1742
  openObligationEntry: () => void;
1848
- addCollateral: (obligation: SuiObjectArg, coin: SuiObjectArg, collateralCoinName: SupportCollateralCoins) => void;
1849
- takeCollateral: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, amount: number, collateralCoinName: SupportCollateralCoins) => TransactionResult;
1850
- deposit: (coin: SuiObjectArg, poolCoinName: SupportPoolCoins) => TransactionResult;
1851
- depositEntry: (coin: SuiObjectArg, poolCoinName: SupportPoolCoins) => TransactionResult;
1852
- withdraw: (marketCoin: SuiObjectArg, poolCoinName: SupportPoolCoins) => TransactionResult;
1853
- withdrawEntry: (marketCoin: SuiObjectArg, poolCoinName: SupportPoolCoins) => TransactionResult;
1854
- borrow: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, amount: number, poolCoinName: SupportPoolCoins) => TransactionResult;
1855
- borrowWithReferral: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, borrowReferral: SuiObjectArg, amount: number | SuiTxArg, poolCoinName: SupportPoolCoins) => TransactionResult;
1856
- borrowEntry: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, amount: number, poolCoinName: SupportPoolCoins) => TransactionResult;
1857
- repay: (obligation: SuiObjectArg, coin: SuiObjectArg, poolCoinName: SupportPoolCoins) => void;
1858
- borrowFlashLoan: (amount: number | SuiTxArg, poolCoinName: SupportPoolCoins) => TransactionResult;
1859
- repayFlashLoan: (coin: SuiObjectArg, loan: SuiObjectArg, poolCoinName: SupportPoolCoins) => void;
1743
+ addCollateral: (obligation: SuiObjectArg, coin: SuiObjectArg, collateralCoinName: string) => void;
1744
+ takeCollateral: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, amount: number, collateralCoinName: string) => TransactionResult;
1745
+ deposit: (coin: SuiObjectArg, poolCoinName: string) => TransactionResult;
1746
+ depositEntry: (coin: SuiObjectArg, poolCoinName: string) => TransactionResult;
1747
+ withdraw: (marketCoin: SuiObjectArg, poolCoinName: string) => TransactionResult;
1748
+ withdrawEntry: (marketCoin: SuiObjectArg, poolCoinName: string) => TransactionResult;
1749
+ borrow: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, amount: number, poolCoinName: string) => TransactionResult;
1750
+ borrowWithReferral: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, borrowReferral: SuiObjectArg, amount: number | SuiTxArg, poolCoinName: string) => TransactionResult;
1751
+ borrowEntry: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, amount: number, poolCoinName: string) => TransactionResult;
1752
+ repay: (obligation: SuiObjectArg, coin: SuiObjectArg, poolCoinName: string) => void;
1753
+ borrowFlashLoan: (amount: number | SuiTxArg, poolCoinName: string) => TransactionResult;
1754
+ repayFlashLoan: (coin: SuiObjectArg, loan: SuiObjectArg, poolCoinName: string) => void;
1860
1755
  };
1861
1756
  type CoreQuickMethods = {
1862
- addCollateralQuick: (amount: number, collateralCoinName: SupportCollateralCoins, obligationId?: SuiObjectArg) => Promise<void>;
1863
- takeCollateralQuick: (amount: number, collateralCoinName: SupportCollateralCoins, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg) => Promise<TransactionResult>;
1864
- borrowQuick: (amount: number, poolCoinName: SupportPoolCoins, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg) => Promise<TransactionResult>;
1865
- borrowWithReferralQuick: (amount: number, poolCoinName: SupportPoolCoins, borrowReferral: SuiObjectArg, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg) => Promise<TransactionResult>;
1866
- depositQuick: (amount: number, poolCoinName: SupportPoolCoins, returnSCoin?: boolean) => Promise<TransactionResult>;
1867
- withdrawQuick: (amount: number, poolCoinName: SupportPoolCoins) => Promise<TransactionResult>;
1868
- repayQuick: (amount: number, poolCoinName: SupportPoolCoins, obligationId?: SuiObjectArg) => Promise<void>;
1869
- updateAssetPricesQuick: (assetCoinNames?: SupportAssetCoins[]) => Promise<void>;
1757
+ addCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg) => Promise<void>;
1758
+ takeCollateralQuick: (amount: number, collateralCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg) => Promise<TransactionResult>;
1759
+ borrowQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg) => Promise<TransactionResult>;
1760
+ borrowWithReferralQuick: (amount: number, poolCoinName: string, borrowReferral: SuiObjectArg, obligationId?: SuiObjectArg, obligationKey?: SuiObjectArg) => Promise<TransactionResult>;
1761
+ depositQuick: (amount: number, poolCoinName: string, returnSCoin?: boolean) => Promise<TransactionResult>;
1762
+ withdrawQuick: (amount: number, poolCoinName: string) => Promise<TransactionResult>;
1763
+ repayQuick: (amount: number, poolCoinName: string, obligationId?: SuiObjectArg) => Promise<void>;
1764
+ updateAssetPricesQuick: (assetCoinNames?: string[]) => Promise<void>;
1870
1765
  };
1871
1766
  type SuiTxBlockWithCoreNormalMethods = SuiTxBlock & SuiTxBlockWithSpool & CoreNormalMethods;
1872
1767
  type CoreTxBlock = SuiTxBlockWithCoreNormalMethods & CoreQuickMethods;
@@ -1883,15 +1778,15 @@ type SpoolIds = {
1883
1778
  spoolPkg: string;
1884
1779
  };
1885
1780
  type SpoolNormalMethods = {
1886
- createStakeAccount: (stakeMarketCoinName: SupportStakeMarketCoins) => TransactionResult;
1887
- stake: (stakeAccount: SuiAddressArg, coin: SuiObjectArg, stakeMarketCoinName: SupportStakeMarketCoins) => void;
1888
- unstake: (stakeAccount: SuiAddressArg, amount: number, stakeMarketCoinName: SupportStakeMarketCoins) => TransactionResult;
1889
- claim: (stakeAccount: SuiAddressArg, stakeMarketCoinName: SupportStakeMarketCoins) => TransactionResult;
1781
+ createStakeAccount: (stakeMarketCoinName: string) => TransactionResult;
1782
+ stake: (stakeAccount: SuiAddressArg, coin: SuiObjectArg, stakeMarketCoinName: string) => void;
1783
+ unstake: (stakeAccount: SuiAddressArg, amount: number, stakeMarketCoinName: string) => TransactionResult;
1784
+ claim: (stakeAccount: SuiAddressArg, stakeMarketCoinName: string) => TransactionResult;
1890
1785
  };
1891
1786
  type SpoolQuickMethods = {
1892
- stakeQuick(amountOrMarketCoin: SuiObjectArg | number, stakeMarketCoinName: SupportStakeMarketCoins, stakeAccountId?: SuiAddressArg): Promise<void>;
1893
- unstakeQuick(amount: number, stakeMarketCoinName: SupportStakeMarketCoins, stakeAccountId?: SuiAddressArg, returnSCoin?: boolean): Promise<TransactionResult | undefined>;
1894
- claimQuick(stakeMarketCoinName: SupportStakeMarketCoins, stakeAccountId?: SuiAddressArg): Promise<TransactionResult[]>;
1787
+ stakeQuick(amountOrMarketCoin: SuiObjectArg | number, stakeMarketCoinName: string, stakeAccountId?: SuiAddressArg): Promise<void>;
1788
+ unstakeQuick(amount: number, stakeMarketCoinName: string, stakeAccountId?: SuiAddressArg, returnSCoin?: boolean): Promise<TransactionResult | undefined>;
1789
+ claimQuick(stakeMarketCoinName: string, stakeAccountId?: SuiAddressArg): Promise<TransactionResult[]>;
1895
1790
  };
1896
1791
  type SuiTxBlockWithSpoolNormalMethods = SuiTxBlock & SuiTxBlockWithSCoin & SpoolNormalMethods;
1897
1792
  type SpoolTxBlock = SuiTxBlockWithSpoolNormalMethods & SpoolQuickMethods;
@@ -1916,14 +1811,14 @@ type BorrowIncentiveNormalMethods = {
1916
1811
  stakeObligation: (obligation: SuiObjectArg, obligationKey: SuiObjectArg) => void;
1917
1812
  stakeObligationWithVesca: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, veScaKey: SuiObjectArg) => void;
1918
1813
  unstakeObligation: (obligation: SuiObjectArg, obligationKey: SuiObjectArg) => void;
1919
- claimBorrowIncentive: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, rewardType: SupportBorrowIncentiveRewardCoins) => TransactionResult;
1814
+ claimBorrowIncentive: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, rewardType: string) => TransactionResult;
1920
1815
  deactivateBoost: (obligation: SuiObjectArg, veScaKey: SuiObjectArg) => void;
1921
1816
  };
1922
1817
  type BorrowIncentiveQuickMethods = {
1923
1818
  stakeObligationQuick(obligation?: string, obligationKey?: string): Promise<void>;
1924
1819
  stakeObligationWithVeScaQuick(obligation?: string, obligationKey?: string, veScaKey?: string): Promise<void>;
1925
1820
  unstakeObligationQuick(obligation?: string, obligationKey?: string): Promise<void>;
1926
- claimBorrowIncentiveQuick(rewardType: SupportBorrowIncentiveRewardCoins, obligation?: string, obligationKey?: string): Promise<TransactionResult>;
1821
+ claimBorrowIncentiveQuick(rewardType: string, obligation?: string, obligationKey?: string): Promise<TransactionResult>;
1927
1822
  };
1928
1823
  type SuiTxBlockWithBorrowIncentiveNormalMethods = SuiTxBlock & BorrowIncentiveNormalMethods;
1929
1824
  type BorrowIncentiveTxBlock = SuiTxBlockWithBorrowIncentiveNormalMethods & BorrowIncentiveQuickMethods;
@@ -1987,12 +1882,12 @@ type GenerateVeScaQuickMethod = (params: {
1987
1882
 
1988
1883
  type ReferralNormalMethods = {
1989
1884
  bindToReferral: (veScaKeyId: string) => void;
1990
- claimReferralTicket: (poolCoinName: SupportPoolCoins) => TransactionResult$1;
1991
- burnReferralTicket: (ticket: SuiObjectArg, poolCoinName: SupportPoolCoins) => void;
1992
- claimReferralRevenue: (veScaKey: SuiObjectArg, poolCoinName: SupportPoolCoins) => TransactionResult$1;
1885
+ claimReferralTicket: (poolCoinName: string) => TransactionResult$1;
1886
+ burnReferralTicket: (ticket: SuiObjectArg, poolCoinName: string) => void;
1887
+ claimReferralRevenue: (veScaKey: SuiObjectArg, poolCoinName: string) => TransactionResult$1;
1993
1888
  };
1994
1889
  type ReferralQuickMethods = {
1995
- claimReferralRevenueQuick: (veScaKey: SuiObjectArg, coinNames: SupportPoolCoins[]) => Promise<void>;
1890
+ claimReferralRevenueQuick: (veScaKey: SuiObjectArg, coinNames: string[]) => Promise<void>;
1996
1891
  };
1997
1892
  type SuiTxBlockWithReferralNormalMethods = SuiTxBlock & ReferralNormalMethods;
1998
1893
  type ReferralTxBlock = SuiTxBlockWithReferralNormalMethods & ReferralQuickMethods;
@@ -2029,18 +1924,18 @@ type sCoinNormalMethods = {
2029
1924
  * @param marketCoin
2030
1925
  * @returns
2031
1926
  */
2032
- mintSCoin: (marketCoinName: SupportSCoin, marketCoin: SuiObjectArg) => TransactionResult$1;
1927
+ mintSCoin: (marketCoinName: string, marketCoin: SuiObjectArg) => TransactionResult$1;
2033
1928
  /**
2034
1929
  * Burn sCoin and return marketCoin
2035
1930
  * @param sCoinName
2036
1931
  * @param sCoin
2037
1932
  * @returns
2038
1933
  */
2039
- burnSCoin: (sCoinName: SupportSCoin, sCoin: SuiObjectArg) => TransactionResult$1;
1934
+ burnSCoin: (sCoinName: string, sCoin: SuiObjectArg) => TransactionResult$1;
2040
1935
  };
2041
1936
  type sCoinQuickMethods = {
2042
- mintSCoinQuick: (marketCoinName: SupportSCoin, amount: number) => Promise<TransactionResult$1>;
2043
- burnSCoinQuick: (sCoinName: SupportSCoin, amount: number) => Promise<TransactionResult$1>;
1937
+ mintSCoinQuick: (marketCoinName: string, amount: number) => Promise<TransactionResult$1>;
1938
+ burnSCoinQuick: (sCoinName: string, amount: number) => Promise<TransactionResult$1>;
2044
1939
  };
2045
1940
  type SuiTxBlockWithSCoinNormalMethods = SuiTxBlock & BaseScallopTxBlock & sCoinNormalMethods;
2046
1941
  type SCoinTxBlock = SuiTxBlockWithSCoinNormalMethods & sCoinQuickMethods;
@@ -2057,13 +1952,119 @@ type BaseScallopTxBlock = ReferralTxBlock & LoyaltyProgramTxBlock & BorrowIncent
2057
1952
  type SuiTxBlockWithSCoin = BaseScallopTxBlock & SCoinTxBlock;
2058
1953
  type SuiTxBlockWithSpool = SuiTxBlockWithSCoin & SpoolTxBlock;
2059
1954
  type ScallopTxBlock = SuiTxBlockWithSpool & CoreTxBlock;
2060
- type SelectCoinReturnType<T extends SupportAssetCoins> = T extends 'sui' ? {
1955
+ type SelectCoinReturnType<T extends string> = T extends 'sui' ? {
2061
1956
  takeCoin: NestedResult;
2062
1957
  } : {
2063
1958
  takeCoin: NestedResult;
2064
1959
  leftCoin: NestedResult;
2065
1960
  };
2066
1961
 
1962
+ type PoolAddress = {
1963
+ coinName: string;
1964
+ symbol: string;
1965
+ coinType: string;
1966
+ coinMetadataId: string;
1967
+ decimals: number;
1968
+ pythFeed?: string;
1969
+ pythFeedObjectId?: string;
1970
+ lendingPoolAddress?: string;
1971
+ borrowDynamic?: string;
1972
+ interestModel?: string;
1973
+ borrowFeeKey?: string;
1974
+ flashloanFeeObject?: string;
1975
+ coinGeckoId?: string;
1976
+ collateralPoolAddress?: string;
1977
+ riskModel?: string;
1978
+ supplyLimitKey?: string;
1979
+ borrowLimitKey?: string;
1980
+ sCoinType?: string;
1981
+ sCoinName?: string;
1982
+ sCoinSymbol?: string;
1983
+ sCoinMetadataId?: string;
1984
+ sCoinTreasury?: string;
1985
+ isolatedAssetKey?: string;
1986
+ spool?: string;
1987
+ spoolReward?: string;
1988
+ spoolName?: string;
1989
+ };
1990
+ type Whitelist = {
1991
+ lending: Set<string>;
1992
+ borrowing: Set<string>;
1993
+ collateral: Set<string>;
1994
+ packages: Set<string>;
1995
+ spool: Set<string>;
1996
+ scoin: Set<string>;
1997
+ suiBridge: Set<string>;
1998
+ wormhole: Set<string>;
1999
+ oracles: Set<string>;
2000
+ borrowIncentiveRewards: Set<string>;
2001
+ rewardsAsPoint: Set<string>;
2002
+ pythEndpoints: Set<string>;
2003
+ deprecated: Set<string>;
2004
+ };
2005
+ type CoinWrappedType = {
2006
+ from: string;
2007
+ type: string;
2008
+ } | undefined;
2009
+
2010
+ type Coins = {
2011
+ [K in string]: K;
2012
+ };
2013
+ type AssetCoins = {
2014
+ [K in string]: K;
2015
+ };
2016
+ type MarketCoins = {
2017
+ [K in string]: K;
2018
+ };
2019
+ type SCoins = {
2020
+ [K in string]: K;
2021
+ };
2022
+ type StakeMarketCoins = {
2023
+ [K in string]: K;
2024
+ };
2025
+ type StakeRewardCoins = {
2026
+ [key in string]: string;
2027
+ };
2028
+ type SuiBridgeCoins = {
2029
+ [K in string]: K;
2030
+ };
2031
+ type BorrowIncentiveRewardCoins = {
2032
+ [key in string]: string[];
2033
+ };
2034
+ type AssetCoinIds = {
2035
+ [key in string]: string;
2036
+ };
2037
+ type SCoinIds = {
2038
+ [key in string]: string;
2039
+ };
2040
+ type SCoinTreasuryCaps = {
2041
+ [key in string]: string;
2042
+ };
2043
+ type SCoinConverterTreasury = {
2044
+ [key in string]: string;
2045
+ };
2046
+ type PickFromUnion<T, K extends string> = K extends T ? K : never;
2047
+ type WormholeCoinIds = {
2048
+ [key in PickFromUnion<string, 'weth' | 'wbtc' | 'wusdc' | 'wusdt' | 'wapt' | 'wsol'>]: string;
2049
+ };
2050
+ type VoloCoinIds = {
2051
+ [key in PickFromUnion<string, 'vsui'>]: string;
2052
+ };
2053
+ type SuiBridgedCoinPackageIds = {
2054
+ [key in string]: string;
2055
+ };
2056
+
2057
+ declare const _SUPPORT_ORACLES: readonly ["supra", "switchboard", "pyth"];
2058
+ type SupportOracleType = (typeof _SUPPORT_ORACLES)[number];
2059
+ type xOracleRules = {
2060
+ primary: SupportOracleType[];
2061
+ secondary: SupportOracleType[];
2062
+ };
2063
+ type xOracleRuleType = keyof xOracleRules;
2064
+ type xOracleListType = {
2065
+ [key in string]: xOracleRules;
2066
+ };
2067
+
2067
2068
  interface BorrowIncentiveAccountKey {
2068
2069
  id: string;
2069
2070
  onwerId: string;
@@ -2071,16 +2072,16 @@ interface BorrowIncentiveAccountKey {
2071
2072
  type OptionalKeys$4<T> = {
2072
2073
  [K in keyof T]?: T[K];
2073
2074
  };
2074
- type BorrowIncentivePools = OptionalKeys$4<Record<SupportBorrowIncentiveCoins, BorrowIncentivePool>>;
2075
+ type BorrowIncentivePools = OptionalKeys$4<Record<string, BorrowIncentivePool>>;
2075
2076
  type BorrowIncentivePoolPoints = {
2076
2077
  symbol: string;
2077
- coinName: SupportBorrowIncentiveRewardCoins;
2078
+ coinName: string;
2078
2079
  coinType: string;
2079
2080
  coinDecimal: number;
2080
2081
  coinPrice: number;
2081
2082
  } & Required<Pick<ParsedBorrowIncentivePoolPointData, 'points' | 'distributedPoint' | 'weightedAmount'>> & CalculatedBorrowIncentivePoolPointData;
2082
2083
  type BorrowIncentivePool = {
2083
- coinName: SupportBorrowIncentiveCoins;
2084
+ coinName: string;
2084
2085
  symbol: string;
2085
2086
  coinType: string;
2086
2087
  coinDecimal: number;
@@ -2088,7 +2089,7 @@ type BorrowIncentivePool = {
2088
2089
  stakedAmount: number;
2089
2090
  stakedCoin: number;
2090
2091
  stakedValue: number;
2091
- points: OptionalKeys$4<Record<SupportBorrowIncentiveRewardCoins, BorrowIncentivePoolPoints>>;
2092
+ points: OptionalKeys$4<Record<string, BorrowIncentivePoolPoints>>;
2092
2093
  };
2093
2094
  type OriginBorrowIncentivePoolPointData = {
2094
2095
  point_type: {
@@ -2128,7 +2129,7 @@ type ParsedBorrowIncentivePoolPointData = {
2128
2129
  };
2129
2130
  type ParsedBorrowIncentivePoolData = {
2130
2131
  poolType: string;
2131
- poolPoints: OptionalKeys$4<Record<SupportBorrowIncentiveRewardCoins, ParsedBorrowIncentivePoolPointData>>;
2132
+ poolPoints: OptionalKeys$4<Record<string, ParsedBorrowIncentivePoolPointData>>;
2132
2133
  minStakes: number;
2133
2134
  maxStakes: number;
2134
2135
  staked: number;
@@ -2145,7 +2146,7 @@ type CalculatedBorrowIncentivePoolPointData = {
2145
2146
  rewardApr: number;
2146
2147
  rewardPerSec: number;
2147
2148
  };
2148
- type BorrowIncentiveAccounts = OptionalKeys$4<Record<SupportBorrowIncentiveCoins, ParsedBorrowIncentiveAccountData>>;
2149
+ type BorrowIncentiveAccounts = OptionalKeys$4<Record<string, ParsedBorrowIncentiveAccountData>>;
2149
2150
  type OriginBorrowIncentiveAccountPoolData = {
2150
2151
  point_type: {
2151
2152
  name: string;
@@ -2170,7 +2171,7 @@ type ParsedBorrowIncentiveAccountPoolData = {
2170
2171
  index: number;
2171
2172
  };
2172
2173
  type ParsedBorrowIncentiveAccountData = {
2173
- pointList: OptionalKeys$4<Record<SupportBorrowIncentiveRewardCoins, ParsedBorrowIncentiveAccountPoolData>>;
2174
+ pointList: OptionalKeys$4<Record<string, ParsedBorrowIncentiveAccountPoolData>>;
2174
2175
  poolType: string;
2175
2176
  debtAmount: number;
2176
2177
  };
@@ -2190,11 +2191,11 @@ interface BorrowIncentiveAccountsQueryInterface {
2190
2191
  type OptionalKeys$3<T> = {
2191
2192
  [K in keyof T]?: T[K];
2192
2193
  };
2193
- type MarketPools = OptionalKeys$3<Record<SupportPoolCoins, MarketPool>>;
2194
- type MarketCollaterals = OptionalKeys$3<Record<SupportCollateralCoins, MarketCollateral>>;
2195
- type CoinAmounts = OptionalKeys$3<Record<SupportPoolCoins, number>>;
2196
- type MarketCoinAmounts = OptionalKeys$3<Record<SupportMarketCoins, number>>;
2197
- type SCoinAmounts = OptionalKeys$3<Record<SupportSCoin, number>>;
2194
+ type MarketPools = OptionalKeys$3<Record<string, MarketPool>>;
2195
+ type MarketCollaterals = OptionalKeys$3<Record<string, MarketCollateral>>;
2196
+ type CoinAmounts = OptionalKeys$3<Record<string, number>>;
2197
+ type MarketCoinAmounts = OptionalKeys$3<Record<string, number>>;
2198
+ type SCoinAmounts = OptionalKeys$3<Record<string, number>>;
2198
2199
  type BalanceSheet = {
2199
2200
  cash: string;
2200
2201
  debt: string;
@@ -2305,7 +2306,7 @@ type CollateralStat = {
2305
2306
  amount: string;
2306
2307
  };
2307
2308
  type MarketPool = {
2308
- coinName: SupportPoolCoins;
2309
+ coinName: string;
2309
2310
  symbol: string;
2310
2311
  coinType: string;
2311
2312
  marketCoinType: string;
@@ -2318,7 +2319,7 @@ type MarketPool = {
2318
2319
  isIsolated: boolean;
2319
2320
  } & Required<Pick<ParsedMarketPoolData, 'highKink' | 'midKink' | 'reserveFactor' | 'borrowWeight' | 'borrowFee' | 'marketCoinSupplyAmount' | 'minBorrowAmount'>> & CalculatedMarketPoolData;
2320
2321
  type MarketCollateral = {
2321
- coinName: SupportCollateralCoins;
2322
+ coinName: string;
2322
2323
  symbol: string;
2323
2324
  coinType: string;
2324
2325
  marketCoinType: string;
@@ -2575,9 +2576,9 @@ type LoyaltyProgramInfo = {
2575
2576
  type OptionalKeys$2<T> = {
2576
2577
  [K in keyof T]?: T[K];
2577
2578
  };
2578
- type Spools = OptionalKeys$2<Record<SupportStakeMarketCoins, Spool>>;
2579
+ type Spools = OptionalKeys$2<Record<string, Spool>>;
2579
2580
  type Spool = {
2580
- marketCoinName: SupportStakeMarketCoins;
2581
+ marketCoinName: string;
2581
2582
  symbol: string;
2582
2583
  coinType: string;
2583
2584
  marketCoinType: string;
@@ -2676,9 +2677,9 @@ type CalculatedSpoolRewardPoolData = {
2676
2677
  claimedRewardValue: number;
2677
2678
  rewardPerSec: number;
2678
2679
  };
2679
- type StakePools = OptionalKeys$2<Record<SupportStakeMarketCoins, StakePool>>;
2680
- type StakeRewardPools = OptionalKeys$2<Record<SupportStakeMarketCoins, StakeRewardPool>>;
2681
- type StakeAccounts = Record<SupportStakeMarketCoins, StakeAccount[]>;
2680
+ type StakePools = OptionalKeys$2<Record<string, StakePool>>;
2681
+ type StakeRewardPools = OptionalKeys$2<Record<string, StakeRewardPool>>;
2682
+ type StakeAccounts = Record<string, StakeAccount[]>;
2682
2683
  interface StakeAccount {
2683
2684
  id: string;
2684
2685
  type: string;
@@ -2716,7 +2717,7 @@ interface StakeRewardPool {
2716
2717
  type OptionalKeys$1<T> = {
2717
2718
  [K in keyof T]?: T[K];
2718
2719
  };
2719
- type Lendings = OptionalKeys$1<Record<SupportPoolCoins, Lending>>;
2720
+ type Lendings = OptionalKeys$1<Record<string, Lending>>;
2720
2721
  type ObligationAccounts = OptionalKeys$1<Record<string, ObligationAccount>>;
2721
2722
  type Lending = Required<Pick<MarketPool, 'coinName' | 'symbol' | 'coinType' | 'marketCoinType' | 'sCoinType' | 'coinDecimal' | 'coinPrice' | 'conversionRate' | 'isIsolated'> & Pick<Spool, 'marketCoinPrice'>> & {
2722
2723
  supplyApr: number;
@@ -2760,12 +2761,12 @@ type ObligationAccount = {
2760
2761
  totalDepositedPools: number;
2761
2762
  totalBorrowedPools: number;
2762
2763
  totalRewardedPools: number;
2763
- collaterals: OptionalKeys$1<Record<SupportCollateralCoins, ObligationCollateral>>;
2764
- debts: OptionalKeys$1<Record<SupportPoolCoins, ObligationDebt>>;
2765
- borrowIncentives: OptionalKeys$1<Record<SupportPoolCoins, ObligationBorrowIncentive>>;
2764
+ collaterals: OptionalKeys$1<Record<string, ObligationCollateral>>;
2765
+ debts: OptionalKeys$1<Record<string, ObligationDebt>>;
2766
+ borrowIncentives: OptionalKeys$1<Record<string, ObligationBorrowIncentive>>;
2766
2767
  };
2767
2768
  type ObligationCollateral = {
2768
- coinName: SupportCollateralCoins;
2769
+ coinName: string;
2769
2770
  coinType: string;
2770
2771
  symbol: string;
2771
2772
  coinDecimal: number;
@@ -2781,7 +2782,7 @@ type ObligationCollateral = {
2781
2782
  availableWithdrawCoin: number;
2782
2783
  };
2783
2784
  type ObligationDebt = {
2784
- coinName: SupportPoolCoins;
2785
+ coinName: string;
2785
2786
  coinType: string;
2786
2787
  symbol: string;
2787
2788
  coinDecimal: number;
@@ -2799,17 +2800,18 @@ type ObligationDebt = {
2799
2800
  availableRepayCoin: number;
2800
2801
  };
2801
2802
  type ObligationBorrowIcentiveReward = {
2802
- coinName: SupportBorrowIncentiveRewardCoins;
2803
+ coinName: string;
2803
2804
  coinType: string;
2804
2805
  symbol: string;
2805
2806
  coinDecimal: number;
2806
2807
  coinPrice: number;
2808
+ weightedBorrowAmount: number;
2807
2809
  availableClaimCoin: number;
2808
2810
  availableClaimAmount: number;
2809
2811
  boostValue: number;
2810
2812
  };
2811
2813
  type ObligationBorrowIncentive = {
2812
- coinName: SupportPoolCoins;
2814
+ coinName: string;
2813
2815
  coinType: string;
2814
2816
  symbol: string;
2815
2817
  coinDecimal: number;
@@ -2866,7 +2868,7 @@ interface AddressesInterface {
2866
2868
  adminCap: string;
2867
2869
  coinDecimalsRegistry: string;
2868
2870
  obligationAccessStore: string;
2869
- coins: Partial<Record<SupportAssetCoins, {
2871
+ coins: Partial<Record<string, {
2870
2872
  id: string;
2871
2873
  treasury: string;
2872
2874
  metaData: string;
@@ -2874,21 +2876,23 @@ interface AddressesInterface {
2874
2876
  symbol: string;
2875
2877
  decimals: number;
2876
2878
  oracle: {
2877
- [K in SupportOracleType]: K extends (typeof SUPPORT_ORACLES)[0] ? string : K extends (typeof SUPPORT_ORACLES)[1] ? string : K extends (typeof SUPPORT_ORACLES)[2] ? {
2879
+ [K in SupportOracleType]: K extends (typeof _SUPPORT_ORACLES)[0] ? string : K extends (typeof _SUPPORT_ORACLES)[1] ? string : K extends (typeof _SUPPORT_ORACLES)[2] ? {
2878
2880
  feed: string;
2879
2881
  feedObject: string;
2880
2882
  } : never;
2881
2883
  };
2882
2884
  }>>;
2883
2885
  oracles: {
2884
- [K in SupportOracleType]: K extends (typeof SUPPORT_ORACLES)[0] ? {
2886
+ [K in SupportOracleType]: K extends (typeof _SUPPORT_ORACLES)[0] ? {
2885
2887
  registry: string;
2886
2888
  registryCap: string;
2887
2889
  holder: string;
2888
- } : K extends (typeof SUPPORT_ORACLES)[1] ? {
2890
+ } : K extends (typeof _SUPPORT_ORACLES)[1] ? {
2889
2891
  registry: string;
2890
2892
  registryCap: string;
2891
- } : K extends (typeof SUPPORT_ORACLES)[2] ? {
2893
+ registryTableId: string;
2894
+ state: string;
2895
+ } : K extends (typeof _SUPPORT_ORACLES)[2] ? {
2892
2896
  registry: string;
2893
2897
  registryCap: string;
2894
2898
  state: string;
@@ -2898,8 +2902,12 @@ interface AddressesInterface {
2898
2902
  } & {
2899
2903
  xOracle: string;
2900
2904
  xOracleCap: string;
2905
+ primaryPriceUpdatePolicyObject: string;
2906
+ secondaryPriceUpdatePolicyObject: string;
2907
+ primaryPriceUpdatePolicyVecsetId: string;
2908
+ secondaryPriceUpdatePolicyVecsetId: string;
2901
2909
  };
2902
- packages: Partial<Record<SupportPackageType, {
2910
+ packages: Partial<Record<string, {
2903
2911
  id: string;
2904
2912
  object?: string;
2905
2913
  upgradeCap: string;
@@ -2910,7 +2918,7 @@ interface AddressesInterface {
2910
2918
  adminCap: string;
2911
2919
  object: string;
2912
2920
  config: string;
2913
- pools: Partial<Record<SupportStakeMarketCoins, {
2921
+ pools: Partial<Record<string, {
2914
2922
  id: string;
2915
2923
  rewardPoolId: string;
2916
2924
  }>>;
@@ -2954,7 +2962,7 @@ interface AddressesInterface {
2954
2962
  };
2955
2963
  scoin: {
2956
2964
  id: string;
2957
- coins: Partial<Record<SupportSCoin, {
2965
+ coins: Partial<Record<string, {
2958
2966
  coinType: string;
2959
2967
  symbol: string;
2960
2968
  treasury: string;
@@ -2975,6 +2983,7 @@ type ScallopClientVeScaReturnType<T extends boolean> = T extends true ? SuiTrans
2975
2983
  };
2976
2984
  type ScallopBaseInstanceParams = {
2977
2985
  suiKit?: SuiKit;
2986
+ cache?: ScallopCache;
2978
2987
  };
2979
2988
  type ScallopCacheInstanceParams = ScallopBaseInstanceParams & {
2980
2989
  queryClient?: QueryClient;
@@ -2982,11 +2991,15 @@ type ScallopCacheInstanceParams = ScallopBaseInstanceParams & {
2982
2991
  type ScallopAddressInstanceParams = ScallopBaseInstanceParams & {
2983
2992
  cache?: ScallopCache;
2984
2993
  };
2994
+ type ScallopConstantsInstanceParams = {
2995
+ address?: ScallopAddress;
2996
+ cache?: ScallopCache;
2997
+ };
2985
2998
  type ScallopIndexerInstanceParams = {
2986
2999
  cache?: ScallopCache;
2987
3000
  };
2988
3001
  type ScallopUtilsInstanceParams = ScallopBaseInstanceParams & {
2989
- address?: ScallopAddress;
3002
+ constants?: ScallopConstants;
2990
3003
  };
2991
3004
  type ScallopQueryInstanceParams = ScallopBaseInstanceParams & {
2992
3005
  utils?: ScallopUtils;
@@ -2998,155 +3011,49 @@ type ScallopBuilderInstanceParams = ScallopBaseInstanceParams & {
2998
3011
  type ScallopClientInstanceParams = ScallopBaseInstanceParams & {
2999
3012
  builder?: ScallopBuilder;
3000
3013
  };
3001
- type ScallopAddressParams = {
3002
- id: string;
3003
- auth?: string;
3004
- network?: NetworkType;
3005
- forceInterface?: Partial<Record<NetworkType, AddressesInterface>>;
3014
+ type ScallopCacheConfig = {
3015
+ tokensPerInterval?: number;
3016
+ interval?: number;
3006
3017
  };
3007
- type ScallopParams = {
3008
- addressId?: string;
3009
- forceAddressesInterface?: Partial<Record<NetworkType, AddressesInterface>>;
3018
+ type ScallopCacheParams = {
3010
3019
  walletAddress?: string;
3020
+ cacheOptions?: QueryClientConfig;
3021
+ config?: ScallopCacheConfig;
3011
3022
  } & SuiKitParams;
3012
- type ScallopClientParams = ScallopParams & ScallopBuilderParams & ScallopQueryParams & ScallopUtilsParams & ScallopCacheParams;
3013
- type ScallopBuilderParams = ScallopParams & {
3023
+ type ScallopIndexerParams = ScallopCacheParams & {
3024
+ indexerApiUrl?: string;
3025
+ axios?: AxiosInstance;
3026
+ };
3027
+ type ScallopAddressParams = ScallopCacheParams & {
3028
+ addressApiUrl?: string;
3029
+ addressId: string;
3030
+ auth?: string;
3031
+ network?: NetworkType;
3032
+ forceAddressesInterface?: Partial<Record<NetworkType, AddressesInterface>>;
3033
+ };
3034
+ type ScallopConstantsParams = ScallopAddressParams & {
3035
+ poolAddressesApiUrl?: string;
3036
+ whitelistApiUrl?: string;
3037
+ forcePoolAddressInterface?: Record<string, PoolAddress>;
3038
+ forceWhitelistInterface?: Whitelist;
3039
+ };
3040
+ type ScallopUtilsParams = ScallopAddressParams & ScallopConstantsParams & {
3014
3041
  pythEndpoints?: string[];
3042
+ };
3043
+ type ScallopQueryParams = ScallopUtilsParams & ScallopIndexerParams;
3044
+ type ScallopBuilderParams = ScallopQueryParams & {
3015
3045
  usePythPullModel?: boolean;
3016
3046
  useOnChainXOracleList?: boolean;
3017
- } & ScallopQueryParams;
3018
- type ScallopQueryParams = ScallopParams & ScallopUtilsParams;
3019
- type ScallopUtilsParams = ScallopParams & {
3020
- pythEndpoints?: string[];
3021
3047
  };
3022
- type ScallopCacheParams = Omit<ScallopParams, 'addressId' | 'forceAddressesInterface'> & {
3023
- cacheOptions?: QueryClientConfig;
3048
+ type ScallopClientParams = ScallopBuilderParams;
3049
+ type ScallopParams = SuiKitParams & ScallopAddressParams & ScallopConstantsParams & {
3050
+ walletAddress?: string;
3024
3051
  };
3025
3052
 
3026
3053
  type OptionalKeys<T> = {
3027
3054
  [K in keyof T]?: T[K];
3028
3055
  };
3029
- type CoinPrices = OptionalKeys<Record<SupportCoins, number>>;
3030
- type PoolAddressInfo = {
3031
- name: string;
3032
- coingeckoId: string;
3033
- decimal: number;
3034
- pythFeedId: string;
3035
- lendingPoolAddress?: string;
3036
- collateralPoolAddress?: string;
3037
- borrowDynamic?: string;
3038
- interestModelId?: string;
3039
- borrowFeeKey?: string;
3040
- supplyLimitKey?: string;
3041
- borrowLimitKey?: string;
3042
- isolatedAssetKey?: string;
3043
- sCoinAddress: string | undefined;
3044
- marketCoinAddress: string;
3045
- sCoinName: string | undefined;
3046
- };
3047
-
3048
- declare const coinDecimals: SupportCoinDecimals;
3049
- declare const assetCoins: AssetCoins;
3050
- declare const marketCoins: MarketCoins;
3051
- declare const sCoins: SCoins;
3052
- declare const stakeMarketCoins: StakeMarketCoins;
3053
- declare const spoolRewardCoins: StakeRewardCoins;
3054
- declare const suiBridgeCoins: SuiBridgeCoins;
3055
- declare const coinIds: AssetCoinIds;
3056
- declare const wormholeCoinIds: WormholeCoinIds;
3057
- declare const voloCoinIds: VoloCoinIds;
3058
- declare const sCoinIds: SCoinIds;
3059
- declare const sCoinTypeToName: Record<string, "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd" | "sns" | "susdy">;
3060
- declare const sCoinRawNameToName: Record<string, "susdc" | "ssbeth" | "ssbusdt" | "ssbwbtc" | "sweth" | "swbtc" | "swusdc" | "swusdt" | "ssui" | "swsol" | "scetus" | "safsui" | "shasui" | "svsui" | "ssca" | "sfud" | "sdeep" | "sfdusd" | "sblub" | "smusd" | "sns" | "susdy">;
3061
-
3062
- declare const FlashLoanFeeObjectMap: OptionalKeys<Record<SupportPoolCoins, string>>;
3063
-
3064
- declare const POOL_ADDRESSES: OptionalKeys<Record<SupportPoolCoins, {
3065
- coinName: string;
3066
- symbol: string;
3067
- coinType: string;
3068
- lendingPoolAddress: string;
3069
- borrowDynamic: string;
3070
- interestModel: string;
3071
- borrowFeeKey: string;
3072
- coinMetadataId: string;
3073
- decimals: number;
3074
- pythFeed: string;
3075
- pythFeedObjectId: string;
3076
- collateralPoolAddress?: string;
3077
- riskModel?: string;
3078
- supplyLimitKey?: string;
3079
- borrowLimitKey?: string;
3080
- sCoinType?: string;
3081
- sCoinName?: string;
3082
- sCoinSymbol?: string;
3083
- sCoinMetadataId?: string;
3084
- sCoinTreasury?: string;
3085
- isolatedAssetKey?: string;
3086
- spool?: string;
3087
- spoolReward?: string;
3088
- spoolName?: string;
3089
- }>>;
3090
-
3091
- declare const PYTH_ENDPOINTS: {
3092
- [k in 'mainnet' | 'testnet']: string[];
3093
- };
3094
- declare const PYTH_FEED_IDS: Record<SupportPoolCoins, string>;
3095
-
3096
- declare const queryKeys: {
3097
- api: {
3098
- getAddresses: (addressId?: string) => (string | {
3099
- addressId: string | undefined;
3100
- })[];
3101
- getMarket: () => string[];
3102
- getSpools: () => string[];
3103
- getBorrowIncentivePool: () => string[];
3104
- getTotalValueLocked: () => string[];
3105
- };
3106
- rpc: {
3107
- getInspectTxn: (queryTarget?: string, args?: SuiObjectArg[], typeArgs?: any[]) => (string | {
3108
- queryTarget: string | undefined;
3109
- args: string;
3110
- typeArgs: string | undefined;
3111
- })[];
3112
- getObject: (objectId?: string, options?: SuiObjectDataOptions) => (string | {
3113
- objectId: string | undefined;
3114
- options: SuiObjectDataOptions | undefined;
3115
- })[];
3116
- getObjects: (objectIds?: string[]) => (string | {
3117
- objectIds: string;
3118
- })[];
3119
- getOwnedObjects: (input?: Partial<GetOwnedObjectsParams>) => (string | {
3120
- walletAddress: string | undefined;
3121
- cursor: string | undefined;
3122
- options: SuiObjectDataOptions | undefined;
3123
- filter: string;
3124
- limit: number | undefined;
3125
- })[];
3126
- getDynamicFields: (input?: Partial<GetDynamicFieldsParams>) => (string | {
3127
- parentId: string | undefined;
3128
- cursor: string | undefined;
3129
- limit: number | undefined;
3130
- })[];
3131
- getDynamicFieldObject: (input?: Partial<GetDynamicFieldObjectParams>) => (string | {
3132
- parentId: string | undefined;
3133
- name: string;
3134
- })[];
3135
- getTotalVeScaTreasuryAmount: (refreshArgs?: any[], vescaAmountArgs?: (string | SuiObjectData | SuiTxArg)[]) => (string | {
3136
- refreshArgs: string;
3137
- vescaAmountArgs: string;
3138
- })[];
3139
- getAllCoinBalances: (owner?: string) => (string | {
3140
- owner: string | undefined;
3141
- })[];
3142
- getNormalizedMoveFunction: (target?: string) => (string | undefined)[];
3143
- };
3144
- oracle: {
3145
- getPythLatestPriceFeeds: () => string[];
3146
- };
3147
- };
3148
-
3149
- declare const RPC_PROVIDERS: string[];
3056
+ type CoinPrices = OptionalKeys<Record<string, number>>;
3150
3057
 
3151
3058
  declare const TEST_ADDRESSES: AddressesInterface;
3152
3059
 
@@ -3158,4 +3065,4 @@ declare const MIN_TOP_UP_AMOUNT: 1000000000;
3158
3065
 
3159
3066
  declare const xOracleList: xOracleListType;
3160
3067
 
3161
- export { ADDRESS_ID, API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, BORROW_FEE_PROTOCOL_ID, 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, COIN_GECKGO_IDS, 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, FlashLoanFeeObjectMap, 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 LoyaltyProgramIds, 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 ObligationBorrowIcentiveReward, type ObligationBorrowIncentive, 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, PROTOCOL_OBJECT_ID, PYTH_ENDPOINTS, PYTH_FEED_IDS, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddressInfo, RPC_PROVIDERS, type RedeemScaQuickReturnType, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinConverterTreasury, type SCoinIds, type SCoinTreasuryCaps, type SCoinTxBlock, type SCoins, SDK_API_BASE_URL, SUPPORT_BORROW_INCENTIVE_POOLS, SUPPORT_BORROW_INCENTIVE_REWARDS, SUPPORT_COLLATERALS, SUPPORT_ORACLES, SUPPORT_PACKAGES, SUPPORT_POOLS, SUPPORT_SCOIN, SUPPORT_SPOOLS, SUPPORT_SPOOLS_REWARDS, SUPPORT_SUI_BRIDGE, SUPPORT_WORMHOLE, Scallop, ScallopAddress, type ScallopAddressInstanceParams, type ScallopAddressParams, type ScallopBaseInstanceParams, ScallopBuilder, type ScallopBuilderInstanceParams, type ScallopBuilderParams, ScallopCache, type ScallopCacheInstanceParams, type ScallopCacheParams, ScallopClient, type ScallopClientFnReturnType, type ScallopClientInstanceParams, type ScallopClientParams, type ScallopClientVeScaReturnType, ScallopIndexer, type ScallopIndexerInstanceParams, type ScallopParams, ScallopQuery, type ScallopQueryInstanceParams, type ScallopQueryParams, type ScallopTxBlock, ScallopUtils, type ScallopUtilsInstanceParams, type ScallopUtilsParams, 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 SupportAssetCoins, type SupportBorrowIncentiveCoins, type SupportBorrowIncentiveRewardCoins, type SupportCoinDecimals, type SupportCoins, type SupportCollateralCoins, type SupportMarketCoins, type SupportOracleType, type SupportPackageType, type SupportPoolCoins, type SupportSCoin, type SupportStakeCoins, type SupportStakeMarketCoins, type SupportStakeRewardCoins, type SupportSuiBridgeCoins, type SupportWormholeCoins, TEST_ADDRESSES, type TotalValueLocked, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, type VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type VescaIds, type VoloCoinIds, type WormholeCoinIds, assetCoins, coinDecimals, coinIds, marketCoins, queryKeys, type sCoinBalance, sCoinIds, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, sCoinRawNameToName, sCoinTypeToName, sCoins, spoolRewardCoins, stakeMarketCoins, suiBridgeCoins, voloCoinIds, wormholeCoinIds, xOracleList, type xOracleListType, type xOracleRuleType, type xOracleRules };
3068
+ 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 LoyaltyProgramIds, 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 ObligationBorrowIcentiveReward, type ObligationBorrowIncentive, type ObligationCollateral, type ObligationDebt, type ObligationQueryInterface, type OptionalKeys, type OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, RPC_PROVIDERS, type RedeemScaQuickReturnType, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinConverterTreasury, type SCoinIds, type SCoinTreasuryCaps, type SCoinTxBlock, type SCoins, SDK_API_BASE_URL, Scallop, ScallopAddress, type ScallopAddressInstanceParams, type ScallopAddressParams, type ScallopBaseInstanceParams, ScallopBuilder, type ScallopBuilderInstanceParams, type ScallopBuilderParams, ScallopCache, type ScallopCacheConfig, type ScallopCacheInstanceParams, type ScallopCacheParams, ScallopClient, type ScallopClientFnReturnType, type ScallopClientInstanceParams, type ScallopClientParams, type ScallopClientVeScaReturnType, ScallopConstants, type ScallopConstantsInstanceParams, type ScallopConstantsParams, ScallopIndexer, type ScallopIndexerInstanceParams, type ScallopIndexerParams, type ScallopParams, ScallopQuery, type ScallopQueryInstanceParams, type ScallopQueryParams, type ScallopTxBlock, ScallopUtils, type ScallopUtilsInstanceParams, type ScallopUtilsParams, 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 VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type VescaIds, type VoloCoinIds, type Whitelist, type WormholeCoinIds, _SUPPORT_ORACLES, queryKeys, type sCoinBalance, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, xOracleList, type xOracleListType, type xOracleRuleType, type xOracleRules };