@typus/typus-perp-sdk 1.1.49 → 1.1.51-upgrade

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.
Files changed (77) hide show
  1. package/dist/src/api/sentio.d.ts +1 -1
  2. package/dist/src/api/sentio.js +3 -3
  3. package/dist/src/client.d.ts +11 -12
  4. package/dist/src/client.js +16 -44
  5. package/dist/src/fetch.d.ts +15 -45
  6. package/dist/src/fetch.js +70 -69
  7. package/dist/src/generated/typus_perp/admin.d.ts +32 -42
  8. package/dist/src/generated/typus_perp/admin.js +41 -67
  9. package/dist/src/generated/typus_perp/competition.d.ts +22 -10
  10. package/dist/src/generated/typus_perp/competition.js +19 -54
  11. package/dist/src/generated/typus_perp/deps/std/type_name.d.ts +2 -2
  12. package/dist/src/generated/typus_perp/deps/std/type_name.js +2 -2
  13. package/dist/src/generated/typus_perp/deps/sui/balance.d.ts +3 -3
  14. package/dist/src/generated/typus_perp/deps/sui/balance.js +3 -3
  15. package/dist/src/generated/typus_perp/deps/sui/object_table.d.ts +4 -6
  16. package/dist/src/generated/typus_perp/deps/sui/object_table.js +4 -38
  17. package/dist/src/generated/typus_perp/deps/sui/table.d.ts +4 -6
  18. package/dist/src/generated/typus_perp/deps/sui/table.js +4 -38
  19. package/dist/src/generated/typus_perp/deps/sui/vec_set.d.ts +2 -2
  20. package/dist/src/generated/typus_perp/deps/sui/vec_set.js +2 -2
  21. package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.d.ts +7 -9
  22. package/dist/src/generated/typus_perp/deps/typus/keyed_big_vector.js +6 -6
  23. package/dist/src/generated/typus_perp/deps/typus/linked_object_table.d.ts +6 -10
  24. package/dist/src/generated/typus_perp/deps/typus/linked_object_table.js +5 -39
  25. package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +14 -8
  26. package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +13 -39
  27. package/dist/src/generated/typus_perp/error.d.ts +97 -87
  28. package/dist/src/generated/typus_perp/error.js +18 -0
  29. package/dist/src/generated/typus_perp/escrow.d.ts +17 -21
  30. package/dist/src/generated/typus_perp/escrow.js +10 -22
  31. package/dist/src/generated/typus_perp/lending.d.ts +47 -0
  32. package/dist/src/generated/typus_perp/lending.js +40 -0
  33. package/dist/src/generated/typus_perp/lp_pool.d.ts +718 -397
  34. package/dist/src/generated/typus_perp/lp_pool.js +485 -365
  35. package/dist/src/generated/typus_perp/math.d.ts +18 -8
  36. package/dist/src/generated/typus_perp/math.js +24 -6
  37. package/dist/src/generated/typus_perp/position.d.ts +207 -185
  38. package/dist/src/generated/typus_perp/position.js +236 -277
  39. package/dist/src/generated/typus_perp/profit_vault.d.ts +64 -72
  40. package/dist/src/generated/typus_perp/profit_vault.js +48 -86
  41. package/dist/src/generated/typus_perp/symbol.d.ts +6 -6
  42. package/dist/src/generated/typus_perp/symbol.js +11 -13
  43. package/dist/src/generated/typus_perp/trading.d.ts +451 -558
  44. package/dist/src/generated/typus_perp/trading.js +429 -681
  45. package/dist/src/generated/typus_perp/treasury_caps.d.ts +5 -7
  46. package/dist/src/generated/typus_perp/treasury_caps.js +8 -45
  47. package/dist/src/generated/typus_stake_pool/admin.d.ts +13 -122
  48. package/dist/src/generated/typus_stake_pool/admin.js +19 -103
  49. package/dist/src/generated/typus_stake_pool/deps/std/type_name.d.ts +2 -2
  50. package/dist/src/generated/typus_stake_pool/deps/std/type_name.js +2 -2
  51. package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.d.ts +2 -2
  52. package/dist/src/generated/typus_stake_pool/deps/sui/vec_set.js +2 -2
  53. package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +249 -240
  54. package/dist/src/generated/typus_stake_pool/stake_pool.js +159 -246
  55. package/dist/src/generated/utils/index.d.ts +21 -2
  56. package/dist/src/generated/utils/index.js +34 -10
  57. package/dist/src/user/history.d.ts +3 -2
  58. package/dist/src/user/history.js +60 -18
  59. package/dist/src/user/order.d.ts +1 -1
  60. package/dist/src/user/orderWithBidReceipt.d.ts +1 -1
  61. package/package.json +8 -15
  62. package/dist/src/generated/typus_perp/deps/sui/object.d.ts +0 -8
  63. package/dist/src/generated/typus_perp/deps/sui/object.js +0 -16
  64. package/dist/src/generated/typus_perp/user_account.d.ts +0 -146
  65. package/dist/src/generated/typus_perp/user_account.js +0 -221
  66. package/dist/src/generated/typus_stake_pool/deps/sui/object.d.ts +0 -8
  67. package/dist/src/generated/typus_stake_pool/deps/sui/object.js +0 -16
  68. package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.d.ts +0 -30
  69. package/dist/src/generated/typus_stake_pool/deps/sui/vec_map.js +0 -37
  70. package/dist/src/grpc/graphql.d.ts +0 -26
  71. package/dist/src/grpc/graphql.js +0 -126
  72. package/dist/src/grpc/grpc.d.ts +0 -1
  73. package/dist/src/grpc/grpc.js +0 -38
  74. package/dist/src/grpc/ledgerService.d.ts +0 -0
  75. package/dist/src/grpc/ledgerService.js +0 -64
  76. package/dist/src/grpc/liveDataService.d.ts +0 -0
  77. package/dist/src/grpc/liveDataService.js +0 -49
