@typus/typus-sdk 1.0.95 → 1.0.96
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.
|
@@ -161,7 +161,7 @@ function getTailsIds(provider, nftConfig, kiosks) {
|
|
|
161
161
|
case 1:
|
|
162
162
|
res = _e.sent();
|
|
163
163
|
tails = res.data.items
|
|
164
|
-
.filter(function (item) { return item.type == "".concat(nftConfig.
|
|
164
|
+
.filter(function (item) { return item.type == "".concat(nftConfig.NFT_PACKAGE, "::typus_nft::Tails"); })
|
|
165
165
|
.map(function (item) {
|
|
166
166
|
var t = {
|
|
167
167
|
nftId: item.objectId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransactionBlock } from "@mysten/sui.js";
|
|
1
|
+
import { TransactionArgument, TransactionBlock } from "@mysten/sui.js";
|
|
2
2
|
/**
|
|
3
3
|
entry fun free_mint(
|
|
4
4
|
pool: &mut Pool,
|
|
@@ -17,3 +17,11 @@ export declare function getMintTx(gasBudget: number, nftPackageId: string, pool:
|
|
|
17
17
|
)
|
|
18
18
|
*/
|
|
19
19
|
export declare function getMintToKioskTx(gasBudget: number, nftPackageId: string, pool: string, whitelist_token: string, kiosk: string, kiosk_cap: string): Promise<TransactionBlock>;
|
|
20
|
+
/**
|
|
21
|
+
public fun pay<T>(
|
|
22
|
+
policy: &mut TransferPolicy<T>,
|
|
23
|
+
request: &mut TransferRequest<T>,
|
|
24
|
+
payment: Coin<SUI>
|
|
25
|
+
)
|
|
26
|
+
*/
|
|
27
|
+
export declare function getPayRoyaltyTx(tx: TransactionBlock, nftPackageId: string, policy: string, request: TransactionArgument, coin: any): Promise<TransactionBlock>;
|
|
@@ -36,8 +36,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.getMintToKioskTx = exports.getMintTx = void 0;
|
|
39
|
+
exports.getPayRoyaltyTx = exports.getMintToKioskTx = exports.getMintTx = void 0;
|
|
40
40
|
var sui_js_1 = require("@mysten/sui.js");
|
|
41
|
+
var constants_1 = require("../../constants");
|
|
41
42
|
/**
|
|
42
43
|
entry fun free_mint(
|
|
43
44
|
pool: &mut Pool,
|
|
@@ -53,7 +54,7 @@ function getMintTx(gasBudget, nftPackageId, pool, whitelist_token) {
|
|
|
53
54
|
tx.moveCall({
|
|
54
55
|
target: "".concat(nftPackageId, "::typus_nft::free_mint"),
|
|
55
56
|
typeArguments: [],
|
|
56
|
-
arguments: [tx.object(pool), tx.object(whitelist_token)],
|
|
57
|
+
arguments: [tx.object(pool), tx.object(whitelist_token), tx.object(constants_1.CLOCK)],
|
|
57
58
|
});
|
|
58
59
|
tx.setGasBudget(gasBudget);
|
|
59
60
|
return [2 /*return*/, tx];
|
|
@@ -78,7 +79,7 @@ function getMintToKioskTx(gasBudget, nftPackageId, pool, whitelist_token, kiosk,
|
|
|
78
79
|
tx.moveCall({
|
|
79
80
|
target: "".concat(nftPackageId, "::typus_nft::free_mint_into_kiosk"),
|
|
80
81
|
typeArguments: [],
|
|
81
|
-
arguments: [tx.object(pool), tx.object(whitelist_token), tx.object(kiosk), tx.object(kiosk_cap)],
|
|
82
|
+
arguments: [tx.object(pool), tx.object(whitelist_token), tx.object(kiosk), tx.object(kiosk_cap), tx.object(constants_1.CLOCK)],
|
|
82
83
|
});
|
|
83
84
|
tx.setGasBudget(gasBudget);
|
|
84
85
|
return [2 /*return*/, tx];
|
|
@@ -86,3 +87,23 @@ function getMintToKioskTx(gasBudget, nftPackageId, pool, whitelist_token, kiosk,
|
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
exports.getMintToKioskTx = getMintToKioskTx;
|
|
90
|
+
/**
|
|
91
|
+
public fun pay<T>(
|
|
92
|
+
policy: &mut TransferPolicy<T>,
|
|
93
|
+
request: &mut TransferRequest<T>,
|
|
94
|
+
payment: Coin<SUI>
|
|
95
|
+
)
|
|
96
|
+
*/
|
|
97
|
+
function getPayRoyaltyTx(tx, nftPackageId, policy, request, coin) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
99
|
+
return __generator(this, function (_a) {
|
|
100
|
+
tx.moveCall({
|
|
101
|
+
target: "".concat(nftPackageId, "::royalty_rule::pay"),
|
|
102
|
+
typeArguments: ["".concat(nftPackageId, "::typus_nft::Tails")],
|
|
103
|
+
arguments: [tx.object(policy), request, coin],
|
|
104
|
+
});
|
|
105
|
+
return [2 /*return*/, tx];
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
exports.getPayRoyaltyTx = getPayRoyaltyTx;
|