@typus/typus-sdk 1.1.39 → 1.1.40

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.
Files changed (45) hide show
  1. package/lib/constants.d.ts +2 -2
  2. package/lib/constants.js +3 -4
  3. package/lib/utils/mint.d.ts +1 -1
  4. package/lib/utils/mint.js +2 -2
  5. package/lib/utils/nft-staking/authorized-entry.d.ts +1 -1
  6. package/lib/utils/nft-staking/authorized-entry.js +4 -4
  7. package/lib/utils/nft-staking/fetch.d.ts +2 -2
  8. package/lib/utils/nft-staking/user-entry.d.ts +4 -2
  9. package/lib/utils/nft-staking/user-entry.js +37 -27
  10. package/lib/utils/tails-exp-dice/fetch.d.ts +4 -4
  11. package/lib/utils/tails-exp-dice/user-entry.d.ts +1 -1
  12. package/lib/utils/tails-exp-dice/user-entry.js +4 -4
  13. package/lib/utils/token.js +2 -2
  14. package/lib/utils/typus-dov-double/authorized-entry.d.ts +1 -1
  15. package/lib/utils/typus-dov-double/authorized-entry.js +8 -8
  16. package/lib/utils/typus-dov-double/manager-entry.d.ts +1 -1
  17. package/lib/utils/typus-dov-double/manager-entry.js +19 -19
  18. package/lib/utils/typus-dov-double/portfolio-vault.d.ts +2 -2
  19. package/lib/utils/typus-dov-double/portfolio-vault.js +6 -2
  20. package/lib/utils/typus-dov-double/user-entry.d.ts +1 -1
  21. package/lib/utils/typus-dov-double/user-entry.js +10 -10
  22. package/lib/utils/typus-dov-double/view-function.d.ts +4 -4
  23. package/lib/utils/typus-dov-double/view-function.js +4 -4
  24. package/lib/utils/typus-dov-single/portfolio-vault.d.ts +3 -3
  25. package/lib/utils/typus-dov-single/registry.d.ts +3 -3
  26. package/lib/utils/typus-dov-single/user-entry.d.ts +1 -1
  27. package/lib/utils/typus-dov-single/user-entry.js +12 -12
  28. package/lib/utils/typus-dov-single/user-history.d.ts +2 -2
  29. package/lib/utils/typus-dov-single/view-function.d.ts +8 -8
  30. package/lib/utils/typus-dov-single/view-function.js +8 -8
  31. package/lib/utils/typus-dov-single-v2/authorized-entry.d.ts +1 -1
  32. package/lib/utils/typus-dov-single-v2/authorized-entry.js +3 -3
  33. package/lib/utils/typus-dov-single-v2/leaderboard.d.ts +4 -16
  34. package/lib/utils/typus-dov-single-v2/leaderboard.js +12 -0
  35. package/lib/utils/typus-dov-single-v2/user-entry.d.ts +14 -1
  36. package/lib/utils/typus-dov-single-v2/user-entry.js +67 -12
  37. package/lib/utils/typus-dov-single-v2/user-history.d.ts +2 -2
  38. package/lib/utils/typus-dov-single-v2/view-function.d.ts +7 -7
  39. package/lib/utils/typus-dov-single-v2/view-function.js +7 -7
  40. package/lib/utils/typus-framework/dutch.d.ts +2 -2
  41. package/lib/utils/typus-nft/fetch.d.ts +6 -6
  42. package/lib/utils/typus-nft/fetch.js +8 -4
  43. package/lib/utils/typus-nft/user-entry.d.ts +1 -1
  44. package/lib/utils/typus-nft/user-entry.js +3 -3
  45. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { Connection } from "@mysten/sui.js";
1
+ import { SuiClient } from "@mysten/sui.js/client";
2
2
  export declare const CLOCK = "0x6";
3
3
  export declare const SENDER = "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
4
4
  export declare const PRICE_DECIMAL = 8;
@@ -12,7 +12,7 @@ export declare const TOKEN_NAME_TO_MODULE: {
12
12
  SUI: string;
13
13
  USDC: string;
14
14
  };
15
- export declare const testnetConnection: Connection;
15
+ export declare const testnetConnection: SuiClient;
16
16
  export declare const ACTIVE_SUB_VAULT_TAG: number;
17
17
  export declare const DEACTIVATING_SUB_VAULT_TAG: number;
18
18
  export declare const INACTIVE_SUB_VAULT_TAG: number;
package/lib/constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PERFORMANCE_FEE_SUB_VAULT_TAG = exports.PREMIUM_SUB_VAULT_TAG = exports.BIDDER_SUB_VAULT_TAG = exports.WARMUP_SUB_VAULT_TAG = exports.INACTIVE_SUB_VAULT_TAG = exports.DEACTIVATING_SUB_VAULT_TAG = exports.ACTIVE_SUB_VAULT_TAG = exports.testnetConnection = exports.TOKEN_NAME_TO_MODULE = exports.TOKEN_NAME = exports.FAKE_TOKEN_TYPE_ARGUMENT = exports.DEFAULT_TYPE_ARGUMENT = exports.TOKEN_DECIMAL = exports.PRICE_DECIMAL = exports.SENDER = exports.CLOCK = void 0;
4
- var sui_js_1 = require("@mysten/sui.js");
4
+ var client_1 = require("@mysten/sui.js/client");
5
5
  exports.CLOCK = "0x6";
6
6
  exports.SENDER = "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
7
7
  exports.PRICE_DECIMAL = 8;
@@ -15,9 +15,8 @@ exports.TOKEN_NAME_TO_MODULE = {
15
15
  SUI: "sui",
16
16
  USDC: "usdc",
17
17
  };
