@tradeport/sui-trading-sdk 0.1.64 → 0.1.65

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 (53) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.d.mts +4 -1
  3. package/dist/index.d.ts +4 -1
  4. package/dist/index.js +270 -96
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +270 -96
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/src/SuiTradingClient.ts +81 -13
  10. package/src/apiClients/createKioskClient.ts +11 -0
  11. package/src/apiClients/createSuiClient.ts +5 -0
  12. package/src/helpers/isNonKioskListing.ts +9 -2
  13. package/src/helpers/kiosk/getRulePackageId.ts +10 -3
  14. package/src/helpers/kiosk/kioskTxWrapper.ts +3 -2
  15. package/src/helpers/kiosk/resolveTransferPolicies.ts +3 -2
  16. package/src/helpers/originByte/getOBBidderKiosk.ts +8 -2
  17. package/src/helpers/rpc/getAcountBalance.ts +3 -2
  18. package/src/helpers/rpc/getObjectType.ts +8 -2
  19. package/src/methods/acceptCollectionBid/acceptCollectionBid.ts +6 -1
  20. package/src/methods/acceptCollectionBid/addAcceptCollectionBIdTxs.ts +17 -4
  21. package/src/methods/acceptNftBids/acceptNftBids.ts +6 -1
  22. package/src/methods/acceptNftBids/addAcceptNftBidTxs.ts +13 -3
  23. package/src/methods/buyAndExerciseLongLocks/buyAndExerciseLongLocks.ts +1 -1
  24. package/src/methods/buyAndExerciseShortLocks/buyAndExerciseShortLocks.ts +1 -1
  25. package/src/methods/buyListings/addBuyListingTxs.ts +11 -2
  26. package/src/methods/buyListings/buyListings.ts +6 -1
  27. package/src/methods/buyLocks/buyLocks.ts +5 -1
  28. package/src/methods/cancelLocks/cancelLocks.ts +7 -6
  29. package/src/methods/cancelNftTransfers/cancelNftTransfers.ts +1 -0
  30. package/src/methods/claimNfts/addClaimNftsTxs.ts +8 -0
  31. package/src/methods/claimNfts/claimNfts.ts +11 -0
  32. package/src/methods/createLongLocks/createLongLocks.ts +10 -8
  33. package/src/methods/createShortLocks/createShortLocks.ts +5 -1
  34. package/src/methods/exerciseLongLocks/exerciseLongLocks.ts +7 -1
  35. package/src/methods/exerciseShortLocks/exerciseShortLocks.ts +2 -0
  36. package/src/methods/listNfts/addListTxs.ts +3 -0
  37. package/src/methods/listNfts/addRelistTxs.ts +2 -1
  38. package/src/methods/listNfts/listNfts.ts +5 -0
  39. package/src/methods/placeCollectionBids/addPlaceCollectionBidTxs.ts +5 -4
  40. package/src/methods/placeCollectionBids/placeCollectionBids.ts +3 -0
  41. package/src/methods/placeNftBids/addPlaceNftBidTxs.ts +5 -1
  42. package/src/methods/placeNftBids/placeNftBids.ts +3 -0
  43. package/src/methods/relistNft/relistNft.ts +20 -2
  44. package/src/methods/removeCollectionBid/addRemoveCollectionBidTxs.ts +5 -2
  45. package/src/methods/removeCollectionBid/removeCollectionBid.ts +3 -0
  46. package/src/methods/removeNftBids/addRemoveNftBidTxs.ts +1 -1
  47. package/src/methods/removeNftBids/removeNftBids.ts +3 -0
  48. package/src/methods/transferNfts/transferNfts.ts +8 -1
  49. package/src/methods/unlistListings/addUnlistListingTxs.ts +7 -1
  50. package/src/methods/unlistListings/unlistListings.ts +6 -0
  51. package/src/tests/SuiWallet.ts +12 -11
  52. package/src/apiClients/kioskClient.ts +0 -10
  53. package/src/apiClients/suiClient.ts +0 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.1.65
4
+
5
+ ### Patch Changes
6
+
7
+ - 342754c: Refactored to use suiNodeUrl as argument to SuiTradingClient
8
+
3
9
  ## 0.1.64
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -143,11 +143,14 @@ type UnlistListings = {
143
143
  type ApiConfig = {
144
144
  apiUser: string;
145
145
  apiKey: string;
146
+ suiNodeUrl?: string;
146
147
  };
147
148
  declare class SuiTradingClient {
148
149
  private readonly apiUser;
149
150
  private readonly apiKey;
150
- constructor({ apiUser, apiKey }: ApiConfig);
151
+ private readonly suiClient;
152
+ private readonly kioskClient;
153
+ constructor({ apiUser, apiKey, suiNodeUrl }: ApiConfig);
151
154
  buyListings({ listingIds, walletAddress, tx }: BuyListings): Promise<Transaction>;
152
155
  listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
153
156
  unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;
package/dist/index.d.ts CHANGED
@@ -143,11 +143,14 @@ type UnlistListings = {
143
143
  type ApiConfig = {
144
144
  apiUser: string;
145
145
  apiKey: string;
146
+ suiNodeUrl?: string;
146
147
  };
147
148
  declare class SuiTradingClient {
148
149
  private readonly apiUser;
149
150
  private readonly apiKey;
150
- constructor({ apiUser, apiKey }: ApiConfig);
151
+ private readonly suiClient;
152
+ private readonly kioskClient;
153
+ constructor({ apiUser, apiKey, suiNodeUrl }: ApiConfig);
151
154
  buyListings({ listingIds, walletAddress, tx }: BuyListings): Promise<Transaction>;
152
155
  listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
153
156
  unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;