@typus/typus-perp-sdk 1.1.49 → 1.1.51-upgrade
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/src/api/sentio.d.ts +1 -1
- package/dist/src/api/sentio.js +3 -3
- package/dist/src/client.d.ts +11 -12
- package/dist/src/client.js +16 -44
- package/dist/src/fetch.d.ts +15 -45
- package/dist/src/fetch.js +70 -69
- package/dist/src/generated/typus_perp/admin.d.ts +32 -42
- package/dist/src/generated/typus_perp/admin.js +41 -67
- package/dist/src/generated/typus_perp/competition.d.ts +22 -10
- package/dist/src/generated/typus_perp/competition.js +19 -54
- package/dist/src/generated/typus_perp/deps/std/type_name.d.ts +2 -2
- package/dist/src/generated/typus_perp/deps/std/type_name.js +2 -2
- package/dist/src/generated/typus_perp/deps/sui/balance.d.ts +3 -3
- package/dist/src/generated/typus_perp/deps/sui/balance.js +3 -3
- package/dist/src/generated/typus_perp/deps/sui/object_table.d.ts +4 -6
- package/dist/src/generated/typus_perp/deps/sui/object_table.js +4 -38
- package/dist/src/generated/typus_perp/deps/sui/table.d.ts +4 -6
- package/dist/src/generated/typus_perp/deps/sui/table.js +4 -38
- package/dist/src/generated/typus_perp/deps/sui/vec_set.d.ts +2 -2
- package/dist/src/generated/typus_perp/deps/sui/vec_set.js +2 -2
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.d.ts +7 -9
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.js +6 -6
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.d.ts +6 -10
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.js +5 -39
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +14 -8
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +13 -39
- package/dist/src/generated/typus_perp/error.d.ts +97 -87
- package/dist/src/generated/typus_perp/error.js +18 -0
- package/dist/src/generated/typus_perp/escrow.d.ts +17 -21
- package/dist/src/generated/typus_perp/escrow.js +10 -22
- package/dist/src/generated/typus_perp/lending.d.ts +47 -0
- package/dist/src/generated/typus_perp/lending.js +40 -0
- package/dist/src/generated/typus_perp/lp_pool.d.ts +718 -397
- package/dist/src/generated/typus_perp/lp_pool.js +485 -365
- package/dist/src/generated/typus_perp/math.d.ts +18 -8
- package/dist/src/generated/typus_perp/math.js +24 -6
- package/dist/src/generated/typus_perp/position.d.ts +207 -185
- package/dist/src/generated/typus_perp/position.js +236 -277
- package/dist/src/generated/typus_perp/profit_vault.d.ts +64 -72
- package/dist/src/generated/typus_perp/profit_vault.js +48 -86
- package/dist/src/generated/typus_perp/symbol.d.ts +6 -6
- package/dist/src/generated/typus_perp/symbol.js +11 -13
- package/dist/src/generated/typus_perp/trading.d.ts +451 -558
- package/dist/src/generated/typus_perp/trading.js +429 -681
- package/dist/src/generated/typus_perp/treasury_caps.d.ts +5 -7
- package/dist/src/generated/typus_perp/treasury_caps.js +8 -45
- package/dist/src/generated/typus_stake_pool/admin.d.ts +13 -122
- package/dist/src/generated/typus_stake_pool/admin.js +19 -103
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.d.ts +2 -2
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.js +2 -2
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.d.ts +2 -2
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.js +2 -2
- package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +249 -240
- package/dist/src/generated/typus_stake_pool/stake_pool.js +159 -246
- package/dist/src/generated/utils/index.d.ts +21 -2
- package/dist/src/generated/utils/index.js +34 -10
- package/dist/src/user/history.d.ts +3 -2
- package/dist/src/user/history.js +60 -18
- package/dist/src/user/order.d.ts +1 -1
- package/dist/src/user/orderWithBidReceipt.d.ts +1 -1
- package/package.json +8 -15
- package/dist/src/generated/typus_perp/deps/sui/object.d.ts +0 -8
- package/dist/src/generated/typus_perp/deps/sui/object.js +0 -16
- package/dist/src/generated/typus_perp/user_account.d.ts +0 -146
- package/dist/src/generated/typus_perp/user_account.js +0 -221
- package/dist/src/generated/typus_stake_pool/deps/sui/object.d.ts +0 -8
- package/dist/src/generated/typus_stake_pool/deps/sui/object.js +0 -16
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.d.ts +0 -30
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.js +0 -37
- package/dist/src/grpc/graphql.d.ts +0 -26
- package/dist/src/grpc/graphql.js +0 -126
- package/dist/src/grpc/grpc.d.ts +0 -1
- package/dist/src/grpc/grpc.js +0 -38
- package/dist/src/grpc/ledgerService.d.ts +0 -0
- package/dist/src/grpc/ledgerService.js +0 -64
- package/dist/src/grpc/liveDataService.d.ts +0 -0
- package/dist/src/grpc/liveDataService.js +0 -49
|
@@ -2,52 +2,19 @@
|
|
|
2
2
|
/**************************************************************
|
|
3
3
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
4
|
**************************************************************/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
6
|
exports.CompetitionConfig = void 0;
|
|
40
7
|
exports.newCompetitionConfig = newCompetitionConfig;
|
|
8
|
+
exports.setBoostBp = setBoostBp;
|
|
41
9
|
exports.addScore = addScore;
|
|
42
10
|
/** The `competition` module defines the logic for trading competitions. */
|
|
43
|
-
const
|
|
11
|
+
const index_js_1 = require("../utils/index.js");
|
|
44
12
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
45
|
-
const object = __importStar(require("./deps/sui/object"));
|
|
46
13
|
const $moduleName = "@typus/perp::competition";
|
|
47
|
-
exports.CompetitionConfig = new
|
|
14
|
+
exports.CompetitionConfig = new index_js_1.MoveStruct({
|
|
48
15
|
name: `${$moduleName}::CompetitionConfig`,
|
|
49
16
|
fields: {
|
|
50
|
-
id:
|
|
17
|
+
id: bcs_1.bcs.Address,
|
|
51
18
|
/** The boost in basis points for each staking level. */
|
|
52
19
|
boost_bp: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
53
20
|
/** Whether the competition is active. */
|
|
@@ -60,32 +27,30 @@ exports.CompetitionConfig = new index_1.MoveStruct({
|
|
|
60
27
|
});
|
|
61
28
|
function newCompetitionConfig(options) {
|
|
62
29
|
const packageAddress = options.package ?? "@typus/perp";
|
|
63
|
-
const argumentsTypes = [
|
|
64
|
-
`${packageAddress}::admin::Version`,
|
|
65
|
-
"vector<u64>",
|
|
66
|
-
"0x0000000000000000000000000000000000000000000000000000000000000001::ascii::String",
|
|
67
|
-
];
|
|
30
|
+
const argumentsTypes = [null, "vector<u64>", "0x1::string::String"];
|
|
68
31
|
const parameterNames = ["version", "boostBp", "programName"];
|
|
69
32
|
return (tx) => tx.moveCall({
|
|
70
33
|
package: packageAddress,
|
|
71
34
|
module: "competition",
|
|
72
35
|
function: "new_competition_config",
|
|
73
|
-
arguments: (0,
|
|
36
|
+
arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function setBoostBp(options) {
|
|
40
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
41
|
+
const argumentsTypes = [null, null, "vector<u64>"];
|
|
42
|
+
const parameterNames = ["version", "competitionConfig", "boostBp"];
|
|
43
|
+
return (tx) => tx.moveCall({
|
|
44
|
+
package: packageAddress,
|
|
45
|
+
module: "competition",
|
|
46
|
+
function: "set_boost_bp",
|
|
47
|
+
arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
74
48
|
});
|
|
75
49
|
}
|
|
76
50
|
/** Adds a score to the competition leaderboard. WARNING: no authority check inside */
|
|
77
51
|
function addScore(options) {
|
|
78
52
|
const packageAddress = options.package ?? "@typus/perp";
|
|
79
|
-
const argumentsTypes = [
|
|
80
|
-
`${packageAddress}::admin::Version`,
|
|
81
|
-
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::ecosystem::Version",
|
|
82
|
-
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::leaderboard::TypusLeaderboardRegistry",
|
|
83
|
-
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::tails_staking::TailsStakingRegistry",
|
|
84
|
-
`${packageAddress}::competition::CompetitionConfig`,
|
|
85
|
-
"u64",
|
|
86
|
-
"address",
|
|
87
|
-
"0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
|
|
88
|
-
];
|
|
53
|
+
const argumentsTypes = [null, null, null, null, null, "u64", "address", "0x2::clock::Clock"];
|
|
89
54
|
const parameterNames = [
|
|
90
55
|
"version",
|
|
91
56
|
"ecosystemVersion",
|
|
@@ -99,6 +64,6 @@ function addScore(options) {
|
|
|
99
64
|
package: packageAddress,
|
|
100
65
|
module: "competition",
|
|
101
66
|
function: "add_score",
|
|
102
|
-
arguments: (0,
|
|
67
|
+
arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
103
68
|
});
|
|
104
69
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
4
|
/** Functionality for converting Move types into values. Use with care! */
|
|
5
|
-
import { MoveStruct } from "../../../utils/index";
|
|
5
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
6
6
|
export declare const TypeName: MoveStruct<{
|
|
7
7
|
/**
|
|
8
8
|
* String representation of the type. All types are represented using their source
|
|
@@ -13,5 +13,5 @@ export declare const TypeName: MoveStruct<{
|
|
|
13
13
|
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
14
14
|
* 32 depending on the Move platform)
|
|
15
15
|
*/
|
|
16
|
-
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
16
|
+
name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
|
|
17
17
|
}, "std::type_name::TypeName">;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.TypeName = void 0;
|
|
7
7
|
/** Functionality for converting Move types into values. Use with care! */
|
|
8
|
-
const
|
|
8
|
+
const index_js_1 = require("../../../utils/index.js");
|
|
9
9
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
10
10
|
const $moduleName = "std::type_name";
|
|
11
|
-
exports.TypeName = new
|
|
11
|
+
exports.TypeName = new index_js_1.MoveStruct({
|
|
12
12
|
name: `${$moduleName}::TypeName`,
|
|
13
13
|
fields: {
|
|
14
14
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
7
7
|
* and `Balance`s.
|
|
8
8
|
*/
|
|
9
|
-
import { MoveStruct } from "../../../utils/index";
|
|
9
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
10
10
|
export declare const Balance: MoveStruct<{
|
|
11
|
-
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
12
|
-
}, "0x2::balance::Balance">;
|
|
11
|
+
value: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
|
|
12
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
@@ -9,11 +9,11 @@ exports.Balance = void 0;
|
|
|
9
9
|
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
10
10
|
* and `Balance`s.
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const index_js_1 = require("../../../utils/index.js");
|
|
13
13
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
14
14
|
const $moduleName = "0x2::balance";
|
|
15
|
-
exports.Balance = new
|
|
16
|
-
name: `${$moduleName}::Balance
|
|
15
|
+
exports.Balance = new index_js_1.MoveStruct({
|
|
16
|
+
name: `${$moduleName}::Balance<phantom T>`,
|
|
17
17
|
fields: {
|
|
18
18
|
value: bcs_1.bcs.u64(),
|
|
19
19
|
},
|
|
@@ -8,12 +8,10 @@
|
|
|
8
8
|
* may be important for external tools. The difference is otherwise not observable
|
|
9
9
|
* from within Move.
|
|
10
10
|
*/
|
|
11
|
-
import { MoveStruct } from "../../../utils/index";
|
|
11
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
12
12
|
export declare const ObjectTable: MoveStruct<{
|
|
13
13
|
/** the ID of this table */
|
|
14
|
-
id:
|
|
15
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
16
|
-
}, "0x2::object::UID">;
|
|
14
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
17
15
|
/** the number of key-value pairs in the table */
|
|
18
|
-
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
19
|
-
}, "0x2::object_table::ObjectTable">;
|
|
16
|
+
size: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
|
|
17
|
+
}, "0x2::object_table::ObjectTable<phantom K, phantom V>">;
|
|
@@ -2,39 +2,6 @@
|
|
|
2
2
|
/**************************************************************
|
|
3
3
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
4
|
**************************************************************/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
6
|
exports.ObjectTable = void 0;
|
|
40
7
|
/**
|
|
@@ -44,15 +11,14 @@ exports.ObjectTable = void 0;
|
|
|
44
11
|
* may be important for external tools. The difference is otherwise not observable
|
|
45
12
|
* from within Move.
|
|
46
13
|
*/
|
|
47
|
-
const
|
|
14
|
+
const index_js_1 = require("../../../utils/index.js");
|
|
48
15
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
49
|
-
const object = __importStar(require("./object"));
|
|
50
16
|
const $moduleName = "0x2::object_table";
|
|
51
|
-
exports.ObjectTable = new
|
|
52
|
-
name: `${$moduleName}::ObjectTable
|
|
17
|
+
exports.ObjectTable = new index_js_1.MoveStruct({
|
|
18
|
+
name: `${$moduleName}::ObjectTable<phantom K, phantom V>`,
|
|
53
19
|
fields: {
|
|
54
20
|
/** the ID of this table */
|
|
55
|
-
id:
|
|
21
|
+
id: bcs_1.bcs.Address,
|
|
56
22
|
/** the number of key-value pairs in the table */
|
|
57
23
|
size: bcs_1.bcs.u64(),
|
|
58
24
|
},
|
|
@@ -20,12 +20,10 @@
|
|
|
20
20
|
* assert!(&table1 != &table2);
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
import { MoveStruct } from "../../../utils/index";
|
|
23
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
24
24
|
export declare const Table: MoveStruct<{
|
|
25
25
|
/** the ID of this table */
|
|
26
|
-
id:
|
|
27
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
28
|
-
}, "0x2::object::UID">;
|
|
26
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
29
27
|
/** the number of key-value pairs in the table */
|
|
30
|
-
size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
31
|
-
}, "0x2::table::Table">;
|
|
28
|
+
size: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
|
|
29
|
+
}, "0x2::table::Table<phantom K, phantom V>">;
|
|
@@ -2,39 +2,6 @@
|
|
|
2
2
|
/**************************************************************
|
|
3
3
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
4
|
**************************************************************/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
6
|
exports.Table = void 0;
|
|
40
7
|
/**
|
|
@@ -56,15 +23,14 @@ exports.Table = void 0;
|
|
|
56
23
|
* assert!(&table1 != &table2);
|
|
57
24
|
* ```
|
|
58
25
|
*/
|
|
59
|
-
const
|
|
26
|
+
const index_js_1 = require("../../../utils/index.js");
|
|
60
27
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
61
|
-
const object = __importStar(require("./object"));
|
|
62
28
|
const $moduleName = "0x2::table";
|
|
63
|
-
exports.Table = new
|
|
64
|
-
name: `${$moduleName}::Table
|
|
29
|
+
exports.Table = new index_js_1.MoveStruct({
|
|
30
|
+
name: `${$moduleName}::Table<phantom K, phantom V>`,
|
|
65
31
|
fields: {
|
|
66
32
|
/** the ID of this table */
|
|
67
|
-
id:
|
|
33
|
+
id: bcs_1.bcs.Address,
|
|
68
34
|
/** the number of key-value pairs in the table */
|
|
69
35
|
size: bcs_1.bcs.u64(),
|
|
70
36
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
4
|
import { type BcsType } from "@mysten/sui/bcs";
|
|
5
|
-
import { MoveStruct } from "../../../utils/index";
|
|
5
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
6
6
|
/**
|
|
7
7
|
* A set data structure backed by a vector. The set is guaranteed not to contain
|
|
8
8
|
* duplicate keys. All operations are O(N) in the size of the set
|
|
@@ -12,7 +12,7 @@ import { MoveStruct } from "../../../utils/index";
|
|
|
12
12
|
* insertion order iteration should be handwritten.
|
|
13
13
|
*/
|
|
14
14
|
export declare function VecSet<K extends BcsType<any>>(...typeParameters: [K]): MoveStruct<{
|
|
15
|
-
contents: BcsType<import("@mysten/bcs").InferBcsType<K>[], Iterable<import("@mysten/bcs").InferBcsInput<K>> & {
|
|
15
|
+
contents: BcsType<import("@mysten/bcs", { with: { "resolution-mode": "import" } }).InferBcsType<K>[], Iterable<import("@mysten/bcs", { with: { "resolution-mode": "import" } }).InferBcsInput<K>> & {
|
|
16
16
|
length: number;
|
|
17
17
|
}, string>;
|
|
18
18
|
}, `0x2::vec_set::VecSet<${K["name"]}>`>;
|
|
@@ -5,7 +5,7 @@ exports.VecSet = VecSet;
|
|
|
5
5
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
6
6
|
**************************************************************/
|
|
7
7
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
8
|
-
const
|
|
8
|
+
const index_js_1 = require("../../../utils/index.js");
|
|
9
9
|
const $moduleName = "0x2::vec_set";
|
|
10
10
|
/**
|
|
11
11
|
* A set data structure backed by a vector. The set is guaranteed not to contain
|
|
@@ -16,7 +16,7 @@ const $moduleName = "0x2::vec_set";
|
|
|
16
16
|
* insertion order iteration should be handwritten.
|
|
17
17
|
*/
|
|
18
18
|
function VecSet(...typeParameters) {
|
|
19
|
-
return new
|
|
19
|
+
return new index_js_1.MoveStruct({
|
|
20
20
|
name: `${$moduleName}::VecSet<${typeParameters[0].name}>`,
|
|
21
21
|
fields: {
|
|
22
22
|
contents: bcs_1.bcs.vector(typeParameters[0]),
|
|
@@ -7,24 +7,22 @@
|
|
|
7
7
|
* access to a large number of elements by storing them in slices, while
|
|
8
8
|
* maintaining a mapping from keys to indices in a `Table`.
|
|
9
9
|
*/
|
|
10
|
-
import { MoveStruct } from "../../../utils/index";
|
|
10
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
11
11
|
export declare const KeyedBigVector: MoveStruct<{
|
|
12
12
|
/** The unique identifier of the KeyedBigVector object. */
|
|
13
|
-
id:
|
|
14
|
-
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
15
|
-
}, "0x2::object::UID">;
|
|
13
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
16
14
|
/** The type name of the keys. */
|
|
17
15
|
key_type: MoveStruct<{
|
|
18
|
-
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
16
|
+
name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
|
|
19
17
|
}, "std::type_name::TypeName">;
|
|
20
18
|
/** The type name of the values. */
|
|
21
19
|
value_type: MoveStruct<{
|
|
22
|
-
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
20
|
+
name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
|
|
23
21
|
}, "std::type_name::TypeName">;
|
|
24
22
|
/** The index of the latest slice. */
|
|
25
|
-
slice_idx: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
|
|
23
|
+
slice_idx: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<number, number, "u16">;
|
|
26
24
|
/** The maximum size of each slice. */
|
|
27
|
-
slice_size: import("@mysten/sui/bcs").BcsType<number, number, "u32">;
|
|
25
|
+
slice_size: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<number, number, "u32">;
|
|
28
26
|
/** The total number of elements in the KeyedBigVector. */
|
|
29
|
-
length: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
27
|
+
length: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
|
|
30
28
|
}, "typus::keyed_big_vector::KeyedBigVector">;
|
|
@@ -43,20 +43,20 @@ exports.KeyedBigVector = void 0;
|
|
|
43
43
|
* access to a large number of elements by storing them in slices, while
|
|
44
44
|
* maintaining a mapping from keys to indices in a `Table`.
|
|
45
45
|
*/
|
|
46
|
-
const
|
|
46
|
+
const index_js_1 = require("../../../utils/index.js");
|
|
47
47
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
48
|
-
const
|
|
49
|
-
const
|
|
48
|
+
const type_name = __importStar(require("../std/type_name.js"));
|
|
49
|
+
const type_name_1 = __importStar(require("../std/type_name.js"));
|
|
50
50
|
const $moduleName = "typus::keyed_big_vector";
|
|
51
|
-
exports.KeyedBigVector = new
|
|
51
|
+
exports.KeyedBigVector = new index_js_1.MoveStruct({
|
|
52
52
|
name: `${$moduleName}::KeyedBigVector`,
|
|
53
53
|
fields: {
|
|
54
54
|
/** The unique identifier of the KeyedBigVector object. */
|
|
55
|
-
id:
|
|
55
|
+
id: bcs_1.bcs.Address,
|
|
56
56
|
/** The type name of the keys. */
|
|
57
57
|
key_type: type_name.TypeName,
|
|
58
58
|
/** The type name of the values. */
|
|
59
|
-
value_type:
|
|
59
|
+
value_type: type_name_1.TypeName,
|
|
60
60
|
/** The index of the latest slice. */
|
|
61
61
|
slice_idx: bcs_1.bcs.u16(),
|
|
62
62
|
/** The maximum size of each slice. */
|
|
@@ -9,24 +9,20 @@
|
|
|
9
9
|
* allowing for efficient iteration in both forward and reverse order.
|
|
10
10
|
*/
|
|
11
11
|
import { type BcsType } from "@mysten/sui/bcs";
|
|
12
|
-
import { MoveStruct } from "../../../utils/index";
|
|
12
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
13
13
|
/**
|
|
14
14
|
* A doubly-linked list of key-value pairs where values are stored as dynamic
|
|
15
15
|
* object fields.
|
|
16
16
|
*/
|
|
17
17
|
export declare function LinkedObjectTable<K extends BcsType<any>>(...typeParameters: [K]): MoveStruct<{
|
|
18
18
|
/** The UID for storing the nodes of the linked list. */
|
|
19
|
-
id:
|
|
20
|
-
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
-
}, "0x2::object::UID">;
|
|
19
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
22
20
|
/** The UID for storing the values as dynamic object fields. */
|
|
23
|
-
vid:
|
|
24
|
-
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
25
|
-
}, "0x2::object::UID">;
|
|
21
|
+
vid: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
26
22
|
/** The number of key-value pairs in the table. */
|
|
27
23
|
size: BcsType<string, string | number | bigint, "u64">;
|
|
28
24
|
/** The key of the first entry in the table. */
|
|
29
|
-
head: BcsType<import("@mysten/bcs").InferBcsType<K> | null, import("@mysten/bcs").InferBcsInput<K> | null | undefined, `Option<${K["name"]}>`>;
|
|
25
|
+
head: BcsType<import("@mysten/bcs", { with: { "resolution-mode": "import" } }).InferBcsType<K> | null, import("@mysten/bcs", { with: { "resolution-mode": "import" } }).InferBcsInput<K> | null | undefined, `Option<${K["name"]}>`>;
|
|
30
26
|
/** The key of the last entry in the table. */
|
|
31
|
-
tail: BcsType<import("@mysten/bcs").InferBcsType<K> | null, import("@mysten/bcs").InferBcsInput<K> | null | undefined, `Option<${K["name"]}>`>;
|
|
32
|
-
}, `typus::linked_object_table::LinkedObjectTable<${K["name"]}>`>;
|
|
27
|
+
tail: BcsType<import("@mysten/bcs", { with: { "resolution-mode": "import" } }).InferBcsType<K> | null, import("@mysten/bcs", { with: { "resolution-mode": "import" } }).InferBcsInput<K> | null | undefined, `Option<${K["name"]}>`>;
|
|
28
|
+
}, `typus::linked_object_table::LinkedObjectTable<${K["name"]}, phantom V>`>;
|
|
@@ -2,39 +2,6 @@
|
|
|
2
2
|
/**************************************************************
|
|
3
3
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
4
4
|
**************************************************************/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
6
|
exports.LinkedObjectTable = LinkedObjectTable;
|
|
40
7
|
/**
|
|
@@ -45,21 +12,20 @@ exports.LinkedObjectTable = LinkedObjectTable;
|
|
|
45
12
|
* allowing for efficient iteration in both forward and reverse order.
|
|
46
13
|
*/
|
|
47
14
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
48
|
-
const
|
|
49
|
-
const object = __importStar(require("../sui/object"));
|
|
15
|
+
const index_js_1 = require("../../../utils/index.js");
|
|
50
16
|
const $moduleName = "typus::linked_object_table";
|
|
51
17
|
/**
|
|
52
18
|
* A doubly-linked list of key-value pairs where values are stored as dynamic
|
|
53
19
|
* object fields.
|
|
54
20
|
*/
|
|
55
21
|
function LinkedObjectTable(...typeParameters) {
|
|
56
|
-
return new
|
|
57
|
-
name: `${$moduleName}::LinkedObjectTable<${typeParameters[0].name}>`,
|
|
22
|
+
return new index_js_1.MoveStruct({
|
|
23
|
+
name: `${$moduleName}::LinkedObjectTable<${typeParameters[0].name}, phantom V>`,
|
|
58
24
|
fields: {
|
|
59
25
|
/** The UID for storing the nodes of the linked list. */
|
|
60
|
-
id:
|
|
26
|
+
id: bcs_1.bcs.Address,
|
|
61
27
|
/** The UID for storing the values as dynamic object fields. */
|
|
62
|
-
vid:
|
|
28
|
+
vid: bcs_1.bcs.Address,
|
|
63
29
|
/** The number of key-value pairs in the table. */
|
|
64
30
|
size: bcs_1.bcs.u64(),
|
|
65
31
|
/** The key of the first entry in the table. */
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
/**************************************************************
|
|
2
2
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
3
|
**************************************************************/
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* No authority chech in these public functions, do not let `DepositVault`
|
|
6
|
+
* `BidVault` and `RefundVault` be exposed.
|
|
7
|
+
*/
|
|
8
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
5
9
|
export declare const TypusBidReceipt: MoveStruct<{
|
|
6
|
-
id:
|
|
7
|
-
|
|
8
|
-
}, "
|
|
9
|
-
|
|
10
|
-
index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
11
|
+
/** The ID of the `BidVault`. */
|
|
12
|
+
vid: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
13
|
+
/** The index of the vault. */
|
|
14
|
+
index: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
|
|
15
|
+
/** Metadata for display purposes. */
|
|
16
|
+
metadata: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
|
|
17
|
+
/** Padding for additional u64 fields. */
|
|
18
|
+
u64_padding: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string[], Iterable<string | number | bigint> & {
|
|
13
19
|
length: number;
|
|
14
20
|
}, string>;
|
|
15
21
|
}, "typus_framework::vault::TypusBidReceipt">;
|
|
@@ -1,53 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TypusBidReceipt = void 0;
|
|
37
2
|
/**************************************************************
|
|
38
3
|
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
39
4
|
**************************************************************/
|
|
40
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TypusBidReceipt = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* No authority chech in these public functions, do not let `DepositVault`
|
|
9
|
+
* `BidVault` and `RefundVault` be exposed.
|
|
10
|
+
*/
|
|
11
|
+
const index_js_1 = require("../../../utils/index.js");
|
|
41
12
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
42
|
-
const object = __importStar(require("../sui/object"));
|
|
43
13
|
const $moduleName = "typus_framework::vault";
|
|
44
|
-
exports.TypusBidReceipt = new
|
|
14
|
+
exports.TypusBidReceipt = new index_js_1.MoveStruct({
|
|
45
15
|
name: `${$moduleName}::TypusBidReceipt`,
|
|
46
16
|
fields: {
|
|
47
|
-
id:
|
|
17
|
+
id: bcs_1.bcs.Address,
|
|
18
|
+
/** The ID of the `BidVault`. */
|
|
48
19
|
vid: bcs_1.bcs.Address,
|
|
20
|
+
/** The index of the vault. */
|
|
49
21
|
index: bcs_1.bcs.u64(),
|
|
22
|
+
/** Metadata for display purposes. */
|
|
50
23
|
metadata: bcs_1.bcs.string(),
|
|
24
|
+
/** Padding for additional u64 fields. */
|
|
51
25
|
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
52
26
|
},
|
|
53
27
|
});
|