@tradeport/sui-trading-sdk 0.0.6 → 0.0.7

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 (52) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.d.mts +13 -13
  3. package/dist/index.d.ts +13 -13
  4. package/dist/index.js +609 -660
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +609 -660
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +2 -1
  9. package/src/SuiTradingClient.ts +7 -7
  10. package/src/apiClients/suiClient.ts +1 -1
  11. package/src/helpers/addOneDollarFee.ts +6 -6
  12. package/src/helpers/addThirdPartyTxFee.ts +7 -7
  13. package/src/helpers/destroyZeroCoin.ts +6 -6
  14. package/src/helpers/kiosk/kioskTxWrapper.ts +9 -9
  15. package/src/helpers/kiosk/resolveFloorPriceRule.ts +10 -14
  16. package/src/helpers/kiosk/resolveKioskLockRule.ts +16 -18
  17. package/src/helpers/kiosk/resolvePersonalKioskRule.ts +11 -14
  18. package/src/helpers/kiosk/resolveRoyaltyRule.ts +16 -13
  19. package/src/helpers/kiosk/resolveTransferPolicies.ts +21 -17
  20. package/src/helpers/originByte/confirmOBTranfer.ts +9 -9
  21. package/src/helpers/originByte/createOBKiosk.ts +3 -3
  22. package/src/helpers/originByte/depositNftIntoOBKiosk.ts +6 -4
  23. package/src/helpers/originByte/getOrCreateOBKiosk.ts +3 -3
  24. package/src/helpers/originByte/shareOriginByteKiosk.ts +5 -5
  25. package/src/helpers/splitCoins.ts +4 -4
  26. package/src/methods/acceptCollectionBid/acceptCollectionBid.ts +6 -6
  27. package/src/methods/acceptCollectionBid/addAcceptCollectionBIdTxs.ts +66 -71
  28. package/src/methods/acceptNftBids/acceptNftBids.ts +6 -6
  29. package/src/methods/acceptNftBids/addAcceptNftBidTxs.ts +48 -52
  30. package/src/methods/buyListings/addBuyListingTxs.ts +121 -124
  31. package/src/methods/buyListings/buyListings.ts +8 -8
  32. package/src/methods/claimNfts/addClaimNftsTxs.ts +25 -25
  33. package/src/methods/claimNfts/claimNfts.ts +14 -17
  34. package/src/methods/listNfts/addListTxs.ts +34 -34
  35. package/src/methods/listNfts/addRelistTxs.ts +17 -17
  36. package/src/methods/listNfts/listNfts.ts +8 -9
  37. package/src/methods/placeCollectionBids/addPlaceCollectionBidTxs.ts +34 -34
  38. package/src/methods/placeCollectionBids/placeCollectionBids.ts +8 -8
  39. package/src/methods/placeNftBids/addPlaceNftBidTxs.ts +35 -35
  40. package/src/methods/placeNftBids/placeNftBids.ts +6 -9
  41. package/src/methods/relistNft/relistNft.ts +6 -6
  42. package/src/methods/removeCollectionBid/addRemoveCollectionBidTxs.ts +14 -21
  43. package/src/methods/removeCollectionBid/removeCollectionBid.ts +6 -8
  44. package/src/methods/removeNftBids/addRemoveNftBidTxs.ts +19 -24
  45. package/src/methods/removeNftBids/removeNftBids.ts +6 -6
  46. package/src/methods/transferNfts/addTransferNftTx.ts +17 -21
  47. package/src/methods/transferNfts/transferNfts.ts +12 -12
  48. package/src/methods/unlistListings/addUnlistListingTxs.ts +50 -50
  49. package/src/methods/unlistListings/unlistListings.ts +6 -6
  50. package/src/methods/withdrawKioskProfits/withdrawKioskProfits.ts +6 -6
  51. package/src/tests/SuiWallet.ts +4 -4
  52. package/src/utils/printTxBlockTxs.ts +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - b9a9e83: Migrated to use @mysten/sui instead of @mysten/sui.js to be compabile with @mysten/dapp-kit
8
+
3
9
  ## 0.0.6
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { TransactionBlock } from '@mysten/sui.js/transactions';
1
+ import { Transaction } from '@mysten/sui/transactions';
2
2
 
