@tradeport/sui-trading-sdk 0.1.58 → 0.1.60

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.1.60
4
+
5
+ ### Patch Changes
6
+
7
+ - 85a223f: Got rid of sharing of kiosks since it doesnt work
8
+
9
+ ## 0.1.59
10
+
11
+ ### Patch Changes
12
+
13
+ - c551d9f: Fixed collections with no transfer policy rules when resolving
14
+
3
15
  ## 0.1.58
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -529,13 +529,6 @@ var kioskTxWrapper = async ({
529
529
  kioskTx.createPersonal(true);
530
530
  }
531
531
  await runCommands(kioskTx);
532
- if (kiosk) {
533
- tx.moveCall({
534
- target: `0x2::transfer::public_share_object`,
535
- typeArguments: ["0x2::kiosk::Kiosk"],
536
- arguments: [tx?.object(kiosk)]
537
- });
538
- }
539
532
  kioskTx.finalize();
540
533
  };
541
534
 
@@ -771,6 +764,15 @@ var resolveTransferPolicies = async ({
771
764
  isCustom: false
772
765
  }
773
766
  ] : [];
767
+ if (!policies?.[0]?.data && transferPolicies.length > 0) {
768
+ policies = [
769
+ {
770
+ data: transferPolicies?.[0],
771
+ transferRequest,
772
+ isCustom: false
773
+ }
774
+ ];
775
+ }
774
776
  if (customTransferPolicies) {
775
777
  for (const customTransferPolicy of customTransferPolicies) {
776
778
  const customPolicy = await kioskClient_default.getTransferPolicies({
@@ -1061,13 +1063,6 @@ async function addTradePortAcceptNftBidTxHandler(txData) {
1061
1063
  if (isOriginByteBid(bidType)) {
1062
1064
  if (isOriginByteTx(txData?.sharedObjects)) {
1063
1065
  await addOriginByteAcceptNftBidTx(txData);
1064
- if (txData?.sellerKiosk) {
1065
- txData?.tx.moveCall({
1066
- target: `0x2::transfer::public_share_object`,
1067
- typeArguments: ["0x2::kiosk::Kiosk"],
1068
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
1069
- });
1070
- }
1071
1066
  return;
1072
1067
  }
1073
1068
  throw new Error(
@@ -1240,13 +1235,6 @@ function addSomisUnlistTx({
1240
1235
  async function addTradePortUnlistTxHandler(txData) {
1241
1236
  if (txData?.listingNonce && isOriginByteTx(txData?.sharedObjects) && !ORIGIN_BYTE_NFT_TYPES_MISSING_ORDERBOOK?.includes(normalizedNftType(txData?.nftType))) {
1242
1237
  addOriginByteUnlistTx(txData);
1243
- if (txData?.sellerKiosk) {
1244
- txData?.tx.moveCall({
1245
- target: `0x2::transfer::public_share_object`,
1246
- typeArguments: ["0x2::kiosk::Kiosk"],
1247
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
1248
- });
1249
- }
1250
1238
  return;
1251
1239
  }
1252
1240
  if (txData?.listingNonce && await isNonKioskListing(txData?.listingNonce)) {
@@ -1271,13 +1259,6 @@ async function addTradePortUnlistTxHandler(txData) {
1271
1259
  async function addHyperspaceUnlistTxHandler(txData) {
1272
1260
  if (txData?.listingNonce && isOriginByteTx(txData?.sharedObjects) && !ORIGIN_BYTE_NFT_TYPES_MISSING_ORDERBOOK?.includes(normalizedNftType(txData?.nftType))) {
1273
1261
  addOriginByteUnlistTx(txData);
1274
- if (txData?.sellerKiosk) {
1275
- txData?.tx.moveCall({
1276
- target: `0x2::transfer::public_share_object`,
1277
- typeArguments: ["0x2::kiosk::Kiosk"],
1278
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
1279
- });
1280
- }
1281
1262
  return;
1282
1263
  }
1283
1264
  return kioskTxWrapper({
@@ -1295,13 +1276,6 @@ async function addHyperspaceUnlistTxHandler(txData) {
1295
1276
  async function addBluemoveUnlistTxHandler(txData) {
1296
1277
  if (txData?.listingNonce && isOriginByteTx(txData?.sharedObjects) && !ORIGIN_BYTE_NFT_TYPES_MISSING_ORDERBOOK?.includes(normalizedNftType(txData?.nftType))) {
1297
1278
  addOriginByteUnlistTx(txData);
1298
- if (txData?.sellerKiosk) {
1299
- txData?.tx.moveCall({
1300
- target: `0x2::transfer::public_share_object`,
1301
- typeArguments: ["0x2::kiosk::Kiosk"],
1302
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
1303
- });
1304
- }
1305
1279
  return;
1306
1280
  }
1307
1281
  if (txData?.sellerKiosk) {
@@ -1506,13 +1480,6 @@ async function addTradePortAcceptCollectionBidTxHandler(txData) {
1506
1480
  if (isOriginByteBid(bidType)) {
1507
1481
  if (isOriginByteTx(txData?.sharedObjects)) {
1508
1482
  await addOriginByteAcceptCollectionBidTx(txData);
1509
- if (txData?.sellerKiosk) {
1510
- txData?.tx.moveCall({
1511
- target: `0x2::transfer::public_share_object`,
1512
- typeArguments: ["0x2::kiosk::Kiosk"],
1513
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
1514
- });
1515
- }
1516
1483
  return;
1517
1484
  }
1518
1485
  throw new Error(
@@ -2536,13 +2503,6 @@ var addTocenBuyTx = ({ tx, nftTokenIds, nftType, price }) => {
2536
2503
  async function addTradePortBuyTxHandler(txData) {
2537
2504
  if (txData?.listingNonce && isOriginByteTx(txData?.sharedObjects)) {
2538
2505
  await addOriginByteBuyTx(txData);
2539
- if (txData?.sellerKiosk) {
2540
- txData?.tx.moveCall({
2541
- target: `0x2::transfer::public_share_object`,
2542
- typeArguments: ["0x2::kiosk::Kiosk"],
2543
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
2544
- });
2545
- }
2546
2506
  return;
2547
2507
  }
2548
2508
  if (txData.listingNonce?.startsWith("0x")) {
@@ -2578,13 +2538,6 @@ async function addTradePortBuyTxHandler(txData) {
2578
2538
  async function addHyperspaceBuyTxHandler(txData) {
2579
2539
  if (txData?.listingNonce && isOriginByteTx(txData?.sharedObjects)) {
2580
2540
  await addOriginByteBuyTx(txData);
2581
- if (txData?.sellerKiosk) {
2582
- txData?.tx.moveCall({
2583
- target: `0x2::transfer::public_share_object`,
2584
- typeArguments: ["0x2::kiosk::Kiosk"],
2585
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
2586
- });
2587
- }
2588
2541
  return;
2589
2542
  }
2590
2543
  return kioskTxWrapper({
@@ -2604,13 +2557,6 @@ async function addHyperspaceBuyTxHandler(txData) {
2604
2557
  async function addBluemoveBuyTxHandler(txData) {
2605
2558
  if (txData?.listingNonce && isOriginByteTx(txData?.sharedObjects)) {
2606
2559
  await addOriginByteBuyTx(txData);
2607
- if (txData?.sellerKiosk) {
2608
- txData?.tx.moveCall({
2609
- target: `0x2::transfer::public_share_object`,
2610
- typeArguments: ["0x2::kiosk::Kiosk"],
2611
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
2612
- });
2613
- }
2614
2560
  return;
2615
2561
  }
2616
2562
  if (txData?.sellerKiosk) {
@@ -3497,13 +3443,6 @@ async function addTradePortKioskListTx({
3497
3443
  async function addTradePortListTxHandler(txData) {
3498
3444
  if (isOriginByteTx(txData?.sharedObjects) && !ORIGIN_BYTE_NFT_TYPES_MISSING_ORDERBOOK?.includes(normalizedNftType(txData?.nftType))) {
3499
3445
  await addOriginByteListTx(txData);
3500
- if (txData?.sellerKiosk) {
3501
- txData?.tx.moveCall({
3502
- target: `0x2::transfer::public_share_object`,
3503
- typeArguments: ["0x2::kiosk::Kiosk"],
3504
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
3505
- });
3506
- }
3507
3446
  return;
3508
3447
  }
3509
3448
  if (!await hasTransferPolicyRules(txData?.nftType) && txData?.sellerKiosk && txData?.nftType !== "0xbf1431324a4a6eadd70e0ac6c5a16f36492f255ed4d011978b2cf34ad738efe6::day_one::DayOne") {
@@ -3617,13 +3556,6 @@ async function relistNft({ tx, nft, listPrice, sharedObjects, walletAddress }) {
3617
3556
  ...txData,
3618
3557
  listPrice
3619
3558
  });
3620
- if (txData?.sellerKiosk) {
3621
- txData?.tx.moveCall({
3622
- target: `0x2::transfer::public_share_object`,
3623
- typeArguments: ["0x2::kiosk::Kiosk"],
3624
- arguments: [txData?.tx?.object(txData?.sellerKiosk)]
3625
- });
3626
- }
3627
3559
  return;
3628
3560
  }
3629
3561
  return kioskTxWrapper({
@@ -4462,13 +4394,6 @@ var transferNfts = async ({ nftIds, recipientAddress, walletAddress }, context)
4462
4394
  const isSenderKioskOriginByte = await isOBKiosk(txData.senderAddress, txData.senderKiosk);
4463
4395
  if (isSenderKioskOriginByte) {
4464
4396
  await addOriginByteTransferNftTx(txData);
4465
- if (txData?.senderKiosk) {
4466
- txData?.tx.moveCall({
4467
- target: `0x2::transfer::public_share_object`,
4468
- typeArguments: ["0x2::kiosk::Kiosk"],
4469
- arguments: [txData?.tx?.object(txData?.senderKiosk)]
4470
- });
4471
- }
4472
4397
  continue;
4473
4398
  }
4474
4399
  await kioskTxWrapper({