@scallop-io/sui-scallop-sdk 0.44.1 → 0.44.3

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 (59) hide show
  1. package/dist/builders/borrowIncentiveBuilder.d.ts +12 -0
  2. package/dist/constants/common.d.ts +5 -3
  3. package/dist/constants/enum.d.ts +4 -2
  4. package/dist/index.js +843 -228
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +803 -192
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/models/scallopClient.d.ts +33 -2
  9. package/dist/models/scallopQuery.d.ts +36 -10
  10. package/dist/models/scallopUtils.d.ts +12 -4
  11. package/dist/queries/borrowIncentiveQuery.d.ts +24 -0
  12. package/dist/queries/coreQuery.d.ts +12 -0
  13. package/dist/queries/index.d.ts +1 -0
  14. package/dist/queries/portfolioQuery.d.ts +1 -0
  15. package/dist/queries/spoolQuery.d.ts +13 -5
  16. package/dist/types/address.d.ts +10 -2
  17. package/dist/types/builder/borrowIncentive.d.ts +31 -0
  18. package/dist/types/builder/index.d.ts +3 -1
  19. package/dist/types/constant/common.d.ts +5 -3
  20. package/dist/types/constant/enum.d.ts +9 -3
  21. package/dist/types/query/borrowIncentive.d.ts +118 -0
  22. package/dist/types/query/core.d.ts +1 -0
  23. package/dist/types/query/index.d.ts +1 -0
  24. package/dist/types/query/spool.d.ts +12 -13
  25. package/dist/utils/builder.d.ts +8 -0
  26. package/dist/utils/index.d.ts +1 -1
  27. package/dist/utils/query.d.ts +33 -10
  28. package/dist/utils/util.d.ts +15 -1
  29. package/package.json +12 -12
  30. package/src/builders/borrowIncentiveBuilder.ts +257 -0
  31. package/src/builders/coreBuilder.ts +1 -14
  32. package/src/builders/index.ts +9 -2
  33. package/src/builders/spoolBuilder.ts +3 -16
  34. package/src/constants/common.ts +6 -1
  35. package/src/constants/enum.ts +18 -2
  36. package/src/models/scallopAddress.ts +47 -0
  37. package/src/models/scallopClient.ts +104 -2
  38. package/src/models/scallopQuery.ts +48 -14
  39. package/src/models/scallopUtils.ts +53 -15
  40. package/src/queries/borrowIncentiveQuery.ts +166 -0
  41. package/src/queries/coreQuery.ts +57 -15
  42. package/src/queries/index.ts +1 -0
  43. package/src/queries/spoolQuery.ts +78 -62
  44. package/src/types/address.ts +10 -2
  45. package/src/types/builder/borrowIncentive.ts +67 -0
  46. package/src/types/builder/index.ts +5 -1
  47. package/src/types/builder/spool.ts +0 -1
  48. package/src/types/constant/common.ts +10 -3
  49. package/src/types/constant/enum.ts +13 -3
  50. package/src/types/query/borrowIncentive.ts +150 -0
  51. package/src/types/query/core.ts +1 -1
  52. package/src/types/query/index.ts +1 -0
  53. package/src/types/query/spool.ts +28 -18
  54. package/src/utils/builder.ts +15 -0
  55. package/src/utils/index.ts +1 -1
  56. package/src/utils/query.ts +277 -70
  57. package/src/utils/util.ts +59 -9
  58. package/dist/utils/oracle.d.ts +0 -14
  59. package/src/utils/oracle.ts +0 -36
@@ -0,0 +1,12 @@
1
+ import { TransactionBlock } from '@mysten/sui.js/transactions';
2
+ import { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
3
+ import type { ScallopBuilder } from '../models';
4
+ import type { BorrowIncentiveTxBlock, ScallopTxBlock } from '../types';
5
+ /**
6
+ * Create an enhanced transaction block instance for interaction with borrow incentive modules of the Scallop contract.
7
+ *
8
+ * @param builder - Scallop builder instance.
9
+ * @param initTxBlock - Scallop txBlock, txBlock created by SuiKit, or original transaction block.
10
+ * @return Scallop borrow incentive txBlock.
11
+ */
12
+ export declare const newBorrowIncentiveTxBlock: (builder: ScallopBuilder, initTxBlock?: ScallopTxBlock | SuiKitTxBlock | TransactionBlock) => BorrowIncentiveTxBlock;
@@ -1,9 +1,11 @@
1
1
  export declare const API_BASE_URL = "https://sui.api.scallop.io";
2
2
  export declare const ADDRESSES_ID = "6462a088a7ace142bb6d7e9b";
3
3
  export declare const PROTOCOL_OBJECT_ID = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
4
- export declare const SUPPORT_POOLS: readonly ["eth", "btc", "usdc", "usdt", "sui", "apt", "sol", "cetus", "afsui", "hasui"];
5
- export declare const SUPPORT_COLLATERALS: readonly ["eth", "btc", "usdc", "usdt", "sui", "apt", "sol", "cetus", "afsui", "hasui"];
4
+ export declare const SUPPORT_POOLS: readonly ["eth", "btc", "usdc", "usdt", "sui", "apt", "sol", "cetus", "afsui", "hasui", "vsui"];
5
+ export declare const SUPPORT_COLLATERALS: readonly ["eth", "btc", "usdc", "usdt", "sui", "apt", "sol", "cetus", "afsui", "hasui", "vsui"];
6
6
  export declare const SUPPORT_SPOOLS: readonly ["ssui", "susdc", "susdt"];
7
- export declare const SUPPORT_REWARD_POOLS: readonly ["sui"];
7
+ export declare const SUPPORT_SPOOLS_REWARDS: readonly ["sui"];
8
+ export declare const SUPPORT_BORROW_INCENTIVE_POOLS: readonly ["sui", "usdc"];
9
+ export declare const SUPPORT_BORROW_INCENTIVE_REWARDS: readonly ["sui"];
8
10
  export declare const SUPPORT_ORACLES: readonly ["supra", "switchboard", "pyth"];
9
11
  export declare const SUPPORT_PACKAGES: readonly ["coinDecimalsRegistry", "math", "whitelist", "x", "protocol", "protocolWhitelist", "query", "supra", "pyth", "switchboard", "xOracle", "testCoin"];
@@ -1,8 +1,10 @@
1
- import type { SupportCoinDecimals, AssetCoins, MarketCoins, StakeMarketCoins, RewardCoins, AssetCoinIds, WormholeCoinIds } from '../types';
1
+ import type { SupportCoinDecimals, AssetCoins, MarketCoins, StakeMarketCoins, StakeRewardCoins, BorrowIncentiveRewardCoins, AssetCoinIds, WormholeCoinIds, VoloCoinIds } from '../types';
2
2
  export declare const coinDecimals: SupportCoinDecimals;
3
3
  export declare const assetCoins: AssetCoins;
4
4
  export declare const marketCoins: MarketCoins;
5
5
  export declare const stakeMarketCoins: StakeMarketCoins;
6
- export declare const rewardCoins: RewardCoins;
6
+ export declare const spoolRewardCoins: StakeRewardCoins;
7
+ export declare const borrowIncentiveRewardCoins: BorrowIncentiveRewardCoins;
7
8
  export declare const coinIds: AssetCoinIds;
8
9
  export declare const wormholeCoinIds: WormholeCoinIds;
10
+ export declare const voloCoinIds: VoloCoinIds;