18
- exports.testnetConnection = new sui_js_1.Connection({
19
- fullnode: "https://fullnode.testnet.sui.io:443/",
20
- faucet: "https://faucet.testnet.sui.io/gas",
18
+ exports.testnetConnection = new client_1.SuiClient({
19
+ url: "https://fullnode.testnet.sui.io:443/",
21
20
  });
22
21
  exports.ACTIVE_SUB_VAULT_TAG = 0;
23
22
  exports.DEACTIVATING_SUB_VAULT_TAG = 1;
@@ -1,2 +1,2 @@
1
- import { TransactionBlock } from "@mysten/sui.js";
1
+ import { TransactionBlock } from "@mysten/sui.js/transactions";
2
2
  export declare function getMintTx(gasBudget: number, packageId: string, registry: string, moduleName: string, amount: number): Promise<TransactionBlock>;
package/lib/utils/mint.js CHANGED
@@ -37,12 +37,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.getMintTx = void 0;
40
- var sui_js_1 = require("@mysten/sui.js");
40
+ var transactions_1 = require("@mysten/sui.js/transactions");
41
41
  function getMintTx(gasBudget, packageId, registry, moduleName, amount) {
42
42
  return __awaiter(this, void 0, void 0, function () {
43
43
  var tx;
44
44
  return __generator(this, function (_a) {
45
- tx = new sui_js_1.TransactionBlock();
45
+ tx = new transactions_1.TransactionBlock();
46
46
  tx.moveCall({
47
47
  target: "".concat(packageId, "::").concat(moduleName, "::mint"),
48
48
  arguments: [tx.pure(registry), tx.pure(amount)],
@@ -1,4 +1,4 @@
1
- import { TransactionBlock } from "@mysten/sui.js";
1
+ import { TransactionBlock } from "@mysten/sui.js/transactions";
2
2
  export declare function getSetProfitSharingTx(gasBudget: number, packageId: string, registry: string, level_profits: number[], amount: number): Promise<TransactionBlock>;
3
3
  export declare function getAllocateProfitSharingTx(gasBudget: number, packageId: string, registry: string, users: string[]): Promise<TransactionBlock>;
4
4
  export declare function getClaimProfitSharingTx(gasBudget: number, packageId: string, registry: string): Promise<TransactionBlock>;
@@ -53,12 +53,12 @@ var __read = (this && this.__read) || function (o, n) {
53
53
  };
54
54
  Object.defineProperty(exports, "__esModule", { value: true });
55
55
  exports.getClaimProfitSharingTx = exports.getAllocateProfitSharingTx = exports.getSetProfitSharingTx = void 0;
56
- var sui_js_1 = require("@mysten/sui.js");
56
+ var transactions_1 = require("@mysten/sui.js/transactions");
57
57
  function getSetProfitSharingTx(gasBudget, packageId, registry, level_profits, amount) {
58
58
  return __awaiter(this, void 0, void 0, function () {
59
59
  var tx, _a, coin;
60
60
  return __generator(this, function (_b) {
61
- tx = new sui_js_1.TransactionBlock();
61
+ tx = new transactions_1.TransactionBlock();
62
62
  _a = __read(tx.splitCoins(tx.gas, [tx.pure(amount)]), 1), coin = _a[0];
63
63
  tx.moveCall({
64
64
  target: "".concat(packageId, "::tails_staking::set_profit_sharing"),
@@ -75,7 +75,7 @@ function getAllocateProfitSharingTx(gasBudget, packageId, registry, users) {
75
75
  return __awaiter(this, void 0, void 0, function () {
76
76
  var tx;
77
77
  return __generator(this, function (_a) {
78
- tx = new sui_js_1.TransactionBlock();
78
+ tx = new transactions_1.TransactionBlock();
79
79
  tx.moveCall({
80
80
  target: "".concat(packageId, "::tails_staking::allocate_profit_sharing"),
81
81
  typeArguments: ["0x2::sui::SUI"],
@@ -91,7 +91,7 @@ function getClaimProfitSharingTx(gasBudget, packageId, registry) {
91
91
  return __awaiter(this, void 0, void 0, function () {
92
92
  var tx;
93
93
  return __generator(this, function (_a) {
94
- tx = new sui_js_1.TransactionBlock();
94
+ tx = new transactions_1.TransactionBlock();
95
95
  tx.moveCall({
96
96
  target: "".concat(packageId, "::tails_staking::claim_profit_sharing"),
97
97
  typeArguments: ["0x2::sui::SUI"],
@@ -1,3 +1,3 @@
1
- import { JsonRpcProvider } from "@mysten/sui.js";
1
+ import { SuiClient } from "@mysten/sui.js/client";
2
2
  import { Tails } from "../typus-nft/fetch";
3
- export declare function getUserStake(provider: JsonRpcProvider, nft_table: string, user: string): Promise<Tails | null>;
3
+ export declare function getUserStake(provider: SuiClient, nft_table: string, user: string): Promise<Tails | null>;
@@ -1,4 +1,6 @@
1
- import { TransactionBlock } from "@mysten/sui.js";
1
+ import { TransactionBlock } from "@mysten/sui.js/transactions";
2
+ import { Network } from "@mysten/kiosk";
3
+ import { SuiClient } from "@mysten/sui.js/client";
2
4
  /**
3
5
  entry fun transfer_nft(
4
6
  registry: &mut Registry,
@@ -22,7 +24,7 @@ export declare function getTransferNftsTx(gasBudget: number, nftPackageId: strin
22
24
  )
23
25
  */
24
26
  export declare function getStakeNftTx(gasBudget: number, nftPackageId: string, registry: string, kiosk: string, kiosk_cap: string, nft_id: string): Promise<TransactionBlock>;
25
- export declare function getCreateKioskAndLockNftTx(gasBudget: number, nftPackageId: string, policy: string, nft_id: string, singer: string): Promise<TransactionBlock>;
27
+ export declare function getCreateKioskAndLockNftTx(provider: SuiClient, network: Network, gasBudget: number, nftPackageId: string, policy: string, nft_id: string, singer: string): Promise<TransactionBlock>;
26
28
  /**
27
29
  public fun unstake_nft(
28
30
  registry: &mut Registry,
@@ -53,7 +53,7 @@ var __read = (this && this.__read) || function (o, n) {
53
53
  };
54
54
  Object.defineProperty(exports, "__esModule", { value: true });
55
55
  exports.consumeExpCoinStakedTx = exports.consumeExpCoinUnstakedTx = exports.getLevelUpTx = exports.getUnsubscribeTx = exports.getWithdrawTx = exports.getCompoundTx = exports.getDepositTx = exports.getNewBidTx = exports.getSnapshotTx = exports.getDailyAttendTx = exports.getUnstakeNftTx = exports.getCreateKioskAndLockNftTx = exports.getStakeNftTx = exports.getTransferNftsTx = exports.getTransferNftTx = void 0;
56
- var sui_js_1 = require("@mysten/sui.js");
56
+ var transactions_1 = require("@mysten/sui.js/transactions");
57
57
  var constants_1 = require("../../constants");
58
58
  var kiosk_1 = require("@mysten/kiosk");
59
59
  /**
@@ -70,7 +70,7 @@ function getTransferNftTx(gasBudget, nftPackageId, registry, kiosk, kiosk_cap, n
70
70
  return __awaiter(this, void 0, void 0, function () {
71
71
  var tx, _a, coin;
72
72
  return __generator(this, function (_b) {
73
- tx = new sui_js_1.TransactionBlock();
73
+ tx = new transactions_1.TransactionBlock();
74
74
  _a = __read(tx.splitCoins(tx.gas, [tx.pure(10000000)]), 1), coin = _a[0];
75
75
  tx.moveCall({
76
76
  target: "".concat(nftPackageId, "::tails_staking::transfer_nft"),
@@ -87,7 +87,7 @@ function getTransferNftsTx(gasBudget, nftPackageId, registry, kiosks, kiosk_caps
87
87
  return __awaiter(this, void 0, void 0, function () {
88
88
  var tx, i, _a, coin;
89
89
  return __generator(this, function (_b) {
90
- tx = new sui_js_1.TransactionBlock();
90
+ tx = new transactions_1.TransactionBlock();
91
91
  i = 0;
92
92
  while (i < kiosks.length) {
93
93
  _a = __read(tx.splitCoins(tx.gas, [tx.pure(10000000)]), 1), coin = _a[0];
@@ -118,7 +118,7 @@ function getStakeNftTx(gasBudget, nftPackageId, registry, kiosk, kiosk_cap, nft_
118
118
  return __awaiter(this, void 0, void 0, function () {
119
119
  var tx, _a, coin;
120
120
  return __generator(this, function (_b) {
121
- tx = new sui_js_1.TransactionBlock();
121
+ tx = new transactions_1.TransactionBlock();
122
122
  _a = __read(tx.splitCoins(tx.gas, [tx.pure(50000000)]), 1), coin = _a[0];
123
123
  tx.moveCall({
124
124
  target: "".concat(nftPackageId, "::tails_staking::stake_nft"),
@@ -131,20 +131,30 @@ function getStakeNftTx(gasBudget, nftPackageId, registry, kiosk, kiosk_cap, nft_
131
131
  });
132
132
  }
133
133
  exports.getStakeNftTx = getStakeNftTx;
134
- function getCreateKioskAndLockNftTx(gasBudget, nftPackageId, policy, nft_id, singer) {
134
+ function getCreateKioskAndLockNftTx(provider, network, gasBudget, nftPackageId, policy, nft_id, singer) {
135
135
  return __awaiter(this, void 0, void 0, function () {
136
- var tx, _a, kiosk, kiosk_cap;
137
- return __generator(this, function (_b) {
138
- tx = new sui_js_1.TransactionBlock();
139
- _a = __read((0, kiosk_1.createKiosk)(tx), 2), kiosk = _a[0], kiosk_cap = _a[1];
140
- (0, kiosk_1.lock)(tx, "".concat(nftPackageId, "::typus_nft::Tails"), kiosk, kiosk_cap, tx.object(policy), tx.pure(nft_id));
141
- tx.moveCall({
142
- target: "0x2::transfer::public_share_object",
143
- typeArguments: [kiosk_1.KIOSK_TYPE],
144
- arguments: [kiosk],
136
+ var tx, kioskClient, kioskTx, kiosk, kioskCap;
137
+ return __generator(this, function (_a) {
138
+ tx = new transactions_1.TransactionBlock();
139
+ kioskClient = new kiosk_1.KioskClient({
140
+ client: provider,
141
+ network: network,
145
142
  });
146
- tx.transferObjects([kiosk_cap], tx.pure(singer));
147
- tx.setGasBudget(gasBudget);
143
+ kioskTx = new kiosk_1.KioskTransaction({ transactionBlock: tx, kioskClient: kioskClient });
144
+ kioskTx.lock({ itemType: "".concat(nftPackageId, "::typus_nft::Tails"), itemId: nft_id, policy: policy });
145
+ kiosk = kioskTx.kiosk, kioskCap = kioskTx.kioskCap;
146
+ if (kiosk && kioskCap) {
147
+ tx.moveCall({
148
+ target: "0x2::transfer::public_share_object",
149
+ typeArguments: [kiosk_1.KIOSK_TYPE],
150
+ arguments: [kiosk],
151
+ });
152
+ tx.transferObjects([kioskCap], tx.pure(singer));
153
+ tx.setGasBudget(gasBudget);
154
+ }
155
+ else {
156
+ console.error("Fail to Create Kiosk Tx!!");
157
+ }
148
158
  return [2 /*return*/, tx];
149
159
  });
150
160
  });
@@ -163,7 +173,7 @@ function getUnstakeNftTx(gasBudget, nftPackageId, registry, kiosk, kiosk_cap) {
163
173
  return __awaiter(this, void 0, void 0, function () {
164
174
  var tx;
165
175
  return __generator(this, function (_a) {
166
- tx = new sui_js_1.TransactionBlock();
176
+ tx = new transactions_1.TransactionBlock();
167
177
  tx.moveCall({
168
178
  target: "".concat(nftPackageId, "::tails_staking::snapshot"),
169
179
  typeArguments: [],
@@ -191,7 +201,7 @@ function getDailyAttendTx(gasBudget, nftPackageId, registry) {
191
201
  return __awaiter(this, void 0, void 0, function () {
192
202
  var tx;
193
203
  return __generator(this, function (_a) {
194
- tx = new sui_js_1.TransactionBlock();
204
+ tx = new transactions_1.TransactionBlock();
195
205
  tx.moveCall({
196
206
  target: "".concat(nftPackageId, "::tails_staking::daily_attend"),
197
207
  typeArguments: [],
@@ -214,7 +224,7 @@ function getSnapshotTx(gasBudget, nftPackageId, registry) {
214
224
  return __awaiter(this, void 0, void 0, function () {
215
225
  var tx;
216
226
  return __generator(this, function (_a) {
217
- tx = new sui_js_1.TransactionBlock();
227
+ tx = new transactions_1.TransactionBlock();
218
228
  tx.moveCall({
219
229
  target: "".concat(nftPackageId, "::tails_staking::snapshot"),
220
230
  typeArguments: [],
@@ -232,7 +242,7 @@ usingSponsoredGasCoin) {
232
242
  return __awaiter(this, void 0, void 0, function () {
233
243
  var tx, _a, coin;
234
244
  return __generator(this, function (_b) {
235
- tx = new sui_js_1.TransactionBlock();
245
+ tx = new transactions_1.TransactionBlock();
236
246
  if (!usingSponsoredGasCoin &&
237
247
  (typeArguments[1] == "0x2::sui::SUI" ||
238
248
  typeArguments[1] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")) {
@@ -277,7 +287,7 @@ function getDepositTx(gasBudget, packageId, typeArguments, registry, additional_
277
287
  return __awaiter(this, void 0, void 0, function () {
278
288
  var tx, _a, coin;
279
289
  return __generator(this, function (_b) {
280
- tx = new sui_js_1.TransactionBlock();
290
+ tx = new transactions_1.TransactionBlock();
281
291
  if (!usingSponsoredGasCoin &&
282
292
  (typeArguments[0] == "0x2::sui::SUI" ||
283
293
  typeArguments[0] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI")) {
@@ -319,7 +329,7 @@ function getCompoundTx(gasBudget, packageId, typeArguments, registry, additional
319
329
  return __awaiter(this, void 0, void 0, function () {
320
330
  var tx;
321
331
  return __generator(this, function (_a) {
322
- tx = new sui_js_1.TransactionBlock();
332
+ tx = new transactions_1.TransactionBlock();
323
333
  tx.moveCall({
324
334
  target: "".concat(packageId, "::tails_staking::compound"),
325
335
  typeArguments: typeArguments,
@@ -335,7 +345,7 @@ function getWithdrawTx(gasBudget, packageId, typeArguments, registry, additional
335
345
  return __awaiter(this, void 0, void 0, function () {
336
346
  var tx;
337
347
  return __generator(this, function (_a) {
338
- tx = new sui_js_1.TransactionBlock();
348
+ tx = new transactions_1.TransactionBlock();
339
349
  tx.moveCall({
340
350
  target: "".concat(packageId, "::tails_staking::withdraw"),
341
351
  typeArguments: typeArguments,
@@ -357,7 +367,7 @@ function getUnsubscribeTx(gasBudget, packageId, typeArguments, registry, additio
357
367
  return __awaiter(this, void 0, void 0, function () {
358
368
  var tx;
359
369
  return __generator(this, function (_a) {
360
- tx = new sui_js_1.TransactionBlock();
370
+ tx = new transactions_1.TransactionBlock();
361
371
  tx.moveCall({
362
372
  target: "".concat(packageId, "::tails_staking::unsubscribe"),
363
373
  typeArguments: typeArguments,
@@ -385,7 +395,7 @@ function getLevelUpTx(gasBudget, nftPackageId, registry) {
385
395
  return __awaiter(this, void 0, void 0, function () {
386
396
  var tx;
387
397
  return __generator(this, function (_a) {
388
- tx = new sui_js_1.TransactionBlock();
398
+ tx = new transactions_1.TransactionBlock();
389
399
  tx.moveCall({
390
400
  target: "".concat(nftPackageId, "::tails_staking::level_up"),
391
401
  typeArguments: [],
@@ -411,7 +421,7 @@ function consumeExpCoinUnstakedTx(gasBudget, nftPackageId, typeArguments, regist
411
421
  return __awaiter(this, void 0, void 0, function () {
412
422
  var tx, coin, _a, input_coin;
413
423
  return __generator(this, function (_b) {
414
- tx = new sui_js_1.TransactionBlock();
424
+ tx = new transactions_1.TransactionBlock();
415
425
  coin = exp_coins.pop();
416
426
  if (exp_coins.length > 0) {
417
427
  tx.mergeCoins(tx.object(coin), exp_coins.map(function (id) { return tx.object(id); }));
@@ -439,7 +449,7 @@ function consumeExpCoinStakedTx(gasBudget, nftPackageId, typeArguments, registry
439
449
  return __awaiter(this, void 0, void 0, function () {
440
450
  var tx, coin, _a, input_coin;
441
451
  return __generator(this, function (_b) {
442
- tx = new sui_js_1.TransactionBlock();
452
+ tx = new transactions_1.TransactionBlock();
443
453
  coin = exp_coins.pop();
444
454
  if (exp_coins.length > 0) {
445
455
  tx.mergeCoins(tx.object(coin), exp_coins.map(function (id) { return tx.object(id); }));
@@ -1,5 +1,5 @@
1
- import { JsonRpcProvider } from "@mysten/sui.js";
2
- export declare function getPlaygrounds(provider: JsonRpcProvider, diceRegistry: string): Promise<Playground[]>;
1
+ import { SuiClient } from "@mysten/sui.js/client";
2
+ export declare function getPlaygrounds(provider: SuiClient, diceRegistry: string): Promise<Playground[]>;
3
3
  export interface Playground {
4
4
  id: string;
5
5
  house_whitelist: string[];
@@ -29,7 +29,7 @@ export interface Game {
29
29
  larger_than_2: boolean | null;
30
30
  vrf_input_2: number[] | null;
31
31
  }
32
- export declare function getHistory(provider: JsonRpcProvider, dicePackage: string, playgrounds: Playground[]): Promise<DrawDisplay[]>;
32
+ export declare function getHistory(provider: SuiClient, dicePackage: string, playgrounds: Playground[]): Promise<DrawDisplay[]>;
33
33
  interface DrawDisplay {
34
34
  game_id: string;
35
35
  player: string;
@@ -47,5 +47,5 @@ export interface ProfitSharing {
47
47
  remaining: string;
48
48
  total: string;
49
49
  }
50
- export declare function getProfitSharing(provider: JsonRpcProvider, diceProfitSharing: string): Promise<ProfitSharing>;
50
+ export declare function getProfitSharing(provider: SuiClient, diceProfitSharing: string): Promise<ProfitSharing>;
51
51
  export {};
@@ -1,4 +1,4 @@
1
- import { TransactionBlock } from "@mysten/sui.js";
1
+ import { TransactionBlock } from "@mysten/sui.js/transactions";
2
2
  /**
3
3
  public(friend) entry fun new_game<TOKEN>(
4
4
  registry: &mut Registry,
@@ -53,7 +53,7 @@ var __read = (this && this.__read) || function (o, n) {
53
53
  };
54
54
  Object.defineProperty(exports, "__esModule", { value: true });
55
55
  exports.newGamePlayGuessTx = exports.playGuessTx = exports.newGameTx = void 0;
56
- var sui_js_1 = require("@mysten/sui.js");
56
+ var transactions_1 = require("@mysten/sui.js/transactions");
57
57
  /**
58
58
  public(friend) entry fun new_game<TOKEN>(
59
59
  registry: &mut Registry,
@@ -68,7 +68,7 @@ registry, index, coins, amount) {
68
68
  return __awaiter(this, void 0, void 0, function () {
69
69
  var tx;
70
70
  return __generator(this, function (_a) {
71
- tx = new sui_js_1.TransactionBlock();
71
+ tx = new transactions_1.TransactionBlock();
72
72
  tx.moveCall({
73
73
  target: "".concat(packageId, "::tails_exp::new_game"),
74
74
  typeArguments: typeArguments,
@@ -96,7 +96,7 @@ function playGuessTx(gasBudget, packageId, registry, index, guess_1, larger_than
96
96
  return __awaiter(this, void 0, void 0, function () {
97
97
  var tx;
98
98
  return __generator(this, function (_a) {
99
- tx = new sui_js_1.TransactionBlock();
99
+ tx = new transactions_1.TransactionBlock();
100
100
  tx.moveCall({
101
101
  target: "".concat(packageId, "::tails_exp::play_guess"),
102
102
  typeArguments: [],
@@ -120,7 +120,7 @@ registry, index, coins, amount, guess_1, larger_than_1, guess_2, larger_than_2)
120
120
  return __awaiter(this, void 0, void 0, function () {
121
121
  var tx, _a, coin;
122
122
  return __generator(this, function (_b) {
123
- tx = new sui_js_1.TransactionBlock();
123
+ tx = new transactions_1.TransactionBlock();
124
124
  if (typeArguments[0] == "0x2::sui::SUI" ||
125
125
  typeArguments[0] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI") {
126
126
  _a = __read(tx.splitCoins(tx.gas, [tx.pure(amount)]), 1), coin = _a[0];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.assetToDecimal = exports.typeArgToAsset = exports.typeArgsToAssets = void 0;
4
- var sui_js_1 = require("@mysten/sui.js");
4
+ var utils_1 = require("@mysten/sui.js/utils");
5
5
  function typeArgsToAssets(typeArgs) {
6
6
  var assets = typeArgs.map(function (x) { return typeArgToAsset(x); });
7
7
  return assets;
@@ -9,7 +9,7 @@ function typeArgsToAssets(typeArgs) {
9
9
  exports.typeArgsToAssets = typeArgsToAssets;
10
10
  function typeArgToAsset(typeArg) {
11
11
  var typeArgs = typeArg.split("::");
12
- switch ((0, sui_js_1.normalizeSuiAddress)(typeArgs[0])) {
12
+ switch ((0, utils_1.normalizeSuiAddress)(typeArgs[0])) {
13
13
  case "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881":
14
14
  return "WBTC";
15
15
  case "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5":
@@ -1,4 +1,4 @@
1
- import { TransactionBlock } from "@mysten/sui.js";
1
+ import { TransactionBlock } from "@mysten/sui.js/transactions";
2
2
  /**
3
3
  public(friend) entry fun authorized_add_portfolio_vault_authorized_user<O_TOKEN, U_TOKEN, B_TOKEN>(
4
4
  registry: &mut Registry,
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.getAuthorizedDeliveryTx = exports.getAuthorizedUpdateUpcomingVaultConfigTx = exports.getAuthorizedUpdateWarmupVaultConfigTx = exports.getAuthorizedUpdateCapacityTx = exports.getAuthorizedNewPortfolioVaultTx = exports.getAuthorizedRemovePortfolioVaultAuthorizedUserTx = exports.getAuthorizedAddPortfolioVaultAuthorizedUserTx = void 0;
40
- var sui_js_1 = require("@mysten/sui.js");
40
+ var transactions_1 = require("@mysten/sui.js/transactions");
41
41
  /**
42
42
  public(friend) entry fun authorized_add_portfolio_vault_authorized_user<O_TOKEN, U_TOKEN, B_TOKEN>(
43
43
  registry: &mut Registry,
@@ -50,7 +50,7 @@ function getAuthorizedAddPortfolioVaultAuthorizedUserTx(gasBudget, packageId, ty
50
50
  return __awaiter(this, void 0, void 0, function () {
51
51
  var tx;
52
52
  return __generator(this, function (_a) {
53
- tx = new sui_js_1.TransactionBlock();
53
+ tx = new transactions_1.TransactionBlock();
54
54
  tx.moveCall({
55
55
  target: "".concat(packageId, "::typus_dov_double::authorized_add_portfolio_vault_authorized_user"),
56
56
  typeArguments: typeArguments,
@@ -74,7 +74,7 @@ function getAuthorizedRemovePortfolioVaultAuthorizedUserTx(gasBudget, packageId,
74
74
  return __awaiter(this, void 0, void 0, function () {
75
75
  var tx;
76
76
  return __generator(this, function (_a) {
77
- tx = new sui_js_1.TransactionBlock();
77
+ tx = new transactions_1.TransactionBlock();
78
78
  tx.moveCall({
79
79
  target: "".concat(packageId, "::typus_dov_double::authorized_remove_portfolio_vault_authorized_user"),
80
80
  typeArguments: typeArguments,
@@ -121,7 +121,7 @@ function getAuthorizedNewPortfolioVaultTx(gasBudget, packageId, typeArguments, r
121
121
  return __awaiter(this, void 0, void 0, function () {
122
122
  var tx;
123
123
  return __generator(this, function (_a) {
124
- tx = new sui_js_1.TransactionBlock();
124
+ tx = new transactions_1.TransactionBlock();
125
125
  tx.moveCall({
126
126
  target: "".concat(packageId, "::typus_dov_double::authorized_new_portfolio_vault"),
127
127
  typeArguments: typeArguments,
@@ -172,7 +172,7 @@ function getAuthorizedUpdateCapacityTx(gasBudget, packageId, typeArguments, regi
172
172
  return __awaiter(this, void 0, void 0, function () {
173
173
  var tx;
174
174
  return __generator(this, function (_a) {
175
- tx = new sui_js_1.TransactionBlock();
175
+ tx = new transactions_1.TransactionBlock();
176
176
  tx.moveCall({
177
177
  target: "".concat(packageId, "::typus_dov_double::authorized_update_capacity"),
178
178
  typeArguments: typeArguments,
@@ -200,7 +200,7 @@ function getAuthorizedUpdateWarmupVaultConfigTx(gasBudget, packageId, typeArgume
200
200
  return __awaiter(this, void 0, void 0, function () {
201
201
  var tx;
202
202
  return __generator(this, function (_a) {
203
- tx = new sui_js_1.TransactionBlock();
203
+ tx = new transactions_1.TransactionBlock();
204
204
  tx.moveCall({
205
205
  target: "".concat(packageId, "::typus_dov_double::authorized_update_warmup_vault_config"),
206
206
  typeArguments: typeArguments,
@@ -242,7 +242,7 @@ function getAuthorizedUpdateUpcomingVaultConfigTx(gasBudget, packageId, typeArgu
242
242
  return __awaiter(this, void 0, void 0, function () {
243
243
  var tx;
244
244
  return __generator(this, function (_a) {
245
- tx = new sui_js_1.TransactionBlock();
245
+ tx = new transactions_1.TransactionBlock();
246
246
  tx.moveCall({
247
247
  target: "".concat(packageId, "::typus_dov_double::authorized_update_upcoming_vault_config"),
248
248
  typeArguments: typeArguments,
@@ -281,7 +281,7 @@ function getAuthorizedDeliveryTx(gasBudget, packageId, typeArguments, registry,
281
281
  return __awaiter(this, void 0, void 0, function () {
282
282
  var tx;
283
283
  return __generator(this, function (_a) {
284
- tx = new sui_js_1.TransactionBlock();
284
+ tx = new transactions_1.TransactionBlock();
285
285
  tx.moveCall({
286
286
  target: "".concat(packageId, "::typus_dov_double::authorized_delivery"),
287
287
  typeArguments: typeArguments,
@@ -1,4 +1,4 @@
1
- import { TransactionBlock } from "@mysten/sui.js";
1
+ import { TransactionBlock } from "@mysten/sui.js/transactions";
2
2
  /**
3
3
  public(friend) entry fun new_manager(
4
4
  _manager_cap: &ManagerCap,
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.getTerminateAuctionTx = exports.getTerminateVaultTx = exports.getNewAuctionTx = exports.getUpdateActiveVaultConfigTx = exports.getCloseTx = exports.getEvolutionTx = exports.getDeliveryTx = exports.getUpdateUpcomingVaultConfigTx = exports.getUpdateWarmupVaultConfigTx = exports.getUpdateCapacityTx = exports.getNewPortfolioVaultTx = exports.getUpdateRestrictActivationTimePeriodTx = exports.getRemovePortfolioVaultAuthorizedUserTx = exports.getAddPortfolioVaultAuthorizedUserTx = exports.getRemoveAuthorizedUserTx = exports.getAddAuthorizedUserTx = exports.getRemoveManagerTx = exports.getNewManagerTx = void 0;
40
- var sui_js_1 = require("@mysten/sui.js");
40
+ var transactions_1 = require("@mysten/sui.js/transactions");
41
41
  /**
42
42
  public(friend) entry fun new_manager(
43
43
  _manager_cap: &ManagerCap,
@@ -49,7 +49,7 @@ function getNewManagerTx(gasBudget, packageId, managerCap, users) {
49
49
  return __awaiter(this, void 0, void 0, function () {
50
50
  var tx;
51
51
  return __generator(this, function (_a) {
52
- tx = new sui_js_1.TransactionBlock();
52
+ tx = new transactions_1.TransactionBlock();
53
53
  tx.moveCall({
54
54
  target: "".concat(packageId, "::typus_dov_double::new_manager"),
55
55
  arguments: [tx.pure(managerCap), tx.pure(users)],
@@ -71,7 +71,7 @@ function getRemoveManagerTx(gasBudget, packageId, managerCap) {
71
71
  return __awaiter(this, void 0, void 0, function () {
72
72
  var tx;
73
73
  return __generator(this, function (_a) {
74
- tx = new sui_js_1.TransactionBlock();
74
+ tx = new transactions_1.TransactionBlock();
75
75
  tx.moveCall({
76
76
  target: "".concat(packageId, "::typus_dov_double::remove_manager"),
77
77
  arguments: [tx.pure(managerCap)],
@@ -94,7 +94,7 @@ function getAddAuthorizedUserTx(gasBudget, packageId, managerCap, registry, user
94
94
  return __awaiter(this, void 0, void 0, function () {
95
95
  var tx;
96
96
  return __generator(this, function (_a) {
97
- tx = new sui_js_1.TransactionBlock();
97
+ tx = new transactions_1.TransactionBlock();
98
98
  tx.moveCall({
99
99
  target: "".concat(packageId, "::typus_dov_double::add_authorized_user"),
100
100
  arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(users)],
@@ -117,7 +117,7 @@ function getRemoveAuthorizedUserTx(gasBudget, packageId, managerCap, registry, u
117
117
  return __awaiter(this, void 0, void 0, function () {
118
118
  var tx;
119
119
  return __generator(this, function (_a) {
120
- tx = new sui_js_1.TransactionBlock();
120
+ tx = new transactions_1.TransactionBlock();
121
121
  tx.moveCall({
122
122
  target: "".concat(packageId, "::typus_dov_double::remove_authorized_user"),
123
123
  arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(users)],
@@ -141,7 +141,7 @@ function getAddPortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArgument
141
141
  return __awaiter(this, void 0, void 0, function () {
142
142
  var tx;
143
143
  return __generator(this, function (_a) {
144
- tx = new sui_js_1.TransactionBlock();
144
+ tx = new transactions_1.TransactionBlock();
145
145
  tx.moveCall({
146
146
  target: "".concat(packageId, "::typus_dov_double::add_portfolio_vault_authorized_user"),
147
147
  typeArguments: typeArguments,
@@ -166,7 +166,7 @@ function getRemovePortfolioVaultAuthorizedUserTx(gasBudget, packageId, typeArgum
166
166
  return __awaiter(this, void 0, void 0, function () {
167
167
  var tx;
168
168
  return __generator(this, function (_a) {
169
- tx = new sui_js_1.TransactionBlock();
169
+ tx = new transactions_1.TransactionBlock();
170
170
  tx.moveCall({
171
171
  target: "".concat(packageId, "::typus_dov_double::remove_portfolio_vault_authorized_user"),
172
172
  typeArguments: typeArguments,
@@ -191,7 +191,7 @@ function getUpdateRestrictActivationTimePeriodTx(gasBudget, packageId, managerCa
191
191
  return __awaiter(this, void 0, void 0, function () {
192
192
  var tx;
193
193
  return __generator(this, function (_a) {
194
- tx = new sui_js_1.TransactionBlock();
194
+ tx = new transactions_1.TransactionBlock();
195
195
  tx.moveCall({
196
196
  target: "".concat(packageId, "::typus_dov_double::update_restrict_activation_time_period"),
197
197
  arguments: [tx.pure(managerCap), tx.pure(registry), tx.pure(from_ts_ms), tx.pure(to_ts_ms)],
@@ -238,7 +238,7 @@ function getNewPortfolioVaultTx(gasBudget, packageId, typeArguments, managerCap,
238
238
  return __awaiter(this, void 0, void 0, function () {
239
239
  var tx;
240
240
  return __generator(this, function (_a) {
241
- tx = new sui_js_1.TransactionBlock();
241
+ tx = new transactions_1.TransactionBlock();
242
242
  tx.moveCall({
243
243
  target: "".concat(packageId, "::typus_dov_double::new_portfolio_vault"),
244
244
  typeArguments: typeArguments,
@@ -291,7 +291,7 @@ function getUpdateCapacityTx(gasBudget, packageId, typeArguments, managerCap, re
291
291
  return __awaiter(this, void 0, void 0, function () {
292
292
  var tx;
293
293
  return __generator(this, function (_a) {
294
- tx = new sui_js_1.TransactionBlock();
294
+ tx = new transactions_1.TransactionBlock();
295
295
  tx.moveCall({
296
296
  target: "".concat(packageId, "::typus_dov_double::update_capacity"),
297
297
  typeArguments: typeArguments,
@@ -320,7 +320,7 @@ function getUpdateWarmupVaultConfigTx(gasBudget, packageId, typeArguments, manag
320
320
  return __awaiter(this, void 0, void 0, function () {
321
321
  var tx;
322
322
  return __generator(this, function (_a) {
323
- tx = new sui_js_1.TransactionBlock();
323
+ tx = new transactions_1.TransactionBlock();
324
324
  tx.moveCall({
325
325
  target: "".concat(packageId, "::typus_dov_double::update_warmup_vault_config"),
326
326
  typeArguments: typeArguments,
@@ -364,7 +364,7 @@ function getUpdateUpcomingVaultConfigTx(gasBudget, packageId, typeArguments, man
364
364
  return __awaiter(this, void 0, void 0, function () {
365
365
  var tx;
366
366
  return __generator(this, function (_a) {
367
- tx = new sui_js_1.TransactionBlock();
367
+ tx = new transactions_1.TransactionBlock();
368
368
  tx.moveCall({
369
369
  target: "".concat(packageId, "::typus_dov_double::update_upcoming_vault_config"),
370
370
  typeArguments: typeArguments,
@@ -405,7 +405,7 @@ function getDeliveryTx(gasBudget, packageId, typeArguments, managerCap, registry
405
405
  return __awaiter(this, void 0, void 0, function () {
406
406
  var tx;
407
407
  return __generator(this, function (_a) {
408
- tx = new sui_js_1.TransactionBlock();
408
+ tx = new transactions_1.TransactionBlock();
409
409
  tx.moveCall({
410
410
  target: "".concat(packageId, "::typus_dov_double::delivery"),
411
411
  typeArguments: typeArguments,
@@ -431,7 +431,7 @@ function getEvolutionTx(gasBudget, packageId, typeArguments, managerCap, registr
431
431
  return __awaiter(this, void 0, void 0, function () {
432
432
  var tx;
433
433
  return __generator(this, function (_a) {
434
- tx = new sui_js_1.TransactionBlock();
434
+ tx = new transactions_1.TransactionBlock();
435
435
  tx.moveCall({
436
436
  target: "".concat(packageId, "::typus_dov_double::evolution"),
437
437
  typeArguments: typeArguments,
@@ -455,7 +455,7 @@ function getCloseTx(gasBudget, packageId, typeArguments, managerCap, registry, i
455
455
  return __awaiter(this, void 0, void 0, function () {
456
456
  var tx;
457
457
  return __generator(this, function (_a) {
458
- tx = new sui_js_1.TransactionBlock();
458
+ tx = new transactions_1.TransactionBlock();
459
459
  tx.moveCall({
460
460
  target: "".concat(packageId, "::typus_dov_double::evolution"),
461
461
  typeArguments: typeArguments,
@@ -484,7 +484,7 @@ function getUpdateActiveVaultConfigTx(gasBudget, packageId, typeArguments, manag
484
484
  return __awaiter(this, void 0, void 0, function () {
485
485
  var tx;
486
486
  return __generator(this, function (_a) {
487
- tx = new sui_js_1.TransactionBlock();
487
+ tx = new transactions_1.TransactionBlock();
488
488
  tx.moveCall({
489
489
  target: "".concat(packageId, "::typus_dov_double::update_active_vault_config"),
490
490
  typeArguments: typeArguments,
@@ -520,7 +520,7 @@ function getNewAuctionTx(gasBudget, packageId, typeArguments, managerCap, regist
520
520
  return __awaiter(this, void 0, void 0, function () {
521
521
  var tx;
522
522
  return __generator(this, function (_a) {
523
- tx = new sui_js_1.TransactionBlock();
523
+ tx = new transactions_1.TransactionBlock();
524
524
  tx.moveCall({
525
525
  target: "".concat(packageId, "::typus_dov_double::new_auction"),
526
526
  typeArguments: typeArguments,
@@ -545,7 +545,7 @@ function getTerminateVaultTx(gasBudget, packageId, typeArguments, managerCap, re
545
545
  return __awaiter(this, void 0, void 0, function () {
546
546
  var tx;
547
547
  return __generator(this, function (_a) {
548
- tx = new sui_js_1.TransactionBlock();
548
+ tx = new transactions_1.TransactionBlock();
549
549
  tx.moveCall({
550
550
  target: "".concat(packageId, "::typus_dov_double::terminate_vault"),
551
551
  typeArguments: typeArguments,
@@ -570,7 +570,7 @@ function getTerminateAuctionTx(gasBudget, packageId, typeArguments, managerCap,
570
570
  return __awaiter(this, void 0, void 0, function () {
571
571
  var tx;
572
572
  return __generator(this, function (_a) {
573
- tx = new sui_js_1.TransactionBlock();
573
+ tx = new transactions_1.TransactionBlock();
574
574
  tx.moveCall({
575
575
  target: "".concat(packageId, "::typus_dov_double::terminate_auction"),
576
576
  typeArguments: typeArguments,