@tradeport/sui-trading-sdk 0.4.7 → 0.4.9
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/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/helpers/kiosk/kioskTxWrapper.ts +6 -0
- package/src/methods/buyListings/addBuyListingTxs.ts +8 -1
- package/src/methods/claimNfts/claimNfts.ts +9 -0
- package/src/methods/migrateNftsFromUnsharedToSharedKiosks/migrateNftsFromUnsharedToSharedKiosks.ts +1 -0
- package/src/methods/transferNfts/addTransferNftTx.ts +2 -1
- package/src/methods/unlistListings/addUnlistListingTxs.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1443,6 +1443,7 @@ var kioskTxWrapper = async ({
|
|
|
1443
1443
|
shouldConvertToPersonalKiosk,
|
|
1444
1444
|
shouldAssertNftInSharedKiosk,
|
|
1445
1445
|
shouldAllowNftUnsharedKiosk,
|
|
1446
|
+
shouldSkipFinalize,
|
|
1446
1447
|
kioskStrategy,
|
|
1447
1448
|
failIfNoKiosk
|
|
1448
1449
|
}) => {
|
|
@@ -1520,6 +1521,9 @@ var kioskTxWrapper = async ({
|
|
|
1520
1521
|
kioskTx.createPersonal(true);
|
|
1521
1522
|
}
|
|
1522
1523
|
await runCommands(kioskTx);
|
|
1524
|
+
if (!shouldSkipFinalize) {
|
|
1525
|
+
kioskTx.finalize();
|
|
1526
|
+
}
|
|
1523
1527
|
};
|
|
1524
1528
|
|
|
1525
1529
|
// src/helpers/originByte/confirmOBTranfer.ts
|
|
@@ -3732,7 +3736,14 @@ async function addBluemoveKioskBuyTx({
|
|
|
3732
3736
|
transferRequest
|
|
3733
3737
|
});
|
|
3734
3738
|
}
|
|
3735
|
-
async function addSouffl3BuyTx({
|
|
3739
|
+
async function addSouffl3BuyTx({
|
|
3740
|
+
tx,
|
|
3741
|
+
nftType,
|
|
3742
|
+
price,
|
|
3743
|
+
listingNonce,
|
|
3744
|
+
collectionId,
|
|
3745
|
+
transferPolicies
|
|
3746
|
+
}) {
|
|
3736
3747
|
const [coin] = splitCoins({ tx, amounts: [tx.pure.u64(price)] });
|
|
3737
3748
|
const transferPolicyId = getNativeKioskTransferPolicies(transferPolicies)?.at(0)?.id;
|
|
3738
3749
|
if (transferPolicyId && !SOUFFL3_GENERIC_BUY_METHOD_COLLECTIONS?.includes(collectionId)) {
|
|
@@ -4642,6 +4653,7 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
4642
4653
|
kioskTx: globalKioskTx,
|
|
4643
4654
|
shouldConvertToPersonalKiosk: true,
|
|
4644
4655
|
shouldAllowNftUnsharedKiosk: true,
|
|
4656
|
+
shouldSkipFinalize: true,
|
|
4645
4657
|
async runCommands(kioskTx) {
|
|
4646
4658
|
existingKioskTx = kioskTx;
|
|
4647
4659
|
await addBluemoveClaimAcceptedBidNft({
|
|
@@ -4651,6 +4663,7 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
4651
4663
|
});
|
|
4652
4664
|
}
|
|
4653
4665
|
});
|
|
4666
|
+
globalKioskTx = existingKioskTx;
|
|
4654
4667
|
continue;
|
|
4655
4668
|
}
|
|
4656
4669
|
if (useOldClaim) {
|
|
@@ -4663,6 +4676,7 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
4663
4676
|
kioskTx: globalKioskTx,
|
|
4664
4677
|
shouldConvertToPersonalKiosk: true,
|
|
4665
4678
|
shouldAllowNftUnsharedKiosk: true,
|
|
4679
|
+
shouldSkipFinalize: true,
|
|
4666
4680
|
async runCommands(kioskTx) {
|
|
4667
4681
|
existingKioskTx = kioskTx;
|
|
4668
4682
|
await addClaimAcceptedBidNftTx({ ...txData, kioskTx });
|
|
@@ -4678,12 +4692,14 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
4678
4692
|
kioskTx: globalKioskTx,
|
|
4679
4693
|
shouldConvertToPersonalKiosk: true,
|
|
4680
4694
|
shouldAssertNftInSharedKiosk: true,
|
|
4695
|
+
shouldSkipFinalize: true,
|
|
4681
4696
|
async runCommands(kioskTx) {
|
|
4682
4697
|
existingKioskTx = kioskTx;
|
|
4683
4698
|
await addClaimAcceptedBidNftWithPurchaseCapTx({ ...txData, kioskTx });
|
|
4684
4699
|
}
|
|
4685
4700
|
});
|
|
4686
4701
|
}
|
|
4702
|
+
globalKioskTx = existingKioskTx;
|
|
4687
4703
|
continue;
|
|
4688
4704
|
}
|
|
4689
4705
|
if (nft?.chain_state?.claimable_reason === "offer-transfer") {
|
|
@@ -4709,6 +4725,7 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
4709
4725
|
kioskTx: globalKioskTx,
|
|
4710
4726
|
shouldConvertToPersonalKiosk: true,
|
|
4711
4727
|
shouldAllowNftUnsharedKiosk: true,
|
|
4728
|
+
shouldSkipFinalize: true,
|
|
4712
4729
|
async runCommands(kioskTx) {
|
|
4713
4730
|
existingKioskTx = kioskTx;
|
|
4714
4731
|
await addClaimTransferredNftTx({ ...txData, kioskTx });
|
|
@@ -4725,6 +4742,7 @@ var claimNfts = async ({ nftIds, walletAddress, tx: existingTx }, context, useOl
|
|
|
4725
4742
|
kioskTx: globalKioskTx,
|
|
4726
4743
|
shouldConvertToPersonalKiosk: true,
|
|
4727
4744
|
shouldAllowNftUnsharedKiosk: true,
|
|
4745
|
+
shouldSkipFinalize: true,
|
|
4728
4746
|
async runCommands(kioskTx) {
|
|
4729
4747
|
existingKioskTx = kioskTx;
|
|
4730
4748
|
await addClaimTransferredNftWithPurchaseCapTx({ ...txData, kioskTx });
|
|
@@ -5617,6 +5635,7 @@ async function migrateNftsFromUnsharedToSharedKiosks({ walletAddress, max = 50 }
|
|
|
5617
5635
|
kiosk: unsharedNativeKiosk,
|
|
5618
5636
|
kioskStrategy: "exclude",
|
|
5619
5637
|
kioskTx: globalKioskTx,
|
|
5638
|
+
shouldSkipFinalize: true,
|
|
5620
5639
|
shouldConvertToPersonalKiosk: true,
|
|
5621
5640
|
async runCommands(kioskTx) {
|
|
5622
5641
|
existingKioskTx = kioskTx;
|