@typus/typus-sdk 1.2.35 → 1.2.36-exp
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/lib/mainnet.json +4 -3
- package/lib/utils/leader-board.js +2 -2
- package/lib/utils/nft-staking/authorized-entry.d.ts +3 -2
- package/lib/utils/nft-staking/authorized-entry.js +22 -6
- package/lib/utils/nft-staking/user-entry.d.ts +1 -1
- package/lib/utils/nft-staking/user-entry.js +2 -2
- package/package.json +1 -1
package/lib/mainnet.json
CHANGED
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"SCALLOP_MARKET": "0xa757975255146dc9686aa823b7838b507f315d704f428cbadad2f4ea061939d9",
|
|
31
31
|
"SCALLOP_REWARD_POOL_FOR_SUI": "0x162250ef72393a4ad3d46294c4e1bdfcb03f04c869d390e7efbfc995353a7ee9",
|
|
32
32
|
"SCALLOP_REWARD_POOL_FOR_USDC": "0xf4268cc9b9413b9bfe09e8966b8de650494c9e5784bf0930759cfef4904daff8",
|
|
33
|
-
"VERSION": "2.12
|
|
33
|
+
"VERSION": "2.18.12",
|
|
34
34
|
"EXP_GUESS_PACKAGE": "0x32d670520a10a87b8c042d2259c2d1f7c319329bafcf6f893ad9aaf01a43db8b",
|
|
35
35
|
"EXP_GUESS_PACKAGE_ORIGIN": "0x32d670520a10a87b8c042d2259c2d1f7c319329bafcf6f893ad9aaf01a43db8b",
|
|
36
36
|
"EXP_GUESS_REGISTRY": "0x70c6cbe6764b315cee1b24f483a0fc8307f047f1fab2a0d4438624845e6ba3f2",
|
|
37
37
|
"FRAMEWORK_PACKAGE": "0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274",
|
|
38
|
-
"SINGLE_COLLATERAL_PACKAGE": "
|
|
38
|
+
"SINGLE_COLLATERAL_PACKAGE": "0x05b81d86deb99c33a46042ee92a0e6665cea64dffa3ad23a114ce08f449b8bdb",
|
|
39
39
|
"SINGLE_COLLATERAL_PACKAGE_ORIGIN": "0x321848bf1ae327a9e022ccb3701940191e02fa193ab160d9c0e49cd3c003de3a",
|
|
40
40
|
"SINGLE_COLLATERAL_REGISTRY": "0x3d70b09359e3ca8301ae0abeda4f2fdf72ce313ba58c919ce568e5f535fd2ea8",
|
|
41
41
|
"SINGLE_COLLATERAL_PORTFOLIO_VAULT_REGISTRY": "0xa1a186d050e3172ef4701c16048c99b11f785969874fa2642b9cbcf59cde7fc0",
|
|
@@ -65,5 +65,6 @@
|
|
|
65
65
|
"sui_network": "0xed5f3eebda1be7cd74ebb883852738996ea4b7d651eb1b5a77bb5d7f221b5b2a",
|
|
66
66
|
"mysten_labs": "0x985a37095c597ecfa072b0f389df689ee4d9c99bcf4b175aa53be52e2e5f25b8",
|
|
67
67
|
"none": "0x88dba869e789d0725ae55fbb446f6e38065b67e1f26b10ec57322b18f4de9892",
|
|
68
|
-
"diceProfitSharing": "0x42ba35a057e38baf19e916b0f9ad5d98bb23b7fc246b4d659fc21c608790e872"
|
|
68
|
+
"diceProfitSharing": "0x42ba35a057e38baf19e916b0f9ad5d98bb23b7fc246b4d659fc21c608790e872",
|
|
69
|
+
"STRATEGY_POOL": "0x2c60ddd50d76beb00faa025962d566359a6ea05b1f7f19ac6bd050f4db8c885c"
|
|
69
70
|
}
|
|
@@ -281,8 +281,8 @@ function getExpLeaderBoard(startTimestamp, endTimestamp) {
|
|
|
281
281
|
_endTimestamp = endTimestamp ? endTimestamp : "99999999999";
|
|
282
282
|
requestData = {
|
|
283
283
|
sqlQuery: {
|
|
284
|
-
sql: "SELECT S.distinct_id
|
|
285
|
-
size:
|
|
284
|
+
sql: "SELECT S.distinct_id AS address, SUM(E.exp_earn) AS total_exp_earn\n FROM ExpUp E\n JOIN (\n SELECT number, distinct_id\n FROM StakeNft\n WHERE (number, timestamp) IN (\n SELECT number, MAX(timestamp) AS max_timestamp\n FROM StakeNft\n GROUP BY number\n )\n ) S ON E.number = S.number\n WHERE E.timestamp >= ".concat(startTimestamp, " && E.timestamp < ").concat(endTimestamp, "\n GROUP BY address\n ORDER BY total_exp_earn DESC;"),
|
|
285
|
+
size: 100,
|
|
286
286
|
},
|
|
287
287
|
};
|
|
288
288
|
jsonData = JSON.stringify(requestData);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
2
|
-
export declare function getSetProfitSharingTx(gasBudget: number, packageId: string, registry: string, level_profits: number[], amount: number, coins: string[], typeArguments: string[]): Promise<TransactionBlock>;
|
|
2
|
+
export declare function getSetProfitSharingTx(gasBudget: number, packageId: string, registry: string, name: "dice_profit_sharing" | "exp_profit_sharing", level_profits: number[], amount: number, coins: string[], typeArguments: string[]): Promise<TransactionBlock>;
|
|
3
3
|
export declare function getAllocateProfitSharingTx(gasBudget: number, packageId: string, registry: string, users: string[], typeArguments: string[]): Promise<TransactionBlock>;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function getAllocateProfitSharingValueTx(gasBudget: number, packageId: string, registry: string, users: string[], values: string[], typeArguments: string[]): Promise<TransactionBlock>;
|
|
5
|
+
export declare function getRemoveProfitSharingTx(gasBudget: number, packageId: string, registry: string, name: "dice_profit_sharing" | "exp_profit_sharing", typeArgumentsRemove: string[]): Promise<TransactionBlock>;
|
|
@@ -52,9 +52,9 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
52
52
|
return ar;
|
|
53
53
|
};
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
-
exports.getRemoveProfitSharingTx = exports.getAllocateProfitSharingTx = exports.getSetProfitSharingTx = void 0;
|
|
55
|
+
exports.getRemoveProfitSharingTx = exports.getAllocateProfitSharingValueTx = exports.getAllocateProfitSharingTx = exports.getSetProfitSharingTx = void 0;
|
|
56
56
|
var transactions_1 = require("@mysten/sui.js/transactions");
|
|
57
|
-
function getSetProfitSharingTx(gasBudget, packageId, registry, level_profits, amount, coins, typeArguments) {
|
|
57
|
+
function getSetProfitSharingTx(gasBudget, packageId, registry, name, level_profits, amount, coins, typeArguments) {
|
|
58
58
|
return __awaiter(this, void 0, void 0, function () {
|
|
59
59
|
var tx, _a, input_coin, coin, _b, input_coin;
|
|
60
60
|
return __generator(this, function (_c) {
|
|
@@ -65,7 +65,7 @@ function getSetProfitSharingTx(gasBudget, packageId, registry, level_profits, am
|
|
|
65
65
|
tx.moveCall({
|
|
66
66
|
target: "".concat(packageId, "::tails_staking::set_profit_sharing"),
|
|
67
67
|
typeArguments: typeArguments,
|
|
68
|
-
arguments: [tx.object(registry), tx.pure(level_profits), input_coin],
|
|
68
|
+
arguments: [tx.object(registry), tx.pure(name), tx.pure(level_profits), input_coin],
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
@@ -77,7 +77,7 @@ function getSetProfitSharingTx(gasBudget, packageId, registry, level_profits, am
|
|
|
77
77
|
tx.moveCall({
|
|
78
78
|
target: "".concat(packageId, "::tails_staking::set_profit_sharing"),
|
|
79
79
|
typeArguments: typeArguments,
|
|
80
|
-
arguments: [tx.object(registry), tx.pure(level_profits), input_coin],
|
|
80
|
+
arguments: [tx.object(registry), tx.pure(name), tx.pure(level_profits), input_coin],
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
tx.setGasBudget(gasBudget);
|
|
@@ -102,7 +102,23 @@ function getAllocateProfitSharingTx(gasBudget, packageId, registry, users, typeA
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
exports.getAllocateProfitSharingTx = getAllocateProfitSharingTx;
|
|
105
|
-
function
|
|
105
|
+
function getAllocateProfitSharingValueTx(gasBudget, packageId, registry, users, values, typeArguments) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
+
var tx;
|
|
108
|
+
return __generator(this, function (_a) {
|
|
109
|
+
tx = new transactions_1.TransactionBlock();
|
|
110
|
+
tx.moveCall({
|
|
111
|
+
target: "".concat(packageId, "::tails_staking::allocate_profit_sharing_w_value"),
|
|
112
|
+
typeArguments: typeArguments,
|
|
113
|
+
arguments: [tx.object(registry), tx.pure(users), tx.pure(values)],
|
|
114
|
+
});
|
|
115
|
+
tx.setGasBudget(gasBudget);
|
|
116
|
+
return [2 /*return*/, tx];
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
exports.getAllocateProfitSharingValueTx = getAllocateProfitSharingValueTx;
|
|
121
|
+
function getRemoveProfitSharingTx(gasBudget, packageId, registry, name, typeArgumentsRemove) {
|
|
106
122
|
return __awaiter(this, void 0, void 0, function () {
|
|
107
123
|
var tx;
|
|
108
124
|
return __generator(this, function (_a) {
|
|
@@ -110,7 +126,7 @@ function getRemoveProfitSharingTx(gasBudget, packageId, registry, typeArgumentsR
|
|
|
110
126
|
tx.moveCall({
|
|
111
127
|
target: "".concat(packageId, "::tails_staking::remove_profit_sharing"),
|
|
112
128
|
typeArguments: typeArgumentsRemove,
|
|
113
|
-
arguments: [tx.object(registry)],
|
|
129
|
+
arguments: [tx.object(registry), tx.pure(name)],
|
|
114
130
|
});
|
|
115
131
|
tx.setGasBudget(gasBudget);
|
|
116
132
|
return [2 /*return*/, tx];
|
|
@@ -83,4 +83,4 @@ export declare function consumeExpCoinUnstakedTx(gasBudget: number, nftPackageId
|
|
|
83
83
|
)
|
|
84
84
|
*/
|
|
85
85
|
export declare function consumeExpCoinStakedTx(gasBudget: number, nftPackageId: string, typeArguments: string[], registry: string, exp_coins: string[], amount: string): Promise<TransactionBlock>;
|
|
86
|
-
export declare function getClaimProfitSharingTx(gasBudget: number, packageId: string, registry: string, typeArguments: string[]): Promise<TransactionBlock>;
|
|
86
|
+
export declare function getClaimProfitSharingTx(gasBudget: number, packageId: string, registry: string, name: "dice_profit" | "exp_profit", typeArguments: string[]): Promise<TransactionBlock>;
|
|
@@ -496,7 +496,7 @@ function consumeExpCoinStakedTx(gasBudget, nftPackageId, typeArguments, registry
|
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
498
|
exports.consumeExpCoinStakedTx = consumeExpCoinStakedTx;
|
|
499
|
-
function getClaimProfitSharingTx(gasBudget, packageId, registry, typeArguments) {
|
|
499
|
+
function getClaimProfitSharingTx(gasBudget, packageId, registry, name, typeArguments) {
|
|
500
500
|
return __awaiter(this, void 0, void 0, function () {
|
|
501
501
|
var tx;
|
|
502
502
|
return __generator(this, function (_a) {
|
|
@@ -504,7 +504,7 @@ function getClaimProfitSharingTx(gasBudget, packageId, registry, typeArguments)
|
|
|
504
504
|
tx.moveCall({
|
|
505
505
|
target: "".concat(packageId, "::tails_staking::claim_profit_sharing"),
|
|
506
506
|
typeArguments: typeArguments,
|
|
507
|
-
arguments: [tx.object(registry)],
|
|
507
|
+
arguments: [tx.object(registry), tx.pure(name)],
|
|
508
508
|
});
|
|
509
509
|
tx.setGasBudget(gasBudget);
|
|
510
510
|
return [2 /*return*/, tx];
|