@typus/typus-perp-sdk 1.1.33 → 1.1.35

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.
@@ -750,7 +750,7 @@ async function getLeaderboardFromSentio(startTs, endTs) {
750
750
  }
751
751
  }
752
752
  // getRecentTradesFromSentio().then((x) => console.log(x));
753
- // getAccumulatedUser().then((x) => console.log(x));
753
+ getAccumulatedUser().then((x) => console.log(x));
754
754
  // getTradingVolumeFromSentio(1747008000, 1, 1747011600);
755
755
  // getTlpPriceFromSentio(0).then((x) => console.dir(x, { depth: null }));
756
756
  // getTotalVolumeFromSentio().then((x) => console.log(x));
@@ -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: MoveStruct<{
193
- contents: import("@mysten/sui/bcs").BcsType<{
194
- key: {
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
- contents: Iterable<{
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: MoveStruct<{
259
- contents: import("@mysten/sui/bcs").BcsType<{
260
- key: {
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: MoveStruct<{
483
- contents: import("@mysten/sui/bcs").BcsType<{
484
- key: {
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: vec_map.VecMap(type_name.TypeName, bcs_1.bcs.u64()),
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: vec_map.VecMap(type_name.TypeName, bcs_1.bcs.u64()),
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: vec_map.VecMap(type_name.TypeName, bcs_1.bcs.u64()),
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
- "0x0000000000000000000000000000000000000000000000000000000000000002::vec_map::VecMap<0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName, u64>",
799
- "0x0000000000000000000000000000000000000000000000000000000000000002::vec_map::VecMap<0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName, u64>",
797
+ "0x0000000000000000000000000000000000000000000000000000000000000001::vector::vector<u64>",
798
+ "0x0000000000000000000000000000000000000000000000000000000000000001::vector::vector<u64>",
800
799
  ];
801
800
  const parameterNames = ["current", "user"];
802
801
  return (tx) => tx.moveCall({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typus/typus-perp-sdk",
3
- "version": "1.1.33",
3
+ "version": "1.1.35",
4
4
  "repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
5
5
  "author": "Typus",
6
6
  "description": "typus perp sdk",
@@ -8,7 +8,7 @@
8
8
  "dependencies": {
9
9
  "@mysten/bcs": "1.9.2",
10
10
  "@mysten/sui": "1.44.0",
11
- "@typus/typus-sdk": "1.8.33"
11
+ "@typus/typus-sdk": "1.8.34"
12
12
  },
13
13
  "resolutions": {
14
14
  "@mysten/bcs": "1.9.2",
@@ -44,4 +44,4 @@
44
44
  },
45
45
  "homepage": "https://github.com/Typus-Lab/typus-perp-sdk#readme",
46
46
  "packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f"
47
- }
47
+ }