@typus/typus-perp-sdk 1.1.32-codegen-exp1 → 1.1.32-codegen-exp3
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/fetch.d.ts +435 -29
- package/dist/src/fetch.js +9 -7
- package/dist/src/generated/typus_stake_pool/admin.d.ts +135 -1
- package/dist/src/generated/typus_stake_pool/admin.js +181 -0
- package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +32 -69
- package/dist/src/generated/typus_stake_pool/stake_pool.js +21 -65
- package/dist/src/index.js +5 -5
- package/dist/src/user/order.d.ts +5 -0
- package/dist/src/user/order.js +9 -9
- package/dist/src/user/tlp.d.ts +2 -10
- package/dist/src/user/tlp.js +29 -28
- package/package.json +45 -46
|
@@ -5,7 +5,8 @@
|
|
|
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 } from "../utils/index";
|
|
8
|
+
import { MoveStruct, type RawTransactionArgument } from "../utils/index";
|
|
9
|
+
import { type Transaction } from "@mysten/sui/transactions";
|
|
9
10
|
export declare const FeeInfo: MoveStruct<{
|
|
10
11
|
/** The type name of the token. */
|
|
11
12
|
token: MoveStruct<{
|
|
@@ -98,3 +99,136 @@ export declare const SendFeeEvent: MoveStruct<{
|
|
|
98
99
|
/** The amount of fees sent. */
|
|
99
100
|
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
100
101
|
}, "@typus/stake-pool::admin::SendFeeEvent">;
|
|
102
|
+
export interface VersionCheckArguments {
|
|
103
|
+
version: RawTransactionArgument<string>;
|
|
104
|
+
}
|
|
105
|
+
export interface VersionCheckOptions {
|
|
106
|
+
package?: string;
|
|
107
|
+
arguments: VersionCheckArguments | [version: RawTransactionArgument<string>];
|
|
108
|
+
}
|
|
109
|
+
/** Checks if the contract version is valid. */
|
|
110
|
+
export declare function versionCheck(options: VersionCheckOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
111
|
+
export interface UpgradeArguments {
|
|
112
|
+
version: RawTransactionArgument<string>;
|
|
113
|
+
}
|
|
114
|
+
export interface UpgradeOptions {
|
|
115
|
+
package?: string;
|
|
116
|
+
arguments: UpgradeArguments | [version: RawTransactionArgument<string>];
|
|
117
|
+
}
|
|
118
|
+
/** Upgrades the contract version. WARNING: no authority check inside */
|
|
119
|
+
export declare function upgrade(options: UpgradeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
120
|
+
export interface InitOptions {
|
|
121
|
+
package?: string;
|
|
122
|
+
arguments?: [];
|
|
123
|
+
}
|
|
124
|
+
/** Initializes the contract. */
|
|
125
|
+
export declare function init(options?: InitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
126
|
+
export interface VerifyArguments {
|
|
127
|
+
version: RawTransactionArgument<string>;
|
|
128
|
+
}
|
|
129
|
+
export interface VerifyOptions {
|
|
130
|
+
package?: string;
|
|
131
|
+
arguments: VerifyArguments | [version: RawTransactionArgument<string>];
|
|
132
|
+
}
|
|
133
|
+
/** [Authorized Function] Verifies if the sender is an authorized user. */
|
|
134
|
+
export declare function verify(options: VerifyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
135
|
+
export interface AddAuthorizedUserArguments {
|
|
136
|
+
version: RawTransactionArgument<string>;
|
|
137
|
+
userAddress: RawTransactionArgument<string>;
|
|
138
|
+
}
|
|
139
|
+
export interface AddAuthorizedUserOptions {
|
|
140
|
+
package?: string;
|
|
141
|
+
arguments: AddAuthorizedUserArguments | [version: RawTransactionArgument<string>, userAddress: RawTransactionArgument<string>];
|
|
142
|
+
}
|
|
143
|
+
/** [Authorized Function] Adds an authorized user. */
|
|
144
|
+
export declare function addAuthorizedUser(options: AddAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
145
|
+
export interface RemoveAuthorizedUserArguments {
|
|
146
|
+
version: RawTransactionArgument<string>;
|
|
147
|
+
userAddress: RawTransactionArgument<string>;
|
|
148
|
+
}
|
|
149
|
+
export interface RemoveAuthorizedUserOptions {
|
|
150
|
+
package?: string;
|
|
151
|
+
arguments: RemoveAuthorizedUserArguments | [version: RawTransactionArgument<string>, userAddress: RawTransactionArgument<string>];
|
|
152
|
+
}
|
|
153
|
+
/** [Authorized Function] Removes an authorized user. */
|
|
154
|
+
export declare function removeAuthorizedUser(options: RemoveAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
155
|
+
export interface InstallEcosystemManagerCapEntryArguments {
|
|
156
|
+
version: RawTransactionArgument<string>;
|
|
157
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
158
|
+
}
|
|
159
|
+
export interface InstallEcosystemManagerCapEntryOptions {
|
|
160
|
+
package?: string;
|
|
161
|
+
arguments: InstallEcosystemManagerCapEntryArguments | [version: RawTransactionArgument<string>, typusEcosystemVersion: RawTransactionArgument<string>];
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* [Authorized Function] Installs the ecosystem manager cap. TODO: can be remove
|
|
165
|
+
* after install
|
|
166
|
+
*/
|
|
167
|
+
export declare function installEcosystemManagerCapEntry(options: InstallEcosystemManagerCapEntryOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
168
|
+
export interface AddTailsExpAmountArguments {
|
|
169
|
+
version: RawTransactionArgument<string>;
|
|
170
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
171
|
+
typusUserRegistry: RawTransactionArgument<string>;
|
|
172
|
+
user: RawTransactionArgument<string>;
|
|
173
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
174
|
+
}
|
|
175
|
+
export interface AddTailsExpAmountOptions {
|
|
176
|
+
package?: string;
|
|
177
|
+
arguments: AddTailsExpAmountArguments | [
|
|
178
|
+
version: RawTransactionArgument<string>,
|
|
179
|
+
typusEcosystemVersion: RawTransactionArgument<string>,
|
|
180
|
+
typusUserRegistry: RawTransactionArgument<string>,
|
|
181
|
+
user: RawTransactionArgument<string>,
|
|
182
|
+
amount: RawTransactionArgument<number | bigint>
|
|
183
|
+
];
|
|
184
|
+
}
|
|
185
|
+
/** Adds tails experience points to a user. */
|
|
186
|
+
export declare function addTailsExpAmount(options: AddTailsExpAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
187
|
+
export interface SendFeeArguments {
|
|
188
|
+
version: RawTransactionArgument<string>;
|
|
189
|
+
}
|
|
190
|
+
export interface SendFeeOptions {
|
|
191
|
+
package?: string;
|
|
192
|
+
arguments: SendFeeArguments | [version: RawTransactionArgument<string>];
|
|
193
|
+
typeArguments: [string];
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Sends the collected fees to the fee address. Safe with constant address as
|
|
197
|
+
* receiver
|
|
198
|
+
*/
|
|
199
|
+
export declare function sendFee(options: SendFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
200
|
+
export interface ChargeFeeArguments {
|
|
201
|
+
version: RawTransactionArgument<string>;
|
|
202
|
+
balance: RawTransactionArgument<string>;
|
|
203
|
+
}
|
|
204
|
+
export interface ChargeFeeOptions {
|
|
205
|
+
package?: string;
|
|
206
|
+
arguments: ChargeFeeArguments | [version: RawTransactionArgument<string>, balance: RawTransactionArgument<string>];
|
|
207
|
+
typeArguments: [string];
|
|
208
|
+
}
|
|
209
|
+
/** Charges a protocol fee. WARNING: no authority check inside */
|
|
210
|
+
export declare function chargeFee(options: ChargeFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
211
|
+
export interface SendLiquidatorFeeArguments {
|
|
212
|
+
version: RawTransactionArgument<string>;
|
|
213
|
+
}
|
|
214
|
+
export interface SendLiquidatorFeeOptions {
|
|
215
|
+
package?: string;
|
|
216
|
+
arguments: SendLiquidatorFeeArguments | [version: RawTransactionArgument<string>];
|
|
217
|
+
typeArguments: [string];
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Sends the liquidator fees to the fee address. Safe with constant address as
|
|
221
|
+
* receiver
|
|
222
|
+
*/
|
|
223
|
+
export declare function sendLiquidatorFee(options: SendLiquidatorFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
224
|
+
export interface ChargeLiquidatorFeeArguments {
|
|
225
|
+
version: RawTransactionArgument<string>;
|
|
226
|
+
balance: RawTransactionArgument<string>;
|
|
227
|
+
}
|
|
228
|
+
export interface ChargeLiquidatorFeeOptions {
|
|
229
|
+
package?: string;
|
|
230
|
+
arguments: ChargeLiquidatorFeeArguments | [version: RawTransactionArgument<string>, balance: RawTransactionArgument<string>];
|
|
231
|
+
typeArguments: [string];
|
|
232
|
+
}
|
|
233
|
+
/** Charges a liquidator fee. WARNING: no authority check inside */
|
|
234
|
+
export declare function chargeLiquidatorFee(options: ChargeLiquidatorFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -37,6 +37,18 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.SendFeeEvent = exports.Version = exports.FeePool = exports.FeeInfo = void 0;
|
|
40
|
+
exports.versionCheck = versionCheck;
|
|
41
|
+
exports.upgrade = upgrade;
|
|
42
|
+
exports.init = init;
|
|
43
|
+
exports.verify = verify;
|
|
44
|
+
exports.addAuthorizedUser = addAuthorizedUser;
|
|
45
|
+
exports.removeAuthorizedUser = removeAuthorizedUser;
|
|
46
|
+
exports.installEcosystemManagerCapEntry = installEcosystemManagerCapEntry;
|
|
47
|
+
exports.addTailsExpAmount = addTailsExpAmount;
|
|
48
|
+
exports.sendFee = sendFee;
|
|
49
|
+
exports.chargeFee = chargeFee;
|
|
50
|
+
exports.sendLiquidatorFee = sendLiquidatorFee;
|
|
51
|
+
exports.chargeLiquidatorFee = chargeLiquidatorFee;
|
|
40
52
|
/**
|
|
41
53
|
* The `admin` module provides administrative functionalities for the Typus Stake
|
|
42
54
|
* Pool. It includes version management, authority control, and fee handling.
|
|
@@ -89,3 +101,172 @@ exports.SendFeeEvent = new index_1.MoveStruct({
|
|
|
89
101
|
amount: bcs_1.bcs.u64(),
|
|
90
102
|
},
|
|
91
103
|
});
|
|
104
|
+
/** Checks if the contract version is valid. */
|
|
105
|
+
function versionCheck(options) {
|
|
106
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
107
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
108
|
+
const parameterNames = ["version"];
|
|
109
|
+
return (tx) => tx.moveCall({
|
|
110
|
+
package: packageAddress,
|
|
111
|
+
module: "admin",
|
|
112
|
+
function: "version_check",
|
|
113
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/** Upgrades the contract version. WARNING: no authority check inside */
|
|
117
|
+
function upgrade(options) {
|
|
118
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
119
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
120
|
+
const parameterNames = ["version"];
|
|
121
|
+
return (tx) => tx.moveCall({
|
|
122
|
+
package: packageAddress,
|
|
123
|
+
module: "admin",
|
|
124
|
+
function: "upgrade",
|
|
125
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/** Initializes the contract. */
|
|
129
|
+
function init(options = {}) {
|
|
130
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
131
|
+
return (tx) => tx.moveCall({
|
|
132
|
+
package: packageAddress,
|
|
133
|
+
module: "admin",
|
|
134
|
+
function: "init",
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/** [Authorized Function] Verifies if the sender is an authorized user. */
|
|
138
|
+
function verify(options) {
|
|
139
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
140
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
141
|
+
const parameterNames = ["version"];
|
|
142
|
+
return (tx) => tx.moveCall({
|
|
143
|
+
package: packageAddress,
|
|
144
|
+
module: "admin",
|
|
145
|
+
function: "verify",
|
|
146
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/** [Authorized Function] Adds an authorized user. */
|
|
150
|
+
function addAuthorizedUser(options) {
|
|
151
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
152
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`, "address"];
|
|
153
|
+
const parameterNames = ["version", "userAddress"];
|
|
154
|
+
return (tx) => tx.moveCall({
|
|
155
|
+
package: packageAddress,
|
|
156
|
+
module: "admin",
|
|
157
|
+
function: "add_authorized_user",
|
|
158
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/** [Authorized Function] Removes an authorized user. */
|
|
162
|
+
function removeAuthorizedUser(options) {
|
|
163
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
164
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`, "address"];
|
|
165
|
+
const parameterNames = ["version", "userAddress"];
|
|
166
|
+
return (tx) => tx.moveCall({
|
|
167
|
+
package: packageAddress,
|
|
168
|
+
module: "admin",
|
|
169
|
+
function: "remove_authorized_user",
|
|
170
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* [Authorized Function] Installs the ecosystem manager cap. TODO: can be remove
|
|
175
|
+
* after install
|
|
176
|
+
*/
|
|
177
|
+
function installEcosystemManagerCapEntry(options) {
|
|
178
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
179
|
+
const argumentsTypes = [
|
|
180
|
+
`${packageAddress}::admin::Version`,
|
|
181
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::ecosystem::Version",
|
|
182
|
+
];
|
|
183
|
+
const parameterNames = ["version", "typusEcosystemVersion"];
|
|
184
|
+
return (tx) => tx.moveCall({
|
|
185
|
+
package: packageAddress,
|
|
186
|
+
module: "admin",
|
|
187
|
+
function: "install_ecosystem_manager_cap_entry",
|
|
188
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/** Adds tails experience points to a user. */
|
|
192
|
+
function addTailsExpAmount(options) {
|
|
193
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
194
|
+
const argumentsTypes = [
|
|
195
|
+
`${packageAddress}::admin::Version`,
|
|
196
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::ecosystem::Version",
|
|
197
|
+
"0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::user::TypusUserRegistry",
|
|
198
|
+
"address",
|
|
199
|
+
"u64",
|
|
200
|
+
];
|
|
201
|
+
const parameterNames = ["version", "typusEcosystemVersion", "typusUserRegistry", "user", "amount"];
|
|
202
|
+
return (tx) => tx.moveCall({
|
|
203
|
+
package: packageAddress,
|
|
204
|
+
module: "admin",
|
|
205
|
+
function: "add_tails_exp_amount",
|
|
206
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Sends the collected fees to the fee address. Safe with constant address as
|
|
211
|
+
* receiver
|
|
212
|
+
*/
|
|
213
|
+
function sendFee(options) {
|
|
214
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
215
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
216
|
+
const parameterNames = ["version"];
|
|
217
|
+
return (tx) => tx.moveCall({
|
|
218
|
+
package: packageAddress,
|
|
219
|
+
module: "admin",
|
|
220
|
+
function: "send_fee",
|
|
221
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
222
|
+
typeArguments: options.typeArguments,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/** Charges a protocol fee. WARNING: no authority check inside */
|
|
226
|
+
function chargeFee(options) {
|
|
227
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
228
|
+
const argumentsTypes = [
|
|
229
|
+
`${packageAddress}::admin::Version`,
|
|
230
|
+
`0x0000000000000000000000000000000000000000000000000000000000000002::balance::Balance<${options.typeArguments[0]}>`,
|
|
231
|
+
];
|
|
232
|
+
const parameterNames = ["version", "balance"];
|
|
233
|
+
return (tx) => tx.moveCall({
|
|
234
|
+
package: packageAddress,
|
|
235
|
+
module: "admin",
|
|
236
|
+
function: "charge_fee",
|
|
237
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
238
|
+
typeArguments: options.typeArguments,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Sends the liquidator fees to the fee address. Safe with constant address as
|
|
243
|
+
* receiver
|
|
244
|
+
*/
|
|
245
|
+
function sendLiquidatorFee(options) {
|
|
246
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
247
|
+
const argumentsTypes = [`${packageAddress}::admin::Version`];
|
|
248
|
+
const parameterNames = ["version"];
|
|
249
|
+
return (tx) => tx.moveCall({
|
|
250
|
+
package: packageAddress,
|
|
251
|
+
module: "admin",
|
|
252
|
+
function: "send_liquidator_fee",
|
|
253
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
254
|
+
typeArguments: options.typeArguments,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
/** Charges a liquidator fee. WARNING: no authority check inside */
|
|
258
|
+
function chargeLiquidatorFee(options) {
|
|
259
|
+
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
260
|
+
const argumentsTypes = [
|
|
261
|
+
`${packageAddress}::admin::Version`,
|
|
262
|
+
`0x0000000000000000000000000000000000000000000000000000000000000002::balance::Balance<${options.typeArguments[0]}>`,
|
|
263
|
+
];
|
|
264
|
+
const parameterNames = ["version", "balance"];
|
|
265
|
+
return (tx) => tx.moveCall({
|
|
266
|
+
package: packageAddress,
|
|
267
|
+
module: "admin",
|
|
268
|
+
function: "charge_liquidator_fee",
|
|
269
|
+
arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
|
|
270
|
+
typeArguments: options.typeArguments,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
@@ -23,10 +23,11 @@ export declare const StakePoolInfo: MoveStruct<{
|
|
|
23
23
|
total_share: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
24
24
|
/** Whether the pool is active. */
|
|
25
25
|
active: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
/** tlp price (decimal 4) */
|
|
27
|
+
new_tlp_price: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
28
|
+
/** number of depositor */
|
|
29
|
+
depositors_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
30
|
+
/** Padding for future use. */
|
|
30
31
|
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
31
32
|
length: number;
|
|
32
33
|
}, string>;
|
|
@@ -34,6 +35,8 @@ export declare const StakePoolInfo: MoveStruct<{
|
|
|
34
35
|
export declare const StakePoolConfig: MoveStruct<{
|
|
35
36
|
/** The unlock countdown in milliseconds. */
|
|
36
37
|
unlock_countdown_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
38
|
+
/** for exp calculation */
|
|
39
|
+
usd_per_exp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
37
40
|
/** Padding for future use. */
|
|
38
41
|
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
39
42
|
length: number;
|
|
@@ -113,10 +116,11 @@ export declare const StakePool: MoveStruct<{
|
|
|
113
116
|
total_share: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
114
117
|
/** Whether the pool is active. */
|
|
115
118
|
active: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
116
|
-
/**
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
/** tlp price (decimal 4) */
|
|
120
|
+
new_tlp_price: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
121
|
+
/** number of depositor */
|
|
122
|
+
depositors_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
123
|
+
/** Padding for future use. */
|
|
120
124
|
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
121
125
|
length: number;
|
|
122
126
|
}, string>;
|
|
@@ -125,6 +129,8 @@ export declare const StakePool: MoveStruct<{
|
|
|
125
129
|
config: MoveStruct<{
|
|
126
130
|
/** The unlock countdown in milliseconds. */
|
|
127
131
|
unlock_countdown_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
132
|
+
/** for exp calculation */
|
|
133
|
+
usd_per_exp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
128
134
|
/** Padding for future use. */
|
|
129
135
|
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
130
136
|
length: number;
|
|
@@ -264,10 +270,13 @@ export declare const LpUserShare: MoveStruct<{
|
|
|
264
270
|
length: number;
|
|
265
271
|
}, string>;
|
|
266
272
|
}, "0x2::vec_map::VecMap<std::type_name::TypeName, u64>">;
|
|
267
|
-
/**
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
273
|
+
/** The last snapshot ts for exp. */
|
|
274
|
+
snapshot_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
275
|
+
/** old tlp price for exp with decimal 4 */
|
|
276
|
+
tlp_price: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
277
|
+
/** accumulated harvested amount */
|
|
278
|
+
harvested_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
279
|
+
/** Padding for future use. */
|
|
271
280
|
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
272
281
|
length: number;
|
|
273
282
|
}, string>;
|
|
@@ -287,10 +296,11 @@ export declare const NewStakePoolEvent: MoveStruct<{
|
|
|
287
296
|
total_share: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
288
297
|
/** Whether the pool is active. */
|
|
289
298
|
active: import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">;
|
|
290
|
-
/**
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
299
|
+
/** tlp price (decimal 4) */
|
|
300
|
+
new_tlp_price: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
301
|
+
/** number of depositor */
|
|
302
|
+
depositors_count: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
303
|
+
/** Padding for future use. */
|
|
294
304
|
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
295
305
|
length: number;
|
|
296
306
|
}, string>;
|
|
@@ -298,6 +308,8 @@ export declare const NewStakePoolEvent: MoveStruct<{
|
|
|
298
308
|
stake_pool_config: MoveStruct<{
|
|
299
309
|
/** The unlock countdown in milliseconds. */
|
|
300
310
|
unlock_countdown_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
311
|
+
/** for exp calculation */
|
|
312
|
+
usd_per_exp: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
301
313
|
/** Padding for future use. */
|
|
302
314
|
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
303
315
|
length: number;
|
|
@@ -732,7 +744,6 @@ export interface StakeArguments {
|
|
|
732
744
|
registry: RawTransactionArgument<string>;
|
|
733
745
|
index: RawTransactionArgument<number | bigint>;
|
|
734
746
|
lpToken: RawTransactionArgument<string>;
|
|
735
|
-
UserShareId: RawTransactionArgument<number | bigint | null>;
|
|
736
747
|
}
|
|
737
748
|
export interface StakeOptions {
|
|
738
749
|
package?: string;
|
|
@@ -740,8 +751,7 @@ export interface StakeOptions {
|
|
|
740
751
|
version: RawTransactionArgument<string>,
|
|
741
752
|
registry: RawTransactionArgument<string>,
|
|
742
753
|
index: RawTransactionArgument<number | bigint>,
|
|
743
|
-
lpToken: RawTransactionArgument<string
|
|
744
|
-
UserShareId: RawTransactionArgument<number | bigint | null>
|
|
754
|
+
lpToken: RawTransactionArgument<string>
|
|
745
755
|
];
|
|
746
756
|
typeArguments: [string];
|
|
747
757
|
}
|
|
@@ -766,30 +776,12 @@ export interface UpdatePoolInfoU64PaddingOptions {
|
|
|
766
776
|
}
|
|
767
777
|
/** [Authorized Function] Update TLP price for calculating staking exp */
|
|
768
778
|
export declare function updatePoolInfoU64Padding(options: UpdatePoolInfoU64PaddingOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
769
|
-
export interface HotfixPoolInfoU64PaddingArguments {
|
|
770
|
-
version: RawTransactionArgument<string>;
|
|
771
|
-
registry: RawTransactionArgument<string>;
|
|
772
|
-
index: RawTransactionArgument<number | bigint>;
|
|
773
|
-
u64Padding: RawTransactionArgument<number | bigint[]>;
|
|
774
|
-
}
|
|
775
|
-
export interface HotfixPoolInfoU64PaddingOptions {
|
|
776
|
-
package?: string;
|
|
777
|
-
arguments: HotfixPoolInfoU64PaddingArguments | [
|
|
778
|
-
version: RawTransactionArgument<string>,
|
|
779
|
-
registry: RawTransactionArgument<string>,
|
|
780
|
-
index: RawTransactionArgument<number | bigint>,
|
|
781
|
-
u64Padding: RawTransactionArgument<number | bigint[]>
|
|
782
|
-
];
|
|
783
|
-
}
|
|
784
|
-
/** [Authorized Function] Update TLP price for calculating staking exp */
|
|
785
|
-
export declare function hotfixPoolInfoU64Padding(options: HotfixPoolInfoU64PaddingOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
786
779
|
export interface SnapshotArguments {
|
|
787
780
|
version: RawTransactionArgument<string>;
|
|
788
781
|
registry: RawTransactionArgument<string>;
|
|
789
782
|
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
790
783
|
typusUserRegistry: RawTransactionArgument<string>;
|
|
791
784
|
index: RawTransactionArgument<number | bigint>;
|
|
792
|
-
UserShareId: RawTransactionArgument<number | bigint>;
|
|
793
785
|
}
|
|
794
786
|
export interface SnapshotOptions {
|
|
795
787
|
package?: string;
|
|
@@ -798,8 +790,7 @@ export interface SnapshotOptions {
|
|
|
798
790
|
registry: RawTransactionArgument<string>,
|
|
799
791
|
typusEcosystemVersion: RawTransactionArgument<string>,
|
|
800
792
|
typusUserRegistry: RawTransactionArgument<string>,
|
|
801
|
-
index: RawTransactionArgument<number | bigint
|
|
802
|
-
UserShareId: RawTransactionArgument<number | bigint>
|
|
793
|
+
index: RawTransactionArgument<number | bigint>
|
|
803
794
|
];
|
|
804
795
|
}
|
|
805
796
|
/** [User Function] Get the staking exp */
|
|
@@ -808,7 +799,6 @@ export interface UnsubscribeArguments {
|
|
|
808
799
|
version: RawTransactionArgument<string>;
|
|
809
800
|
registry: RawTransactionArgument<string>;
|
|
810
801
|
index: RawTransactionArgument<number | bigint>;
|
|
811
|
-
UserShareId: RawTransactionArgument<number | bigint>;
|
|
812
802
|
unsubscribedShares: RawTransactionArgument<number | bigint | null>;
|
|
813
803
|
}
|
|
814
804
|
export interface UnsubscribeOptions {
|
|
@@ -817,7 +807,6 @@ export interface UnsubscribeOptions {
|
|
|
817
807
|
version: RawTransactionArgument<string>,
|
|
818
808
|
registry: RawTransactionArgument<string>,
|
|
819
809
|
index: RawTransactionArgument<number | bigint>,
|
|
820
|
-
UserShareId: RawTransactionArgument<number | bigint>,
|
|
821
810
|
unsubscribedShares: RawTransactionArgument<number | bigint | null>
|
|
822
811
|
];
|
|
823
812
|
typeArguments: [string];
|
|
@@ -828,15 +817,13 @@ export interface UnstakeArguments {
|
|
|
828
817
|
version: RawTransactionArgument<string>;
|
|
829
818
|
registry: RawTransactionArgument<string>;
|
|
830
819
|
index: RawTransactionArgument<number | bigint>;
|
|
831
|
-
UserShareId: RawTransactionArgument<number | bigint>;
|
|
832
820
|
}
|
|
833
821
|
export interface UnstakeOptions {
|
|
834
822
|
package?: string;
|
|
835
823
|
arguments: UnstakeArguments | [
|
|
836
824
|
version: RawTransactionArgument<string>,
|
|
837
825
|
registry: RawTransactionArgument<string>,
|
|
838
|
-
index: RawTransactionArgument<number | bigint
|
|
839
|
-
UserShareId: RawTransactionArgument<number | bigint>
|
|
826
|
+
index: RawTransactionArgument<number | bigint>
|
|
840
827
|
];
|
|
841
828
|
typeArguments: [string];
|
|
842
829
|
}
|
|
@@ -869,15 +856,13 @@ export interface HarvestPerUserShareArguments {
|
|
|
869
856
|
version: RawTransactionArgument<string>;
|
|
870
857
|
registry: RawTransactionArgument<string>;
|
|
871
858
|
index: RawTransactionArgument<number | bigint>;
|
|
872
|
-
UserShareId: RawTransactionArgument<number | bigint>;
|
|
873
859
|
}
|
|
874
860
|
export interface HarvestPerUserShareOptions {
|
|
875
861
|
package?: string;
|
|
876
862
|
arguments: HarvestPerUserShareArguments | [
|
|
877
863
|
version: RawTransactionArgument<string>,
|
|
878
864
|
registry: RawTransactionArgument<string>,
|
|
879
|
-
index: RawTransactionArgument<number | bigint
|
|
880
|
-
UserShareId: RawTransactionArgument<number | bigint>
|
|
865
|
+
index: RawTransactionArgument<number | bigint>
|
|
881
866
|
];
|
|
882
867
|
typeArguments: [string];
|
|
883
868
|
}
|
|
@@ -999,25 +984,3 @@ export interface GetLastIncentivePriceIndexOptions {
|
|
|
999
984
|
arguments: GetLastIncentivePriceIndexArguments | [stakePool: RawTransactionArgument<string>];
|
|
1000
985
|
}
|
|
1001
986
|
export declare function getLastIncentivePriceIndex(options: GetLastIncentivePriceIndexOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1002
|
-
export interface WithdrawIncentiveArguments {
|
|
1003
|
-
version: RawTransactionArgument<string>;
|
|
1004
|
-
registry: RawTransactionArgument<string>;
|
|
1005
|
-
index: RawTransactionArgument<number | bigint>;
|
|
1006
|
-
amount: RawTransactionArgument<number | bigint | null>;
|
|
1007
|
-
}
|
|
1008
|
-
export interface WithdrawIncentiveOptions {
|
|
1009
|
-
package?: string;
|
|
1010
|
-
arguments: WithdrawIncentiveArguments | [
|
|
1011
|
-
version: RawTransactionArgument<string>,
|
|
1012
|
-
registry: RawTransactionArgument<string>,
|
|
1013
|
-
index: RawTransactionArgument<number | bigint>,
|
|
1014
|
-
amount: RawTransactionArgument<number | bigint | null>
|
|
1015
|
-
];
|
|
1016
|
-
typeArguments: [string];
|
|
1017
|
-
}
|
|
1018
|
-
export declare function withdrawIncentive(options: WithdrawIncentiveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1019
|
-
export interface DeprecatedOptions {
|
|
1020
|
-
package?: string;
|
|
1021
|
-
arguments?: [];
|
|
1022
|
-
}
|
|
1023
|
-
export declare function deprecated(options?: DeprecatedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|