@@ -1,126 +1,118 @@
1
1
  /**************************************************************
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
- import { MoveStruct, type RawTransactionArgument } from "../utils/index";
4
+ import { MoveStruct, type RawTransactionArgument } from "../utils/index.js";
5
5
  import { type Transaction } from "@mysten/sui/transactions";
6
6
  export declare const ProfitVault: MoveStruct<{
7
- id: MoveStruct<{
8
- id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
9
- }, "0x2::object::UID">;
7
+ id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
10
8
  whitelist: MoveStruct<{
11
- contents: import("@mysten/sui/bcs").BcsType<string[], Iterable<string | Uint8Array<ArrayBufferLike>> & {
9
+ contents: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string[], Iterable<string | Uint8Array<ArrayBufferLike>> & {
12
10
  length: number;
13
11
  }, string>;
14
12
  }, "0x2::vec_set::VecSet<bytes[32]>">;
15
13
  user_profits: MoveStruct<{
16
- id: MoveStruct<{
17
- id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
18
- }, "0x2::object::UID">;
19
- size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
20
- }, "0x2::table::Table">;
21
- unlock_countdown_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
14
+ id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
15
+ size: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
16
+ }, "0x2::table::Table<phantom K, phantom V>">;
17
+ unlock_countdown_ts_ms: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
22
18
  }, "@typus/perp::profit_vault::ProfitVault">;
23
19
  export declare const LockVault: MoveStruct<{
24
- id: MoveStruct<{
25
- id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
26
- }, "0x2::object::UID">;
20
+ id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
27
21
  user_profits: MoveStruct<{
28
- id: MoveStruct<{
29
- id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
30
- }, "0x2::object::UID">;
31
- size: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
32
- }, "0x2::table::Table">;
22
+ id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
23
+ size: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
24
+ }, "0x2::table::Table<phantom K, phantom V>">;
33
25
  }, "@typus/perp::profit_vault::LockVault">;
34
26
  export declare const UserProfit: MoveStruct<{
35
27
  collateral_token: MoveStruct<{
36
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
28
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
37
29
  }, "std::type_name::TypeName">;
38
30
  base_token: MoveStruct<{
39
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
31
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
40
32
  }, "std::type_name::TypeName">;
41
- position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
42
- order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
43
- amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
44
- create_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
33
+ position_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
34
+ order_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
35
+ amount: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
36
+ create_ts_ms: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
45
37
  }, "@typus/perp::profit_vault::UserProfit">;
46
38
  export declare const LockedUserProfit: MoveStruct<{
47
39
  user_profit: MoveStruct<{
48
40
  collateral_token: MoveStruct<{
49
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
41
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
50
42
  }, "std::type_name::TypeName">;
51
43
  base_token: MoveStruct<{
52
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
44
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
53
45
  }, "std::type_name::TypeName">;
54
- position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
55
- order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
56
- amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
57
- create_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
46
+ position_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
47
+ order_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
48
+ amount: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
49
+ create_ts_ms: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
58
50
  }, "@typus/perp::profit_vault::UserProfit">;
59
- create_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
51
+ create_ts_ms: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
60
52
  }, "@typus/perp::profit_vault::LockedUserProfit">;
61
53
  export declare const CreateProfitVaultEvent: MoveStruct<{
62
- unlock_countdown_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
54
+ unlock_countdown_ts_ms: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
63
55
  }, "@typus/perp::profit_vault::CreateProfitVaultEvent">;
64
56
  export declare const AddWhitelistEvent: MoveStruct<{
65
- new_whitelist_address: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
57
+ new_whitelist_address: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
66
58
  }, "@typus/perp::profit_vault::AddWhitelistEvent">;
67
59
  export declare const RemoveWhitelistEvent: MoveStruct<{
68
- removed_whitelist_address: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
60
+ removed_whitelist_address: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
69
61
  }, "@typus/perp::profit_vault::RemoveWhitelistEvent">;
70
62
  export declare const UpdateUnlockCountdownTsMsEvent: MoveStruct<{
71
- previous: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
72
- new: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
63
+ previous: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
64
+ new: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
73
65
  }, "@typus/perp::profit_vault::UpdateUnlockCountdownTsMsEvent">;
74
66
  export declare const LockUserProfitEvent: MoveStruct<{
75
- user: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
67
+ user: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
76
68
  user_profit: MoveStruct<{
77
69
  collateral_token: MoveStruct<{
78
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
70
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
79
71
  }, "std::type_name::TypeName">;
80
72
  base_token: MoveStruct<{
81
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
73
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
82
74
  }, "std::type_name::TypeName">;
83
- position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
84
- order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
85
- amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
86
- create_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
75
+ position_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
76
+ order_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
77
+ amount: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
78
+ create_ts_ms: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
87
79
  }, "@typus/perp::profit_vault::UserProfit">;
88
80
  }, "@typus/perp::profit_vault::LockUserProfitEvent">;
89
81
  export declare const UnlockUserProfitEvent: MoveStruct<{
90
- user: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
82
+ user: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
91
83
  user_profit: MoveStruct<{
92
84
  collateral_token: MoveStruct<{
93
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
85
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
94
86
  }, "std::type_name::TypeName">;
95
87
  base_token: MoveStruct<{
96
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
88
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
97
89
  }, "std::type_name::TypeName">;
98
- position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
99
- order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
100
- amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
101
- create_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
90
+ position_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
91
+ order_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
92
+ amount: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
93
+ create_ts_ms: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
102
94
  }, "@typus/perp::profit_vault::UserProfit">;
103
95
  }, "@typus/perp::profit_vault::UnlockUserProfitEvent">;
104
96
  export declare const PutUserProfitEvent: MoveStruct<{
105
- user: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
97
+ user: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
106
98
  user_profit: MoveStruct<{
107
99
  collateral_token: MoveStruct<{
108
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
100
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
109
101
  }, "std::type_name::TypeName">;
110
102
  base_token: MoveStruct<{
111
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
103
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
112
104
  }, "std::type_name::TypeName">;
113
- position_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
114
- order_id: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
115
- amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
116
- create_ts_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
105
+ position_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
106
+ order_id: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
107
+ amount: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
108
+ create_ts_ms: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
117
109
  }, "@typus/perp::profit_vault::UserProfit">;
118
110
  }, "@typus/perp::profit_vault::PutUserProfitEvent">;
119
111
  export declare const WithdrawProfitEvent: MoveStruct<{
120
112
  token_type: MoveStruct<{
121
- name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
113
+ name: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string, "string">;
122
114
  }, "std::type_name::TypeName">;
123
- withdraw_amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
115
+ withdraw_amount: import("@mysten/sui/bcs", { with: { "resolution-mode": "import" } }).BcsType<string, string | number | bigint, "u64">;
124
116
  }, "@typus/perp::profit_vault::WithdrawProfitEvent">;
125
117
  export interface CreateProfitVaultArguments {
126
118
  version: RawTransactionArgument<string>;
@@ -130,7 +122,7 @@ export interface CreateProfitVaultOptions {
130
122
  package?: string;
131
123
  arguments: CreateProfitVaultArguments | [version: RawTransactionArgument<string>, unlockCountdownTsMs: RawTransactionArgument<number | bigint>];
132
124
  }
133
- export declare function createProfitVault(options: CreateProfitVaultOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
125
+ export declare function createProfitVault(options: CreateProfitVaultOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
134
126
  export interface CreateLockVaultArguments {
135
127
  version: RawTransactionArgument<string>;
136
128
  }
@@ -138,7 +130,7 @@ export interface CreateLockVaultOptions {
138
130
  package?: string;
139
131
  arguments: CreateLockVaultArguments | [version: RawTransactionArgument<string>];
140
132
  }
141
- export declare function createLockVault(options: CreateLockVaultOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
133
+ export declare function createLockVault(options: CreateLockVaultOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
142
134
  export interface AddWhitelistArguments {
143
135
  version: RawTransactionArgument<string>;
144
136
  profitVault: RawTransactionArgument<string>;
@@ -148,7 +140,7 @@ export interface AddWhitelistOptions {
148
140
  package?: string;
149
141
  arguments: AddWhitelistArguments | [version: RawTransactionArgument<string>, profitVault: RawTransactionArgument<string>, user: RawTransactionArgument<string>];
150
142
  }
151
- export declare function addWhitelist(options: AddWhitelistOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
143
+ export declare function addWhitelist(options: AddWhitelistOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
152
144
  export interface RemoveWhitelistArguments {
153
145
  version: RawTransactionArgument<string>;
154
146
  profitVault: RawTransactionArgument<string>;
@@ -158,7 +150,7 @@ export interface RemoveWhitelistOptions {
158
150
  package?: string;
159
151
  arguments: RemoveWhitelistArguments | [version: RawTransactionArgument<string>, profitVault: RawTransactionArgument<string>, user: RawTransactionArgument<string>];
160
152
  }
161
- export declare function removeWhitelist(options: RemoveWhitelistOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
153
+ export declare function removeWhitelist(options: RemoveWhitelistOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
162
154
  export interface UpdateUnlockCountdownTsMsArguments {
163
155
  version: RawTransactionArgument<string>;
164
156
  profitVault: RawTransactionArgument<string>;
@@ -172,7 +164,7 @@ export interface UpdateUnlockCountdownTsMsOptions {
172
164
  newUnlockCountdownTsMs: RawTransactionArgument<number | bigint>
173
165
  ];
174
166
  }
175
- export declare function updateUnlockCountdownTsMs(options: UpdateUnlockCountdownTsMsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
167
+ export declare function updateUnlockCountdownTsMs(options: UpdateUnlockCountdownTsMsOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
176
168
  export interface LockUserProfitArguments {
177
169
  version: RawTransactionArgument<string>;
178
170
  profitVault: RawTransactionArgument<string>;
@@ -191,7 +183,7 @@ export interface LockUserProfitOptions {
191
183
  ];
192
184
  typeArguments: [string];
193
185
  }
194
- export declare function lockUserProfit(options: LockUserProfitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
186
+ export declare function lockUserProfit(options: LockUserProfitOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
195
187
  export interface UnlockUserProfitArguments {
196
188
  version: RawTransactionArgument<string>;
197
189
  profitVault: RawTransactionArgument<string>;
@@ -210,7 +202,7 @@ export interface UnlockUserProfitOptions {
210
202
  ];
211
203
  typeArguments: [string];
212
204
  }
213
- export declare function unlockUserProfit(options: UnlockUserProfitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
205
+ export declare function unlockUserProfit(options: UnlockUserProfitOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
214
206
  export interface PutUserProfitArguments {
215
207
  profitVault: RawTransactionArgument<string>;
216
208
  user: RawTransactionArgument<string>;
@@ -231,7 +223,7 @@ export interface PutUserProfitOptions {
231
223
  ];
232
224
  typeArguments: [string];
233
225
  }
234
- export declare function putUserProfit(options: PutUserProfitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
226
+ export declare function putUserProfit(options: PutUserProfitOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
235
227
  export interface WithdrawProfitArguments {
236
228
  profitVault: RawTransactionArgument<string>;
237
229
  }
@@ -240,7 +232,7 @@ export interface WithdrawProfitOptions {
240
232
  arguments: WithdrawProfitArguments | [profitVault: RawTransactionArgument<string>];
241
233
  typeArguments: [string];
242
234
  }
243
- export declare function withdrawProfit(options: WithdrawProfitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
235
+ export declare function withdrawProfit(options: WithdrawProfitOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
244
236
  export interface IsWhitelistArguments {
245
237
  profitVault: RawTransactionArgument<string>;
246
238
  user: RawTransactionArgument<string>;
@@ -249,7 +241,7 @@ export interface IsWhitelistOptions {
249
241
  package?: string;
250
242
  arguments: IsWhitelistArguments | [profitVault: RawTransactionArgument<string>, user: RawTransactionArgument<string>];
251
243
  }
252
- export declare function isWhitelist(options: IsWhitelistOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
244
+ export declare function isWhitelist(options: IsWhitelistOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
253
245
  export interface GetUserProfitsArguments {
254
246
  version: RawTransactionArgument<string>;
255
247
  profitVault: RawTransactionArgument<string>;
@@ -259,7 +251,7 @@ export interface GetUserProfitsOptions {
259
251
  package?: string;
260
252
  arguments: GetUserProfitsArguments | [version: RawTransactionArgument<string>, profitVault: RawTransactionArgument<string>, user: RawTransactionArgument<string>];
261
253
  }
262
- export declare function getUserProfits(options: GetUserProfitsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
254
+ export declare function getUserProfits(options: GetUserProfitsOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
263
255
  export interface GetLockedUserProfitsArguments {
264
256
  version: RawTransactionArgument<string>;
265
257
  lockVault: RawTransactionArgument<string>;
@@ -269,4 +261,4 @@ export interface GetLockedUserProfitsOptions {
269
261
  package?: string;
270
262
  arguments: GetLockedUserProfitsArguments | [version: RawTransactionArgument<string>, lockVault: RawTransactionArgument<string>, user: RawTransactionArgument<string>];
271
263
  }
272
- export declare function getLockedUserProfits(options: GetLockedUserProfitsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
264
+ export declare function getLockedUserProfits(options: GetLockedUserProfitsOptions): (tx: Transaction) => import("@mysten/sui/transactions", { with: { "resolution-mode": "import" } }).TransactionResult;
@@ -49,273 +49,235 @@ exports.getLockedUserProfits = getLockedUserProfits;
49
49
  /**************************************************************
50
50
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
51
51
  **************************************************************/
