@typus/typus-perp-sdk 1.1.32-codegen-exp7 → 1.1.32-codegen-exp9
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/client.js +34 -3
- package/dist/src/fetch.d.ts +2 -2
- package/dist/src/fetch.js +42 -40
- package/dist/src/generated/typus_perp/admin.d.ts +158 -1
- package/dist/src/generated/typus_perp/admin.js +211 -0
- package/dist/src/generated/typus_perp/competition.d.ts +39 -1
- package/dist/src/generated/typus_perp/competition.js +46 -0
- package/dist/src/generated/typus_perp/deps/sui/table.d.ts +31 -0
- package/dist/src/generated/typus_perp/{tlp.js → deps/sui/table.js} +28 -13
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +0 -8
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +3 -11
- package/dist/src/generated/typus_perp/error.d.ts +443 -0
- package/dist/src/generated/typus_perp/error.js +788 -0
- package/dist/src/generated/typus_perp/escrow.d.ts +51 -1
- package/dist/src/generated/typus_perp/escrow.js +63 -0
- package/dist/src/generated/typus_perp/lp_pool.d.ts +2 -476
- package/dist/src/generated/typus_perp/lp_pool.js +19 -492
- package/dist/src/generated/typus_perp/position.d.ts +1016 -1
- package/dist/src/generated/typus_perp/position.js +1187 -0
- package/dist/src/generated/typus_perp/profit_vault.d.ts +272 -0
- package/dist/src/generated/typus_perp/profit_vault.js +321 -0
- package/dist/src/generated/typus_perp/symbol.d.ts +30 -1
- package/dist/src/generated/typus_perp/symbol.js +42 -0
- package/dist/src/generated/typus_perp/trading.d.ts +56 -418
- package/dist/src/generated/typus_perp/trading.js +124 -552
- package/dist/src/generated/typus_perp/treasury_caps.d.ts +32 -1
- package/dist/src/generated/typus_perp/treasury_caps.js +40 -0
- package/dist/src/generated/typus_perp/user_account.d.ts +107 -1
- package/dist/src/generated/typus_perp/user_account.js +149 -0
- package/dist/src/generated/typus_stake_pool/admin.d.ts +9 -25
- package/dist/src/generated/typus_stake_pool/admin.js +11 -36
- package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +56 -4
- package/dist/src/generated/typus_stake_pool/stake_pool.js +68 -4
- package/dist/src/generated/utils/index.js +3 -0
- package/dist/src/grpc/graphql.d.ts +6 -6
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +13 -19
- package/dist/src/user/order.js +1 -6
- package/dist/src/user/orderWithBidReceipt.js +3 -3
- package/package.json +2 -2
- package/dist/src/generated/typus_perp/lending.d.ts +0 -47
- package/dist/src/generated/typus_perp/lending.js +0 -50
- package/dist/src/generated/typus_perp/tlp.d.ts +0 -13
|
@@ -37,6 +37,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.Symbol = void 0;
|
|
40
|
+
exports.create = create;
|
|
41
|
+
exports.baseToken = baseToken;
|
|
42
|
+
exports.quoteToken = quoteToken;
|
|
40
43
|
/**
|
|
41
44
|
* The `symbol` module defines the `Symbol` struct, which represents a trading
|
|
42
45
|
* pair.
|
|
@@ -53,3 +56,42 @@ exports.Symbol = new index_1.MoveStruct({
|
|
|
53
56
|
quote_token: type_name.TypeName,
|
|
54
57
|
},
|
|
55
58
|
});
|
|
59
|
+
/** Creates a new `Symbol` from `TypeName`s. */
|
|
60
|
+
function create(options) {
|
|
61
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
62
|
+
const argumentsTypes = [
|
|
63
|
+
"0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName",
|
|
64
|
+
"0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName",
|
|
65
|
+
];
|
|
66
|
+
const parameterNames = ["baseToken", "quoteToken"];
|
|
67
|
+
return (tx) => tx.moveCall({
|
|
68
|
+
package: packageAddress,
|
|
69
|
+
module: "symbol",
|
|
70
|
+
function: "create",
|
|
71
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/** Gets the base token of a `Symbol`. */
|
|
75
|
+
function baseToken(options) {
|
|
76
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
77
|
+
const argumentsTypes = [`${packageAddress}::symbol::Symbol`];
|
|
78
|
+
const parameterNames = ["self"];
|
|
79
|
+
return (tx) => tx.moveCall({
|
|
80
|
+
package: packageAddress,
|
|
81
|
+
module: "symbol",
|
|
82
|
+
function: "base_token",
|
|
83
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/** Gets the quote token of a `Symbol`. */
|
|
87
|
+
function quoteToken(options) {
|
|
88
|
+
const packageAddress = options.package ?? "@typus/perp";
|
|
89
|
+
const argumentsTypes = [`${packageAddress}::symbol::Symbol`];
|
|
90
|
+
const parameterNames = ["self"];
|
|
91
|
+
return (tx) => tx.moveCall({
|
|
92
|
+
package: packageAddress,
|
|
93
|
+
module: "symbol",
|
|
94
|
+
function: "quote_token",
|
|
95
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
96
|
+
});
|
|
97
|
+
}
|