@scallop-io/sui-scallop-sdk 1.3.4-alpha.4 → 1.3.4-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/index.js +8486 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +8407 -1
  4. package/dist/index.mjs.map +1 -1
  5. package/package.json +2 -2
  6. package/src/builders/borrowIncentiveBuilder.ts +8 -8
  7. package/src/builders/coreBuilder.ts +5 -5
  8. package/src/builders/index.ts +2 -2
  9. package/src/builders/oracle.ts +4 -4
  10. package/src/builders/referralBuilder.ts +1 -1
  11. package/src/builders/spoolBuilder.ts +6 -6
  12. package/src/builders/vescaBuilder.ts +4 -4
  13. package/src/constants/coinGecko.ts +1 -1
  14. package/src/constants/enum.ts +1 -1
  15. package/src/constants/index.ts +1 -1
  16. package/src/models/scallop.ts +5 -5
  17. package/src/models/scallopAddress.ts +6 -9
  18. package/src/models/scallopBuilder.ts +5 -4
  19. package/src/models/scallopCache.ts +4 -4
  20. package/src/models/scallopClient.ts +4 -4
  21. package/src/models/scallopIndexer.ts +4 -3
  22. package/src/models/scallopQuery.ts +4 -8
  23. package/src/models/scallopUtils.ts +8 -11
  24. package/src/models/suiKit.ts +1 -1
  25. package/src/queries/borrowIncentiveQuery.ts +5 -5
  26. package/src/queries/coreQuery.ts +4 -4
  27. package/src/queries/isolatedAssetQuery.ts +2 -2
  28. package/src/queries/portfolioQuery.ts +4 -4
  29. package/src/queries/priceQuery.ts +2 -2
  30. package/src/queries/spoolQuery.ts +5 -5
  31. package/src/queries/supplyLimitQuery.ts +2 -2
  32. package/src/queries/vescaQuery.ts +2 -2
  33. package/src/types/address.ts +1 -1
  34. package/src/types/builder/borrowIncentive.ts +3 -3
  35. package/src/types/builder/core.ts +3 -3
  36. package/src/types/builder/index.ts +4 -5
  37. package/src/types/builder/referral.ts +1 -1
  38. package/src/types/builder/sCoin.ts +1 -1
  39. package/src/types/builder/spool.ts +2 -2
  40. package/src/types/constant/common.ts +1 -1
  41. package/src/types/model.ts +2 -2
  42. package/src/types/query/borrowIncentive.ts +2 -2
  43. package/src/types/query/core.ts +1 -1
  44. package/src/types/query/portfolio.ts +2 -2
  45. package/src/types/query/spool.ts +1 -1
  46. package/src/utils/builder.ts +1 -1
  47. package/src/utils/index.ts +2 -2
  48. package/src/utils/query.ts +3 -3
  49. package/src/utils/tokenBucket.ts +1 -1
  50. package/src/utils/util.ts +4 -4
  51. package/src/test.ts +0 -30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scallop-io/sui-scallop-sdk",
3
- "version": "1.3.4-alpha.4",
3
+ "version": "1.3.4-alpha.6",
4
4
  "description": "Typescript sdk for interacting with Scallop contract on SUI",
