@tradeport/sui-trading-sdk 0.4.66 → 0.5.1

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 (55) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.d.ts +2 -1
  3. package/dist/index.js +330 -329
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +16 -5
  6. package/dist/index.mjs.map +1 -1
  7. package/jest.config.js +6 -2
  8. package/package.json +66 -65
  9. package/src/SuiTradingClient.ts +24 -14
  10. package/src/apiClients/createKioskClient.ts +5 -6
  11. package/src/apiClients/createSuiClient.ts +2 -2
  12. package/src/helpers/getTransferPolicyRuleNamesFromSuiObject.ts +9 -21
  13. package/src/helpers/isNonKioskListing.ts +2 -2
  14. package/src/helpers/kiosk/getKioskCollectionRoyaltyFeeAmount.ts +10 -10
  15. package/src/helpers/kiosk/getKioskIdFromKioskTx.ts +15 -7
  16. package/src/helpers/kiosk/getKioskPlaceBidCoin.ts +2 -2
  17. package/src/helpers/kiosk/getRulePackageId.ts +2 -2
  18. package/src/helpers/kiosk/getTransferPoliciesToResolve.ts +2 -2
  19. package/src/helpers/kiosk/kioskListingBcs.ts +19 -0
  20. package/src/helpers/kiosk/kioskTxWrapper.ts +3 -3
  21. package/src/helpers/kiosk/lockNftInsideKioskIfNotLocked.ts +9 -9
  22. package/src/helpers/kiosk/preProcessSharedBulkBuyingData.ts +33 -21
  23. package/src/helpers/kiosk/resolveRoyaltyRule.ts +2 -2
  24. package/src/helpers/kiosk/resolveTransferPolicies.ts +2 -2
  25. package/src/helpers/kiosk/takeAndBorrowNftFromKiosk.ts +2 -2
  26. package/src/helpers/kiosk/takeLockedNftFromKiosk.ts +5 -9
  27. package/src/helpers/originByte/getOBBidderKiosk.ts +4 -7
  28. package/src/helpers/rpc/getAcountBalance.ts +3 -3
  29. package/src/helpers/rpc/getObjectType.ts +8 -4
  30. package/src/methods/acceptCollectionBid/acceptCollectionBid.ts +2 -2
  31. package/src/methods/acceptCollectionBid/addAcceptCollectionBIdTxs.ts +3 -3
  32. package/src/methods/acceptNftBids/acceptNftBids.ts +2 -2
  33. package/src/methods/acceptNftBids/addAcceptNftBidTxs.ts +4 -4
  34. package/src/methods/buyListings/addBuyListingTxs.ts +16 -18
  35. package/src/methods/buyListings/buyListings.ts +2 -2
  36. package/src/methods/cancelNftTransfers/addCancelNftTransfersTx.ts +1 -1
  37. package/src/methods/claimNfts/addClaimNftsTxs.ts +8 -8
  38. package/src/methods/claimNfts/claimNfts.ts +3 -3
  39. package/src/methods/listNfts/addListTxs.ts +2 -2
  40. package/src/methods/listNfts/addRelistTxs.ts +4 -4
  41. package/src/methods/listNfts/listNfts.ts +2 -2
  42. package/src/methods/placeCollectionBids/placeCollectionBids.ts +2 -2
  43. package/src/methods/placeNftBids/addPlaceNftBidTxs.ts +5 -10
  44. package/src/methods/placeNftBids/placeNftBids.ts +2 -2
  45. package/src/methods/relistNft/relistNft.ts +2 -2
  46. package/src/methods/removeCollectionBids/removeCollectionBids.ts +2 -2
  47. package/src/methods/removeNftBids/removeNftBids.ts +2 -2
  48. package/src/methods/transferNfts/addTransferNftTx.ts +16 -7
  49. package/src/methods/transferNfts/transferNfts.ts +2 -2
  50. package/src/methods/unlistListings/addUnlistListingTxs.ts +6 -10
  51. package/src/methods/unlistListings/unlistListings.ts +2 -2
  52. package/src/methods/withdrawProfitsFromKiosks/withdrawProfitsFromKiosks.ts +2 -2
  53. package/src/tests/SuiWallet.ts +19 -15
  54. package/tsconfig.json +2 -1
  55. package/.claude/settings.local.json +0 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.4.67
4
+
5
+ ### Patch Changes
6
+
7
+ - e26b647: transferNfts: don't split the gas coin when no royalty is due in the direct-transfer path. Use `0x2::coin::zero` instead, so the transaction contains no GasCoin argument and can be sponsored (Enoki rejects PTBs that reference GasCoin with "Cannot use GasCoin as a transaction argument").
8
+
3
9
  ## 0.4.17
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -155,6 +155,7 @@ type ApiConfig = {
155
155
  tradeportRouterUrl?: string;
156
156
  apiVercelId?: string;
157
157
  suiNodeUrl?: string;
158
+ suiGraphqlUrl?: string;
158
159
  graphQLClient?: GraphQLClient;
159
160
  };
160
161
  declare class SuiTradingClient {
@@ -164,7 +165,7 @@ declare class SuiTradingClient {
164
165
  private readonly suiClient;
165
166
  private readonly kioskClient;
166
167
  private readonly allowedApiUsersForUnsharedKiosksMigration;
167
- constructor({ apiUser, apiKey, apiVercelId, apiUrl, tradeportRouterUrl, suiNodeUrl, graphQLClient, }: ApiConfig);
168
+ constructor({ apiUser, apiKey, apiVercelId, apiUrl, tradeportRouterUrl, suiNodeUrl, suiGraphqlUrl, graphQLClient, }: ApiConfig);
168
169
  buyListings(args: BuyListings): Promise<Transaction>;
169
170
  listNfts({ nfts, walletAddress, tx }: ListNfts): Promise<Transaction>;
170
171
  unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;