@scallop-io/sui-scallop-sdk 0.46.35 → 0.46.37

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 (42) hide show
  1. package/README.md +2 -0
  2. package/dist/builders/loyaltyProgramBuilder.d.ts +12 -0
  3. package/dist/builders/referralBuilder.d.ts +1 -1
  4. package/dist/constants/testAddress.d.ts +2 -0
  5. package/dist/index.js +568 -71
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +558 -61
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/models/scallopQuery.d.ts +10 -3
  10. package/dist/models/scallopUtils.d.ts +1 -1
  11. package/dist/queries/index.d.ts +1 -0
  12. package/dist/queries/loyaltyProgramQuery.d.ts +10 -0
  13. package/dist/queries/vescaQuery.d.ts +8 -6
  14. package/dist/types/address.d.ts +6 -0
  15. package/dist/types/builder/index.d.ts +3 -1
  16. package/dist/types/builder/loyaltyProgram.d.ts +23 -0
  17. package/dist/types/builder/vesca.d.ts +16 -0
  18. package/dist/types/query/index.d.ts +1 -0
  19. package/dist/types/query/loyaltyProgram.d.ts +5 -0
  20. package/dist/types/query/vesca.d.ts +18 -0
  21. package/dist/utils/builder.d.ts +6 -5
  22. package/package.json +7 -6
  23. package/src/builders/index.ts +6 -1
  24. package/src/builders/loyaltyProgramBuilder.ts +115 -0
  25. package/src/builders/referralBuilder.ts +3 -1
  26. package/src/builders/vescaBuilder.ts +5 -1
  27. package/src/constants/testAddress.ts +383 -0
  28. package/src/models/scallopAddress.ts +12 -2
  29. package/src/models/scallopCache.ts +0 -1
  30. package/src/models/scallopQuery.ts +16 -5
  31. package/src/models/scallopUtils.ts +3 -3
  32. package/src/queries/index.ts +1 -0
  33. package/src/queries/loyaltyProgramQuery.ts +77 -0
  34. package/src/queries/vescaQuery.ts +70 -15
  35. package/src/types/address.ts +6 -0
  36. package/src/types/builder/index.ts +3 -0
  37. package/src/types/builder/loyaltyProgram.ts +35 -0
  38. package/src/types/builder/vesca.ts +16 -0
  39. package/src/types/query/index.ts +1 -0
  40. package/src/types/query/loyaltyProgram.ts +5 -0
  41. package/src/types/query/vesca.ts +21 -0
  42. package/src/utils/builder.ts +69 -53
package/README.md CHANGED
@@ -40,6 +40,8 @@ This SDK is used to interact with [sui-lending-protocol](https://github.com/scal
40
40
  ```
41
41
  - Create an instance:
42
42
 
43
+ > **Note**: Currently, this SDK only supports the mainnet network. When you use the testnet network, it will give errors because there is no address package ID for the testnet.
44
+
43
45
  ```typescript
44
46
  // Create an instance quickly through the`Scallop` class to construct other models.
45
47
  const scallopSDK = new Scallop({
@@ -0,0 +1,12 @@
1
+ import { TransactionBlock } from '@mysten/sui.js/transactions';
2
+ import { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
3
+ import { ScallopBuilder } from 'src/models';
4
+ import { LoyaltyProgramTxBlock, ScallopTxBlock } from 'src/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 loyalty program txBlock.
11
+ */
12
+ export declare const newLoyaltyProgramTxBlock: (builder: ScallopBuilder, initTxBlock?: ScallopTxBlock | SuiKitTxBlock | TransactionBlock) => LoyaltyProgramTxBlock;
@@ -7,6 +7,6 @@ import { ReferralTxBlock } from 'src/types/builder/referral';
7
7
  *
8
8
  * @param builder - Scallop builder instance.
9
9
  * @param initTxBlock - Scallop txBlock, txBlock created by SuiKit, or original transaction block.
10
- * @return Scallop borrow incentive txBlock.
10
+ * @return Scallop referral txBlock.
11
11
  */
12
12
  export declare const newReferralTxBlock: (builder: ScallopBuilder, initTxBlock?: ScallopTxBlock | SuiKitTxBlock | TransactionBlock) => ReferralTxBlock;
@@ -0,0 +1,2 @@
1
+ import { AddressesInterface } from 'src/types';
2
+ export declare const TEST_ADDRESSES: AddressesInterface;