@typus/typus-perp-sdk 1.1.33 → 1.1.34
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
CHANGED
|
@@ -383,24 +383,10 @@ export declare function getUserStake(client: TypusClient, input: {
|
|
|
383
383
|
shares: string;
|
|
384
384
|
unsubscribed_ts_ms: string;
|
|
385
385
|
unlocked_ts_ms: string;
|
|
386
|
-
unsubscribed_incentive_price_index:
|
|
387
|
-
contents: {
|
|
388
|
-
key: {
|
|
389
|
-
name: string;
|
|
390
|
-
};
|
|
391
|
-
value: string;
|
|
392
|
-
}[];
|
|
393
|
-
};
|
|
386
|
+
unsubscribed_incentive_price_index: string[];
|
|
394
387
|
u64_padding: string[];
|
|
395
388
|
}[];
|
|
396
|
-
last_incentive_price_index:
|
|
397
|
-
contents: {
|
|
398
|
-
key: {
|
|
399
|
-
name: string;
|
|
400
|
-
};
|
|
401
|
-
value: string;
|
|
402
|
-
}[];
|
|
403
|
-
};
|
|
389
|
+
last_incentive_price_index: string[];
|
|
404
390
|
snapshot_ts_ms: string;
|
|
405
391
|
tlp_price: string;
|
|
406
392
|
harvested_amount: string;
|
|
@@ -189,21 +189,9 @@ export declare const DeactivatingShares: MoveStruct<{
|
|
|
189
189
|
/** The timestamp when the shares can be unlocked. */
|
|
190
190
|
unlocked_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
191
191
|
/** The unsubscribed incentive price index. */
|
|
192
|
-
unsubscribed_incentive_price_index:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
name: string;
|
|
196
|
-
};
|
|
197
|
-
value: string;
|
|
198
|
-
}[], Iterable<{
|
|
199
|
-
key: {
|
|
200
|
-
name: string;
|
|
201
|
-
};
|
|
202
|
-
value: string | number | bigint;
|
|
203
|
-
}> & {
|
|
204
|
-
length: number;
|
|
205
|
-
}, string>;
|
|
206
|
-
}, "0x2::vec_map::VecMap<std::type_name::TypeName, u64>">;
|
|
192
|
+
unsubscribed_incentive_price_index: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
193
|
+
length: number;
|
|
194
|
+
}, string>;
|
|
207
195
|
/** Padding for future use. */
|
|
208
196
|
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
209
197
|
length: number;
|
|
@@ -225,28 +213,14 @@ export declare const LpUserShare: MoveStruct<{
|
|
|
225
213
|
shares: string;
|
|
226
214
|
unsubscribed_ts_ms: string;
|
|
227
215
|
unlocked_ts_ms: string;
|
|
228
|
-
unsubscribed_incentive_price_index:
|
|
229
|
-
contents: {
|
|
230
|
-
key: {
|
|
231
|
-
name: string;
|
|
232
|
-
};
|
|
233
|
-
value: string;
|
|
234
|
-
}[];
|
|
235
|
-
};
|
|
216
|
+
unsubscribed_incentive_price_index: string[];
|
|
236
217
|
u64_padding: string[];
|
|
237
218
|
}[], Iterable<{
|
|
238
219
|
shares: string | number | bigint;
|
|
239
220
|
unsubscribed_ts_ms: string | number | bigint;
|
|
240
221
|
unlocked_ts_ms: string | number | bigint;
|
|
241
|
-
unsubscribed_incentive_price_index: {
|
|
242
|
-
|
|
243
|
-
key: {
|
|
244
|
-
name: string;
|
|
245
|
-
};
|
|
246
|
-
value: string | number | bigint;
|
|
247
|
-
}> & {
|
|
248
|
-
length: number;
|
|
249
|
-
};
|
|
222
|
+
unsubscribed_incentive_price_index: Iterable<string | number | bigint> & {
|
|
223
|
+
length: number;
|
|
250
224
|
};
|
|
251
225
|
u64_padding: Iterable<string | number | bigint> & {
|
|
252
226
|
length: number;
|
|
@@ -255,21 +229,9 @@ export declare const LpUserShare: MoveStruct<{
|
|
|
255
229
|
length: number;
|
|
256
230
|
}, string>;
|
|
257
231
|
/** The last incentive price index. */
|
|
258
|
-
last_incentive_price_index:
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
name: string;
|
|
262
|
-
};
|
|
263
|
-
value: string;
|
|
264
|
-
}[], Iterable<{
|
|
265
|
-
key: {
|
|
266
|
-
name: string;
|
|
267
|
-
};
|
|
268
|
-
value: string | number | bigint;
|
|
269
|
-
}> & {
|
|
270
|
-
length: number;
|
|
271
|
-
}, string>;
|
|
272
|
-
}, "0x2::vec_map::VecMap<std::type_name::TypeName, u64>">;
|
|
232
|
+
last_incentive_price_index: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
233
|
+
length: number;
|
|
234
|
+
}, string>;
|
|
273
235
|
/** The last snapshot ts for exp. */
|
|
274
236
|
snapshot_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
275
237
|
/** old tlp price for exp with decimal 4 */
|
|
@@ -479,21 +441,9 @@ export declare const StakeEvent: MoveStruct<{
|
|
|
479
441
|
stake_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
480
442
|
user_share_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
481
443
|
stake_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
482
|
-
last_incentive_price_index:
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
name: string;
|
|
486
|
-
};
|
|
487
|
-
value: string;
|
|
488
|
-
}[], Iterable<{
|
|
489
|
-
key: {
|
|
490
|
-
name: string;
|
|
491
|
-
};
|
|
492
|
-
value: string | number | bigint;
|
|
493
|
-
}> & {
|
|
494
|
-
length: number;
|
|
495
|
-
}, string>;
|
|
496
|
-
}, "0x2::vec_map::VecMap<std::type_name::TypeName, u64>">;
|
|
444
|
+
last_incentive_price_index: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
445
|
+
length: number;
|
|
446
|
+
}, string>;
|
|
497
447
|
u64_padding: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | number | bigint> & {
|
|
498
448
|
length: number;
|
|
499
449
|
}, string>;
|
|
@@ -76,7 +76,6 @@ const index_1 = require("../utils/index");
|
|
|
76
76
|
const bcs_1 = require("@mysten/sui/bcs");
|
|
77
77
|
const object = __importStar(require("./deps/sui/object"));
|
|
78
78
|
const type_name = __importStar(require("./deps/std/type_name"));
|
|
79
|
-
const vec_map = __importStar(require("./deps/sui/vec_map"));
|
|
80
79
|
const $moduleName = "@typus/stake-pool::stake_pool";
|
|
81
80
|
exports.StakePoolRegistry = new index_1.MoveStruct({
|
|
82
81
|
name: `${$moduleName}::StakePoolRegistry`,
|
|
@@ -179,7 +178,7 @@ exports.DeactivatingShares = new index_1.MoveStruct({
|
|
|
179
178
|
/** The timestamp when the shares can be unlocked. */
|
|
180
179
|
unlocked_ts_ms: bcs_1.bcs.u64(),
|
|
181
180
|
/** The unsubscribed incentive price index. */
|
|
182
|
-
unsubscribed_incentive_price_index:
|
|
181
|
+
unsubscribed_incentive_price_index: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
183
182
|
/** Padding for future use. */
|
|
184
183
|
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
185
184
|
},
|
|
@@ -200,7 +199,7 @@ exports.LpUserShare = new index_1.MoveStruct({
|
|
|
200
199
|
/** A vector of deactivating shares. */
|
|
201
200
|
deactivating_shares: bcs_1.bcs.vector(exports.DeactivatingShares),
|
|
202
201
|
/** The last incentive price index. */
|
|
203
|
-
last_incentive_price_index:
|
|
202
|
+
last_incentive_price_index: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
204
203
|
/** The last snapshot ts for exp. */
|
|
205
204
|
snapshot_ts_ms: bcs_1.bcs.u64(),
|
|
206
205
|
/** old tlp price for exp with decimal 4 */
|
|
@@ -337,7 +336,7 @@ exports.StakeEvent = new index_1.MoveStruct({
|
|
|
337
336
|
stake_amount: bcs_1.bcs.u64(),
|
|
338
337
|
user_share_id: bcs_1.bcs.u64(),
|
|
339
338
|
stake_ts_ms: bcs_1.bcs.u64(),
|
|
340
|
-
last_incentive_price_index:
|
|
339
|
+
last_incentive_price_index: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
341
340
|
u64_padding: bcs_1.bcs.vector(bcs_1.bcs.u64()),
|
|
342
341
|
},
|
|
343
342
|
});
|
|
@@ -795,8 +794,8 @@ function calculateIncentive(options) {
|
|
|
795
794
|
function harvestProgressUpdated(options) {
|
|
796
795
|
const packageAddress = options.package ?? "@typus/stake-pool";
|
|
797
796
|
const argumentsTypes = [
|
|
798
|
-
"
|
|
799
|
-
"
|
|
797
|
+
"0x0000000000000000000000000000000000000000000000000000000000000001::vector::vector<u64>",
|
|
798
|
+
"0x0000000000000000000000000000000000000000000000000000000000000001::vector::vector<u64>",
|
|
800
799
|
];
|
|
801
800
|
const parameterNames = ["current", "user"];
|
|
802
801
|
return (tx) => tx.moveCall({
|