@mysten/deepbook-v3 1.5.8 → 1.6.2

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 (182) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/client.d.mts +5 -0
  3. package/dist/client.d.mts.map +1 -1
  4. package/dist/client.mjs +7 -0
  5. package/dist/client.mjs.map +1 -1
  6. package/dist/contracts/deepbook/account.d.mts +18 -18
  7. package/dist/contracts/deepbook/account.d.mts.map +1 -1
  8. package/dist/contracts/deepbook/balance_manager.mjs +413 -0
  9. package/dist/contracts/deepbook/balance_manager.mjs.map +1 -0
  10. package/dist/contracts/deepbook/big_vector.mjs +43 -0
  11. package/dist/contracts/deepbook/big_vector.mjs.map +1 -0
  12. package/dist/contracts/deepbook/book.mjs +29 -0
  13. package/dist/contracts/deepbook/book.mjs.map +1 -0
  14. package/dist/contracts/deepbook/deep_price.d.mts +3 -3
  15. package/dist/contracts/deepbook/deep_price.d.mts.map +1 -1
  16. package/dist/contracts/deepbook/deep_price.mjs +1 -1
  17. package/dist/contracts/deepbook/deps/std/type_name.mjs +17 -0
  18. package/dist/contracts/deepbook/deps/std/type_name.mjs.map +1 -0
  19. package/dist/contracts/deepbook/deps/sui/bag.mjs +43 -0
  20. package/dist/contracts/deepbook/deps/sui/bag.mjs.map +1 -0
  21. package/dist/contracts/deepbook/deps/sui/balance.mjs +21 -0
  22. package/dist/contracts/deepbook/deps/sui/balance.mjs.map +1 -0
  23. package/dist/contracts/deepbook/deps/sui/table.mjs +38 -0
  24. package/dist/contracts/deepbook/deps/sui/table.mjs.map +1 -0
  25. package/dist/contracts/deepbook/deps/sui/vec_map.mjs +37 -0
  26. package/dist/contracts/deepbook/deps/sui/vec_map.mjs.map +1 -0
  27. package/dist/contracts/deepbook/deps/sui/versioned.mjs +19 -0
  28. package/dist/contracts/deepbook/deps/sui/versioned.mjs.map +1 -0
  29. package/dist/contracts/deepbook/governance.mjs +49 -0
  30. package/dist/contracts/deepbook/governance.mjs.map +1 -0
  31. package/dist/contracts/deepbook/history.mjs +56 -0
  32. package/dist/contracts/deepbook/history.mjs.map +1 -0
  33. package/dist/contracts/deepbook/order.d.mts +12 -12
  34. package/dist/contracts/deepbook/pool.mjs +1739 -0
  35. package/dist/contracts/deepbook/pool.mjs.map +1 -0
  36. package/dist/contracts/deepbook/registry.mjs +295 -0
  37. package/dist/contracts/deepbook/registry.mjs.map +1 -0
  38. package/dist/contracts/deepbook/state.mjs +89 -0
  39. package/dist/contracts/deepbook/state.mjs.map +1 -0
  40. package/dist/contracts/deepbook/trade_params.mjs +21 -0
  41. package/dist/contracts/deepbook/trade_params.mjs.map +1 -0
  42. package/dist/contracts/deepbook/vault.mjs +42 -0
  43. package/dist/contracts/deepbook/vault.mjs.map +1 -0
  44. package/dist/contracts/deepbook_margin/deps/deepbook/balance_manager.mjs +53 -0
  45. package/dist/contracts/deepbook_margin/deps/deepbook/balance_manager.mjs.map +1 -0
  46. package/dist/contracts/deepbook_margin/deps/std/type_name.mjs +17 -0
  47. package/dist/contracts/deepbook_margin/deps/std/type_name.mjs.map +1 -0
  48. package/dist/contracts/deepbook_margin/deps/sui/bag.mjs +43 -0
  49. package/dist/contracts/deepbook_margin/deps/sui/bag.mjs.map +1 -0
  50. package/dist/contracts/deepbook_margin/deps/sui/balance.mjs +21 -0
  51. package/dist/contracts/deepbook_margin/deps/sui/balance.mjs.map +1 -0
  52. package/dist/contracts/deepbook_margin/deps/sui/table.mjs +38 -0
  53. package/dist/contracts/deepbook_margin/deps/sui/table.mjs.map +1 -0
  54. package/dist/contracts/deepbook_margin/deps/sui/vec_map.mjs +37 -0
  55. package/dist/contracts/deepbook_margin/deps/sui/vec_map.mjs.map +1 -0
  56. package/dist/contracts/deepbook_margin/deps/sui/vec_set.mjs +26 -0
  57. package/dist/contracts/deepbook_margin/deps/sui/vec_set.mjs.map +1 -0
  58. package/dist/contracts/deepbook_margin/deps/sui/versioned.mjs +19 -0
  59. package/dist/contracts/deepbook_margin/deps/sui/versioned.mjs.map +1 -0
  60. package/dist/contracts/deepbook_margin/margin_manager.mjs +989 -0
  61. package/dist/contracts/deepbook_margin/margin_manager.mjs.map +1 -0
  62. package/dist/contracts/deepbook_margin/margin_pool.mjs +550 -0
  63. package/dist/contracts/deepbook_margin/margin_pool.mjs.map +1 -0
  64. package/dist/contracts/deepbook_margin/margin_registry.mjs +786 -0
  65. package/dist/contracts/deepbook_margin/margin_registry.mjs.map +1 -0
  66. package/dist/contracts/deepbook_margin/margin_state.mjs +30 -0
  67. package/dist/contracts/deepbook_margin/margin_state.mjs.map +1 -0
  68. package/dist/contracts/deepbook_margin/oracle.mjs +82 -0
  69. package/dist/contracts/deepbook_margin/oracle.mjs.map +1 -0
  70. package/dist/contracts/deepbook_margin/pool_proxy.mjs +644 -0
  71. package/dist/contracts/deepbook_margin/pool_proxy.mjs.map +1 -0
  72. package/dist/contracts/deepbook_margin/position_manager.mjs +32 -0
  73. package/dist/contracts/deepbook_margin/position_manager.mjs.map +1 -0
  74. package/dist/contracts/deepbook_margin/protocol_config.mjs +122 -0
  75. package/dist/contracts/deepbook_margin/protocol_config.mjs.map +1 -0
  76. package/dist/contracts/deepbook_margin/protocol_fees.mjs +58 -0
  77. package/dist/contracts/deepbook_margin/protocol_fees.mjs.map +1 -0
  78. package/dist/contracts/deepbook_margin/rate_limiter.mjs +26 -0
  79. package/dist/contracts/deepbook_margin/rate_limiter.mjs.map +1 -0
  80. package/dist/contracts/deepbook_margin/tpsl.mjs +171 -0
  81. package/dist/contracts/deepbook_margin/tpsl.mjs.map +1 -0
  82. package/dist/contracts/margin_liquidation/deps/sui/bag.mjs +43 -0
  83. package/dist/contracts/margin_liquidation/deps/sui/bag.mjs.map +1 -0
  84. package/dist/contracts/margin_liquidation/liquidation_vault.mjs +179 -0
  85. package/dist/contracts/margin_liquidation/liquidation_vault.mjs.map +1 -0
  86. package/dist/contracts/utils/index.d.mts +1 -1
  87. package/dist/contracts/utils/index.mjs +92 -3
  88. package/dist/contracts/utils/index.mjs.map +1 -1
  89. package/dist/queries/registryQueries.mjs +13 -0
  90. package/dist/queries/registryQueries.mjs.map +1 -1
  91. package/dist/transactions/balanceManager.d.mts.map +1 -1
  92. package/dist/transactions/balanceManager.mjs +119 -100
  93. package/dist/transactions/balanceManager.mjs.map +1 -1
  94. package/dist/transactions/deepbook.d.mts.map +1 -1
  95. package/dist/transactions/deepbook.mjs +464 -439
  96. package/dist/transactions/deepbook.mjs.map +1 -1
  97. package/dist/transactions/deepbookAdmin.d.mts.map +1 -1
  98. package/dist/transactions/deepbookAdmin.mjs +151 -135
  99. package/dist/transactions/deepbookAdmin.mjs.map +1 -1
  100. package/dist/transactions/flashLoans.d.mts.map +1 -1
  101. package/dist/transactions/flashLoans.mjs +29 -22
  102. package/dist/transactions/flashLoans.mjs.map +1 -1
  103. package/dist/transactions/governance.d.mts.map +1 -1
  104. package/dist/transactions/governance.mjs +34 -33
  105. package/dist/transactions/governance.mjs.map +1 -1
  106. package/dist/transactions/marginAdmin.d.mts +17 -7
  107. package/dist/transactions/marginAdmin.d.mts.map +1 -1
  108. package/dist/transactions/marginAdmin.mjs +186 -169
  109. package/dist/transactions/marginAdmin.mjs.map +1 -1
  110. package/dist/transactions/marginLiquidations.d.mts +3 -3
  111. package/dist/transactions/marginLiquidations.d.mts.map +1 -1
  112. package/dist/transactions/marginLiquidations.mjs +53 -54
  113. package/dist/transactions/marginLiquidations.mjs.map +1 -1
  114. package/dist/transactions/marginMaintainer.d.mts +5 -5
  115. package/dist/transactions/marginMaintainer.d.mts.map +1 -1
  116. package/dist/transactions/marginMaintainer.mjs +83 -83
  117. package/dist/transactions/marginMaintainer.mjs.map +1 -1
  118. package/dist/transactions/marginManager.d.mts +32 -32
  119. package/dist/transactions/marginManager.d.mts.map +1 -1
  120. package/dist/transactions/marginManager.mjs +330 -317
  121. package/dist/transactions/marginManager.mjs.map +1 -1
  122. package/dist/transactions/marginPool.d.mts +18 -18
  123. package/dist/transactions/marginPool.d.mts.map +1 -1
  124. package/dist/transactions/marginPool.mjs +93 -89
  125. package/dist/transactions/marginPool.mjs.map +1 -1
  126. package/dist/transactions/marginRegistry.d.mts +22 -15
  127. package/dist/transactions/marginRegistry.d.mts.map +1 -1
  128. package/dist/transactions/marginRegistry.mjs +101 -68
  129. package/dist/transactions/marginRegistry.mjs.map +1 -1
  130. package/dist/transactions/marginTPSL.d.mts +27 -9
  131. package/dist/transactions/marginTPSL.d.mts.map +1 -1
  132. package/dist/transactions/marginTPSL.mjs +108 -82
  133. package/dist/transactions/marginTPSL.mjs.map +1 -1
  134. package/dist/transactions/poolProxy.d.mts +37 -5
  135. package/dist/transactions/poolProxy.d.mts.map +1 -1
  136. package/dist/transactions/poolProxy.mjs +269 -189
  137. package/dist/transactions/poolProxy.mjs.map +1 -1
  138. package/dist/utils/constants.mjs +4 -4
  139. package/dist/utils/constants.mjs.map +1 -1
  140. package/package.json +3 -3
  141. package/src/client.ts +8 -0
  142. package/src/contracts/deepbook/balance_manager.ts +46 -5
  143. package/src/contracts/deepbook/constants.ts +13 -0
  144. package/src/contracts/deepbook/pool.ts +133 -0
  145. package/src/contracts/deepbook/registry.ts +136 -1
  146. package/src/contracts/deepbook_margin/deps/deepbook/balance_manager.ts +49 -0
  147. package/src/contracts/deepbook_margin/deps/std/type_name.ts +24 -0
  148. package/src/contracts/deepbook_margin/deps/sui/bag.ts +41 -0
  149. package/src/contracts/deepbook_margin/deps/sui/balance.ts +19 -0
  150. package/src/contracts/deepbook_margin/deps/sui/table.ts +36 -0
  151. package/src/contracts/deepbook_margin/deps/sui/vec_map.ts +33 -0
  152. package/src/contracts/deepbook_margin/deps/sui/vec_set.ts +22 -0
  153. package/src/contracts/deepbook_margin/deps/sui/versioned.ts +13 -0
  154. package/src/contracts/deepbook_margin/margin_constants.ts +329 -0
  155. package/src/contracts/deepbook_margin/margin_manager.ts +1772 -0
  156. package/src/contracts/deepbook_margin/margin_pool.ts +1129 -0
  157. package/src/contracts/deepbook_margin/margin_registry.ts +1207 -0
  158. package/src/contracts/deepbook_margin/margin_state.ts +26 -0
  159. package/src/contracts/deepbook_margin/oracle.ts +99 -0
  160. package/src/contracts/deepbook_margin/pool_proxy.ts +1298 -0
  161. package/src/contracts/deepbook_margin/position_manager.ts +28 -0
  162. package/src/contracts/deepbook_margin/protocol_config.ts +163 -0
  163. package/src/contracts/deepbook_margin/protocol_fees.ts +153 -0
  164. package/src/contracts/deepbook_margin/rate_limiter.ts +80 -0
  165. package/src/contracts/deepbook_margin/tpsl.ts +559 -0
  166. package/src/contracts/margin_liquidation/deps/sui/bag.ts +41 -0
  167. package/src/contracts/margin_liquidation/liquidation_vault.ts +401 -0
  168. package/src/queries/registryQueries.ts +15 -0
  169. package/src/transactions/balanceManager.ts +140 -90
  170. package/src/transactions/deepbook.ts +586 -494
  171. package/src/transactions/deepbookAdmin.ts +154 -146
  172. package/src/transactions/flashLoans.ts +29 -20
  173. package/src/transactions/governance.ts +50 -37
  174. package/src/transactions/marginAdmin.ts +247 -188
  175. package/src/transactions/marginLiquidations.ts +70 -55
  176. package/src/transactions/marginMaintainer.ts +106 -88
  177. package/src/transactions/marginManager.ts +414 -348
  178. package/src/transactions/marginPool.ts +140 -103
  179. package/src/transactions/marginRegistry.ts +103 -70
  180. package/src/transactions/marginTPSL.ts +151 -87
  181. package/src/transactions/poolProxy.ts +384 -205
  182. package/src/utils/constants.ts +4 -4