3
3
  type AcceptCollectionBid = {
4
4
  bidId: string;
@@ -73,18 +73,18 @@ type ApiConfig = {
73
73
  };
74
74
  declare class SuiTradingClient {
75
75
  constructor({ apiUser, apiKey }: ApiConfig);
76
- buyListings({ listingIds, walletAddress }: BuyListings): Promise<TransactionBlock>;
77
- listNfts({ nfts, walletAddress }: ListNfts): Promise<TransactionBlock>;
78
- unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<TransactionBlock>;
79
- placeNftBids({ nfts, walletAddress }: PlaceNftBids): Promise<TransactionBlock>;
80
- removeNftBids({ bidIds }: RemoveNftBids): Promise<TransactionBlock>;
81
- acceptNftBids({ bidIds }: AcceptNftBids): Promise<TransactionBlock>;
82
- placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, }: PlaceCollectionBid): Promise<TransactionBlock>;
83
- acceptCollectionBid({ bidId, nftId, walletAddress }: AcceptCollectionBid): Promise<TransactionBlock>;
84
- removeCollectionBid({ bidId }: RemoveCollectionBid): Promise<TransactionBlock>;
85
- transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<TransactionBlock>;
86
- claimNfts({ nftIds, walletAddress }: ClaimNfts): Promise<TransactionBlock>;
87
- withdrawKioskProfits({ amount, walletAddress }: WithdrawKioskProfits): Promise<TransactionBlock>;
76
+ buyListings({ listingIds, walletAddress }: BuyListings): Promise<Transaction>;
77
+ listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
78
+ unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;
79
+ placeNftBids({ nfts, walletAddress }: PlaceNftBids): Promise<Transaction>;
80
+ removeNftBids({ bidIds }: RemoveNftBids): Promise<Transaction>;
81
+ acceptNftBids({ bidIds }: AcceptNftBids): Promise<Transaction>;
82
+ placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, }: PlaceCollectionBid): Promise<Transaction>;
83
+ acceptCollectionBid({ bidId, nftId, walletAddress }: AcceptCollectionBid): Promise<Transaction>;
84
+ removeCollectionBid({ bidId }: RemoveCollectionBid): Promise<Transaction>;
85
+ transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
86
+ claimNfts({ nftIds, walletAddress }: ClaimNfts): Promise<Transaction>;
87
+ withdrawKioskProfits({ amount, walletAddress }: WithdrawKioskProfits): Promise<Transaction>;
88
88
  }
89
89
 
90
90
  export { SuiTradingClient };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { TransactionBlock } from '@mysten/sui.js/transactions';
1
+ import { Transaction } from '@mysten/sui/transactions';
2
2
 
3
3
  type AcceptCollectionBid = {
4
4
  bidId: string;
@@ -73,18 +73,18 @@ type ApiConfig = {
73
73
  };
74
74
  declare class SuiTradingClient {
75
75
  constructor({ apiUser, apiKey }: ApiConfig);
76
- buyListings({ listingIds, walletAddress }: BuyListings): Promise<TransactionBlock>;
77
- listNfts({ nfts, walletAddress }: ListNfts): Promise<TransactionBlock>;
78
- unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<TransactionBlock>;
79
- placeNftBids({ nfts, walletAddress }: PlaceNftBids): Promise<TransactionBlock>;
80
- removeNftBids({ bidIds }: RemoveNftBids): Promise<TransactionBlock>;
81
- acceptNftBids({ bidIds }: AcceptNftBids): Promise<TransactionBlock>;
82
- placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, }: PlaceCollectionBid): Promise<TransactionBlock>;
83
- acceptCollectionBid({ bidId, nftId, walletAddress }: AcceptCollectionBid): Promise<TransactionBlock>;
84
- removeCollectionBid({ bidId }: RemoveCollectionBid): Promise<TransactionBlock>;
85
- transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<TransactionBlock>;
86
- claimNfts({ nftIds, walletAddress }: ClaimNfts): Promise<TransactionBlock>;
87
- withdrawKioskProfits({ amount, walletAddress }: WithdrawKioskProfits): Promise<TransactionBlock>;
76
+ buyListings({ listingIds, walletAddress }: BuyListings): Promise<Transaction>;
77
+ listNfts({ nfts, walletAddress }: ListNfts): Promise<Transaction>;
78
+ unlistListings({ listingIds, walletAddress }: UnlistListings): Promise<Transaction>;
79
+ placeNftBids({ nfts, walletAddress }: PlaceNftBids): Promise<Transaction>;
80
+ removeNftBids({ bidIds }: RemoveNftBids): Promise<Transaction>;
81
+ acceptNftBids({ bidIds }: AcceptNftBids): Promise<Transaction>;
82
+ placeCollectionBid({ collectionId, bidAmountInMist, numOfBids, walletAddress, }: PlaceCollectionBid): Promise<Transaction>;
83
+ acceptCollectionBid({ bidId, nftId, walletAddress }: AcceptCollectionBid): Promise<Transaction>;
84
+ removeCollectionBid({ bidId }: RemoveCollectionBid): Promise<Transaction>;
85
+ transferNfts({ nftIds, recipientAddress, walletAddress }: TransferNfts): Promise<Transaction>;
86
+ claimNfts({ nftIds, walletAddress }: ClaimNfts): Promise<Transaction>;
87
+ withdrawKioskProfits({ amount, walletAddress }: WithdrawKioskProfits): Promise<Transaction>;
88
88
  }
89
89
 
90
90
  export { SuiTradingClient };