@scallop-io/sui-scallop-sdk 0.44.28 → 0.46.0

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 (60) hide show
  1. package/dist/builders/borrowIncentiveBuilder.d.ts +1 -1
  2. package/dist/builders/referralBuilder.d.ts +12 -0
  3. package/dist/constants/cache.d.ts +8 -0
  4. package/dist/constants/common.d.ts +1 -1
  5. package/dist/index.js +890 -419
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +967 -493
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/models/index.d.ts +1 -0
  10. package/dist/models/scallop.d.ts +7 -1
  11. package/dist/models/scallopAddress.d.ts +4 -2
  12. package/dist/models/scallopBuilder.d.ts +2 -0
  13. package/dist/models/scallopCache.d.ts +75 -0
  14. package/dist/models/scallopClient.d.ts +2 -0
  15. package/dist/models/scallopIndexer.d.ts +5 -3
  16. package/dist/models/scallopQuery.d.ts +28 -28
  17. package/dist/models/scallopUtils.d.ts +1 -0
  18. package/dist/queries/coreQuery.d.ts +3 -29
  19. package/dist/queries/index.d.ts +1 -0
  20. package/dist/queries/priceQuery.d.ts +3 -1
  21. package/dist/queries/referralQuery.d.ts +7 -0
  22. package/dist/queries/vescaQuery.d.ts +6 -2
  23. package/dist/types/address.d.ts +15 -0
  24. package/dist/types/builder/core.d.ts +2 -0
  25. package/dist/types/builder/index.d.ts +2 -1
  26. package/dist/types/builder/referral.d.ts +30 -0
  27. package/dist/types/builder/vesca.d.ts +1 -0
  28. package/dist/types/model.d.ts +2 -0
  29. package/package.json +8 -6
  30. package/src/builders/borrowIncentiveBuilder.ts +12 -21
  31. package/src/builders/coreBuilder.ts +54 -0
  32. package/src/builders/index.ts +5 -2
  33. package/src/builders/referralBuilder.ts +178 -0
  34. package/src/builders/vescaBuilder.ts +8 -6
  35. package/src/constants/cache.ts +15 -0
  36. package/src/constants/common.ts +9 -2
  37. package/src/constants/vesca.ts +1 -3
  38. package/src/models/index.ts +1 -0
  39. package/src/models/scallop.ts +26 -7
  40. package/src/models/scallopAddress.ts +87 -38
  41. package/src/models/scallopBuilder.ts +14 -4
  42. package/src/models/scallopCache.ts +285 -0
  43. package/src/models/scallopClient.ts +15 -4
  44. package/src/models/scallopIndexer.ts +58 -84
  45. package/src/models/scallopQuery.ts +54 -5
  46. package/src/models/scallopUtils.ts +66 -37
  47. package/src/queries/borrowIncentiveQuery.ts +6 -12
  48. package/src/queries/coreQuery.ts +83 -260
  49. package/src/queries/index.ts +1 -0
  50. package/src/queries/priceQuery.ts +48 -9
  51. package/src/queries/referralQuery.ts +27 -0
  52. package/src/queries/spoolQuery.ts +20 -27
  53. package/src/queries/vescaQuery.ts +95 -17
  54. package/src/types/address.ts +15 -0
  55. package/src/types/builder/core.ts +14 -0
  56. package/src/types/builder/index.ts +2 -0
  57. package/src/types/builder/referral.ts +51 -0
  58. package/src/types/builder/vesca.ts +1 -0
  59. package/src/types/model.ts +2 -0
  60. package/src/types/query/borrowIncentive.ts +0 -107
@@ -1,6 +1,6 @@
1
1
  import { TransactionBlock } from '@mysten/sui.js/transactions';
2
2
  import { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
3
- import type { ScallopBuilder } from '../models';
3
+ import type { ScallopBuilder } from 'src/models';
4
4
  import type { BorrowIncentiveTxBlock, ScallopTxBlock } from '../types';
5
5
  /**
6
6
  * Create an enhanced transaction block instance for interaction with borrow incentive modules of the Scallop contract.
@@ -0,0 +1,12 @@
1
+ import { ScallopBuilder } from 'src/models';
2
+ import { ScallopTxBlock } from 'src/types';
3
+ import { SuiTxBlock as SuiKitTxBlock, TransactionBlock } from '@scallop-io/sui-kit';
4
+ import { ReferralTxBlock } from 'src/types/builder/referral';
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 newReferralTxBlock: (builder: ScallopBuilder, initTxBlock?: ScallopTxBlock | SuiKitTxBlock | TransactionBlock) => ReferralTxBlock;
@@ -0,0 +1,8 @@
1
+ import { QueryClientConfig } from '@tanstack/query-core';
2
+ /**
3
+ * Default cache options for the QueryClient.
4
+ * @type {QueryClientConfig}
5
+ * @description Default cache options for the QueryClient
6
+ * We set the default to 5s to prevent duplicate requests from being requested (e.g. query MarketObject, etc.)
7
+ */
8
+ export declare const DEFAULT_CACHE_OPTIONS: QueryClientConfig;
@@ -1,7 +1,7 @@
1
1
  export declare const API_BASE_URL = "https://sui.api.scallop.io";
2
2
  export declare const SDK_API_BASE_URL = "https://sdk.api.scallop.io";
3
3
  export declare const IS_VE_SCA_TEST = false;
4
- export declare const ADDRESSES_ID: "65fb07c39c845425d71d7b18" | "6601955b8b0024600a917079";
4
+ export declare const ADDRESSES_ID: "65fb07c39c845425d71d7b18" | "664dfe22898c36c159e28bc8";
5
5
  export declare const PROTOCOL_OBJECT_ID: "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" | "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf";
6
6
  export declare const BORROW_FEE_PROTOCOL_ID: "0xc9f859f98ca352a11b97a038c4b4162bee437b8df8caa047990fe9cb03d4f778" | "0xc38f849e81cfe46d4e4320f508ea7dda42934a329d5a6571bb4c3cb6ea63f5da";
7
7
  export declare const SCA_COIN_TYPE: "0x6cd813061a3adf3602b76545f076205f0c8e7ec1d3b1eab9a1da7992c18c0524::sca::SCA" | "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";