@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
@@ -1,5 +1,6 @@
1
1
  import { convertQuantity, convertRate } from "../utils/conversion.mjs";
2
2
  import { DEEP_SCALAR, FLOAT_SCALAR } from "../utils/config.mjs";
3
+ import { stake, submitProposal, unstake, vote } from "../contracts/deepbook/pool.mjs";
3
4
 
4
5
  //#region src/transactions/governance.ts
5
6
  /**
@@ -18,16 +19,16 @@ var GovernanceContract = class {
18
19
  const baseCoin = this.#config.getCoin(pool.baseCoin);
19
20
  const quoteCoin = this.#config.getCoin(pool.quoteCoin);
20
21
  const stakeInput = convertQuantity(stakeAmount, DEEP_SCALAR);
21
- tx.moveCall({
22
- target: `${this.#config.DEEPBOOK_PACKAGE_ID}::pool::stake`,
23
- arguments: [
24
- tx.object(pool.address),
25
- tx.object(balanceManager.address),
22
+ tx.add(stake({
23
+ package: this.#config.DEEPBOOK_PACKAGE_ID,
24
+ arguments: {
25
+ self: pool.address,
26
+ balanceManager: balanceManager.address,
26
27
  tradeProof,
27
- tx.pure.u64(stakeInput)
28
- ],
28
+ amount: stakeInput
29
+ },
29
30
  typeArguments: [baseCoin.type, quoteCoin.type]
30
- });
31
+ }));
31
32
  };
32
33
  this.unstake = (poolKey, balanceManagerKey) => (tx) => {
33
34
  const pool = this.#config.getPool(poolKey);
@@ -35,15 +36,15 @@ var GovernanceContract = class {
35
36
  const tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));
36
37
  const baseCoin = this.#config.getCoin(pool.baseCoin);
37
38
  const quoteCoin = this.#config.getCoin(pool.quoteCoin);
38
- tx.moveCall({
39
- target: `${this.#config.DEEPBOOK_PACKAGE_ID}::pool::unstake`,
40
- arguments: [
41
- tx.object(pool.address),
42
- tx.object(balanceManager.address),
39
+ tx.add(unstake({
40
+ package: this.#config.DEEPBOOK_PACKAGE_ID,
41
+ arguments: {
42
+ self: pool.address,
43
+ balanceManager: balanceManager.address,
43
44
  tradeProof
44
- ],
45
+ },
45
46
  typeArguments: [baseCoin.type, quoteCoin.type]
46
- });
47
+ }));
47
48
  };
48
49
  this.submitProposal = (params) => (tx) => {
49
50
  const { poolKey, balanceManagerKey, takerFee, makerFee, stakeRequired } = params;
@@ -52,18 +53,18 @@ var GovernanceContract = class {
52
53
  const tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));
53
54
  const baseCoin = this.#config.getCoin(pool.baseCoin);
54
55
  const quoteCoin = this.#config.getCoin(pool.quoteCoin);
55
- tx.moveCall({
56
- target: `${this.#config.DEEPBOOK_PACKAGE_ID}::pool::submit_proposal`,
57
- arguments: [
58
- tx.object(pool.address),
59
- tx.object(balanceManager.address),
56
+ tx.add(submitProposal({
57
+ package: this.#config.DEEPBOOK_PACKAGE_ID,
58
+ arguments: {
59
+ self: pool.address,
60
+ balanceManager: balanceManager.address,
60
61
  tradeProof,
61
- tx.pure.u64(convertRate(takerFee, FLOAT_SCALAR)),
62
- tx.pure.u64(convertRate(makerFee, FLOAT_SCALAR)),
63
- tx.pure.u64(convertQuantity(stakeRequired, DEEP_SCALAR))
64
- ],
62
+ takerFee: convertRate(takerFee, FLOAT_SCALAR),
63
+ makerFee: convertRate(makerFee, FLOAT_SCALAR),
64
+ stakeRequired: convertQuantity(stakeRequired, DEEP_SCALAR)
65
+ },
65
66
  typeArguments: [baseCoin.type, quoteCoin.type]
66
- });
67
+ }));
67
68
  };
68
69
  this.vote = (poolKey, balanceManagerKey, proposal_id) => (tx) => {
69
70
  const pool = this.#config.getPool(poolKey);
@@ -71,16 +72,16 @@ var GovernanceContract = class {
71
72
  const tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));
72
73
  const baseCoin = this.#config.getCoin(pool.baseCoin);
73
74
  const quoteCoin = this.#config.getCoin(pool.quoteCoin);
74
- tx.moveCall({
75
- target: `${this.#config.DEEPBOOK_PACKAGE_ID}::pool::vote`,
76
- arguments: [
77
- tx.object(pool.address),
78
- tx.object(balanceManager.address),
75
+ tx.add(vote({
76
+ package: this.#config.DEEPBOOK_PACKAGE_ID,
77
+ arguments: {
78
+ self: pool.address,
79
+ balanceManager: balanceManager.address,
79
80
  tradeProof,
80
- tx.pure.id(proposal_id)
81
- ],
81
+ proposalId: proposal_id
82
+ },
82
83
  typeArguments: [baseCoin.type, quoteCoin.type]
83
- });
84
+ }));
84
85
  };
85
86
  this.#config = config;
86
87
  }
@@ -1 +1 @@
1
- {"version":3,"file":"governance.mjs","names":["#config"],"sources":["../../src/transactions/governance.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\nimport type { Transaction } from '@mysten/sui/transactions';\n\nimport type { ProposalParams } from '../types/index.js';\nimport type { DeepBookConfig } from '../utils/config.js';\nimport { DEEP_SCALAR, FLOAT_SCALAR } from '../utils/config.js';\nimport { convertQuantity, convertRate } from '../utils/conversion.js';\n\n/**\n * GovernanceContract class for managing governance operations in DeepBook.\n */\nexport class GovernanceContract {\n\t#config: DeepBookConfig;\n\n\t/**\n\t * @param {DeepBookConfig} config Configuration for GovernanceContract\n\t */\n\tconstructor(config: DeepBookConfig) {\n\t\tthis.#config = config;\n\t}\n\n\t/**\n\t * @description Stake a specified amount in the pool\n\t * @param {string} poolKey The key to identify the pool\n\t * @param {string} balanceManagerKey The key to identify the BalanceManager\n\t * @param {number} stakeAmount The amount to stake\n\t * @returns A function that takes a Transaction object\n\t */\n\tstake =\n\t\t(poolKey: string, balanceManagerKey: string, stakeAmount: number) => (tx: Transaction) => {\n\t\t\tconst pool = this.#config.getPool(poolKey);\n\t\t\tconst balanceManager = this.#config.getBalanceManager(balanceManagerKey);\n\t\t\tconst tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));\n\t\t\tconst baseCoin = this.#config.getCoin(pool.baseCoin);\n\t\t\tconst quoteCoin = this.#config.getCoin(pool.quoteCoin);\n\t\t\tconst stakeInput = convertQuantity(stakeAmount, DEEP_SCALAR);\n\n\t\t\ttx.moveCall({\n\t\t\t\ttarget: `${this.#config.DEEPBOOK_PACKAGE_ID}::pool::stake`,\n\t\t\t\targuments: [\n\t\t\t\t\ttx.object(pool.address),\n\t\t\t\t\ttx.object(balanceManager.address),\n\t\t\t\t\ttradeProof,\n\t\t\t\t\ttx.pure.u64(stakeInput),\n\t\t\t\t],\n\t\t\t\ttypeArguments: [baseCoin.type, quoteCoin.type],\n\t\t\t});\n\t\t};\n\n\t/**\n\t * @description Unstake from the pool\n\t * @param {string} poolKey The key to identify the pool\n\t * @param {string} balanceManagerKey The key to identify the BalanceManager\n\t * @returns A function that takes a Transaction object\n\t */\n\tunstake = (poolKey: string, balanceManagerKey: string) => (tx: Transaction) => {\n\t\tconst pool = this.#config.getPool(poolKey);\n\t\tconst balanceManager = this.#config.getBalanceManager(balanceManagerKey);\n\t\tconst tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));\n\t\tconst baseCoin = this.#config.getCoin(pool.baseCoin);\n\t\tconst quoteCoin = this.#config.getCoin(pool.quoteCoin);\n\n\t\ttx.moveCall({\n\t\t\ttarget: `${this.#config.DEEPBOOK_PACKAGE_ID}::pool::unstake`,\n\t\t\targuments: [tx.object(pool.address), tx.object(balanceManager.address), tradeProof],\n\t\t\ttypeArguments: [baseCoin.type, quoteCoin.type],\n\t\t});\n\t};\n\n\t/**\n\t * @description Submit a governance proposal\n\t * @param {ProposalParams} params Parameters for the proposal\n\t * @returns A function that takes a Transaction object\n\t */\n\tsubmitProposal = (params: ProposalParams) => (tx: Transaction) => {\n\t\tconst { poolKey, balanceManagerKey, takerFee, makerFee, stakeRequired } = params;\n\n\t\tconst pool = this.#config.getPool(poolKey);\n\t\tconst balanceManager = this.#config.getBalanceManager(balanceManagerKey);\n\t\tconst tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));\n\t\tconst baseCoin = this.#config.getCoin(pool.baseCoin);\n\t\tconst quoteCoin = this.#config.getCoin(pool.quoteCoin);\n\n\t\ttx.moveCall({\n\t\t\ttarget: `${this.#config.DEEPBOOK_PACKAGE_ID}::pool::submit_proposal`,\n\t\t\targuments: [\n\t\t\t\ttx.object(pool.address),\n\t\t\t\ttx.object(balanceManager.address),\n\t\t\t\ttradeProof,\n\t\t\t\ttx.pure.u64(convertRate(takerFee, FLOAT_SCALAR)),\n\t\t\t\ttx.pure.u64(convertRate(makerFee, FLOAT_SCALAR)),\n\t\t\t\ttx.pure.u64(convertQuantity(stakeRequired, DEEP_SCALAR)),\n\t\t\t],\n\t\t\ttypeArguments: [baseCoin.type, quoteCoin.type],\n\t\t});\n\t};\n\n\t/**\n\t * @description Vote on a proposal\n\t * @param {string} poolKey The key to identify the pool\n\t * @param {string} balanceManagerKey The key to identify the BalanceManager\n\t * @param {string} proposal_id The ID of the proposal to vote on\n\t * @returns A function that takes a Transaction object\n\t */\n\tvote = (poolKey: string, balanceManagerKey: string, proposal_id: string) => (tx: Transaction) => {\n\t\tconst pool = this.#config.getPool(poolKey);\n\t\tconst balanceManager = this.#config.getBalanceManager(balanceManagerKey);\n\t\tconst tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));\n\t\tconst baseCoin = this.#config.getCoin(pool.baseCoin);\n\t\tconst quoteCoin = this.#config.getCoin(pool.quoteCoin);\n\n\t\ttx.moveCall({\n\t\t\ttarget: `${this.#config.DEEPBOOK_PACKAGE_ID}::pool::vote`,\n\t\t\targuments: [\n\t\t\t\ttx.object(pool.address),\n\t\t\t\ttx.object(balanceManager.address),\n\t\t\t\ttradeProof,\n\t\t\t\ttx.pure.id(proposal_id),\n\t\t\t],\n\t\t\ttypeArguments: [baseCoin.type, quoteCoin.type],\n\t\t});\n\t};\n}\n"],"mappings":";;;;;;;AAYA,IAAa,qBAAb,MAAgC;CAC/B;;;;CAKA,YAAY,QAAwB;gBAYlC,SAAiB,mBAA2B,iBAAyB,OAAoB;GACzF,MAAM,OAAO,MAAKA,OAAQ,QAAQ,QAAQ;GAC1C,MAAM,iBAAiB,MAAKA,OAAQ,kBAAkB,kBAAkB;GACxE,MAAM,aAAa,GAAG,IAAI,MAAKA,OAAQ,eAAe,cAAc,kBAAkB,CAAC;GACvF,MAAM,WAAW,MAAKA,OAAQ,QAAQ,KAAK,SAAS;GACpD,MAAM,YAAY,MAAKA,OAAQ,QAAQ,KAAK,UAAU;GACtD,MAAM,aAAa,gBAAgB,aAAa,YAAY;AAE5D,MAAG,SAAS;IACX,QAAQ,GAAG,MAAKA,OAAQ,oBAAoB;IAC5C,WAAW;KACV,GAAG,OAAO,KAAK,QAAQ;KACvB,GAAG,OAAO,eAAe,QAAQ;KACjC;KACA,GAAG,KAAK,IAAI,WAAW;KACvB;IACD,eAAe,CAAC,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AC9C,CAAC;;eAUK,SAAiB,mBAA2B,iBAAyB,OAAoB;GAChG,MAAM,OAAO,MAAKA,OAAQ,QAAQ,QAAQ;GAC1C,MAAM,iBAAiB,MAAKA,OAAQ,kBAAkB,kBAAkB;GACxE,MAAM,aAAa,GAAG,IAAI,MAAKA,OAAQ,eAAe,cAAc,kBAAkB,CAAC;GACvF,MAAM,WAAW,MAAKA,OAAQ,QAAQ,KAAK,SAAS;GACpD,MAAM,YAAY,MAAKA,OAAQ,QAAQ,KAAK,UAAU;AAEtD,MAAG,SAAS;IACX,QAAQ,GAAG,MAAKA,OAAQ,oBAAoB;IAC5C,WAAW;KACV,GAAG,OAAO,KAAK,QAAQ;KACvB,GAAG,OAAO,eAAe,QAAQ;KACjC;KACA,GAAG,KAAK,GAAG,YAAY;KACvB;IACD,eAAe,CAAC,SAAS,MAAM,UAAU,KAAK;IAC9C,CAAC;;AAtGF,QAAKA,SAAU"}
1
+ {"version":3,"file":"governance.mjs","names":["#config","poolMoveCalls.stake","poolMoveCalls.unstake","poolMoveCalls.submitProposal","poolMoveCalls.vote"],"sources":["../../src/transactions/governance.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\nimport type { Transaction } from '@mysten/sui/transactions';\n\nimport type { ProposalParams } from '../types/index.js';\nimport type { DeepBookConfig } from '../utils/config.js';\nimport { DEEP_SCALAR, FLOAT_SCALAR } from '../utils/config.js';\nimport { convertQuantity, convertRate } from '../utils/conversion.js';\nimport * as poolMoveCalls from '../contracts/deepbook/pool.js';\n\n/**\n * GovernanceContract class for managing governance operations in DeepBook.\n */\nexport class GovernanceContract {\n\t#config: DeepBookConfig;\n\n\t/**\n\t * @param {DeepBookConfig} config Configuration for GovernanceContract\n\t */\n\tconstructor(config: DeepBookConfig) {\n\t\tthis.#config = config;\n\t}\n\n\t/**\n\t * @description Stake a specified amount in the pool\n\t * @param {string} poolKey The key to identify the pool\n\t * @param {string} balanceManagerKey The key to identify the BalanceManager\n\t * @param {number} stakeAmount The amount to stake\n\t * @returns A function that takes a Transaction object\n\t */\n\tstake =\n\t\t(poolKey: string, balanceManagerKey: string, stakeAmount: number) => (tx: Transaction) => {\n\t\t\tconst pool = this.#config.getPool(poolKey);\n\t\t\tconst balanceManager = this.#config.getBalanceManager(balanceManagerKey);\n\t\t\tconst tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));\n\t\t\tconst baseCoin = this.#config.getCoin(pool.baseCoin);\n\t\t\tconst quoteCoin = this.#config.getCoin(pool.quoteCoin);\n\t\t\tconst stakeInput = convertQuantity(stakeAmount, DEEP_SCALAR);\n\n\t\t\ttx.add(\n\t\t\t\tpoolMoveCalls.stake({\n\t\t\t\t\tpackage: this.#config.DEEPBOOK_PACKAGE_ID,\n\t\t\t\t\targuments: {\n\t\t\t\t\t\tself: pool.address,\n\t\t\t\t\t\tbalanceManager: balanceManager.address,\n\t\t\t\t\t\ttradeProof,\n\t\t\t\t\t\tamount: stakeInput,\n\t\t\t\t\t},\n\t\t\t\t\ttypeArguments: [baseCoin.type, quoteCoin.type],\n\t\t\t\t}),\n\t\t\t);\n\t\t};\n\n\t/**\n\t * @description Unstake from the pool\n\t * @param {string} poolKey The key to identify the pool\n\t * @param {string} balanceManagerKey The key to identify the BalanceManager\n\t * @returns A function that takes a Transaction object\n\t */\n\tunstake = (poolKey: string, balanceManagerKey: string) => (tx: Transaction) => {\n\t\tconst pool = this.#config.getPool(poolKey);\n\t\tconst balanceManager = this.#config.getBalanceManager(balanceManagerKey);\n\t\tconst tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));\n\t\tconst baseCoin = this.#config.getCoin(pool.baseCoin);\n\t\tconst quoteCoin = this.#config.getCoin(pool.quoteCoin);\n\n\t\ttx.add(\n\t\t\tpoolMoveCalls.unstake({\n\t\t\t\tpackage: this.#config.DEEPBOOK_PACKAGE_ID,\n\t\t\t\targuments: {\n\t\t\t\t\tself: pool.address,\n\t\t\t\t\tbalanceManager: balanceManager.address,\n\t\t\t\t\ttradeProof,\n\t\t\t\t},\n\t\t\t\ttypeArguments: [baseCoin.type, quoteCoin.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Submit a governance proposal\n\t * @param {ProposalParams} params Parameters for the proposal\n\t * @returns A function that takes a Transaction object\n\t */\n\tsubmitProposal = (params: ProposalParams) => (tx: Transaction) => {\n\t\tconst { poolKey, balanceManagerKey, takerFee, makerFee, stakeRequired } = params;\n\n\t\tconst pool = this.#config.getPool(poolKey);\n\t\tconst balanceManager = this.#config.getBalanceManager(balanceManagerKey);\n\t\tconst tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));\n\t\tconst baseCoin = this.#config.getCoin(pool.baseCoin);\n\t\tconst quoteCoin = this.#config.getCoin(pool.quoteCoin);\n\n\t\ttx.add(\n\t\t\tpoolMoveCalls.submitProposal({\n\t\t\t\tpackage: this.#config.DEEPBOOK_PACKAGE_ID,\n\t\t\t\targuments: {\n\t\t\t\t\tself: pool.address,\n\t\t\t\t\tbalanceManager: balanceManager.address,\n\t\t\t\t\ttradeProof,\n\t\t\t\t\ttakerFee: convertRate(takerFee, FLOAT_SCALAR),\n\t\t\t\t\tmakerFee: convertRate(makerFee, FLOAT_SCALAR),\n\t\t\t\t\tstakeRequired: convertQuantity(stakeRequired, DEEP_SCALAR),\n\t\t\t\t},\n\t\t\t\ttypeArguments: [baseCoin.type, quoteCoin.type],\n\t\t\t}),\n\t\t);\n\t};\n\n\t/**\n\t * @description Vote on a proposal\n\t * @param {string} poolKey The key to identify the pool\n\t * @param {string} balanceManagerKey The key to identify the BalanceManager\n\t * @param {string} proposal_id The ID of the proposal to vote on\n\t * @returns A function that takes a Transaction object\n\t */\n\tvote = (poolKey: string, balanceManagerKey: string, proposal_id: string) => (tx: Transaction) => {\n\t\tconst pool = this.#config.getPool(poolKey);\n\t\tconst balanceManager = this.#config.getBalanceManager(balanceManagerKey);\n\t\tconst tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));\n\t\tconst baseCoin = this.#config.getCoin(pool.baseCoin);\n\t\tconst quoteCoin = this.#config.getCoin(pool.quoteCoin);\n\n\t\ttx.add(\n\t\t\tpoolMoveCalls.vote({\n\t\t\t\tpackage: this.#config.DEEPBOOK_PACKAGE_ID,\n\t\t\t\targuments: {\n\t\t\t\t\tself: pool.address,\n\t\t\t\t\tbalanceManager: balanceManager.address,\n\t\t\t\t\ttradeProof,\n\t\t\t\t\tproposalId: proposal_id,\n\t\t\t\t},\n\t\t\t\ttypeArguments: [baseCoin.type, quoteCoin.type],\n\t\t\t}),\n\t\t);\n\t};\n}\n"],"mappings":";;;;;;;;AAaA,IAAa,qBAAb,MAAgC;CAC/B;;;;CAKA,YAAY,QAAwB;gBAYlC,SAAiB,mBAA2B,iBAAyB,OAAoB;GACzF,MAAM,OAAO,MAAKA,OAAQ,QAAQ,QAAQ;GAC1C,MAAM,iBAAiB,MAAKA,OAAQ,kBAAkB,kBAAkB;GACxE,MAAM,aAAa,GAAG,IAAI,MAAKA,OAAQ,eAAe,cAAc,kBAAkB,CAAC;GACvF,MAAM,WAAW,MAAKA,OAAQ,QAAQ,KAAK,SAAS;GACpD,MAAM,YAAY,MAAKA,OAAQ,QAAQ,KAAK,UAAU;GACtD,MAAM,aAAa,gBAAgB,aAAa,YAAY;AAE5D,MAAG,IACFC,MAAoB;IACnB,SAAS,MAAKD,OAAQ;IACtB,WAAW;KACV,MAAM,KAAK;KACX,gBAAgB,eAAe;KAC/B;KACA,QAAQ;KACR;IACD,eAAe,CAAC,SAAS,MAAM,UAAU,KAAK;IAC9C,CAAC,CACF;;kBASQ,SAAiB,uBAA+B,OAAoB;GAC9E,MAAM,OAAO,MAAKA,OAAQ,QAAQ,QAAQ;GAC1C,MAAM,iBAAiB,MAAKA,OAAQ,kBAAkB,kBAAkB;GACxE,MAAM,aAAa,GAAG,IAAI,MAAKA,OAAQ,eAAe,cAAc,kBAAkB,CAAC;GACvF,MAAM,W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AS,MAAKJ,OAAQ;IACtB,WAAW;KACV,MAAM,KAAK;KACX,gBAAgB,eAAe;KAC/B;KACA,YAAY;KACZ;IACD,eAAe,CAAC,SAAS,MAAM,UAAU,KAAK;IAC9C,CAAC,CACF;;AAlHD,QAAKA,SAAU"}
@@ -1,6 +1,6 @@
1
1
  import { PoolConfigParams } from "../types/index.mjs";
2
2
  import { DeepBookConfig } from "../utils/config.mjs";
3
- import * as _mysten_sui_transactions40 from "@mysten/sui/transactions";
3
+ import * as _mysten_sui_transactions32 from "@mysten/sui/transactions";
4
4
  import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
5
5
 
6
6
  //#region src/transactions/marginAdmin.d.ts
@@ -17,7 +17,7 @@ declare class MarginAdminContract {
17
17
  * @description Mint a maintainer cap
18
18
  * @returns A function that takes a Transaction object
19
19
  */
20
- mintMaintainerCap: () => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
20
+ mintMaintainerCap: () => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
21
21
  /**
22
22
  * @description Revoke a maintainer cap
23
23
  * @returns A function that takes a Transaction object
@@ -80,6 +80,16 @@ declare class MarginAdminContract {
80
80
  * @returns A function that takes a Transaction object
81
81
  */
82
82
  setMaxOrderTtl: (poolKey: string, maxOrderTtlMs: number | bigint) => (tx: Transaction) => void;
83
+ /**
84
+ * @description Set the minimum risk ratio required to open a new position on
85
+ * a pool. Distinct from the borrow floor: this gates position opening, not
86
+ * borrowing. Stored in 9-decimal float scaling (1.0 = `FLOAT_SCALAR`); the SDK
87
+ * applies the scaling, so callers pass a human-readable ratio (e.g. `1.25`).
88
+ * @param {string} poolKey The key of the pool to update
89
+ * @param {number | bigint} minOpenRiskRatio Minimum open risk ratio (e.g. 1.25)
90
+ * @returns A function that takes a Transaction object
91
+ */
92
+ setMinOpenRiskRatio: (poolKey: string, minOpenRiskRatio: number | bigint) => (tx: Transaction) => void;
83
93
  /**
84
94
  * @description Add the PythConfig to the margin registry
85
95
  * @param {Transaction} tx The transaction object
@@ -111,7 +121,7 @@ declare class MarginAdminContract {
111
121
  * @param {PoolConfigParams} poolConfigParams The parameters for the pool config
112
122
  * @returns A function that takes a Transaction object
113
123
  */
114
- newPoolConfig: (poolKey: string, poolConfigParams: PoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
124
+ newPoolConfig: (poolKey: string, poolConfigParams: PoolConfigParams) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
115
125
  /**
116
126
  * @description Create a new pool config with leverage
117
127
  * @param {string} poolKey The key to identify the pool
@@ -126,7 +136,7 @@ declare class MarginAdminContract {
126
136
  * @param {number} maxEwmaDifferenceBps The maximum EWMA difference in basis points
127
137
  * @returns A function that takes a Transaction object
128
138
  */
129
- newCoinTypeData: (coinKey: string, maxConfBps: number, maxEwmaDifferenceBps: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
139
+ newCoinTypeData: (coinKey: string, maxConfBps: number, maxEwmaDifferenceBps: number) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
130
140
  /**
131
141
  * @description Create a new Pyth config
132
142
  * @param {Array<{coinKey: string, maxConfBps: number, maxEwmaDifferenceBps: number}>} coinSetups The coins with their oracle config to be added to the Pyth config
@@ -137,12 +147,12 @@ declare class MarginAdminContract {
137
147
  coinKey: string;
138
148
  maxConfBps: number;
139
149
  maxEwmaDifferenceBps: number;
140
- }>, maxAgeSeconds: number) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
150
+ }>, maxAgeSeconds: number) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
141
151
  /**
142
152
  * @description Mint a pause cap
143
153
  * @returns A function that takes a Transaction object
144
154
  */
145
- mintPauseCap: () => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
155
+ mintPauseCap: () => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
146
156
  /**
147
157
  * @description Revoke a pause cap
148
158
  * @param {string} pauseCapId The ID of the pause cap to revoke
@@ -162,7 +172,7 @@ declare class MarginAdminContract {
162
172
  * @param {string} coinKey The key to identify the margin pool
163
173
  * @returns A function that takes a Transaction object and returns a Coin<Asset>
164
174
  */
165
- adminWithdrawDefaultReferralFees: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions40.TransactionResult;
175
+ adminWithdrawDefaultReferralFees: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions32.TransactionResult;
166
176
  }
167
177
  //#endregion
168
178
  export { MarginAdminContract };
@@ -1 +1 @@
1
- {"version":3,"file":"marginAdmin.d.mts","names":[],"sources":["../../src/transactions/marginAdmin.ts"],"mappings":";;;;;;;;AAeA;cAAa,mBAAA;EAAA;EAMQ;;;cAAR,MAAA,EAAQ,cAAA;EAsDW;;;;EAlC/B,iBAAA,SAA2B,EAAA,EAAI,WAAA,KAAW,0BAAA,CAAA,iBAAA;EAmGoC;;;;EApF9E,mBAAA,GAAuB,eAAA,cAA6B,EAAA,EAAI,WAAA;EA0LN;;;;;;EAxKlD,oBAAA,GACE,OAAA,UAAiB,UAAA,EAAY,mBAAA,MAAyB,EAAA,EAAI,WAAA;EAuQY;;;;;EAjPxE,kBAAA,GAAsB,OAAA,cAAqB,EAAA,EAAI,WAAA;EA6TrB;;;;;EAxS1B,mBAAA,GAAuB,OAAA,cAAqB,EAAA,EAAI,WAAA;EA2VwB;;;;;;EArUxE,gBAAA,GAAoB,OAAA,UAAiB,UAAA,EAAY,mBAAA,MAAyB,EAAA,EAAI,WAAA;EAnG/C;;;;;;;;;;EA8H/B,iBAAA,GAAqB,OAAA,UAAiB,SAAA,uBAAgC,EAAA,EAAI,WAAA;EA5Fd;;;;;;;;EAqH5D,cAAA,GAAkB,OAAA,UAAiB,QAAA,uBAA+B,EAAA,EAAI,WAAA;EA1E1B;;;;;;;;;;EAqG5C,cAAA,GAAkB,OAAA,UAAiB,aAAA,uBAAoC,EAAA,EAAI,WAAA;EApDL;;;;;;EA2EtE,SAAA,GAAa,MAAA,EAAQ,mBAAA,MAAyB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