@typus/typus-sdk 1.1.38 → 1.1.39
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.
|
@@ -72,7 +72,7 @@ export declare function getLevelUpTx(gasBudget: number, nftPackageId: string, re
|
|
|
72
72
|
ctx: &mut TxContext
|
|
73
73
|
)
|
|
74
74
|
*/
|
|
75
|
-
export declare function consumeExpCoinUnstakedTx(gasBudget: number, nftPackageId: string, typeArguments: string[], registry: string, kiosk: string, kiosk_cap: string, nft_id: string, exp_coins: string[]): Promise<TransactionBlock>;
|
|
75
|
+
export declare function consumeExpCoinUnstakedTx(gasBudget: number, nftPackageId: string, typeArguments: string[], registry: string, kiosk: string, kiosk_cap: string, nft_id: string, exp_coins: string[], amount: string): Promise<TransactionBlock>;
|
|
76
76
|
/**
|
|
77
77
|
entry fun consume_exp_coin_staked<EXP_COIN>(
|
|
78
78
|
registry: &mut Registry,
|
|
@@ -80,4 +80,4 @@ export declare function consumeExpCoinUnstakedTx(gasBudget: number, nftPackageId
|
|
|
80
80
|
ctx: &mut TxContext
|
|
81
81
|
)
|
|
82
82
|
*/
|
|
83
|
-
export declare function consumeExpCoinStakedTx(gasBudget: number, nftPackageId: string, typeArguments: string[], registry: string, exp_coins: string[]): Promise<TransactionBlock>;
|
|
83
|
+
export declare function consumeExpCoinStakedTx(gasBudget: number, nftPackageId: string, typeArguments: string[], registry: string, exp_coins: string[], amount: string): Promise<TransactionBlock>;
|
|
@@ -407,19 +407,20 @@ exports.getLevelUpTx = getLevelUpTx;
|
|
|
407
407
|
ctx: &mut TxContext
|
|
408
408
|
)
|
|
409
409
|
*/
|
|
410
|
-
function consumeExpCoinUnstakedTx(gasBudget, nftPackageId, typeArguments, registry, kiosk, kiosk_cap, nft_id, exp_coins) {
|
|
410
|
+
function consumeExpCoinUnstakedTx(gasBudget, nftPackageId, typeArguments, registry, kiosk, kiosk_cap, nft_id, exp_coins, amount) {
|
|
411
411
|
return __awaiter(this, void 0, void 0, function () {
|
|
412
|
-
var tx, coin;
|
|
413
|
-
return __generator(this, function (
|
|
412
|
+
var tx, coin, _a, input_coin;
|
|
413
|
+
return __generator(this, function (_b) {
|
|
414
414
|
tx = new sui_js_1.TransactionBlock();
|
|
415
415
|
coin = exp_coins.pop();
|
|
416
416
|
if (exp_coins.length > 0) {
|
|
417
417
|
tx.mergeCoins(tx.object(coin), exp_coins.map(function (id) { return tx.object(id); }));
|
|
418
418
|
}
|
|
419
|
+
_a = __read(tx.splitCoins(tx.object(coin), [tx.pure(amount)]), 1), input_coin = _a[0];
|
|
419
420
|
tx.moveCall({
|
|
420
421
|
target: "".concat(nftPackageId, "::tails_staking::consume_exp_coin_unstaked"),
|
|
421
422
|
typeArguments: typeArguments,
|
|
422
|
-
arguments: [tx.object(registry), tx.object(kiosk), tx.object(kiosk_cap), tx.pure(nft_id),
|
|
423
|
+
arguments: [tx.object(registry), tx.object(kiosk), tx.object(kiosk_cap), tx.pure(nft_id), input_coin],
|
|
423
424
|
});
|
|
424
425
|
tx.setGasBudget(gasBudget);
|
|
425
426
|
return [2 /*return*/, tx];
|
|
@@ -434,19 +435,20 @@ exports.consumeExpCoinUnstakedTx = consumeExpCoinUnstakedTx;
|
|
|
434
435
|
ctx: &mut TxContext
|
|
435
436
|
)
|
|
436
437
|
*/
|
|
437
|
-
function consumeExpCoinStakedTx(gasBudget, nftPackageId, typeArguments, registry, exp_coins) {
|
|
438
|
+
function consumeExpCoinStakedTx(gasBudget, nftPackageId, typeArguments, registry, exp_coins, amount) {
|
|
438
439
|
return __awaiter(this, void 0, void 0, function () {
|
|
439
|
-
var tx, coin;
|
|
440
|
-
return __generator(this, function (
|
|
440
|
+
var tx, coin, _a, input_coin;
|
|
441
|
+
return __generator(this, function (_b) {
|
|
441
442
|
tx = new sui_js_1.TransactionBlock();
|
|
442
443
|
coin = exp_coins.pop();
|
|
443
444
|
if (exp_coins.length > 0) {
|
|
444
445
|
tx.mergeCoins(tx.object(coin), exp_coins.map(function (id) { return tx.object(id); }));
|
|
445
446
|
}
|
|
447
|
+
_a = __read(tx.splitCoins(tx.object(coin), [tx.pure(amount)]), 1), input_coin = _a[0];
|
|
446
448
|
tx.moveCall({
|
|
447
449
|
target: "".concat(nftPackageId, "::tails_staking::consume_exp_coin_staked"),
|
|
448
450
|
typeArguments: typeArguments,
|
|
449
|
-
arguments: [tx.object(registry),
|
|
451
|
+
arguments: [tx.object(registry), input_coin],
|
|
450
452
|
});
|
|
451
453
|
tx.setGasBudget(gasBudget);
|
|
452
454
|
return [2 /*return*/, tx];
|