@tradeport/sui-trading-sdk 0.4.64 → 0.4.66
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/.claude/settings.local.json +5 -0
- package/dist/index.js +34 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +65 -59
- package/src/helpers/kiosk/getRulePackageId.ts +2 -1
- package/src/helpers/kiosk/getTransferPoliciesToResolve.ts +3 -0
- package/src/helpers/kiosk/upgradeKioskRulesPackageId.ts +17 -0
package/dist/index.mjs
CHANGED
|
@@ -1415,6 +1415,14 @@ var getTransferPolicyRuleNamesFromSuiObject = async ({
|
|
|
1415
1415
|
return ruleNames;
|
|
1416
1416
|
};
|
|
1417
1417
|
|
|
1418
|
+
// src/helpers/kiosk/upgradeKioskRulesPackageId.ts
|
|
1419
|
+
import { normalizeSuiAddress } from "@mysten/sui/utils";
|
|
1420
|
+
var KIOSK_RULES_ORIGINAL_PACKAGE_ID = normalizeSuiAddress(
|
|
1421
|
+
"0x434b5bd8f6a7b05fede0ff46c6e511d71ea326ed38056e3bcd681d2d7c2a7879"
|
|
1422
|
+
);
|
|
1423
|
+
var KIOSK_RULES_UPGRADED_PACKAGE_ID = "0xdfb4f1d4e43e0c3ad834dcd369f0d39005c872e118c9dc1c5da9765bb93ee5f3";
|
|
1424
|
+
var upgradeKioskRulesPackageId = (packageId) => normalizeSuiAddress(packageId) === KIOSK_RULES_ORIGINAL_PACKAGE_ID ? KIOSK_RULES_UPGRADED_PACKAGE_ID : packageId;
|
|
1425
|
+
|
|
1418
1426
|
// src/helpers/kiosk/getRulePackageId.ts
|
|
1419
1427
|
var getRulePackageId = async ({
|
|
1420
1428
|
transferPolicies,
|
|
@@ -1448,7 +1456,7 @@ var getRulePackageId = async ({
|
|
|
1448
1456
|
if (!rulePackageId) {
|
|
1449
1457
|
rulePackageId = rule?.split("::")?.[0];
|
|
1450
1458
|
}
|
|
1451
|
-
return addHexPrefix(rulePackageId);
|
|
1459
|
+
return upgradeKioskRulesPackageId(addHexPrefix(rulePackageId));
|
|
1452
1460
|
};
|
|
1453
1461
|
|
|
1454
1462
|
// src/helpers/kiosk/isBluemoveKioskBid.ts
|
|
@@ -1685,6 +1693,7 @@ var getTransferPoliciesToResolve = async ({
|
|
|
1685
1693
|
if (!rulePackageId) {
|
|
1686
1694
|
rulePackageId = ruleData?.rule?.split("::")?.[0];
|
|
1687
1695
|
}
|
|
1696
|
+
rulePackageId = upgradeKioskRulesPackageId(rulePackageId);
|
|
1688
1697
|
const moduleName = ruleData?.rule?.split("::")?.[1];
|
|
1689
1698
|
if (originByteRuleModules.includes(moduleName)) {
|
|
1690
1699
|
throw new Error(
|
|
@@ -5367,8 +5376,8 @@ async function createMultiBid({
|
|
|
5367
5376
|
import { Transaction as Transaction13 } from "@mysten/sui/transactions";
|
|
5368
5377
|
|
|
5369
5378
|
// src/helpers/isExpiredListing.ts
|
|
5370
|
-
import { normalizeSuiAddress } from "@mysten/sui/utils";
|
|
5371
|
-
var isExpiredListing = (listing, walletAddress) => listing.nonce && listing.seller &&
|
|
5379
|
+
import { normalizeSuiAddress as normalizeSuiAddress2 } from "@mysten/sui/utils";
|
|
5380
|
+
var isExpiredListing = (listing, walletAddress) => listing.nonce && listing.seller && normalizeSuiAddress2(listing.seller) === normalizeSuiAddress2(walletAddress);
|
|
5372
5381
|
|
|
5373
5382
|
// src/helpers/validateMinFloorPrice.ts
|
|
5374
5383
|
function validateMinFloorPrice({ transferPolicies, listPrice }) {
|