@@ -0,0 +1,413 @@
1
+ import { MoveStruct, MoveTuple, normalizeMoveArguments } from "../utils/index.mjs";
2
+ import { VecSet } from "./deps/sui/vec_set.mjs";
3
+ import { Bag } from "./deps/sui/bag.mjs";
4
+ import { TypeName } from "./deps/std/type_name.mjs";
5
+ import { bcs } from "@mysten/sui/bcs";
6
+
7
+ //#region src/contracts/deepbook/balance_manager.ts
8
+ /**************************************************************
9
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
10
+ **************************************************************/
11
+ /**
12
+ * The BalanceManager is a shared object that holds all of the balances for
13
+ * different assets. A combination of `BalanceManager` and `TradeProof` are passed
14
+ * into a pool to perform trades. A `TradeProof` can be generated in two ways: by
15
+ * the owner directly, or by any `TradeCap` owner. The owner can generate a
16
+ * `TradeProof` without the risk of equivocation. The `TradeCap` owner, due to it
17
+ * being an owned object, risks equivocation when generating a `TradeProof`.
18
+ * Generally, a high frequency trading engine will trade as the default owner.
19
+ */
20
+ const $moduleName = "@deepbook/core::balance_manager";
21
+ const BalanceManager = new MoveStruct({
22
+ name: `${$moduleName}::BalanceManager`,
23
+ fields: {
24
+ id: bcs.Address,
25
+ owner: bcs.Address,
26
+ balances: Bag,
27
+ allow_listed: VecSet(bcs.Address)
28
+ }
29
+ });
30
+ const BalanceManagerEvent = new MoveStruct({
31
+ name: `${$moduleName}::BalanceManagerEvent`,
32
+ fields: {
33
+ balance_manager_id: bcs.Address,
34
+ owner: bcs.Address
35
+ }
36
+ });
37
+ const BalanceEvent = new MoveStruct({
38
+ name: `${$moduleName}::BalanceEvent`,
39
+ fields: {
40
+ balance_manager_id: bcs.Address,
41
+ asset: TypeName,
42
+ amount: bcs.u64(),
43
+ deposit: bcs.bool()
44
+ }
45
+ });
46
+ const BalanceKey = new MoveStruct({
47
+ name: `${$moduleName}::BalanceKey<phantom T>`,
48
+ fields: { dummy_field: bcs.bool() }
49
+ });
50
+ const ReferralKey = new MoveTuple({
51
+ name: `${$moduleName}::ReferralKey`,
52
+ fields: [bcs.Address]
53
+ });
54
+ const TradeCap = new MoveStruct({
55
+ name: `${$moduleName}::TradeCap`,
56
+ fields: {
57
+ id: bcs.Address,
58
+ balance_manager_id: bcs.Address
59
+ }
60
+ });
61
+ const DepositCap = new MoveStruct({
62
+ name: `${$moduleName}::DepositCap`,
63
+ fields: {
64
+ id: bcs.Address,
65
+ balance_manager_id: bcs.Address
66
+ }
67
+ });
68
+ const WithdrawCap = new MoveStruct({
69
+ name: `${$moduleName}::WithdrawCap`,
70
+ fields: {
71
+ id: bcs.Address,
72
+ balance_manager_id: bcs.Address
73
+ }
74
+ });
75
+ const DeepBookReferral = new MoveStruct({
76
+ name: `${$moduleName}::DeepBookReferral`,
77
+ fields: {
78
+ id: bcs.Address,
79
+ owner: bcs.Address
80
+ }
81
+ });
82
+ const DeepBookPoolReferral = new MoveStruct({
83
+ name: `${$moduleName}::DeepBookPoolReferral`,
84
+ fields: {
85
+ id: bcs.Address,
86
+ owner: bcs.Address,
87
+ pool_id: bcs.Address
88
+ }
89
+ });
90
+ const DeepBookReferralCreatedEvent = new MoveStruct({
91
+ name: `${$moduleName}::DeepBookReferralCreatedEvent`,
92
+ fields: {
93
+ referral_id: bcs.Address,
94
+ owner: bcs.Address
95
+ }
96
+ });
97
+ const DeepBookReferralSetEvent = new MoveStruct({
98
+ name: `${$moduleName}::DeepBookReferralSetEvent`,
99
+ fields: {
100
+ referral_id: bcs.Address,
101
+ balance_manager_id: bcs.Address
102
+ }
103
+ });
104
+ const TradeProof = new MoveStruct({
105
+ name: `${$moduleName}::TradeProof`,
106
+ fields: {
107
+ balance_manager_id: bcs.Address,
108
+ trader: bcs.Address
109
+ }
110
+ });
111
+ /** Create a new balance manager with an owner. */
112
+ function newWithCustomOwner(options) {
113
+ const packageAddress = options.package ?? "@deepbook/core";
114
+ const argumentsTypes = ["address"];
115
+ const parameterNames = ["owner"];
116
+ return (tx) => tx.moveCall({
117
+ package: packageAddress,
118
+ module: "balance_manager",
119
+ function: "new_with_custom_owner",
120
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
121
+ });
122
+ }
123
+ /** Set the referral for the balance manager. */
124
+ function setBalanceManagerReferral(options) {
125
+ const packageAddress = options.package ?? "@deepbook/core";
126
+ const argumentsTypes = [
127
+ null,
128
+ null,
129
+ null
130
+ ];
131
+ const parameterNames = [
132
+ "balanceManager",
133
+ "referral",
134
+ "tradeCap"
135
+ ];
136
+ return (tx) => tx.moveCall({
137
+ package: packageAddress,
138
+ module: "balance_manager",
139
+ function: "set_balance_manager_referral",
140
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
141
+ });
142
+ }
143
+ /** Unset the referral for the balance manager. */
144
+ function unsetBalanceManagerReferral(options) {
145
+ const packageAddress = options.package ?? "@deepbook/core";
146
+ const argumentsTypes = [
147
+ null,
148
+ "0x2::object::ID",
149
+ null
150
+ ];
151
+ const parameterNames = [
152
+ "balanceManager",
153
+ "poolId",
154
+ "tradeCap"
155
+ ];
156
+ return (tx) => tx.moveCall({
157
+ package: packageAddress,
158
+ module: "balance_manager",
159
+ function: "unset_balance_manager_referral",
160
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
161
+ });
162
+ }
163
+ /** Returns the balance of a Coin in a balance manager. */
164
+ function balance(options) {
165
+ const packageAddress = options.package ?? "@deepbook/core";
166
+ const argumentsTypes = [null];
167
+ const parameterNames = ["balanceManager"];
168
+ return (tx) => tx.moveCall({
169
+ package: packageAddress,
170
+ module: "balance_manager",
171
+ function: "balance",
172
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
173
+ typeArguments: options.typeArguments
174
+ });
175
+ }
176
+ /** Mint a `TradeCap`, only owner can mint a `TradeCap`. */
177
+ function mintTradeCap(options) {
178
+ const packageAddress = options.package ?? "@deepbook/core";
179
+ const argumentsTypes = [null];
180
+ const parameterNames = ["balanceManager"];
181
+ return (tx) => tx.moveCall({
182
+ package: packageAddress,
183
+ module: "balance_manager",
184
+ function: "mint_trade_cap",
185
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
186
+ });
187
+ }
188
+ /** Mint a `DepositCap`, only owner can mint. */
189
+ function mintDepositCap(options) {
190
+ const packageAddress = options.package ?? "@deepbook/core";
191
+ const argumentsTypes = [null];
192
+ const parameterNames = ["balanceManager"];
193
+ return (tx) => tx.moveCall({
194
+ package: packageAddress,
195
+ module: "balance_manager",
196
+ function: "mint_deposit_cap",
197
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
198
+ });
199
+ }
200
+ /** Mint a `WithdrawCap`, only owner can mint. */
201
+ function mintWithdrawCap(options) {
202
+ const packageAddress = options.package ?? "@deepbook/core";
203
+ const argumentsTypes = [null];
204
+ const parameterNames = ["balanceManager"];
205
+ return (tx) => tx.moveCall({
206
+ package: packageAddress,
207
+ module: "balance_manager",
208
+ function: "mint_withdraw_cap",
209
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
210
+ });
211
+ }
212
+ /**
213
+ * Revoke a `TradeCap`. Only the owner can revoke a `TradeCap`. Can also be used to
214
+ * revoke `DepositCap` and `WithdrawCap`.
215
+ */
216
+ function revokeTradeCap(options) {
217
+ const packageAddress = options.package ?? "@deepbook/core";
218
+ const argumentsTypes = [null, "0x2::object::ID"];
219
+ const parameterNames = ["balanceManager", "tradeCapId"];
220
+ return (tx) => tx.moveCall({
221
+ package: packageAddress,
222
+ module: "balance_manager",
223
+ function: "revoke_trade_cap",
224
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
225
+ });
226
+ }
227
+ /**
228
+ * Generate a `TradeProof` by the owner. The owner does not require a capability
229
+ * and can generate TradeProofs without the risk of equivocation.
230
+ */
231
+ function generateProofAsOwner(options) {
232
+ const packageAddress = options.package ?? "@deepbook/core";
233
+ const argumentsTypes = [null];
234
+ const parameterNames = ["balanceManager"];
235
+ return (tx) => tx.moveCall({
236
+ package: packageAddress,
237
+ module: "balance_manager",
238
+ function: "generate_proof_as_owner",
239
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
240
+ });
241
+ }
242
+ /**
243
+ * Generate a `TradeProof` with a `TradeCap`. Risk of equivocation since `TradeCap`
244
+ * is an owned object.
245
+ */
246
+ function generateProofAsTrader(options) {
247
+ const packageAddress = options.package ?? "@deepbook/core";
248
+ const argumentsTypes = [null, null];
249
+ const parameterNames = ["balanceManager", "tradeCap"];
250
+ return (tx) => tx.moveCall({
251
+ package: packageAddress,
252
+ module: "balance_manager",
253
+ function: "generate_proof_as_trader",
254
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
255
+ });
256
+ }
257
+ /** Deposit funds to a balance manager. Only owner can call this directly. */
258
+ function deposit(options) {
259
+ const packageAddress = options.package ?? "@deepbook/core";
260
+ const argumentsTypes = [null, null];
261
+ const parameterNames = ["balanceManager", "coin"];
262
+ return (tx) => tx.moveCall({
263
+ package: packageAddress,
264
+ module: "balance_manager",
265
+ function: "deposit",
266
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
267
+ typeArguments: options.typeArguments
268
+ });
269
+ }
270
+ /** Deposit funds into a balance manager by a `DepositCap` owner. */
271
+ function depositWithCap(options) {
272
+ const packageAddress = options.package ?? "@deepbook/core";
273
+ const argumentsTypes = [
274
+ null,
275
+ null,
276
+ null
277
+ ];
278
+ const parameterNames = [
279
+ "balanceManager",
280
+ "depositCap",
281
+ "coin"
282
+ ];
283
+ return (tx) => tx.moveCall({
284
+ package: packageAddress,
285
+ module: "balance_manager",
286
+ function: "deposit_with_cap",
287
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
288
+ typeArguments: options.typeArguments
289
+ });
290
+ }
291
+ /** Withdraw funds from a balance manager by a `WithdrawCap` owner. */
292
+ function withdrawWithCap(options) {
293
+ const packageAddress = options.package ?? "@deepbook/core";
294
+ const argumentsTypes = [
295
+ null,
296
+ null,
297
+ "u64"
298
+ ];
299
+ const parameterNames = [
300
+ "balanceManager",
301
+ "withdrawCap",
302
+ "withdrawAmount"
303
+ ];
304
+ return (tx) => tx.moveCall({
305
+ package: packageAddress,
306
+ module: "balance_manager",
307
+ function: "withdraw_with_cap",
308
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
309
+ typeArguments: options.typeArguments
310
+ });
311
+ }
312
+ /**
313
+ * Withdraw funds from a balance_manager. Only owner can call this directly. If
314
+ * withdraw_all is true, amount is ignored and full balance withdrawn. If
315
+ * withdraw_all is false, withdraw_amount will be withdrawn.
316
+ */
317
+ function withdraw(options) {
318
+ const packageAddress = options.package ?? "@deepbook/core";
319
+ const argumentsTypes = [null, "u64"];
320
+ const parameterNames = ["balanceManager", "withdrawAmount"];
321
+ return (tx) => tx.moveCall({
322
+ package: packageAddress,
323
+ module: "balance_manager",
324
+ function: "withdraw",
325
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
326
+ typeArguments: options.typeArguments
327
+ });
328
+ }
329
+ function withdrawAll(options) {
330
+ const packageAddress = options.package ?? "@deepbook/core";
331
+ const argumentsTypes = [null];
332
+ const parameterNames = ["balanceManager"];
333
+ return (tx) => tx.moveCall({
334
+ package: packageAddress,
335
+ module: "balance_manager",
336
+ function: "withdraw_all",
337
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
338
+ typeArguments: options.typeArguments
339
+ });
340
+ }
341
+ function registerBalanceManager(options) {
342
+ const packageAddress = options.package ?? "@deepbook/core";
343
+ const argumentsTypes = [null, null];
344
+ const parameterNames = ["balanceManager", "registry"];
345
+ return (tx) => tx.moveCall({
346
+ package: packageAddress,
347
+ module: "balance_manager",
348
+ function: "register_balance_manager",
349
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
350
+ });
351
+ }
352
+ /** Get the referral id from the balance manager. */
353
+ function getBalanceManagerReferralId(options) {
354
+ const packageAddress = options.package ?? "@deepbook/core";
355
+ const argumentsTypes = [null, "0x2::object::ID"];
356
+ const parameterNames = ["balanceManager", "poolId"];
357
+ return (tx) => tx.moveCall({
358
+ package: packageAddress,
359
+ module: "balance_manager",
360
+ function: "get_balance_manager_referral_id",
361
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
362
+ });
363
+ }
364
+ /** Returns the owner of the balance_manager. */
365
+ function owner(options) {
366
+ const packageAddress = options.package ?? "@deepbook/core";
367
+ const argumentsTypes = [null];
368
+ const parameterNames = ["balanceManager"];
369
+ return (tx) => tx.moveCall({
370
+ package: packageAddress,
371
+ module: "balance_manager",
372
+ function: "owner",
373
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
374
+ });
375
+ }
376
+ /** Returns the owner of the balance_manager. */
377
+ function id(options) {
378
+ const packageAddress = options.package ?? "@deepbook/core";
379
+ const argumentsTypes = [null];
380
+ const parameterNames = ["balanceManager"];
381
+ return (tx) => tx.moveCall({
382
+ package: packageAddress,
383
+ module: "balance_manager",
384
+ function: "id",
385
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
386
+ });
387
+ }
388
+ function balanceManagerReferralOwner(options) {
389
+ const packageAddress = options.package ?? "@deepbook/core";
390
+ const argumentsTypes = [null];
391
+ const parameterNames = ["referral"];
392
+ return (tx) => tx.moveCall({
393
+ package: packageAddress,
394
+ module: "balance_manager",
395
+ function: "balance_manager_referral_owner",
396
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
397
+ });
398
+ }
399
+ function balanceManagerReferralPoolId(options) {
400
+ const packageAddress = options.package ?? "@deepbook/core";
401
+ const argumentsTypes = [null];
402
+ const parameterNames = ["referral"];
403
+ return (tx) => tx.moveCall({
404
+ package: packageAddress,
405
+ module: "balance_manager",
406
+ function: "balance_manager_referral_pool_id",
407
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames)
408
+ });
409
+ }
410
+
411
+ //#endregion
412
+ export { balance, balanceManagerReferralOwner, balanceManagerReferralPoolId, deposit, depositWithCap, generateProofAsOwner, generateProofAsTrader, getBalanceManagerReferralId, id, mintDepositCap, mintTradeCap, mintWithdrawCap, newWithCustomOwner, owner, registerBalanceManager, revokeTradeCap, setBalanceManagerReferral, unsetBalanceManagerReferral, withdraw, withdrawAll, withdrawWithCap };
413
+ //# sourceMappingURL=balance_manager.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"balance_manager.mjs","names":["bag.Bag","vec_set.VecSet","type_name.TypeName"],"sources":["../../../src/contracts/deepbook/balance_manager.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * The BalanceManager is a shared object that holds all of the balances for\n * different assets. A combination of `BalanceManager` and `TradeProof` are passed\n * into a pool to perform trades. A `TradeProof` can be generated in two ways: by\n * the owner directly, or by any `TradeCap` owner. The owner can generate a\n * `TradeProof` without the risk of equivocation. The `TradeCap` owner, due to it\n * being an owned object, risks equivocation when generating a `TradeProof`.\n * Generally, a high frequency trading engine will trade as the default owner.\n */\n\nimport {\n\tMoveStruct,\n\tMoveTuple,\n\tnormalizeMoveArguments,\n\ttype RawTransactionArgument,\n} from '../utils/index.js';\nimport { bcs, type BcsType } from '@mysten/sui/bcs';\nimport { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';\nimport * as bag from './deps/sui/bag.js';\nimport * as vec_set from './deps/sui/vec_set.js';\nimport * as type_name from './deps/std/type_name.js';\nconst $moduleName = '@deepbook/core::balance_manager';\nexport const BalanceManager = new MoveStruct({\n\tname: `${$moduleName}::BalanceManager`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\towner: bcs.Address,\n\t\tbalances: bag.Bag,\n\t\tallow_listed: vec_set.VecSet(bcs.Address),\n\t},\n});\nexport const BalanceManagerEvent = new MoveStruct({\n\tname: `${$moduleName}::BalanceManagerEvent`,\n\tfields: {\n\t\tbalance_manager_id: bcs.Address,\n\t\towner: bcs.Address,\n\t},\n});\nexport const BalanceEvent = new MoveStruct({\n\tname: `${$moduleName}::BalanceEvent`,\n\tfields: {\n\t\tbalance_manager_id: bcs.Address,\n\t\tasset: type_name.TypeName,\n\t\tamount: bcs.u64(),\n\t\tdeposit: bcs.bool(),\n\t},\n});\nexport const BalanceKey = new MoveStruct({\n\tname: `${$moduleName}::BalanceKey<phantom T>`,\n\tfields: {\n\t\tdummy_field: bcs.bool(),\n\t},\n});\nexport const ReferralKey = new MoveTuple({\n\tname: `${$moduleName}::ReferralKey`,\n\tfields: [bcs.Address],\n});\nexport const TradeCap = new MoveStruct({\n\tname: `${$moduleName}::TradeCap`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\tbalance_manager_id: bcs.Address,\n\t},\n});\nexport const DepositCap = new MoveStruct({\n\tname: `${$moduleName}::DepositCap`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\tbalance_manager_id: bcs.Address,\n\t},\n});\nexport const WithdrawCap = new MoveStruct({\n\tname: `${$moduleName}::WithdrawCap`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\tbalance_manager_id: bcs.Address,\n\t},\n});\nexport const DeepBookReferral = new MoveStruct({\n\tname: `${$moduleName}::DeepBookReferral`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\towner: bcs.Address,\n\t},\n});\nexport const DeepBookPoolReferral = new MoveStruct({\n\tname: `${$moduleName}::DeepBookPoolReferral`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\towner: bcs.Address,\n\t\tpool_id: bcs.Address,\n\t},\n});\nexport const DeepBookReferralCreatedEvent = new MoveStruct({\n\tname: `${$moduleName}::DeepBookReferralCreatedEvent`,\n\tfields: {\n\t\treferral_id: bcs.Address,\n\t\towner: bcs.Address,\n\t},\n});\nexport const DeepBookReferralSetEvent = new MoveStruct({\n\tname: `${$moduleName}::DeepBookReferralSetEvent`,\n\tfields: {\n\t\treferral_id: bcs.Address,\n\t\tbalance_manager_id: bcs.Address,\n\t},\n});\nexport const TradeProof = new MoveStruct({\n\tname: `${$moduleName}::TradeProof`,\n\tfields: {\n\t\tbalance_manager_id: bcs.Address,\n\t\ttrader: bcs.Address,\n\t},\n});\nexport interface NewOptions {\n\tpackage?: string;\n\targuments?: [];\n}\nexport function _new(options: NewOptions = {}) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'new',\n\t\t});\n}\nexport interface NewWithOwnerArguments {\n\tOwner: RawTransactionArgument<string>;\n}\nexport interface NewWithOwnerOptions {\n\tpackage?: string;\n\targuments: NewWithOwnerArguments | [Owner: RawTransactionArgument<string>];\n}\nexport function newWithOwner(options: NewWithOwnerOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = ['address'] satisfies (string | null)[];\n\tconst parameterNames = ['Owner'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'new_with_owner',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface NewWithCustomOwnerArguments {\n\towner: RawTransactionArgument<string>;\n}\nexport interface NewWithCustomOwnerOptions {\n\tpackage?: string;\n\targuments: NewWithCustomOwnerArguments | [owner: RawTransactionArgument<string>];\n}\n/** Create a new balance manager with an owner. */\nexport function newWithCustomOwner(options: NewWithCustomOwnerOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = ['address'] satisfies (string | null)[];\n\tconst parameterNames = ['owner'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'new_with_custom_owner',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface NewWithCustomOwnerAndCapsArguments {\n\tOwner: RawTransactionArgument<string>;\n}\nexport interface NewWithCustomOwnerAndCapsOptions {\n\tpackage?: string;\n\targuments: NewWithCustomOwnerAndCapsArguments | [Owner: RawTransactionArgument<string>];\n}\nexport function newWithCustomOwnerAndCaps(options: NewWithCustomOwnerAndCapsOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = ['address'] satisfies (string | null)[];\n\tconst parameterNames = ['Owner'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'new_with_custom_owner_and_caps',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface NewWithCustomOwnerCapsArguments {\n\tDeepbookRegistry: RawTransactionArgument<string>;\n\tOwner: RawTransactionArgument<string>;\n}\nexport interface NewWithCustomOwnerCapsOptions {\n\tpackage?: string;\n\targuments:\n\t\t| NewWithCustomOwnerCapsArguments\n\t\t| [DeepbookRegistry: RawTransactionArgument<string>, Owner: RawTransactionArgument<string>];\n\ttypeArguments: [string];\n}\nexport function newWithCustomOwnerCaps(options: NewWithCustomOwnerCapsOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, 'address'] satisfies (string | null)[];\n\tconst parameterNames = ['DeepbookRegistry', 'Owner'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'new_with_custom_owner_caps',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface NewWithCustomOwnerCapsV2Arguments<App extends BcsType<any>> {\n\tWitness: RawTransactionArgument<App>;\n\tdeepbookRegistry: RawTransactionArgument<string>;\n\towner: RawTransactionArgument<string>;\n}\nexport interface NewWithCustomOwnerCapsV2Options<App extends BcsType<any>> {\n\tpackage?: string;\n\targuments:\n\t\t| NewWithCustomOwnerCapsV2Arguments<App>\n\t\t| [\n\t\t\t\tWitness: RawTransactionArgument<App>,\n\t\t\t\tdeepbookRegistry: RawTransactionArgument<string>,\n\t\t\t\towner: RawTransactionArgument<string>,\n\t\t ];\n\ttypeArguments: [string];\n}\n/**\n * Create a `BalanceManager` with all three caps, gated on an authorized `App`\n * witness. The witness ensures only the module defining `App` can mint caps for\n * that app — the type tag alone is referenceable from any module, so the previous\n * `<App>`-only signature let a rogue caller mint caps under another app's\n * identity.\n */\nexport function newWithCustomOwnerCapsV2<App extends BcsType<any>>(\n\toptions: NewWithCustomOwnerCapsV2Options<App>,\n) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [`${options.typeArguments[0]}`, null, 'address'] satisfies (\n\t\t| string\n\t\t| null\n\t)[];\n\tconst parameterNames = ['Witness', 'deepbookRegistry', 'owner'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'new_with_custom_owner_caps_v2',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface SetReferralArguments {\n\tBalanceManager: RawTransactionArgument<string>;\n\tReferral: RawTransactionArgument<string>;\n\tTradeCap: RawTransactionArgument<string>;\n}\nexport interface SetReferralOptions {\n\tpackage?: string;\n\targuments:\n\t\t| SetReferralArguments\n\t\t| [\n\t\t\t\tBalanceManager: RawTransactionArgument<string>,\n\t\t\t\tReferral: RawTransactionArgument<string>,\n\t\t\t\tTradeCap: RawTransactionArgument<string>,\n\t\t ];\n}\nexport function setReferral(options: SetReferralOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null, null] satisfies (string | null)[];\n\tconst parameterNames = ['BalanceManager', 'Referral', 'TradeCap'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'set_referral',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface SetBalanceManagerReferralArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\treferral: RawTransactionArgument<string>;\n\ttradeCap: RawTransactionArgument<string>;\n}\nexport interface SetBalanceManagerReferralOptions {\n\tpackage?: string;\n\targuments:\n\t\t| SetBalanceManagerReferralArguments\n\t\t| [\n\t\t\t\tbalanceManager: RawTransactionArgument<string>,\n\t\t\t\treferral: RawTransactionArgument<string>,\n\t\t\t\ttradeCap: RawTransactionArgument<string>,\n\t\t ];\n}\n/** Set the referral for the balance manager. */\nexport function setBalanceManagerReferral(options: SetBalanceManagerReferralOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null, null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'referral', 'tradeCap'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'set_balance_manager_referral',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface UnsetReferralArguments {\n\tBalanceManager: RawTransactionArgument<string>;\n\tTradeCap: RawTransactionArgument<string>;\n}\nexport interface UnsetReferralOptions {\n\tpackage?: string;\n\targuments:\n\t\t| UnsetReferralArguments\n\t\t| [BalanceManager: RawTransactionArgument<string>, TradeCap: RawTransactionArgument<string>];\n}\nexport function unsetReferral(options: UnsetReferralOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['BalanceManager', 'TradeCap'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'unset_referral',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface UnsetBalanceManagerReferralArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\tpoolId: RawTransactionArgument<string>;\n\ttradeCap: RawTransactionArgument<string>;\n}\nexport interface UnsetBalanceManagerReferralOptions {\n\tpackage?: string;\n\targuments:\n\t\t| UnsetBalanceManagerReferralArguments\n\t\t| [\n\t\t\t\tbalanceManager: RawTransactionArgument<string>,\n\t\t\t\tpoolId: RawTransactionArgument<string>,\n\t\t\t\ttradeCap: RawTransactionArgument<string>,\n\t\t ];\n}\n/** Unset the referral for the balance manager. */\nexport function unsetBalanceManagerReferral(options: UnsetBalanceManagerReferralOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, '0x2::object::ID', null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'poolId', 'tradeCap'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'unset_balance_manager_referral',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface BalanceArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n}\nexport interface BalanceOptions {\n\tpackage?: string;\n\targuments: BalanceArguments | [balanceManager: RawTransactionArgument<string>];\n\ttypeArguments: [string];\n}\n/** Returns the balance of a Coin in a balance manager. */\nexport function balance(options: BalanceOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'balance',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface MintTradeCapArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n}\nexport interface MintTradeCapOptions {\n\tpackage?: string;\n\targuments: MintTradeCapArguments | [balanceManager: RawTransactionArgument<string>];\n}\n/** Mint a `TradeCap`, only owner can mint a `TradeCap`. */\nexport function mintTradeCap(options: MintTradeCapOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'mint_trade_cap',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface MintDepositCapArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n}\nexport interface MintDepositCapOptions {\n\tpackage?: string;\n\targuments: MintDepositCapArguments | [balanceManager: RawTransactionArgument<string>];\n}\n/** Mint a `DepositCap`, only owner can mint. */\nexport function mintDepositCap(options: MintDepositCapOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'mint_deposit_cap',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface MintWithdrawCapArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n}\nexport interface MintWithdrawCapOptions {\n\tpackage?: string;\n\targuments: MintWithdrawCapArguments | [balanceManager: RawTransactionArgument<string>];\n}\n/** Mint a `WithdrawCap`, only owner can mint. */\nexport function mintWithdrawCap(options: MintWithdrawCapOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'mint_withdraw_cap',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface RevokeTradeCapArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\ttradeCapId: RawTransactionArgument<string>;\n}\nexport interface RevokeTradeCapOptions {\n\tpackage?: string;\n\targuments:\n\t\t| RevokeTradeCapArguments\n\t\t| [balanceManager: RawTransactionArgument<string>, tradeCapId: RawTransactionArgument<string>];\n}\n/**\n * Revoke a `TradeCap`. Only the owner can revoke a `TradeCap`. Can also be used to\n * revoke `DepositCap` and `WithdrawCap`.\n */\nexport function revokeTradeCap(options: RevokeTradeCapOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, '0x2::object::ID'] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'tradeCapId'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'revoke_trade_cap',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface GenerateProofAsOwnerArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n}\nexport interface GenerateProofAsOwnerOptions {\n\tpackage?: string;\n\targuments: GenerateProofAsOwnerArguments | [balanceManager: RawTransactionArgument<string>];\n}\n/**\n * Generate a `TradeProof` by the owner. The owner does not require a capability\n * and can generate TradeProofs without the risk of equivocation.\n */\nexport function generateProofAsOwner(options: GenerateProofAsOwnerOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'generate_proof_as_owner',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface GenerateProofAsTraderArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\ttradeCap: RawTransactionArgument<string>;\n}\nexport interface GenerateProofAsTraderOptions {\n\tpackage?: string;\n\targuments:\n\t\t| GenerateProofAsTraderArguments\n\t\t| [balanceManager: RawTransactionArgument<string>, tradeCap: RawTransactionArgument<string>];\n}\n/**\n * Generate a `TradeProof` with a `TradeCap`. Risk of equivocation since `TradeCap`\n * is an owned object.\n */\nexport function generateProofAsTrader(options: GenerateProofAsTraderOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'tradeCap'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'generate_proof_as_trader',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface DepositArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\tcoin: RawTransactionArgument<string>;\n}\nexport interface DepositOptions {\n\tpackage?: string;\n\targuments:\n\t\t| DepositArguments\n\t\t| [balanceManager: RawTransactionArgument<string>, coin: RawTransactionArgument<string>];\n\ttypeArguments: [string];\n}\n/** Deposit funds to a balance manager. Only owner can call this directly. */\nexport function deposit(options: DepositOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'coin'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'deposit',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface DepositWithCapArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\tdepositCap: RawTransactionArgument<string>;\n\tcoin: RawTransactionArgument<string>;\n}\nexport interface DepositWithCapOptions {\n\tpackage?: string;\n\targuments:\n\t\t| DepositWithCapArguments\n\t\t| [\n\t\t\t\tbalanceManager: RawTransactionArgument<string>,\n\t\t\t\tdepositCap: RawTransactionArgument<string>,\n\t\t\t\tcoin: RawTransactionArgument<string>,\n\t\t ];\n\ttypeArguments: [string];\n}\n/** Deposit funds into a balance manager by a `DepositCap` owner. */\nexport function depositWithCap(options: DepositWithCapOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null, null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'depositCap', 'coin'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'deposit_with_cap',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface WithdrawWithCapArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\twithdrawCap: RawTransactionArgument<string>;\n\twithdrawAmount: RawTransactionArgument<number | bigint>;\n}\nexport interface WithdrawWithCapOptions {\n\tpackage?: string;\n\targuments:\n\t\t| WithdrawWithCapArguments\n\t\t| [\n\t\t\t\tbalanceManager: RawTransactionArgument<string>,\n\t\t\t\twithdrawCap: RawTransactionArgument<string>,\n\t\t\t\twithdrawAmount: RawTransactionArgument<number | bigint>,\n\t\t ];\n\ttypeArguments: [string];\n}\n/** Withdraw funds from a balance manager by a `WithdrawCap` owner. */\nexport function withdrawWithCap(options: WithdrawWithCapOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null, 'u64'] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'withdrawCap', 'withdrawAmount'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'withdraw_with_cap',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface WithdrawArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\twithdrawAmount: RawTransactionArgument<number | bigint>;\n}\nexport interface WithdrawOptions {\n\tpackage?: string;\n\targuments:\n\t\t| WithdrawArguments\n\t\t| [\n\t\t\t\tbalanceManager: RawTransactionArgument<string>,\n\t\t\t\twithdrawAmount: RawTransactionArgument<number | bigint>,\n\t\t ];\n\ttypeArguments: [string];\n}\n/**\n * Withdraw funds from a balance_manager. Only owner can call this directly. If\n * withdraw_all is true, amount is ignored and full balance withdrawn. If\n * withdraw_all is false, withdraw_amount will be withdrawn.\n */\nexport function withdraw(options: WithdrawOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, 'u64'] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'withdrawAmount'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'withdraw',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface WithdrawAllArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n}\nexport interface WithdrawAllOptions {\n\tpackage?: string;\n\targuments: WithdrawAllArguments | [balanceManager: RawTransactionArgument<string>];\n\ttypeArguments: [string];\n}\nexport function withdrawAll(options: WithdrawAllOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'withdraw_all',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t\ttypeArguments: options.typeArguments,\n\t\t});\n}\nexport interface RegisterManagerArguments {\n\tBalanceManager: RawTransactionArgument<string>;\n\tRegistry: RawTransactionArgument<string>;\n}\nexport interface RegisterManagerOptions {\n\tpackage?: string;\n\targuments:\n\t\t| RegisterManagerArguments\n\t\t| [BalanceManager: RawTransactionArgument<string>, Registry: RawTransactionArgument<string>];\n}\nexport function registerManager(options: RegisterManagerOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['BalanceManager', 'Registry'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'register_manager',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface RegisterBalanceManagerArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\tregistry: RawTransactionArgument<string>;\n}\nexport interface RegisterBalanceManagerOptions {\n\tpackage?: string;\n\targuments:\n\t\t| RegisterBalanceManagerArguments\n\t\t| [balanceManager: RawTransactionArgument<string>, registry: RawTransactionArgument<string>];\n}\nexport function registerBalanceManager(options: RegisterBalanceManagerOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'registry'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'register_balance_manager',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface GetReferralIdArguments {\n\tBalanceManager: RawTransactionArgument<string>;\n}\nexport interface GetReferralIdOptions {\n\tpackage?: string;\n\targuments: GetReferralIdArguments | [BalanceManager: RawTransactionArgument<string>];\n}\nexport function getReferralId(options: GetReferralIdOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['BalanceManager'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'get_referral_id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface GetBalanceManagerReferralIdArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\tpoolId: RawTransactionArgument<string>;\n}\nexport interface GetBalanceManagerReferralIdOptions {\n\tpackage?: string;\n\targuments:\n\t\t| GetBalanceManagerReferralIdArguments\n\t\t| [balanceManager: RawTransactionArgument<string>, poolId: RawTransactionArgument<string>];\n}\n/** Get the referral id from the balance manager. */\nexport function getBalanceManagerReferralId(options: GetBalanceManagerReferralIdOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, '0x2::object::ID'] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'poolId'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'get_balance_manager_referral_id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface ValidateProofArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n\tproof: TransactionArgument;\n}\nexport interface ValidateProofOptions {\n\tpackage?: string;\n\targuments:\n\t\t| ValidateProofArguments\n\t\t| [balanceManager: RawTransactionArgument<string>, proof: TransactionArgument];\n}\nexport function validateProof(options: ValidateProofOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null, null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager', 'proof'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'validate_proof',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface OwnerArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n}\nexport interface OwnerOptions {\n\tpackage?: string;\n\targuments: OwnerArguments | [balanceManager: RawTransactionArgument<string>];\n}\n/** Returns the owner of the balance_manager. */\nexport function owner(options: OwnerOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'owner',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface IdArguments {\n\tbalanceManager: RawTransactionArgument<string>;\n}\nexport interface IdOptions {\n\tpackage?: string;\n\targuments: IdArguments | [balanceManager: RawTransactionArgument<string>];\n}\n/** Returns the owner of the balance_manager. */\nexport function id(options: IdOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['balanceManager'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface ReferralOwnerArguments {\n\tReferral: RawTransactionArgument<string>;\n}\nexport interface ReferralOwnerOptions {\n\tpackage?: string;\n\targuments: ReferralOwnerArguments | [Referral: RawTransactionArgument<string>];\n}\nexport function referralOwner(options: ReferralOwnerOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['Referral'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'referral_owner',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface BalanceManagerReferralOwnerArguments {\n\treferral: RawTransactionArgument<string>;\n}\nexport interface BalanceManagerReferralOwnerOptions {\n\tpackage?: string;\n\targuments: BalanceManagerReferralOwnerArguments | [referral: RawTransactionArgument<string>];\n}\nexport function balanceManagerReferralOwner(options: BalanceManagerReferralOwnerOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['referral'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'balance_manager_referral_owner',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface BalanceManagerReferralPoolIdArguments {\n\treferral: RawTransactionArgument<string>;\n}\nexport interface BalanceManagerReferralPoolIdOptions {\n\tpackage?: string;\n\targuments: BalanceManagerReferralPoolIdArguments | [referral: RawTransactionArgument<string>];\n}\nexport function balanceManagerReferralPoolId(options: BalanceManagerReferralPoolIdOptions) {\n\tconst packageAddress = options.package ?? '@deepbook/core';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['referral'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'balance_manager',\n\t\t\tfunction: 'balance_manager_referral_pool_id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,MAAM,cAAc;AACpB,MAAa,iBAAiB,IAAI,WAAW;CAC5C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,IAAI,IAAI;EACR,OAAO,IAAI;EACX,UAAUA;EACV,cAAcC,OAAe,IAAI,QAAQ;EACzC;CACD,CAAC;AACF,MAAa,sBAAsB,IAAI,WAAW;CACjD,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,oBAAoB,IAAI;EACxB,OAAO,IAAI;EACX;CACD,CAAC;AACF,MAAa,eAAe,IAAI,W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,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAUJ,SAAgB,GAAG,SAAoB;CACtC,MAAM,iBAAiB,QAAQ,WAAW;CAC1C,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,iBAAiB;AACzC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;AA4BJ,SAAgB,4BAA4B,SAA6C;CACxF,MAAM,iBAAiB,QAAQ,WAAW;CAC1C,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,WAAW;AACnC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;AASJ,SAAgB,6BAA6B,SAA8C;CAC1F,MAAM,iBAAiB,QAAQ,WAAW;CAC1C,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,WAAW;AACnC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { MoveStruct } from "../utils/index.mjs";
2
+ import { bcs } from "@mysten/sui/bcs";
3
+
4
+ //#region src/contracts/deepbook/big_vector.ts
5
+ /**************************************************************
6
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
7
+ **************************************************************/
8
+ /**
9
+ * BigVector is an arbitrary sized vector-like data structure, implemented using an
10
+ * on-chain B+ Tree to support almost constant time (log base max_fan_out) random
11
+ * access, insertion and removal.
12
+ *
13
+ * Iteration is supported by exposing access to leaf nodes (slices). Finding the
14
+ * initial slice can be done in almost constant time, and subsequently finding the
15
+ * previous or next slice can also be done in constant time.
16
+ *
17
+ * Nodes in the B+ Tree are stored as individual dynamic fields hanging off the
18
+ * `BigVector`.
19
+ *
20
+ * Note: The index type is `u128`, but the length is stored as `u64` because the
21
+ * expectation is that indices are sparsely distributed.
22
+ */
23
+ const $moduleName = "@deepbook/core::big_vector";
24
+ const BigVector = new MoveStruct({
25
+ name: `${$moduleName}::BigVector<phantom E>`,
26
+ fields: {
27
+ id: bcs.Address,
28
+ depth: bcs.u8(),
29
+ length: bcs.u64(),
30
+ max_slice_size: bcs.u64(),
31
+ max_fan_out: bcs.u64(),
32
+ root_id: bcs.u64(),
33
+ last_id: bcs.u64()
34
+ }
35
+ });
36
+ const SliceRef = new MoveStruct({
37
+ name: `${$moduleName}::SliceRef`,
38
+ fields: { ix: bcs.u64() }
39
+ });
40
+
41
+ //#endregion
42
+ export { BigVector };
43
+ //# sourceMappingURL=big_vector.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"big_vector.mjs","names":[],"sources":["../../../src/contracts/deepbook/big_vector.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * BigVector is an arbitrary sized vector-like data structure, implemented using an\n * on-chain B+ Tree to support almost constant time (log base max_fan_out) random\n * access, insertion and removal.\n *\n * Iteration is supported by exposing access to leaf nodes (slices). Finding the\n * initial slice can be done in almost constant time, and subsequently finding the\n * previous or next slice can also be done in constant time.\n *\n * Nodes in the B+ Tree are stored as individual dynamic fields hanging off the\n * `BigVector`.\n *\n * Note: The index type is `u128`, but the length is stored as `u64` because the\n * expectation is that indices are sparsely distributed.\n */\n\nimport { MoveStruct } from '../utils/index.js';\nimport { bcs, type BcsType } from '@mysten/sui/bcs';\nconst $moduleName = '@deepbook/core::big_vector';\nexport const BigVector = new MoveStruct({\n\tname: `${$moduleName}::BigVector<phantom E>`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\t/** How deep the tree structure is. */\n\t\tdepth: bcs.u8(),\n\t\t/**\n\t\t * Total number of elements that this vector contains, not including gaps in the\n\t\t * vector.\n\t\t */\n\t\tlength: bcs.u64(),\n\t\t/** Max size of leaf nodes (counted in number of elements, `E`). */\n\t\tmax_slice_size: bcs.u64(),\n\t\t/** Max size of interior nodes (counted in number of children). */\n\t\tmax_fan_out: bcs.u64(),\n\t\t/** ID of the tree's root structure. Value of `NO_SLICE` means there's no root. */\n\t\troot_id: bcs.u64(),\n\t\t/** The last node ID that was allocated. */\n\t\tlast_id: bcs.u64(),\n\t},\n});\n/**\n * A node in the B+ tree.\n *\n * If representing a leaf node, there are as many keys as values (such that\n * `keys[i]` is the key corresponding to `vals[i]`).\n *\n * A `Slice<u64>` can also represent an interior node, in which case `vals` contain\n * the IDs of its children and `keys` represent the partitions between children.\n * There will be one fewer key than value in this configuration.\n */\nexport function Slice<E extends BcsType<any>>(...typeParameters: [E]) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::Slice<${typeParameters[0].name as E['name']}>`,\n\t\tfields: {\n\t\t\t/** Previous node in the intrusive doubly-linked list data structure. */\n\t\t\tprev: bcs.u64(),\n\t\t\t/** Next node in the intrusive doubly-linked list data structure. */\n\t\t\tnext: bcs.u64(),\n\t\t\tkeys: bcs.vector(bcs.u128()),\n\t\t\tvals: bcs.vector(typeParameters[0]),\n\t\t},\n\t});\n}\nexport const SliceRef = new MoveStruct({\n\tname: `${$moduleName}::SliceRef`,\n\tfields: {\n\t\tix: bcs.u64(),\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,cAAc;AACpB,MAAa,YAAY,IAAI,WAAW;CACvC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,IAAI,IAAI;EAER,OAAO,IAAI,IAAI;EAKf,QAAQ,IAAI,KAAK;EAEjB,gBAAgB,IAAI,KAAK;EAEzB,aAAa,IAAI,KAAK;EAEtB,SAAS,IAAI,KAAK;EAElB,SAAS,IAAI,KAAK;EAClB;CACD,CAAC;AAwBF,MAAa,WAAW,IAAI,WAAW;CACtC,MAAM,GAAG,YAAY;CACrB,QAAQ,EACP,IAAI,IAAI,KAAK,EACb;CACD,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { MoveStruct } from "../utils/index.mjs";
2
+ import { BigVector } from "./big_vector.mjs";
3
+ import { bcs } from "@mysten/sui/bcs";
4
+
5
+ //#region src/contracts/deepbook/book.ts
6
+ /**************************************************************
7
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
8
+ **************************************************************/
9
+ /**
10
+ * The book module contains the `Book` struct which represents the order book. All
11
+ * order book operations are defined in this module.
12
+ */
13
+ const $moduleName = "@deepbook/core::book";
14
+ const Book = new MoveStruct({
15
+ name: `${$moduleName}::Book`,
16
+ fields: {
17
+ tick_size: bcs.u64(),
18
+ lot_size: bcs.u64(),
19
+ min_size: bcs.u64(),
20
+ bids: BigVector,
21
+ asks: BigVector,
22
+ next_bid_order_id: bcs.u64(),
23
+ next_ask_order_id: bcs.u64()
24
+ }
25
+ });
26
+
27
+ //#endregion
28
+ export { Book };
29
+ //# sourceMappingURL=book.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"book.mjs","names":["big_vector.BigVector"],"sources":["../../../src/contracts/deepbook/book.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * The book module contains the `Book` struct which represents the order book. All\n * order book operations are defined in this module.\n */\n\nimport { MoveStruct } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport * as big_vector from './big_vector.js';\nconst $moduleName = '@deepbook/core::book';\nexport const Book = new MoveStruct({\n\tname: `${$moduleName}::Book`,\n\tfields: {\n\t\ttick_size: bcs.u64(),\n\t\tlot_size: bcs.u64(),\n\t\tmin_size: bcs.u64(),\n\t\tbids: big_vector.BigVector,\n\t\tasks: big_vector.BigVector,\n\t\tnext_bid_order_id: bcs.u64(),\n\t\tnext_ask_order_id: bcs.u64(),\n\t},\n});\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,cAAc;AACpB,MAAa,OAAO,IAAI,WAAW;CAClC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,WAAW,IAAI,KAAK;EACpB,UAAU,IAAI,KAAK;EACnB,UAAU,IAAI,KAAK;EACnB,MAAMA;EACN,MAAMA;EACN,mBAAmB,IAAI,KAAK;EAC5B,mBAAmB,IAAI,KAAK;EAC5B;CACD,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { MoveStruct } from "../utils/index.mjs";
2
- import * as _mysten_sui_bcs0 from "@mysten/sui/bcs";
2
+ import * as _mysten_sui_bcs48 from "@mysten/sui/bcs";
3
3
  import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