5
5
  "keywords": [
6
6
  "sui",
@@ -149,7 +149,7 @@
149
149
  "scripts": {
150
150
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",
151
151
  "build": "pnpm run build:types && pnpm run build:tsup",
152
- "build:tsup": "tsup ./src/index.ts --format esm,cjs --sourcemap --splitting --minify --clean",
152
+ "build:tsup": "tsup ./src/index.ts --format esm,cjs --sourcemap --clean",
153
153
  "build:types": "tsc --build",
154
154
  "watch:tsup": "tsup ./src/index.ts --format esm,cjs --clean --splitting --watch",
155
155
  "watch:types": "tsc --watch",
@@ -1,20 +1,20 @@
1
1
  import { Transaction } from '@mysten/sui/transactions';
2
2
  import { SUI_CLOCK_OBJECT_ID } from '@mysten/sui/utils';
3
3
  import { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
4
- import { getObligations, getObligationLocked } from 'src/queries';
5
- import { requireSender } from 'src/utils';
4
+ import { getObligations, getObligationLocked } from '../queries';
5
+ import { requireSender } from '../utils';
6
6
  import type { SuiObjectArg } from '@scallop-io/sui-kit';
7
7
  import type { ScallopBuilder } from 'src/models';
8
- import { OLD_BORROW_INCENTIVE_PROTOCOL_ID } from 'src/constants';
9
- import {
10
- GenerateBorrowIncentiveNormalMethod,
8
+ import type {
11
9
  BorrowIncentiveIds,
12
- VescaIds,
10
+ GenerateBorrowIncentiveNormalMethod,
13
11
  GenerateBorrowIncentiveQuickMethod,
14
- ScallopTxBlock,
15
12
  SuiTxBlockWithBorrowIncentiveNormalMethods,
16
13
  BorrowIncentiveTxBlock,
17
- } from 'src/types';
14
+ ScallopTxBlock,
15
+ VescaIds,
16
+ } from '../types';
17
+ import { OLD_BORROW_INCENTIVE_PROTOCOL_ID } from 'src/constants';
18
18
 
19
19
  /**
20
20
  * Check and get Obligation information from transaction block.
@@ -1,12 +1,12 @@
1
1
  import { Transaction } from '@mysten/sui/transactions';
2
2
  import { SUI_CLOCK_OBJECT_ID } from '@mysten/sui/utils';
3
3
  import { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
4
- import { getObligations } from 'src/queries';
4
+ import { getObligations } from '../queries';
5
5
  import { updateOracles } from './oracle';
6
- import { requireSender } from 'src/utils';
6
+ import { requireSender } from '../utils';
7
7
  import type { SuiObjectArg, TransactionResult } from '@scallop-io/sui-kit';
8
- import type { ScallopBuilder } from 'src/models';
9
- import {
8
+ import type { ScallopBuilder } from '../models';
9
+ import type {
10
10
  CoreIds,
11
11
  GenerateCoreNormalMethod,
12
12
  GenerateCoreQuickMethod,
@@ -15,7 +15,7 @@ import {
15
15
  ScallopTxBlock,
16
16
  NestedResult,
17
17
  SuiTxBlockWithSpool,
18
- } from 'src/types';
18
+ } from '../types';
19
19
 
20
20
  /**
21
21
  * Check and get Obligation information from transaction block.
@@ -4,8 +4,8 @@ import { newCoreTxBlock } from './coreBuilder';
4
4
  import { newSpoolTxBlock } from './spoolBuilder';
5
5
  import { newBorrowIncentiveTxBlock } from './borrowIncentiveBuilder';
6
6
  import { newVeScaTxBlock } from './vescaBuilder';
7
- import type { ScallopBuilder } from 'src/models';
8
- import { ScallopTxBlock } from 'src/types';
7
+ import type { ScallopBuilder } from '../models';
8
+ import type { ScallopTxBlock } from '../types';
9
9
  import { newReferralTxBlock } from './referralBuilder';
10
10
  import { newLoyaltyProgramTxBlock } from './loyaltyProgramBuilder';
11
11
  import { newSCoinTxBlock } from './sCoinBuilder';
@@ -3,12 +3,12 @@ import {
3
3
  SuiPythClient,
4
4
  SuiPriceServiceConnection,
5
5
  } from '@pythnetwork/pyth-sui-js';
6
- import { SUPPORT_COLLATERALS, SUPPORT_POOLS } from 'src/constants';
6
+ import { SUPPORT_COLLATERALS, SUPPORT_POOLS } from '../constants';
7
7
  import type { TransactionArgument } from '@mysten/sui/transactions';
8
8
  import type { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
9
- import type { ScallopBuilder } from 'src/models';
10
- import { SupportAssetCoins, SupportOracleType } from 'src/types';
11
- import { PYTH_ENDPOINTS } from 'src/constants';
9
+ import type { ScallopBuilder } from '../models';
10
+ import type { SupportAssetCoins, SupportOracleType } from '../types';
11
+ import { PYTH_ENDPOINTS } from 'src/constants/pyth';
12
12
 
13
13
  /**
14
14
  * Update the price of the oracle for multiple coin.
@@ -12,7 +12,7 @@ import {
12
12
  ReferralIds,
13
13
  ReferralTxBlock,
14
14
  SuiTxBlockWithReferralNormalMethods,
15
- } from 'src/types';
15
+ } from 'src/types/builder/referral';
16
16
  import { SUPPORT_POOLS } from 'src/constants';
17
17
  import { requireSender } from 'src/utils';
18
18
 
@@ -1,13 +1,13 @@
1
1
  import { Transaction } from '@mysten/sui/transactions';
2
2
  import { SUI_CLOCK_OBJECT_ID } from '@mysten/sui/utils';
3
3
  import { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
4
- import { spoolRewardCoins } from 'src/constants';
5
- import { getStakeAccounts } from 'src/queries/spoolQuery';
6
- import { requireSender } from 'src/utils';
4
+ import { spoolRewardCoins } from '../constants/enum';
5
+ import { getStakeAccounts } from '../queries/spoolQuery';
6
+ import { requireSender } from '../utils';
7
7
  import type { SuiAddressArg } from '@scallop-io/sui-kit';
8
8
  import type { TransactionResult } from '@mysten/sui/transactions';
9
- import type { ScallopBuilder } from 'src/models';
10
- import {
9
+ import type { ScallopBuilder } from '../models';
10
+ import type {
11
11
  SpoolIds,
12
12
  GenerateSpoolNormalMethod,
13
13
  GenerateSpoolQuickMethod,
@@ -16,7 +16,7 @@ import {
16
16
  SupportStakeMarketCoins,
17
17
  ScallopTxBlock,
18
18
  SuiTxBlockWithSCoin,
19
- } from 'src/types';
19
+ } from '../types';
20
20
 
21
21
  /**
22
22
  * Check and get stake account id from transaction block.
@@ -5,8 +5,8 @@ import {
5
5
  SuiTxBlock as SuiKitTxBlock,
6
6
  } from '@scallop-io/sui-kit';
7
7
  import { SCA_COIN_TYPE } from 'src/constants';
8
- import { ScallopBuilder } from 'src/models';
9
- import { getVeSca, getVeScas } from 'src/queries';
8
+ import { ScallopBuilder } from '../models';
9
+ import { getVeSca, getVeScas } from '../queries';
10
10
  import {
11
11
  requireSender,
12
12
  checkLockSca,
@@ -14,12 +14,12 @@ import {
14
14
  checkExtendLockAmount,
15
15
  checkRenewExpiredVeSca,
16
16
  checkVesca,
17
- } from 'src/utils';
17
+ } from '../utils';
18
18
  import type {
19
19
  TransactionObjectArgument,
20
20
  SuiObjectArg,
21
21
  } from '@scallop-io/sui-kit';
22
- import {
22
+ import type {
23
23
  GenerateVeScaNormalMethod,
24
24
  GenerateVeScaQuickMethod,
25
25
  RedeemScaQuickReturnType,
@@ -1,4 +1,4 @@
1
- import { SupportPoolCoins } from 'src/types';
1
+ import { SupportPoolCoins } from 'src/types/constant/common';
2
2
 
3
3
  export const COIN_GECKGO_IDS: Record<SupportPoolCoins, string> = {
4
4
  usdc: 'usdc-coin',
@@ -1,4 +1,4 @@
1
- import type * as types from 'src/types';
1
+ import type * as types from '../types';
2
2
  import { IS_VE_SCA_TEST } from './common';
3
3
 
4
4
  export const coinDecimals: types.SupportCoinDecimals = {
@@ -6,7 +6,7 @@ export * from './flashloan';
6
6
  export * from './poolAddress';
7
7
  export * from './pyth';
8
8
  export * from './queryKeys';
9
+ export * from './rpc';
9
10
  export * from './testAddress';
10
11
  export * from './tokenBucket';
11
12
  export * from './vesca';
12
- export * from './rpc';
@@ -4,23 +4,23 @@ import { ScallopClient } from './scallopClient';
4
4
  import { ScallopBuilder } from './scallopBuilder';
5
5
  import { ScallopQuery } from './scallopQuery';
6
6
  import { ScallopUtils } from './scallopUtils';
7
- import { ADDRESSES_ID } from 'src/constants';
8
- import {
7
+ import { ADDRESSES_ID } from '../constants';
8
+ import type {
9
9
  ScallopBuilderParams,
10
10
  ScallopClientParams,
11
11
  ScallopParams,
12
12
  ScallopQueryParams,
13
13
  ScallopUtilsParams,
14
- } from 'src/types';
14
+ } from '../types/';
15
15
  import { ScallopIndexer } from './scallopIndexer';
16
16
  import { ScallopCache } from './scallopCache';
17
17
  import { QueryClientConfig } from '@tanstack/query-core';
18
- import { DEFAULT_CACHE_OPTIONS } from 'src/constants';
18
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
19
19
  import { TokenBucket } from 'src/utils';
20
20
  import {
21
21
  DEFAULT_INTERVAL_IN_MS,
22
22
  DEFAULT_TOKENS_PER_INTERVAL,
23
- } from 'src/constants';
23
+ } from 'src/constants/tokenBucket';
24
24
  import type { QueryClient } from '@tanstack/query-core';
25
25
  import { newSuiKit } from './suiKit';
26
26
 
@@ -1,19 +1,16 @@
1
- import {
2
- API_BASE_URL,
3
- USE_TEST_ADDRESS,
4
- DEFAULT_CACHE_OPTIONS,
5
- TEST_ADDRESSES,
6
- queryKeys,
7
- } from 'src/constants';
1
+ import { API_BASE_URL, USE_TEST_ADDRESS } from '../constants';
8
2
  import { SuiKit, type NetworkType } from '@scallop-io/sui-kit';
9
- import {
3
+ import type {
10
4
  ScallopAddressParams,
11
5
  AddressesInterface,
12
6
  AddressStringPath,
13
7
  ScallopAddressInstanceParams,
14
- } from 'src/types';
8
+ } from '../types';
15
9
  import { ScallopCache } from './scallopCache';
10
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
16
11
  import axios, { AxiosInstance } from 'axios';
12
+ import { TEST_ADDRESSES } from 'src/constants/testAddress';
13
+ import { queryKeys } from 'src/constants';
17
14
 
18
15
  const EMPTY_ADDRESSES: AddressesInterface = {
19
16
  core: {
@@ -1,14 +1,14 @@
1
1
  import { normalizeSuiAddress } from '@mysten/sui/utils';
2
2
  import { SuiKit } from '@scallop-io/sui-kit';
3
- import { ADDRESSES_ID, DEFAULT_CACHE_OPTIONS } from 'src/constants';
4
- import { newScallopTxBlock } from 'src/builders';
3
+ import { ADDRESSES_ID } from '../constants';
4
+ import { newScallopTxBlock } from '../builders';
5
5
  import { ScallopAddress } from './scallopAddress';
6
6
  import { ScallopQuery } from './scallopQuery';
7
7
  import { ScallopUtils } from './scallopUtils';
8
8
  import type { SuiTransactionBlockResponse } from '@mysten/sui/client';
9
9
  import type { Transaction } from '@mysten/sui/transactions';
10
10
  import type { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
11
- import {
11
+ import type {
12
12
  ScallopBuilderParams,
13
13
  ScallopTxBlock,
14
14
  SupportMarketCoins,
@@ -16,8 +16,9 @@ import {
16
16
  SupportSCoin,
17
17
  ScallopBuilderInstanceParams,
18
18
  SelectCoinReturnType,
19
- } from 'src/types';
19
+ } from '../types';
20
20
  import { ScallopCache } from './scallopCache';
21
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
21
22
  import { newSuiKit } from './suiKit';
22
23
 
23
24
  /**
@@ -17,13 +17,13 @@ import type {
17
17
  GetBalanceParams,
18
18
  SuiClient,
19
19
  } from '@mysten/sui/client';
20
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
21
+ import { callWithRateLimit, TokenBucket } from 'src/utils';
20
22
  import {
21
- DEFAULT_CACHE_OPTIONS,
22
23
  DEFAULT_INTERVAL_IN_MS,
23
24
  DEFAULT_TOKENS_PER_INTERVAL,
24
- queryKeys,
25
- } from 'src/constants';
26
- import { callWithRateLimit, TokenBucket } from 'src/utils';
25
+ } from 'src/constants/tokenBucket';
26
+ import { queryKeys } from 'src/constants';
27
27
 
28
28
  type QueryInspectTxnParams = {
29
29
  queryTarget: string;
@@ -1,13 +1,13 @@
1
1
  import { normalizeSuiAddress } from '@mysten/sui/utils';
2
2
  import { SuiKit } from '@scallop-io/sui-kit';
3
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
3
4
  import {
4
5
  ADDRESSES_ID,
5
- DEFAULT_CACHE_OPTIONS,
6
6
  SUPPORT_BORROW_INCENTIVE_POOLS,
7
7
  SUPPORT_BORROW_INCENTIVE_REWARDS,
8
8
  SUPPORT_SCOIN,
9
9
  SUPPORT_SPOOLS,
10
- } from 'src/constants';
10
+ } from '../constants';
11
11
  import { ScallopAddress } from './scallopAddress';
12
12
  import { ScallopUtils } from './scallopUtils';
13
13
  import { ScallopBuilder } from './scallopBuilder';
@@ -20,7 +20,7 @@ import type {
20
20
  import { ScallopCache } from './scallopCache';
21
21
  import { requireSender } from 'src/utils';
22
22
  import type { SuiObjectArg } from '@scallop-io/sui-kit';
23
- import {
23
+ import type {
24
24
  ScallopClientFnReturnType,
25
25
  ScallopClientParams,
26
26
  SupportPoolCoins,
@@ -33,7 +33,7 @@ import {
33
33
  SupportSCoin,
34
34
  ScallopClientVeScaReturnType,
35
35
  ScallopClientInstanceParams,
36
- } from 'src/types';
36
+ } from '../types';
37
37
  import { newSuiKit } from './suiKit';
38
38
 
39
39
  /**
@@ -1,6 +1,6 @@
1
1
  import axios, { AxiosInstance } from 'axios';
2
- import { DEFAULT_CACHE_OPTIONS, SDK_API_BASE_URL } from 'src/constants';
3
- import {
2
+ import { SDK_API_BASE_URL } from '../constants';
3
+ import type {
4
4
  Market,
5
5
  MarketPools,
6
6
  MarketPool,
@@ -20,8 +20,9 @@ import {
20
20
  BorrowIncentivePoolPoints,
21
21
  SupportBorrowIncentiveRewardCoins,
22
22
  ScallopIndexerInstanceParams,
23
- } from 'src/types';
23
+ } from '../types';
24
24
  import { ScallopCache } from './scallopCache';
25
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
25
26
  import { SuiKit } from '@scallop-io/sui-kit';
26
27
  import { queryKeys } from 'src/constants';
27
28
 
@@ -1,10 +1,5 @@
1
1
  import { SuiKit } from '@scallop-io/sui-kit';
2
- import {
3
- ADDRESSES_ID,
4
- SUPPORT_POOLS,
5
- SUPPORT_SPOOLS,
6
- DEFAULT_CACHE_OPTIONS,
7
- } from 'src/constants';
2
+ import { ADDRESSES_ID, SUPPORT_POOLS, SUPPORT_SPOOLS } from '../constants';
8
3
  import {
9
4
  queryMarket,
10
5
  getObligations,
@@ -39,7 +34,7 @@ import {
39
34
  getFlashLoanFees,
40
35
  getVeSca,
41
36
  getBorrowIncentivePools,
42
- } from 'src/queries';
37
+ } from '../queries';
43
38
  import {
44
39
  ScallopQueryParams,
45
40
  SupportStakeMarketCoins,
@@ -55,11 +50,12 @@ import {
55
50
  MarketPool,
56
51
  CoinPrices,
57
52
  MarketPools,
58
- } from 'src/types';
53
+ } from '../types';
59
54
  import { ScallopAddress } from './scallopAddress';
60
55
  import { ScallopUtils } from './scallopUtils';
61
56
  import { ScallopIndexer } from './scallopIndexer';
62
57
  import { ScallopCache } from './scallopCache';
58
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
63
59
  import { SuiObjectData } from '@mysten/sui/client';
64
60
  import {
65
61
  getSCoinAmount,
@@ -21,8 +21,8 @@ import {
21
21
  COIN_GECKGO_IDS,
22
22
  POOL_ADDRESSES,
23
23
  sCoinTypeToName,
24
- } from 'src/constants';
25
- import { getPythPrices, queryObligation } from 'src/queries';
24
+ } from '../constants';
25
+ import { getPythPrices, queryObligation } from '../queries';
26
26
  import {
27
27
  parseDataFromPythPriceFeed,
28
28
  isMarketCoin,
@@ -30,15 +30,11 @@ import {
30
30
  findClosestUnlockRound,
31
31
  isSuiBridgeAsset,
32
32
  isWormholeAsset,
33
- } from 'src/utils';
34
- import {
35
- DEFAULT_CACHE_OPTIONS,
36
- PYTH_ENDPOINTS,
37
- PYTH_FEED_IDS,
38
- queryKeys,
39
- } from 'src/constants';
33
+ } from '../utils';
34
+ import { PYTH_ENDPOINTS, PYTH_FEED_IDS } from 'src/constants/pyth';
40
35
  import { ScallopCache } from './scallopCache';
41
- import {
36
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
37
+ import type {
42
38
  ScallopUtilsParams,
43
39
  SupportCoins,
44
40
  SupportAssetCoins,
@@ -52,7 +48,8 @@ import {
52
48
  SupportSuiBridgeCoins,
53
49
  SupportWormholeCoins,
54
50
  PoolAddressInfo,
55
- } from 'src/types';
51
+ } from '../types';
52
+ import { queryKeys } from 'src/constants';
56
53
  import type { SuiObjectArg, SuiTxArg, SuiTxBlock } from '@scallop-io/sui-kit';
57
54
  import { newSuiKit } from './suiKit';
58
55
 
@@ -1,5 +1,5 @@
1
1
  import { SuiKit, SuiKitParams } from '@scallop-io/sui-kit';
2
- import { RPC_PROVIDERS } from 'src/constants';
2
+ import { RPC_PROVIDERS } from 'src/constants/rpc';
3
3
 
4
4
  export const newSuiKit = (params: SuiKitParams) => {
5
5
  return new SuiKit({
@@ -1,12 +1,12 @@
1
1
  import { normalizeStructTag } from '@mysten/sui/utils';
2
- import { SUPPORT_BORROW_INCENTIVE_POOLS } from 'src/constants';
2
+ import { SUPPORT_BORROW_INCENTIVE_POOLS } from '../constants';
3
3
  import {
4
4
  parseOriginBorrowIncentivePoolData,
5
5
  parseOriginBorrowIncentiveAccountData,
6
6
  calculateBorrowIncentivePoolPointData,
7
- } from 'src/utils';
8
- import type { ScallopAddress, ScallopQuery, ScallopUtils } from 'src/models';
9
- import {
7
+ } from '../utils';
8
+ import type { ScallopAddress, ScallopQuery, ScallopUtils } from '../models';
9
+ import type {
10
10
  BorrowIncentivePoolsQueryInterface,
11
11
  BorrowIncentivePools,
12
12
  BorrowIncentiveAccountsQueryInterface,
@@ -17,7 +17,7 @@ import {
17
17
  OptionalKeys,
18
18
  BorrowIncentivePool,
19
19
  CoinPrices,
20
- } from 'src/types';
20
+ } from '../types';
21
21
  import BigNumber from 'bignumber.js';
22
22
 
23
23
  /**
@@ -6,16 +6,16 @@ import {
6
6
  BORROW_FEE_PROTOCOL_ID,
7
7
  USE_TEST_ADDRESS,
8
8
  FlashLoanFeeObjectMap,
9
- } from 'src/constants';
9
+ } from '../constants';
10
10
  import {
11
11
  parseOriginMarketPoolData,
12
12
  calculateMarketPoolData,
13
13
  parseOriginMarketCollateralData,
14
14
  calculateMarketCollateralData,
15
- } from 'src/utils';
15
+ } from '../utils';
16
16
  import type { SuiObjectResponse, SuiObjectData } from '@mysten/sui/client';
17
17
  import type { SuiObjectArg } from '@scallop-io/sui-kit';
18
- import type { ScallopAddress, ScallopCache, ScallopQuery } from 'src/models';
18
+ import type { ScallopAddress, ScallopCache, ScallopQuery } from '../models';
19
19
  import {
20
20
  Market,
21
21
  MarketPools,
@@ -36,7 +36,7 @@ import {
36
36
  SupportMarketCoins,
37
37
  OptionalKeys,
38
38
  CoinPrices,
39
- } from 'src/types';
39
+ } from '../types';
40
40
  import BigNumber from 'bignumber.js';
41
41
  import { getSupplyLimit } from './supplyLimitQuery';
42
42
  // import { isIsolatedAsset } from './isolatedAsset';
@@ -1,6 +1,6 @@
1
1
  import { DynamicFieldInfo, DynamicFieldName } from '@mysten/sui/client';
2
- import { ScallopAddress, ScallopUtils } from 'src/models';
3
- import { SupportPoolCoins } from 'src/types';
2
+ import { ScallopAddress, ScallopUtils } from '../models';
3
+ import { SupportPoolCoins } from '../types';
4
4
  import { z as zod } from 'zod';
5
5
 
6
6
  const isolatedAssetZod = zod.object({
@@ -4,10 +4,10 @@ import {
4
4
  SUPPORT_COLLATERALS,
5
5
  SUPPORT_POOLS,
6
6
  SUPPORT_SPOOLS,
7
- } from 'src/constants';
7
+ } from '../constants';
8
8
  import { minBigNumber, estimatedFactor } from 'src/utils';
9
- import type { ScallopQuery } from 'src/models';
10
- import {
9
+ import type { ScallopQuery } from '../models';
10
+ import type {
11
11
  Market,
12
12
  SupportPoolCoins,
13
13
  MarketPool,
@@ -26,7 +26,7 @@ import {
26
26
  SupportBorrowIncentiveCoins,
27
27
  ObligationBorrowIcentiveReward,
28
28
  SupportBorrowIncentiveRewardCoins,
29
- } from 'src/types';
29
+ } from '../types';
30
30
 
31
31
  /**
32
32
  * Get user lending infomation for specific pools.
@@ -1,6 +1,6 @@
1
1
  import { SuiObjectData } from '@mysten/sui/client';
2
- import type { ScallopAddress } from 'src/models';
3
- import { SupportAssetCoins } from 'src/types';
2
+ import type { ScallopAddress } from '../models';
3
+ import type { SupportAssetCoins } from '../types';
4
4
 
5
5
  /**
6
6
  * Get price from pyth fee object.
@@ -1,15 +1,15 @@
1
1
  import { normalizeStructTag } from '@mysten/sui/utils';
2
- import { SUPPORT_SPOOLS } from 'src/constants';
2
+ import { SUPPORT_SPOOLS } from '../constants';
3
3
  import {
4
4
  parseOriginSpoolData,
5
5
  calculateSpoolData,
6
6
  parseOriginSpoolRewardPoolData,
7
7
  calculateSpoolRewardPoolData,
8
8
  isMarketCoin,
9
- } from 'src/utils';
9
+ } from '../utils';
10
10
  import type { SuiObjectResponse } from '@mysten/sui/client';
11
- import type { ScallopQuery, ScallopUtils } from 'src/models';
12
- import {
11
+ import type { ScallopQuery, ScallopUtils } from '../models';
12
+ import type {
13
13
  MarketPool,
14
14
  Spools,
15
15
  Spool,
@@ -20,7 +20,7 @@ import {
20
20
  SupportStakeCoins,
21
21
  CoinPrices,
22
22
  MarketPools,
23
- } from 'src/types';
23
+ } from '../types';
24
24
 
25
25
  /**
26
26
  * Get spools data.
@@ -1,5 +1,5 @@
1
- import { ScallopUtils } from 'src/models';
2
- import { SupportPoolCoins } from 'src/types';
1
+ import { ScallopUtils } from '../models';
2
+ import { SupportPoolCoins } from '../types';
3
3
  import { z as zod } from 'zod';
4
4
 
5
5
  const supplyLimitZod = zod.object({
@@ -1,17 +1,17 @@
1
1
  import BigNumber from 'bignumber.js';
2
+ import { VeScaTreasuryFields, VeScaTreasuryInfo, Vesca } from '../types';
2
3
  import {
3
4
  type SuiObjectResponse,
4
5
  type SuiObjectData,
5
6
  DevInspectResults,
6
7
  } from '@mysten/sui/client';
7
- import type { ScallopUtils } from 'src/models';
8
+ import type { ScallopUtils } from '../models';
8
9
  import { MAX_LOCK_DURATION } from 'src/constants';
9
10
  import { SUI_CLOCK_OBJECT_ID, SuiTxBlock } from '@scallop-io/sui-kit';
10
11
  import { bcs } from '@mysten/sui/bcs';
11
12
  import { z as zod } from 'zod';
12
13
  import { queryKeys } from 'src/constants';
13
14
  import assert from 'assert';
14
- import { Vesca, VeScaTreasuryFields, VeScaTreasuryInfo } from 'src/types';
15
15
  /**
16
16
  * Query all owned veSca key.
17
17
  *
@@ -1,4 +1,4 @@
1
- import { SUPPORT_ORACLES } from 'src/constants';
1
+ import { SUPPORT_ORACLES } from '../constants';
2
2
  import type {
3
3
  SupportAssetCoins,
4
4
  SupportOracleType,
@@ -3,11 +3,11 @@ import type {
3
3
  SuiObjectArg,
4
4
  } from '@scallop-io/sui-kit';
5
5
  import type { TransactionResult } from '@mysten/sui/transactions';
6
- import type { ScallopBuilder } from 'src/models';
7
- import {
6
+ import type { ScallopBuilder } from '../../models';
7
+ import type {
8
8
  SupportBorrowIncentiveCoins,
9
9
  SupportBorrowIncentiveRewardCoins,
10
- } from 'src/types';
10
+ } from '../constant';
11
11
 
12
12
  export type BorrowIncentiveIds = {
13
13
  borrowIncentivePkg: string;
@@ -3,12 +3,12 @@ import type {
3
3
  SuiObjectArg,
4
4
  } from '@scallop-io/sui-kit';
5
5
  import type { Argument, TransactionResult } from '@mysten/sui/transactions';
6
- import type { ScallopBuilder } from 'src/models';
7
- import {
6
+ import type { ScallopBuilder } from '../../models';
7
+ import type {
8
8
  SupportCollateralCoins,
9
9
  SupportPoolCoins,
10
10
  SupportAssetCoins,
11
- } from 'src/types';
11
+ } from '../constant';
12
12
  import { SuiTxBlockWithSpool } from '.';
13
13
 
14
14
  export type CoreIds = {