@tradeport/sui-trading-sdk 0.4.39 → 0.4.41

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 (32) hide show
  1. package/dist/index.d.mts +14 -0
  2. package/dist/index.d.ts +14 -0
  3. package/dist/index.js +534 -134
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +518 -125
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +6 -2
  8. package/src/SuiTradingClient.ts +15 -0
  9. package/src/bigNumberConfig.ts +10 -0
  10. package/src/constants.ts +17 -1
  11. package/src/graphql/queries/fetchNftCollectionChainState.ts +12 -0
  12. package/src/helpers/calculateRoyaltyFee.ts +12 -7
  13. package/src/helpers/isExpiredListing.ts +9 -0
  14. package/src/helpers/kiosk/preProcessSharedBulkBuyingData.ts +9 -8
  15. package/src/helpers/swap.ts +197 -0
  16. package/src/helpers/validateMinFloorPrice.ts +22 -0
  17. package/src/methods/buyListings/addBuyListingTxs.ts +111 -5
  18. package/src/methods/buyLocks/buyLocks.ts +2 -2
  19. package/src/methods/createLongLocks/createLongLocks.ts +2 -2
  20. package/src/methods/createShortLocks/createShortLocks.ts +3 -3
  21. package/src/methods/listNfts/addListTxs.ts +17 -37
  22. package/src/methods/listNfts/addRelistTxs.ts +26 -17
  23. package/src/methods/listNfts/listNfts.ts +27 -16
  24. package/src/methods/placeNftBids/addPlaceNftBidTxs.ts +1 -1
  25. package/src/methods/relistNft/relistNft.ts +19 -28
  26. package/src/methods/sponsorNftListing/addSponsorNftListingTx.ts +71 -0
  27. package/src/methods/sponsorNftListing/sponsorNftListing.ts +62 -0
  28. package/src/methods/unlistListings/addUnlistListingTxs.ts +68 -5
  29. package/src/methods/unlistListings/unlistListings.ts +2 -6
  30. package/src/tests/SuiWallet.ts +4 -1
  31. package/src/utils/printTxBlockTxs.ts +7 -1
  32. package/src/utils/pureValues.ts +13 -0
package/dist/index.d.mts CHANGED
@@ -112,10 +112,23 @@ type ExerciseShortLocks = {
112
112
  }>;
113
113
  };
114
114
 
115
+ type SponsorNftListingOptions = {
116
+ shouldSponsor?: boolean;
117
+ numOfPeriods?: number;
118
+ slippage?: number;
119
+ coinInType?: string;
120
+ };
121
+ type SponsorNftListing = {
122
+ nftTokenId: string;
123
+ walletAddress: string;
124
+ options: SponsorNftListingOptions;
125
+ };
126
+
115
127
  type ListNfts = {
116
128
  nfts: Array<{
117
129
  id: string;
118
130
  listPriceInMist: number;
131
+ sponsorOptions?: SponsorNftListingOptions;
119
132
  }>;
120
133
  walletAddress: string;
121
134
  };
@@ -224,6 +237,7 @@ declare class SuiTradingClient {
224
237
  }>;
225
238
  cancelMultiBid(args: CancelMultiBid): Promise<Transaction>;
226
239
  updateMultiBid(args: UpdateMultiBid): Promise<Transaction>;
240
+ sponsorNftListing(args: SponsorNftListing): Promise<Transaction>;
227
241
  }
228
242
 
229
243
  export { SuiTradingClient };
package/dist/index.d.ts CHANGED
@@ -112,10 +112,23 @@ type ExerciseShortLocks = {
112
112
  }>;
113
113
  };
114
114
 
115
+ type SponsorNftListingOptions = {
116
+ shouldSponsor?: boolean;
117
+ numOfPeriods?: number;
118
+ slippage?: number;
119
+ coinInType?: string;
120
+ };
121
+ type SponsorNftListing = {
122
+ nftTokenId: string;
123
+ walletAddress: string;
124
+ options: SponsorNftListingOptions;
125
+ };
126
+
115
127
  type ListNfts = {
116
128
  nfts: Array<{
117
129
  id: string;
118
130
  listPriceInMist: number;
131
+ sponsorOptions?: SponsorNftListingOptions;
119
132
  }>;
120
133
  walletAddress: string;
121
134
  };
@@ -224,6 +237,7 @@ declare class SuiTradingClient {
224
237
  }>;
225
238
  cancelMultiBid(args: CancelMultiBid): Promise<Transaction>;
226
239
  updateMultiBid(args: UpdateMultiBid): Promise<Transaction>;
240
+ sponsorNftListing(args: SponsorNftListing): Promise<Transaction>;
227
241
  }
228
242
 
229
243
  export { SuiTradingClient };