4
4
 
5
5
  //#region src/contracts/deepbook/deep_price.d.ts
6
6
  declare const OrderDeepPrice: MoveStruct<{
7
- asset_is_base: _mysten_sui_bcs0.BcsType<boolean, boolean, "bool">;
8
- deep_per_asset: _mysten_sui_bcs0.BcsType<string, string | number | bigint, "u64">;
7
+ asset_is_base: _mysten_sui_bcs48.BcsType<boolean, boolean, "bool">;
8
+ deep_per_asset: _mysten_sui_bcs48.BcsType<string, string | number | bigint, "u64">;
9
9
  }, "@deepbook/core::deep_price::OrderDeepPrice">;
10
10
  //#endregion
11
11
  export { OrderDeepPrice };
@@ -1 +1 @@
1
- {"version":3,"file":"deep_price.d.mts","names":[],"sources":["../../../src/contracts/deepbook/deep_price.ts"],"mappings":";;;;;cAuCa,cAAA,EAAc,UAAA;iBAMzB,gBAAA,CAAA,OAAA"}
1
+ {"version":3,"file":"deep_price.d.mts","names":[],"sources":["../../../src/contracts/deepbook/deep_price.ts"],"mappings":";;;;;cAuCa,cAAA,EAAc,UAAA;iBAMzB,iBAAA,CAAA,OAAA"}
@@ -45,5 +45,5 @@ const OrderDeepPrice = new MoveStruct({
45
45
  });