52
- const index_1 = require("../utils/index");
52
+ const index_js_1 = require("../utils/index.js");
53
53
  const bcs_1 = require("@mysten/sui/bcs");
54
- const object = __importStar(require("./deps/sui/object"));
55
- const vec_set = __importStar(require("./deps/sui/vec_set"));
56
- const table = __importStar(require("./deps/sui/table"));
57
- const type_name = __importStar(require("./deps/std/type_name"));
54
+ const vec_set = __importStar(require("./deps/sui/vec_set.js"));
55
+ const table = __importStar(require("./deps/sui/table.js"));
56
+ const table_1 = __importStar(require("./deps/sui/table.js"));
57
+ const type_name = __importStar(require("./deps/std/type_name.js"));
58
+ const type_name_1 = __importStar(require("./deps/std/type_name.js"));
59
+ const type_name_2 = __importStar(require("./deps/std/type_name.js"));
58
60
  const $moduleName = "@typus/perp::profit_vault";
59
- exports.ProfitVault = new index_1.MoveStruct({
61
+ exports.ProfitVault = new index_js_1.MoveStruct({
60
62
  name: `${$moduleName}::ProfitVault`,
61
63
  fields: {
62
- id: object.UID,
64
+ id: bcs_1.bcs.Address,
63
65
  whitelist: vec_set.VecSet(bcs_1.bcs.Address),
64
66
  user_profits: table.Table,
65
67
  unlock_countdown_ts_ms: bcs_1.bcs.u64(),
66
68
  },
67
69
  });
68
- exports.LockVault = new index_1.MoveStruct({
70
+ exports.LockVault = new index_js_1.MoveStruct({
69
71
  name: `${$moduleName}::LockVault`,
70
72
  fields: {
71
- id: object.UID,
72
- user_profits: table.Table,
73
+ id: bcs_1.bcs.Address,
74
+ user_profits: table_1.Table,
73
75
  },
74
76
  });
75
- exports.UserProfit = new index_1.MoveStruct({
77
+ exports.UserProfit = new index_js_1.MoveStruct({
76
78
  name: `${$moduleName}::UserProfit`,
77
79
  fields: {
78
80
  collateral_token: type_name.TypeName,
79
- base_token: type_name.TypeName,
81
+ base_token: type_name_1.TypeName,
80
82
  position_id: bcs_1.bcs.u64(),
81
83
  order_id: bcs_1.bcs.u64(),
82
84
  amount: bcs_1.bcs.u64(),
83
85
  create_ts_ms: bcs_1.bcs.u64(),
84
86
  },
85
87
  });
86
- exports.LockedUserProfit = new index_1.MoveStruct({
88
+ exports.LockedUserProfit = new index_js_1.MoveStruct({
87
89
  name: `${$moduleName}::LockedUserProfit`,
88
90
  fields: {
89
91
  user_profit: exports.UserProfit,
90
92
  create_ts_ms: bcs_1.bcs.u64(),
91
93
  },
92
94
  });
93
- exports.CreateProfitVaultEvent = new index_1.MoveStruct({
95
+ exports.CreateProfitVaultEvent = new index_js_1.MoveStruct({
94
96
  name: `${$moduleName}::CreateProfitVaultEvent`,
95
97
  fields: {
96
98
  unlock_countdown_ts_ms: bcs_1.bcs.u64(),
97
99
  },
98
100
  });
99
- exports.AddWhitelistEvent = new index_1.MoveStruct({
101
+ exports.AddWhitelistEvent = new index_js_1.MoveStruct({
100
102
  name: `${$moduleName}::AddWhitelistEvent`,
101
103
  fields: {
102
104
  new_whitelist_address: bcs_1.bcs.Address,
103
105
  },
104
106
  });
105
- exports.RemoveWhitelistEvent = new index_1.MoveStruct({
107
+ exports.RemoveWhitelistEvent = new index_js_1.MoveStruct({
106
108
  name: `${$moduleName}::RemoveWhitelistEvent`,
107
109
  fields: {
108
110
  removed_whitelist_address: bcs_1.bcs.Address,
109
111
  },
110
112
  });
111
- exports.UpdateUnlockCountdownTsMsEvent = new index_1.MoveStruct({
113
+ exports.UpdateUnlockCountdownTsMsEvent = new index_js_1.MoveStruct({
112
114
  name: `${$moduleName}::UpdateUnlockCountdownTsMsEvent`,
113
115
  fields: {
114
116
  previous: bcs_1.bcs.u64(),
115
117
  new: bcs_1.bcs.u64(),
116
118
  },
117
119
  });
118
- exports.LockUserProfitEvent = new index_1.MoveStruct({
120
+ exports.LockUserProfitEvent = new index_js_1.MoveStruct({
119
121
  name: `${$moduleName}::LockUserProfitEvent`,
120
122
  fields: {
121
123
  user: bcs_1.bcs.Address,
122
124
  user_profit: exports.UserProfit,
123
125
  },
124
126
  });
125
- exports.UnlockUserProfitEvent = new index_1.MoveStruct({
127
+ exports.UnlockUserProfitEvent = new index_js_1.MoveStruct({
126
128
  name: `${$moduleName}::UnlockUserProfitEvent`,
127
129
  fields: {
128
130
  user: bcs_1.bcs.Address,
129
131
  user_profit: exports.UserProfit,
130
132
  },
131
133
  });
132
- exports.PutUserProfitEvent = new index_1.MoveStruct({
134
+ exports.PutUserProfitEvent = new index_js_1.MoveStruct({
133
135
  name: `${$moduleName}::PutUserProfitEvent`,
134
136
  fields: {
135
137
  user: bcs_1.bcs.Address,
136
138
  user_profit: exports.UserProfit,
137
139
  },
138
140
  });
139
- exports.WithdrawProfitEvent = new index_1.MoveStruct({
141
+ exports.WithdrawProfitEvent = new index_js_1.MoveStruct({
140
142
  name: `${$moduleName}::WithdrawProfitEvent`,
141
143
  fields: {
142
- token_type: type_name.TypeName,
144
+ token_type: type_name_2.TypeName,
143
145
  withdraw_amount: bcs_1.bcs.u64(),
144
146
  },
145
147
  });
146
148
  function createProfitVault(options) {
147
149
  const packageAddress = options.package ?? "@typus/perp";
148
- const argumentsTypes = [`${packageAddress}::admin::Version`, "u64"];
150
+ const argumentsTypes = [null, "u64"];
149
151
  const parameterNames = ["version", "unlockCountdownTsMs"];
150
152
  return (tx) => tx.moveCall({
151
153
  package: packageAddress,
152
154
  module: "profit_vault",
153
155
  function: "create_profit_vault",
154
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
156
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
155
157
  });
156
158
  }
157
159
  function createLockVault(options) {
158
160
  const packageAddress = options.package ?? "@typus/perp";
159
- const argumentsTypes = [`${packageAddress}::admin::Version`];
161
+ const argumentsTypes = [null];
160
162
  const parameterNames = ["version"];
161
163
  return (tx) => tx.moveCall({
162
164
  package: packageAddress,
163
165
  module: "profit_vault",
164
166
  function: "create_lock_vault",
165
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
167
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
166
168
  });
167
169
  }
168
170
  function addWhitelist(options) {
169
171
  const packageAddress = options.package ?? "@typus/perp";
170
- const argumentsTypes = [
171
- `${packageAddress}::admin::Version`,
172
- `${packageAddress}::profit_vault::ProfitVault`,
173
- "address",
174
- ];
172
+ const argumentsTypes = [null, null, "address"];
175
173
  const parameterNames = ["version", "profitVault", "user"];
176
174
  return (tx) => tx.moveCall({
177
175
  package: packageAddress,
178
176
  module: "profit_vault",
179
177
  function: "add_whitelist",
180
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
178
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
181
179
  });
182
180
  }
183
181
  function removeWhitelist(options) {
184
182
  const packageAddress = options.package ?? "@typus/perp";
185
- const argumentsTypes = [
186
- `${packageAddress}::admin::Version`,
187
- `${packageAddress}::profit_vault::ProfitVault`,
188
- "address",
189
- ];
183
+ const argumentsTypes = [null, null, "address"];
190
184
  const parameterNames = ["version", "profitVault", "user"];
191
185
  return (tx) => tx.moveCall({
192
186
  package: packageAddress,
193
187
  module: "profit_vault",
194
188
  function: "remove_whitelist",
195
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
189
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
196
190
  });
197
191
  }
198
192
  function updateUnlockCountdownTsMs(options) {
199
193
  const packageAddress = options.package ?? "@typus/perp";
200
- const argumentsTypes = [`${packageAddress}::admin::Version`, `${packageAddress}::profit_vault::ProfitVault`, "u64"];
194
+ const argumentsTypes = [null, null, "u64"];
201
195
  const parameterNames = ["version", "profitVault", "newUnlockCountdownTsMs"];
202
196
  return (tx) => tx.moveCall({
203
197
  package: packageAddress,
204
198
  module: "profit_vault",
205
199
  function: "update_unlock_countdown_ts_ms",
206
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
200
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
207
201
  });
208
202
  }
209
203
  function lockUserProfit(options) {
210
204
  const packageAddress = options.package ?? "@typus/perp";
211
- const argumentsTypes = [
212
- `${packageAddress}::admin::Version`,
213
- `${packageAddress}::profit_vault::ProfitVault`,
214
- `${packageAddress}::profit_vault::LockVault`,
215
- "address",
216
- "u64",
217
- "0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
218
- ];
205
+ const argumentsTypes = [null, null, null, "address", "u64", "0x2::clock::Clock"];
219
206
  const parameterNames = ["version", "profitVault", "lockVault", "user", "idx"];
220
207
  return (tx) => tx.moveCall({
221
208
  package: packageAddress,
222
209
  module: "profit_vault",
223
210
  function: "lock_user_profit",
224
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
211
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
225
212
  typeArguments: options.typeArguments,
226
213
  });
227
214
  }
228
215
  function unlockUserProfit(options) {
229
216
  const packageAddress = options.package ?? "@typus/perp";
230
- const argumentsTypes = [
231
- `${packageAddress}::admin::Version`,
232
- `${packageAddress}::profit_vault::ProfitVault`,
233
- `${packageAddress}::profit_vault::LockVault`,
234
- "address",
235
- "u64",
236
- ];
217
+ const argumentsTypes = [null, null, null, "address", "u64"];
237
218
  const parameterNames = ["version", "profitVault", "lockVault", "user", "idx"];
238
219
  return (tx) => tx.moveCall({
239
220
  package: packageAddress,
240
221
  module: "profit_vault",
241
222
  function: "unlock_user_profit",
242
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
223
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
243
224
  typeArguments: options.typeArguments,
244
225
  });
245
226
  }
246
227
  function putUserProfit(options) {
247
228
  const packageAddress = options.package ?? "@typus/perp";
248
- const argumentsTypes = [
249
- `${packageAddress}::profit_vault::ProfitVault`,
250
- "address",
251
- `0x0000000000000000000000000000000000000000000000000000000000000002::balance::Balance<${options.typeArguments[0]}>`,
252
- "0x0000000000000000000000000000000000000000000000000000000000000001::type_name::TypeName",
253
- "u64",
254
- "u64",
255
- "0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
256
- ];
229
+ const argumentsTypes = [null, "address", null, null, "u64", "u64", "0x2::clock::Clock"];
257
230
  const parameterNames = ["profitVault", "user", "balance", "baseTokenType", "positionId", "orderId"];
258
231
  return (tx) => tx.moveCall({
259
232
  package: packageAddress,
260
233
  module: "profit_vault",
261
234
  function: "put_user_profit",
262
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
235
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
263
236
  typeArguments: options.typeArguments,
264
237
  });
265
238
  }
266
239
  function withdrawProfit(options) {
267
240
  const packageAddress = options.package ?? "@typus/perp";
268
- const argumentsTypes = [
269
- `${packageAddress}::profit_vault::ProfitVault`,
270
- "0x0000000000000000000000000000000000000000000000000000000000000002::clock::Clock",
271
- ];
241
+ const argumentsTypes = [null, "0x2::clock::Clock"];
272
242
  const parameterNames = ["profitVault"];
273
243
  return (tx) => tx.moveCall({
274
244
  package: packageAddress,
275
245
  module: "profit_vault",
276
246
  function: "withdraw_profit",
277
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
247
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
278
248
  typeArguments: options.typeArguments,
279
249
  });
280
250
  }
281
251
  function isWhitelist(options) {
282
252
  const packageAddress = options.package ?? "@typus/perp";
283
- const argumentsTypes = [`${packageAddress}::profit_vault::ProfitVault`, "address"];
253
+ const argumentsTypes = [null, "address"];
284
254
  const parameterNames = ["profitVault", "user"];
285
255
  return (tx) => tx.moveCall({
286
256
  package: packageAddress,
287
257
  module: "profit_vault",
288
258
  function: "is_whitelist",
289
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
259
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
290
260
  });
291
261
  }
292
262
  function getUserProfits(options) {
293
263
  const packageAddress = options.package ?? "@typus/perp";
294
- const argumentsTypes = [
295
- `${packageAddress}::admin::Version`,
296
- `${packageAddress}::profit_vault::ProfitVault`,
297
- "address",
298
- ];
264
+ const argumentsTypes = [null, null, "address"];
299
265
  const parameterNames = ["version", "profitVault", "user"];
300
266
  return (tx) => tx.moveCall({
301
267
  package: packageAddress,
302
268
  module: "profit_vault",
303
269
  function: "get_user_profits",
304
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
270
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
305
271
  });
306
272
  }
307
273
  function getLockedUserProfits(options) {
308
274
  const packageAddress = options.package ?? "@typus/perp";
309
- const argumentsTypes = [
310
- `${packageAddress}::admin::Version`,
311
- `${packageAddress}::profit_vault::LockVault`,
312
- "address",
313
- ];
275
+ const argumentsTypes = [null, null, "address"];
314
276
  const parameterNames = ["version", "lockVault", "user"];
315
277
  return (tx) => tx.moveCall({
316
278
  package: packageAddress,
317
279
  module: "profit_vault",
318
280
  function: "get_locked_user_profits",
319
- arguments: (0, index_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
281
+ arguments: (0, index_js_1.normalizeMoveArguments)(options.arguments, argumentsTypes, parameterNames),
320
282
  });
321
283
  }