@typus/typus-perp-sdk 1.2.2 → 1.3.0
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.d.ts +22 -3
- package/dist/src/client.js +66 -8
- package/dist/src/fetch.d.ts +61 -20
- package/dist/src/fetch.js +20 -14
- package/dist/src/generated/typus_perp/admin.d.ts +65 -21
- package/dist/src/generated/typus_perp/admin.js +139 -123
- package/dist/src/generated/typus_perp/competition.d.ts +5 -17
- package/dist/src/generated/typus_perp/competition.js +63 -39
- package/dist/src/generated/typus_perp/deps/std/type_name.d.ts +9 -9
- package/dist/src/generated/typus_perp/deps/std/type_name.js +13 -16
- package/dist/src/generated/typus_perp/deps/sui/balance.d.ts +2 -2
- package/dist/src/generated/typus_perp/deps/sui/balance.js +5 -8
- package/dist/src/generated/typus_perp/deps/sui/object.d.ts +8 -0
- package/dist/src/generated/typus_perp/deps/sui/object.js +13 -0
- package/dist/src/generated/typus_perp/deps/sui/object_table.d.ts +5 -3
- package/dist/src/generated/typus_perp/deps/sui/object_table.js +40 -9
- package/dist/src/generated/typus_perp/deps/sui/table.d.ts +5 -3
- package/dist/src/generated/typus_perp/deps/sui/table.js +40 -9
- package/dist/src/generated/typus_perp/deps/sui/vec_set.d.ts +5 -3
- package/dist/src/generated/typus_perp/deps/sui/vec_set.js +5 -8
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.d.ts +4 -2
- package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.js +9 -12
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.d.ts +12 -6
- package/dist/src/generated/typus_perp/deps/typus/linked_object_table.js +41 -10
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +4 -2
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +40 -9
- package/dist/src/generated/typus_perp/error.d.ts +201 -94
- package/dist/src/generated/typus_perp/error.js +300 -273
- package/dist/src/generated/typus_perp/escrow.d.ts +14 -6
- package/dist/src/generated/typus_perp/escrow.js +38 -37
- package/dist/src/generated/typus_perp/lending.d.ts +1 -1
- package/dist/src/generated/typus_perp/lending.js +3 -3
- package/dist/src/generated/typus_perp/lp_pool.d.ts +438 -392
- package/dist/src/generated/typus_perp/lp_pool.js +987 -934
- package/dist/src/generated/typus_perp/math.d.ts +13 -16
- package/dist/src/generated/typus_perp/math.js +51 -50
- package/dist/src/generated/typus_perp/position.d.ts +194 -106
- package/dist/src/generated/typus_perp/position.js +714 -733
- package/dist/src/generated/typus_perp/profit_vault.d.ts +62 -20
- package/dist/src/generated/typus_perp/profit_vault.js +162 -148
- package/dist/src/generated/typus_perp/symbol.d.ts +12 -5
- package/dist/src/generated/typus_perp/symbol.js +28 -25
- package/dist/src/generated/typus_perp/trading.d.ts +956 -139
- package/dist/src/generated/typus_perp/trading.js +1577 -1151
- package/dist/src/generated/typus_perp/treasury_caps.d.ts +16 -7
- package/dist/src/generated/typus_perp/treasury_caps.js +60 -24
- package/dist/src/generated/typus_perp/user_account.d.ts +40 -0
- package/dist/src/generated/typus_perp/user_account.js +66 -0
- package/dist/src/generated/typus_stake_pool/admin.d.ts +144 -10
- package/dist/src/generated/typus_stake_pool/admin.js +132 -49
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.d.ts +9 -9
- package/dist/src/generated/typus_stake_pool/deps/std/type_name.js +13 -16
- package/dist/src/generated/typus_stake_pool/deps/sui/object.d.ts +8 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/object.js +13 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.js +31 -0
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.d.ts +5 -3
- package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.js +5 -8
- package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +180 -79
- package/dist/src/generated/typus_stake_pool/stake_pool.js +446 -414
- package/dist/src/generated/utils/index.d.ts +4 -23
- package/dist/src/generated/utils/index.js +34 -54
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +35 -13
- package/dist/src/user/order.d.ts +0 -4
- package/dist/src/user/order.js +31 -74
- package/dist/src/user/orderWithBidReceipt.d.ts +0 -3
- package/dist/src/user/orderWithBidReceipt.js +24 -45
- package/dist/src/user/tlp.d.ts +0 -5
- package/dist/src/user/tlp.js +28 -73
- package/package.json +42 -40
|
@@ -5,14 +5,17 @@
|
|
|
5
5
|
* The `treasury_caps` module defines the `TreasuryCaps` struct, which is a shared
|
|
6
6
|
* object that stores the treasury caps for the TLP tokens.
|
|
7
7
|
*/
|
|
8
|
-
import { MoveStruct, type RawTransactionArgument } from
|
|
9
|
-
import { type Transaction } from
|
|
8
|
+
import { MoveStruct, type RawTransactionArgument } from '../utils/index';
|
|
9
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
10
10
|
export declare const TreasuryCaps: MoveStruct<{
|
|
11
|
-
id:
|
|
11
|
+
id: MoveStruct<{
|
|
12
|
+
id: import("@mysten/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
13
|
+
}, "0x2::object::UID">;
|
|
12
14
|
}, "@typus/perp::treasury_caps::TreasuryCaps">;
|
|
13
15
|
export interface InitOptions {
|
|
14
16
|
package?: string;
|
|
15
|
-
arguments?: [
|
|
17
|
+
arguments?: [
|
|
18
|
+
];
|
|
16
19
|
}
|
|
17
20
|
export declare function init(options?: InitOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
18
21
|
export interface GetMutTreasuryCapArguments {
|
|
@@ -20,8 +23,12 @@ export interface GetMutTreasuryCapArguments {
|
|
|
20
23
|
}
|
|
21
24
|
export interface GetMutTreasuryCapOptions {
|
|
22
25
|
package?: string;
|
|
23
|
-
arguments: GetMutTreasuryCapArguments | [
|
|
24
|
-
|
|
26
|
+
arguments: GetMutTreasuryCapArguments | [
|
|
27
|
+
treasuryCaps: RawTransactionArgument<string>
|
|
28
|
+
];
|
|
29
|
+
typeArguments: [
|
|
30
|
+
string
|
|
31
|
+
];
|
|
25
32
|
}
|
|
26
33
|
/** Gets a mutable reference to a treasury cap. WARNING: no authority check inside */
|
|
27
34
|
export declare function getMutTreasuryCap(options: GetMutTreasuryCapOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
@@ -37,6 +44,8 @@ export interface ManagerStoreTreasuryCapOptions {
|
|
|
37
44
|
treasuryCaps: RawTransactionArgument<string>,
|
|
38
45
|
treasuryCap: RawTransactionArgument<string>
|
|
39
46
|
];
|
|
40
|
-
typeArguments: [
|
|
47
|
+
typeArguments: [
|
|
48
|
+
string
|
|
49
|
+
];
|
|
41
50
|
}
|
|
42
51
|
export declare function managerStoreTreasuryCap(options: ManagerStoreTreasuryCapOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
@@ -2,6 +2,39 @@
|
|
|
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
|
+
})();
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
39
|
exports.TreasuryCaps = void 0;
|
|
7
40
|
exports.init = init;
|
|
@@ -11,45 +44,48 @@ exports.managerStoreTreasuryCap = managerStoreTreasuryCap;
|
|
|
11
44
|
* The `treasury_caps` module defines the `TreasuryCaps` struct, which is a shared
|
|
12
45
|
* object that stores the treasury caps for the TLP tokens.
|
|
13
46
|
*/
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const $moduleName =
|
|
17
|
-
exports.TreasuryCaps = new
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
id: bcs_1.bcs.Address,
|
|
21
|
-
},
|
|
22
|
-
});
|
|
47
|
+
const index_1 = require("../utils/index");
|
|
48
|
+
const object = __importStar(require("./deps/sui/object"));
|
|
49
|
+
const $moduleName = '@typus/perp::treasury_caps';
|
|
50
|
+
exports.TreasuryCaps = new index_1.MoveStruct({ name: `${$moduleName}::TreasuryCaps`, fields: {
|
|
51
|
+
id: object.UID
|
|
52
|
+
} });
|
|
23
53
|
function init(options = {}) {
|
|
24
|
-
const packageAddress = options.package ??
|
|
54
|
+
const packageAddress = options.package ?? '@typus/perp';
|
|
25
55
|
return (tx) => tx.moveCall({
|
|
26
56
|
package: packageAddress,
|
|
27
|
-
module:
|
|
28
|
-
function:
|
|
57
|
+
module: 'treasury_caps',
|
|
58
|
+
function: 'init',
|
|
29
59
|
});
|
|
30
60
|
}
|
|
31
61
|
/** Gets a mutable reference to a treasury cap. WARNING: no authority check inside */
|
|
32
62
|
function getMutTreasuryCap(options) {
|
|
33
|
-
const packageAddress = options.package ??
|
|
34
|
-
const argumentsTypes = [
|
|
63
|
+
const packageAddress = options.package ?? '@typus/perp';
|
|
64
|
+
const argumentsTypes = [
|
|
65
|
+
`${packageAddress}::treasury_caps::TreasuryCaps`
|
|
66
|
+
];
|
|
35
67
|
const parameterNames = ["treasuryCaps"];
|
|
36
68
|
return (tx) => tx.moveCall({
|
|
37
69
|
package: packageAddress,
|
|
38
|
-
module:
|
|
39
|
-
function:
|
|
40
|
-
arguments: (0,
|
|
41
|
-
typeArguments: options.typeArguments
|
|
70
|
+
module: 'treasury_caps',
|
|
71
|
+
function: 'get_mut_treasury_cap',
|
|
72
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
73
|
+
typeArguments: options.typeArguments
|
|
42
74
|
});
|
|
43
75
|
}
|
|
44
76
|
function managerStoreTreasuryCap(options) {
|
|
45
|
-
const packageAddress = options.package ??
|
|
46
|
-
const argumentsTypes = [
|
|
77
|
+
const packageAddress = options.package ?? '@typus/perp';
|
|
78
|
+
const argumentsTypes = [
|
|
79
|
+
`${packageAddress}::admin::Version`,
|
|
80
|
+
`${packageAddress}::treasury_caps::TreasuryCaps`,
|
|
81
|
+
`0x0000000000000000000000000000000000000000000000000000000000000002::coin::TreasuryCap<${options.typeArguments[0]}>`
|
|
82
|
+
];
|
|
47
83
|
const parameterNames = ["version", "treasuryCaps", "treasuryCap"];
|
|
48
84
|
return (tx) => tx.moveCall({
|
|
49
85
|
package: packageAddress,
|
|
50
|
-
module:
|
|
51
|
-
function:
|
|
52
|
-
arguments: (0,
|
|
53
|
-
typeArguments: options.typeArguments
|
|
86
|
+
module: 'treasury_caps',
|
|
87
|
+
function: 'manager_store_treasury_cap',
|
|
88
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
89
|
+
typeArguments: options.typeArguments
|
|
54
90
|
});
|
|
55
91
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* The `user_account` module defines the `UserAccount` and `UserAccountCap`
|
|
6
|
+
* structs, and the logic for creating, updating, and using them.
|
|
7
|
+
*/
|
|
8
|
+
import { MoveStruct } from '../utils/index';
|
|
9
|
+
export declare const UserAccount: MoveStruct<{
|
|
10
|
+
id: MoveStruct<{
|
|
11
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
12
|
+
}, "0x2::object::UID">;
|
|
13
|
+
/** The address of the owner of the user account. */
|
|
14
|
+
owner: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
15
|
+
/** A vector of the delegate users. */
|
|
16
|
+
delegate_user: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string[], Iterable<string | Uint8Array<ArrayBufferLike>> & {
|
|
17
|
+
length: number;
|
|
18
|
+
}, string>;
|
|
19
|
+
/** A vector of the symbols of the tokens in the user account. */
|
|
20
|
+
symbols: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<{
|
|
21
|
+
name: string;
|
|
22
|
+
}[], Iterable<{
|
|
23
|
+
name: string;
|
|
24
|
+
}> & {
|
|
25
|
+
length: number;
|
|
26
|
+
}, string>;
|
|
27
|
+
/** Padding for future use. */
|
|
28
|
+
u64_padding: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string[], Iterable<string | number | bigint> & {
|
|
29
|
+
length: number;
|
|
30
|
+
}, string>;
|
|
31
|
+
}, "@typus/perp::user_account::UserAccount">;
|
|
32
|
+
export declare const UserAccountCap: MoveStruct<{
|
|
33
|
+
id: MoveStruct<{
|
|
34
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
35
|
+
}, "0x2::object::UID">;
|
|
36
|
+
/** The address of the owner of the user account. */
|
|
37
|
+
owner: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
38
|
+
/** The ID of the user account. */
|
|
39
|
+
user_account_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
40
|
+
}, "@typus/perp::user_account::UserAccountCap">;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**************************************************************
|
|
3
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.UserAccountCap = exports.UserAccount = void 0;
|
|
40
|
+
/**
|
|
41
|
+
* The `user_account` module defines the `UserAccount` and `UserAccountCap`
|
|
42
|
+
* structs, and the logic for creating, updating, and using them.
|
|
43
|
+
*/
|
|
44
|
+
const index_1 = require("../utils/index");
|
|
45
|
+
const bcs_1 = require("@mysten/sui/bcs");
|
|
46
|
+
const object = __importStar(require("./deps/sui/object"));
|
|
47
|
+
const type_name = __importStar(require("./deps/std/type_name"));
|
|
48
|
+
const $moduleName = '@typus/perp::user_account';
|
|
49
|
+
exports.UserAccount = new index_1.MoveStruct({ name: `${$moduleName}::UserAccount`, fields: {
|
|
50
|
+
id: object.UID,
|
|
51
|
+
/** The address of the owner of the user account. */
|
|
52
|
+
owner: bcs_1.bcs.Address,
|
|
53
|
+
/** A vector of the delegate users. */
|
|
54
|
+
delegate_user: bcs_1.bcs.vector(bcs_1.bcs.Address),
|
|
55
|
+
/** A vector of the symbols of the tokens in the user account. */
|
|
56
|
+
symbols: bcs_1.bcs.vector(type_name.TypeName),
|
|
57
|
+
/** Padding for future use. */
|
|
58
|
+
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64())
|
|
59
|
+
} });
|
|
60
|
+
exports.UserAccountCap = new index_1.MoveStruct({ name: `${$moduleName}::UserAccountCap`, fields: {
|
|
61
|
+
id: object.UID,
|
|
62
|
+
/** The address of the owner of the user account. */
|
|
63
|
+
owner: bcs_1.bcs.Address,
|
|
64
|
+
/** The ID of the user account. */
|
|
65
|
+
user_account_id: bcs_1.bcs.Address
|
|
66
|
+
} });
|
|
@@ -5,12 +5,81 @@
|
|
|
5
5
|
* The `admin` module provides administrative functionalities for the Typus Stake
|
|
6
6
|
* Pool. It includes version management, authority control, and fee handling.
|
|
7
7
|
*/
|
|
8
|
-
import { MoveStruct, type RawTransactionArgument } from
|
|
9
|
-
import { type Transaction } from
|
|
8
|
+
import { MoveStruct, type RawTransactionArgument } from '../utils/index';
|
|
9
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
10
|
+
export declare const FeeInfo: MoveStruct<{
|
|
11
|
+
/** The type name of the token. */
|
|
12
|
+
token: MoveStruct<{
|
|
13
|
+
name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
|
|
14
|
+
}, "std::type_name::TypeName">;
|
|
15
|
+
/** The amount of fees collected. */
|
|
16
|
+
value: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
|
|
17
|
+
}, "@typus/stake-pool::admin::FeeInfo">;
|
|
18
|
+
export declare const FeePool: MoveStruct<{
|
|
19
|
+
id: MoveStruct<{
|
|
20
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
+
}, "0x2::object::UID">;
|
|
22
|
+
/** A vector of `FeeInfo` structs. */
|
|
23
|
+
fee_infos: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<{
|
|
24
|
+
token: {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
value: string;
|
|
28
|
+
}[], Iterable<{
|
|
29
|
+
token: {
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
32
|
+
value: string | number | bigint;
|
|
33
|
+
}> & {
|
|
34
|
+
length: number;
|
|
35
|
+
}, string>;
|
|
36
|
+
}, "@typus/stake-pool::admin::FeePool">;
|
|
10
37
|
export declare const Version: MoveStruct<{
|
|
11
|
-
id:
|
|
38
|
+
id: MoveStruct<{
|
|
39
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
40
|
+
}, "0x2::object::UID">;
|
|
12
41
|
/** The version number. */
|
|
13
42
|
value: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
|
|
43
|
+
/** The fee pool for protocol fees. */
|
|
44
|
+
fee_pool: MoveStruct<{
|
|
45
|
+
id: MoveStruct<{
|
|
46
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
47
|
+
}, "0x2::object::UID">;
|
|
48
|
+
/** A vector of `FeeInfo` structs. */
|
|
49
|
+
fee_infos: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<{
|
|
50
|
+
token: {
|
|
51
|
+
name: string;
|
|
52
|
+
};
|
|
53
|
+
value: string;
|
|
54
|
+
}[], Iterable<{
|
|
55
|
+
token: {
|
|
56
|
+
name: string;
|
|
57
|
+
};
|
|
58
|
+
value: string | number | bigint;
|
|
59
|
+
}> & {
|
|
60
|
+
length: number;
|
|
61
|
+
}, string>;
|
|
62
|
+
}, "@typus/stake-pool::admin::FeePool">;
|
|
63
|
+
/** The fee pool for liquidator fees. */
|
|
64
|
+
liquidator_fee_pool: MoveStruct<{
|
|
65
|
+
id: MoveStruct<{
|
|
66
|
+
id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
67
|
+
}, "0x2::object::UID">;
|
|
68
|
+
/** A vector of `FeeInfo` structs. */
|
|
69
|
+
fee_infos: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<{
|
|
70
|
+
token: {
|
|
71
|
+
name: string;
|
|
72
|
+
};
|
|
73
|
+
value: string;
|
|
74
|
+
}[], Iterable<{
|
|
75
|
+
token: {
|
|
76
|
+
name: string;
|
|
77
|
+
};
|
|
78
|
+
value: string | number | bigint;
|
|
79
|
+
}> & {
|
|
80
|
+
length: number;
|
|
81
|
+
}, string>;
|
|
82
|
+
}, "@typus/stake-pool::admin::FeePool">;
|
|
14
83
|
/** The list of authorized addresses. */
|
|
15
84
|
authority: MoveStruct<{
|
|
16
85
|
contents: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string[], Iterable<string | Uint8Array<ArrayBufferLike>> & {
|
|
@@ -22,12 +91,30 @@ export declare const Version: MoveStruct<{
|
|
|
22
91
|
length: number;
|
|
23
92
|
}, string>;
|
|
24
93
|
}, "@typus/stake-pool::admin::Version">;
|
|
94
|
+
export declare const SendFeeEvent: MoveStruct<{
|
|
95
|
+
/** The type name of the token. */
|
|
96
|
+
token: MoveStruct<{
|
|
97
|
+
name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
|
|
98
|
+
}, "std::type_name::TypeName">;
|
|
99
|
+
/** The amount of fees sent. */
|
|
100
|
+
amount: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
|
|
101
|
+
}, "@typus/stake-pool::admin::SendFeeEvent">;
|
|
102
|
+
export declare const ProtocolFeeEvent: MoveStruct<{
|
|
103
|
+
/** The type name of the token. */
|
|
104
|
+
token: MoveStruct<{
|
|
105
|
+
name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
|
|
106
|
+
}, "std::type_name::TypeName">;
|
|
107
|
+
/** The amount of fees charged. */
|
|
108
|
+
amount: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
|
|
109
|
+
}, "@typus/stake-pool::admin::ProtocolFeeEvent">;
|
|
25
110
|
export interface VersionCheckArguments {
|
|
26
111
|
version: RawTransactionArgument<string>;
|
|
27
112
|
}
|
|
28
113
|
export interface VersionCheckOptions {
|
|
29
114
|
package?: string;
|
|
30
|
-
arguments: VersionCheckArguments | [
|
|
115
|
+
arguments: VersionCheckArguments | [
|
|
116
|
+
version: RawTransactionArgument<string>
|
|
117
|
+
];
|
|
31
118
|
}
|
|
32
119
|
/** Checks if the contract version is valid. */
|
|
33
120
|
export declare function versionCheck(options: VersionCheckOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
@@ -36,13 +123,16 @@ export interface UpgradeArguments {
|
|
|
36
123
|
}
|
|
37
124
|
export interface UpgradeOptions {
|
|
38
125
|
package?: string;
|
|
39
|
-
arguments: UpgradeArguments | [
|
|
126
|
+
arguments: UpgradeArguments | [
|
|
127
|
+
version: RawTransactionArgument<string>
|
|
128
|
+
];
|
|
40
129
|
}
|
|
41
130
|
/** Upgrades the contract version. WARNING: no authority check inside */
|
|
42
131
|
export declare function upgrade(options: UpgradeOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
43
132
|
export interface InitOptions {
|
|
44
133
|
package?: string;
|
|
45
|
-
arguments?: [
|
|
134
|
+
arguments?: [
|
|
135
|
+
];
|
|
46
136
|
}
|
|
47
137
|
/** Initializes the contract. */
|
|
48
138
|
export declare function init(options?: InitOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
@@ -51,7 +141,9 @@ export interface VerifyArguments {
|
|
|
51
141
|
}
|
|
52
142
|
export interface VerifyOptions {
|
|
53
143
|
package?: string;
|
|
54
|
-
arguments: VerifyArguments | [
|
|
144
|
+
arguments: VerifyArguments | [
|
|
145
|
+
version: RawTransactionArgument<string>
|
|
146
|
+
];
|
|
55
147
|
}
|
|
56
148
|
/** [Authorized Function] Verifies if the sender is an authorized user. */
|
|
57
149
|
export declare function verify(options: VerifyOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
@@ -61,7 +153,10 @@ export interface AddAuthorizedUserArguments {
|
|
|
61
153
|
}
|
|
62
154
|
export interface AddAuthorizedUserOptions {
|
|
63
155
|
package?: string;
|
|
64
|
-
arguments: AddAuthorizedUserArguments | [
|
|
156
|
+
arguments: AddAuthorizedUserArguments | [
|
|
157
|
+
version: RawTransactionArgument<string>,
|
|
158
|
+
userAddress: RawTransactionArgument<string>
|
|
159
|
+
];
|
|
65
160
|
}
|
|
66
161
|
/** [Authorized Function] Adds an authorized user. */
|
|
67
162
|
export declare function addAuthorizedUser(options: AddAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
@@ -71,7 +166,10 @@ export interface RemoveAuthorizedUserArguments {
|
|
|
71
166
|
}
|
|
72
167
|
export interface RemoveAuthorizedUserOptions {
|
|
73
168
|
package?: string;
|
|
74
|
-
arguments: RemoveAuthorizedUserArguments | [
|
|
169
|
+
arguments: RemoveAuthorizedUserArguments | [
|
|
170
|
+
version: RawTransactionArgument<string>,
|
|
171
|
+
userAddress: RawTransactionArgument<string>
|
|
172
|
+
];
|
|
75
173
|
}
|
|
76
174
|
/** [Authorized Function] Removes an authorized user. */
|
|
77
175
|
export declare function removeAuthorizedUser(options: RemoveAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
@@ -81,7 +179,10 @@ export interface InstallEcosystemManagerCapEntryArguments {
|
|
|
81
179
|
}
|
|
82
180
|
export interface InstallEcosystemManagerCapEntryOptions {
|
|
83
181
|
package?: string;
|
|
84
|
-
arguments: InstallEcosystemManagerCapEntryArguments | [
|
|
182
|
+
arguments: InstallEcosystemManagerCapEntryArguments | [
|
|
183
|
+
version: RawTransactionArgument<string>,
|
|
184
|
+
typusEcosystemVersion: RawTransactionArgument<string>
|
|
185
|
+
];
|
|
85
186
|
}
|
|
86
187
|
/**
|
|
87
188
|
* [Authorized Function] Installs the ecosystem manager cap. TODO: can be remove
|
|
@@ -107,3 +208,36 @@ export interface AddTailsExpAmountOptions {
|
|
|
107
208
|
}
|
|
108
209
|
/** Adds tails experience points to a user. */
|
|
109
210
|
export declare function addTailsExpAmount(options: AddTailsExpAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
211
|
+
export interface SendFeeArguments {
|
|
212
|
+
version: RawTransactionArgument<string>;
|
|
213
|
+
}
|
|
214
|
+
export interface SendFeeOptions {
|
|
215
|
+
package?: string;
|
|
216
|
+
arguments: SendFeeArguments | [
|
|
217
|
+
version: RawTransactionArgument<string>
|
|
218
|
+
];
|
|
219
|
+
typeArguments: [
|
|
220
|
+
string
|
|
221
|
+
];
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Sends the collected fees to the fee address. Safe with constant address as
|
|
225
|
+
* receiver
|
|
226
|
+
*/
|
|
227
|
+
export declare function sendFee(options: SendFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|
|
228
|
+
export interface ChargeFeeArguments {
|
|
229
|
+
version: RawTransactionArgument<string>;
|
|
230
|
+
balance: RawTransactionArgument<string>;
|
|
231
|
+
}
|
|
232
|
+
export interface ChargeFeeOptions {
|
|
233
|
+
package?: string;
|
|
234
|
+
arguments: ChargeFeeArguments | [
|
|
235
|
+
version: RawTransactionArgument<string>,
|
|
236
|
+
balance: RawTransactionArgument<string>
|
|
237
|
+
];
|
|
238
|
+
typeArguments: [
|
|
239
|
+
string
|
|
240
|
+
];
|
|
241
|
+
}
|
|
242
|
+
/** Charges a protocol fee. */
|
|
243
|
+
export declare function chargeFee(options: ChargeFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
|