46
46
 
47
47
  //#endregion
48
- export { OrderDeepPrice };
48
+ export { DeepPrice, OrderDeepPrice };
49
49
  //# sourceMappingURL=deep_price.mjs.map
@@ -0,0 +1,17 @@
1
+ import { MoveStruct } from "../../../utils/index.mjs";
2
+ import { bcs } from "@mysten/sui/bcs";
3
+
4
+ //#region src/contracts/deepbook/deps/std/type_name.ts
5
+ /**************************************************************
6
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
7
+ **************************************************************/
8
+ /** Functionality for converting Move types into values. Use with care! */
9
+ const $moduleName = "std::type_name";
10
+ const TypeName = new MoveStruct({
11
+ name: `${$moduleName}::TypeName`,
12
+ fields: { name: bcs.string() }
13
+ });
14
+
15
+ //#endregion
16
+ export { TypeName };
17
+ //# sourceMappingURL=type_name.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type_name.mjs","names":[],"sources":["../../../../../src/contracts/deepbook/deps/std/type_name.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/** Functionality for converting Move types into values. Use with care! */\n\nimport { MoveStruct } from '../../../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nconst $moduleName = 'std::type_name';\nexport const TypeName = new MoveStruct({\n\tname: `${$moduleName}::TypeName`,\n\tfields: {\n\t\t/**\n\t\t * String representation of the type. All types are represented using their source\n\t\t * syntax: \"u8\", \"u64\", \"bool\", \"address\", \"vector\", and so on for primitive types.\n\t\t * Struct types are represented as fully qualified type names; e.g.\n\t\t * `00000000000000000000000000000001::string::String` or\n\t\t * `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`\n\t\t * Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or\n\t\t * 32 depending on the Move platform)\n\t\t */\n\t\tname: bcs.string(),\n\t},\n});\n"],"mappings":";;;;;;;;AAQA,MAAM,cAAc;AACpB,MAAa,WAAW,IAAI,WAAW;CACtC,MAAM,GAAG,YAAY;CACrB,QAAQ,EAUP,MAAM,IAAI,QAAQ,EAClB;CACD,CAAC"}