@mysten/deepbook-v3 2.1.4 → 2.4.0

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 (193) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/PREDICT.md +154 -48
  3. package/README.md +18 -13
  4. package/dist/account.d.mts.map +1 -1
  5. package/dist/account.mjs +3 -1
  6. package/dist/account.mjs.map +1 -1
  7. package/dist/client.d.mts +2 -2
  8. package/dist/contracts/account/account.d.mts +23 -23
  9. package/dist/contracts/account/account.d.mts.map +1 -1
  10. package/dist/contracts/account/account_events.d.mts +20 -20
  11. package/dist/contracts/account/account_registry.d.mts +19 -19
  12. package/dist/contracts/deepbook/account.d.mts +18 -18
  13. package/dist/contracts/deepbook/account.d.mts.map +1 -1
  14. package/dist/contracts/deepbook/balances.d.mts +4 -4
  15. package/dist/contracts/deepbook/balances.d.mts.map +1 -1
  16. package/dist/contracts/deepbook/deep_price.d.mts +3 -3
  17. package/dist/contracts/deepbook/deep_price.d.mts.map +1 -1
  18. package/dist/contracts/deepbook/order.d.mts +12 -12
  19. package/dist/contracts/deepbook_predict/admin.d.mts +27 -0
  20. package/dist/contracts/deepbook_predict/admin.d.mts.map +1 -0
  21. package/dist/contracts/deepbook_predict/admin.mjs +38 -0
  22. package/dist/contracts/deepbook_predict/admin.mjs.map +1 -0
  23. package/dist/contracts/deepbook_predict/builder_code.d.mts +81 -0
  24. package/dist/contracts/deepbook_predict/builder_code.d.mts.map +1 -0
  25. package/dist/contracts/deepbook_predict/builder_code.mjs +103 -0
  26. package/dist/contracts/deepbook_predict/builder_code.mjs.map +1 -0
  27. package/dist/contracts/deepbook_predict/builder_code_events.d.mts +25 -0
  28. package/dist/contracts/deepbook_predict/builder_code_events.d.mts.map +1 -0
  29. package/dist/contracts/deepbook_predict/builder_code_events.mjs +7 -1
  30. package/dist/contracts/deepbook_predict/builder_code_events.mjs.map +1 -1
  31. package/dist/contracts/deepbook_predict/config_events.d.mts +104 -0
  32. package/dist/contracts/deepbook_predict/config_events.d.mts.map +1 -0
  33. package/dist/contracts/deepbook_predict/config_events.mjs +155 -0
  34. package/dist/contracts/deepbook_predict/config_events.mjs.map +1 -0
  35. package/dist/contracts/deepbook_predict/deps/sui/vec_map.mjs +37 -0
  36. package/dist/contracts/deepbook_predict/deps/sui/vec_map.mjs.map +1 -0
  37. package/dist/contracts/deepbook_predict/ewma_config.mjs +28 -0
  38. package/dist/contracts/deepbook_predict/ewma_config.mjs.map +1 -0
  39. package/dist/contracts/deepbook_predict/expiry_cash.mjs +1 -1
  40. package/dist/contracts/deepbook_predict/expiry_cash.mjs.map +1 -1
  41. package/dist/contracts/deepbook_predict/expiry_market.d.mts +859 -0
  42. package/dist/contracts/deepbook_predict/expiry_market.d.mts.map +1 -0
  43. package/dist/contracts/deepbook_predict/expiry_market.mjs +662 -7
  44. package/dist/contracts/deepbook_predict/expiry_market.mjs.map +1 -1
  45. package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts +39 -0
  46. package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts.map +1 -0
  47. package/dist/contracts/deepbook_predict/market_lifecycle_cap.mjs +51 -0
  48. package/dist/contracts/deepbook_predict/market_lifecycle_cap.mjs.map +1 -0
  49. package/dist/contracts/deepbook_predict/market_manager.d.mts +159 -0
  50. package/dist/contracts/deepbook_predict/market_manager.d.mts.map +1 -0
  51. package/dist/contracts/deepbook_predict/market_manager.mjs +88 -2
  52. package/dist/contracts/deepbook_predict/market_manager.mjs.map +1 -1
  53. package/dist/contracts/deepbook_predict/order_events.d.mts +101 -0
  54. package/dist/contracts/deepbook_predict/order_events.d.mts.map +1 -0
  55. package/dist/contracts/deepbook_predict/order_events.mjs +7 -1
  56. package/dist/contracts/deepbook_predict/order_events.mjs.map +1 -1
  57. package/dist/contracts/deepbook_predict/pause_cap.d.mts +39 -0
  58. package/dist/contracts/deepbook_predict/pause_cap.d.mts.map +1 -0
  59. package/dist/contracts/deepbook_predict/pause_cap.mjs +51 -0
  60. package/dist/contracts/deepbook_predict/pause_cap.mjs.map +1 -0
  61. package/dist/contracts/deepbook_predict/plp.d.mts +801 -0
  62. package/dist/contracts/deepbook_predict/plp.d.mts.map +1 -0
  63. package/dist/contracts/deepbook_predict/plp.mjs +511 -32
  64. package/dist/contracts/deepbook_predict/plp.mjs.map +1 -1
  65. package/dist/contracts/deepbook_predict/pool_accounting.mjs +7 -7
  66. package/dist/contracts/deepbook_predict/pool_accounting.mjs.map +1 -1
  67. package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts +39 -0
  68. package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts.map +1 -0
  69. package/dist/contracts/deepbook_predict/pool_valuation_cap.mjs +52 -0
  70. package/dist/contracts/deepbook_predict/pool_valuation_cap.mjs.map +1 -0
  71. package/dist/contracts/deepbook_predict/predict_account.d.mts +90 -0
  72. package/dist/contracts/deepbook_predict/predict_account.d.mts.map +1 -0
  73. package/dist/contracts/deepbook_predict/predict_account.mjs +25 -2
  74. package/dist/contracts/deepbook_predict/predict_account.mjs.map +1 -1
  75. package/dist/contracts/deepbook_predict/pricing.d.mts +127 -0
  76. package/dist/contracts/deepbook_predict/pricing.d.mts.map +1 -0
  77. package/dist/contracts/deepbook_predict/pricing.mjs +37 -1
  78. package/dist/contracts/deepbook_predict/pricing.mjs.map +1 -1
  79. package/dist/contracts/deepbook_predict/pricing_config.mjs +28 -0
  80. package/dist/contracts/deepbook_predict/pricing_config.mjs.map +1 -0
  81. package/dist/contracts/deepbook_predict/protocol_config.d.mts +665 -0
  82. package/dist/contracts/deepbook_predict/protocol_config.d.mts.map +1 -0
  83. package/dist/contracts/deepbook_predict/protocol_config.mjs +841 -0
  84. package/dist/contracts/deepbook_predict/protocol_config.mjs.map +1 -0
  85. package/dist/contracts/deepbook_predict/range_codec.d.mts +30 -0
  86. package/dist/contracts/deepbook_predict/range_codec.d.mts.map +1 -0
  87. package/dist/contracts/deepbook_predict/range_codec.mjs +6 -1
  88. package/dist/contracts/deepbook_predict/range_codec.mjs.map +1 -1
  89. package/dist/contracts/deepbook_predict/registry.d.mts +382 -0
  90. package/dist/contracts/deepbook_predict/registry.d.mts.map +1 -0
  91. package/dist/contracts/deepbook_predict/registry.mjs +458 -2
  92. package/dist/contracts/deepbook_predict/registry.mjs.map +1 -1
  93. package/dist/contracts/deepbook_predict/strike_exposure.mjs.map +1 -1
  94. package/dist/contracts/deepbook_predict/strike_payout_tree.mjs +13 -1
  95. package/dist/contracts/deepbook_predict/strike_payout_tree.mjs.map +1 -1
  96. package/dist/contracts/deepbook_predict/vault_events.d.mts +199 -0
  97. package/dist/contracts/deepbook_predict/vault_events.d.mts.map +1 -0
  98. package/dist/contracts/deepbook_predict/vault_events.mjs +38 -8
  99. package/dist/contracts/deepbook_predict/vault_events.mjs.map +1 -1
  100. package/dist/contracts/deepbook_sessions/session_config.d.mts +8 -8
  101. package/dist/contracts/deepbook_sessions/session_config.d.mts.map +1 -1
  102. package/dist/contracts/deepbook_sessions/sessions.d.mts +22 -22
  103. package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -1
  104. package/dist/deployments/index.d.mts +3 -2
  105. package/dist/deployments/index.d.mts.map +1 -1
  106. package/dist/deployments/index.mjs +4 -1
  107. package/dist/deployments/index.mjs.map +1 -1
  108. package/dist/deployments/mainnet.d.mts +14 -0
  109. package/dist/deployments/mainnet.d.mts.map +1 -0
  110. package/dist/deployments/mainnet.mjs +73 -0
  111. package/dist/deployments/mainnet.mjs.map +1 -0
  112. package/dist/deployments/testnet.mjs +23 -23
  113. package/dist/deployments/testnet.mjs.map +1 -1
  114. package/dist/deployments/types.d.mts +1 -1
  115. package/dist/predict/client.d.mts +28 -6
  116. package/dist/predict/client.d.mts.map +1 -1
  117. package/dist/predict/client.mjs +7 -6
  118. package/dist/predict/client.mjs.map +1 -1
  119. package/dist/predict/config/index.d.mts +2 -0
  120. package/dist/predict/config/index.d.mts.map +1 -1
  121. package/dist/predict/config/index.mjs +4 -1
  122. package/dist/predict/config/index.mjs.map +1 -1
  123. package/dist/predict/config/mainnet.d.mts +17 -0
  124. package/dist/predict/config/mainnet.d.mts.map +1 -0
  125. package/dist/predict/config/mainnet.mjs +26 -0
  126. package/dist/predict/config/mainnet.mjs.map +1 -0
  127. package/dist/predict/config/types.d.mts +6 -0
  128. package/dist/predict/config/types.d.mts.map +1 -1
  129. package/dist/predict/index.d.mts +21 -2
  130. package/dist/predict/index.mjs +20 -1
  131. package/dist/predict/pricing.d.mts +6 -6
  132. package/dist/predict/pricing.d.mts.map +1 -1
  133. package/dist/predict/pricing.mjs +6 -6
  134. package/dist/predict/pricing.mjs.map +1 -1
  135. package/dist/predict/reads/balances.mjs.map +1 -1
  136. package/dist/predict/reads/markets.mjs +1 -1
  137. package/dist/predict/reads/markets.mjs.map +1 -1
  138. package/dist/predict/reads/pricing.d.mts +2 -1
  139. package/dist/predict/reads/pricing.d.mts.map +1 -1
  140. package/dist/predict/reads/pricing.mjs.map +1 -1
  141. package/dist/sessions.d.mts.map +1 -1
  142. package/dist/sessions.mjs +3 -1
  143. package/dist/sessions.mjs.map +1 -1
  144. package/dist/transactions/balanceManager.d.mts +12 -12
  145. package/dist/transactions/balanceManager.d.mts.map +1 -1
  146. package/dist/transactions/deepbook.d.mts +20 -20
  147. package/dist/transactions/deepbook.d.mts.map +1 -1
  148. package/dist/transactions/deepbookAdmin.d.mts +4 -4
  149. package/dist/transactions/deepbookAdmin.d.mts.map +1 -1
  150. package/dist/transactions/marginAdmin.d.mts +7 -7
  151. package/dist/transactions/marginLiquidations.d.mts +3 -3
  152. package/dist/transactions/marginMaintainer.d.mts +5 -5
  153. package/dist/transactions/marginManager.d.mts +32 -32
  154. package/dist/transactions/marginPool.d.mts +18 -18
  155. package/dist/transactions/marginPool.d.mts.map +1 -1
  156. package/dist/transactions/marginRegistry.d.mts +16 -16
  157. package/dist/transactions/marginTPSL.d.mts +10 -10
  158. package/dist/transactions/poolProxy.d.mts +8 -8
  159. package/package.json +3 -3
  160. package/src/account.ts +3 -1
  161. package/src/contracts/deepbook_predict/builder_code.ts +3 -3
  162. package/src/contracts/deepbook_predict/config_events.ts +9 -2
  163. package/src/contracts/deepbook_predict/deps/sui/vec_map.ts +33 -0
  164. package/src/contracts/deepbook_predict/expiry_cash.ts +1 -1
  165. package/src/contracts/deepbook_predict/expiry_market.ts +70 -11
  166. package/src/contracts/deepbook_predict/market_lifecycle_cap.ts +3 -10
  167. package/src/contracts/deepbook_predict/market_manager.ts +2 -2
  168. package/src/contracts/deepbook_predict/order_events.ts +6 -6
  169. package/src/contracts/deepbook_predict/plp.ts +263 -81
  170. package/src/contracts/deepbook_predict/pool_accounting.ts +14 -14
  171. package/src/contracts/deepbook_predict/pool_valuation_cap.ts +69 -0
  172. package/src/contracts/deepbook_predict/predict_account.ts +1 -1
  173. package/src/contracts/deepbook_predict/pricing.ts +16 -4
  174. package/src/contracts/deepbook_predict/protocol_config.ts +202 -7
  175. package/src/contracts/deepbook_predict/registry.ts +91 -17
  176. package/src/contracts/deepbook_predict/strike_exposure.ts +1 -1
  177. package/src/contracts/deepbook_predict/strike_payout_tree.ts +27 -0
  178. package/src/contracts/deepbook_predict/vault_events.ts +45 -14
  179. package/src/contracts/propbook/block_scholes_store.ts +8 -42
  180. package/src/deployments/index.ts +13 -3
  181. package/src/deployments/mainnet.ts +107 -0
  182. package/src/deployments/testnet.ts +25 -25
  183. package/src/deployments/types.ts +1 -1
  184. package/src/predict/client.ts +48 -17
  185. package/src/predict/config/index.ts +7 -2
  186. package/src/predict/config/mainnet.ts +27 -0
  187. package/src/predict/config/types.ts +7 -1
  188. package/src/predict/index.ts +31 -2
  189. package/src/predict/pricing.ts +11 -9
  190. package/src/predict/reads/balances.ts +1 -1
  191. package/src/predict/reads/markets.ts +1 -1
  192. package/src/predict/reads/pricing.ts +2 -1
  193. package/src/sessions.ts +4 -1
@@ -1,5 +1,5 @@
1
1
  import { DeepBookConfig } from "../utils/config.mjs";
2
- import * as _mysten_sui_transactions177 from "@mysten/sui/transactions";
2
+ import * as _mysten_sui_transactions298 from "@mysten/sui/transactions";
3
3
  import { Transaction } from "@mysten/sui/transactions";
4
4
 
5
5
  //#region src/transactions/marginRegistry.d.ts
@@ -17,90 +17,90 @@ declare class MarginRegistryContract {
17
17
  * @param {string} poolKey The key to identify the pool
18
18
  * @returns A function that takes a Transaction object
19
19
  */
20
- poolEnabled: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
20
+ poolEnabled: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
21
21
  /**
22
22
  * @description Get the margin pool ID for a given asset
23
23
  * @param {string} coinKey The key to identify the coin
24
24
  * @returns A function that takes a Transaction object
25
25
  */
26
- getMarginPoolId: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
26
+ getMarginPoolId: (coinKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
27
27
  /**
28
28
  * @description Get the margin pool IDs (base and quote) for a deepbook pool
29
29
  * @param {string} poolKey The key to identify the pool
30
30
  * @returns A function that takes a Transaction object
31
31
  */
32
- getDeepbookPoolMarginPoolIds: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
32
+ getDeepbookPoolMarginPoolIds: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
33
33
  /**
34
34
  * @description Get the margin manager IDs for a given owner
35
35
  * @param {string} owner The owner address
36
36
  * @returns A function that takes a Transaction object
37
37
  */
38
- getMarginManagerIds: (owner: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
38
+ getMarginManagerIds: (owner: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
39
39
  /**
40
40
  * @description Get the base margin pool ID for a deepbook pool
41
41
  * @param {string} poolKey The key to identify the pool
42
42
  * @returns A function that takes a Transaction object
43
43
  */
44
- baseMarginPoolId: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
44
+ baseMarginPoolId: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
45
45
  /**
46
46
  * @description Get the quote margin pool ID for a deepbook pool
47
47
  * @param {string} poolKey The key to identify the pool
48
48
  * @returns A function that takes a Transaction object
49
49
  */
50
- quoteMarginPoolId: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
50
+ quoteMarginPoolId: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
51
51
  /**
52
52
  * @description Get the minimum withdraw risk ratio for a deepbook pool
53
53
  * @param {string} poolKey The key to identify the pool
54
54
  * @returns A function that takes a Transaction object
55
55
  */
56
- minWithdrawRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
56
+ minWithdrawRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
57
57
  /**
58
58
  * @description Get the minimum borrow risk ratio for a deepbook pool
59
59
  * @param {string} poolKey The key to identify the pool
60
60
  * @returns A function that takes a Transaction object
61
61
  */
62
- minBorrowRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
62
+ minBorrowRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
63
63
  /**
64
64
  * @description Get the minimum risk ratio required to open a new position on
65
65
  * a deepbook pool. Distinct from `minBorrowRiskRatio`, which gates borrowing.
66
66
  * @param {string} poolKey The key to identify the pool
67
67
  * @returns A function that takes a Transaction object
68
68
  */
69
- minOpenRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
69
+ minOpenRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
70
70
  /**
71
71
  * @description Get the liquidation risk ratio for a deepbook pool
72
72
  * @param {string} poolKey The key to identify the pool
73
73
  * @returns A function that takes a Transaction object
74
74
  */
75
- liquidationRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
75
+ liquidationRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
76
76
  /**
77
77
  * @description Get the target liquidation risk ratio for a deepbook pool
78
78
  * @param {string} poolKey The key to identify the pool
79
79
  * @returns A function that takes a Transaction object
80
80
  */
81
- targetLiquidationRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
81
+ targetLiquidationRiskRatio: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
82
82
  /**
83
83
  * @description Get the user liquidation reward for a deepbook pool
84
84
  * @param {string} poolKey The key to identify the pool
85
85
  * @returns A function that takes a Transaction object
86
86
  */
87
- userLiquidationReward: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
87
+ userLiquidationReward: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
88
88
  /**
89
89
  * @description Get the pool liquidation reward for a deepbook pool
90
90
  * @param {string} poolKey The key to identify the pool
91
91
  * @returns A function that takes a Transaction object
92
92
  */
93
- poolLiquidationReward: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
93
+ poolLiquidationReward: (poolKey: string) => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
94
94
  /**
95
95
  * @description Get all allowed maintainer cap IDs
96
96
  * @returns A function that takes a Transaction object
97
97
  */
98
- allowedMaintainers: () => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
98
+ allowedMaintainers: () => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
99
99
  /**
100
100
  * @description Get all allowed pause cap IDs
101
101
  * @returns A function that takes a Transaction object
102
102
  */
103
- allowedPauseCaps: () => (tx: Transaction) => _mysten_sui_transactions177.TransactionResult;
103
+ allowedPauseCaps: () => (tx: Transaction) => _mysten_sui_transactions298.TransactionResult;
104
104
  }
105
105
  //#endregion
106
106
  export { MarginRegistryContract };
@@ -1,6 +1,6 @@
1
1
  import { AddConditionalOrderParams, PendingLimitOrderParams, PendingMarketOrderParams } from "../types/index.mjs";
2
2
  import { DeepBookConfig } from "../utils/config.mjs";
3
- import * as _mysten_sui_transactions113 from "@mysten/sui/transactions";
3
+ import * as _mysten_sui_transactions134 from "@mysten/sui/transactions";
4
4
  import { Transaction } from "@mysten/sui/transactions";
5
5
 
6
6
  //#region src/transactions/marginTPSL.d.ts
@@ -20,21 +20,21 @@ declare class MarginTPSLContract {
20
20
  * @param {number} triggerPrice The price at which to trigger the order
21
21
  * @returns A function that takes a Transaction object
22
22
  */
23
- newCondition: (poolKey: string, triggerBelowPrice: boolean, triggerPrice: number | bigint) => (tx: Transaction) => _mysten_sui_transactions113.TransactionResult;
23
+ newCondition: (poolKey: string, triggerBelowPrice: boolean, triggerPrice: number | bigint) => (tx: Transaction) => _mysten_sui_transactions134.TransactionResult;
24
24
  /**
25
25
  * @description Create a new pending limit order for use in conditional orders
26
26
  * @param {string} poolKey The key to identify the pool
27
27
  * @param {PendingLimitOrderParams} params Parameters for the pending limit order
28
28
  * @returns A function that takes a Transaction object
29
29
  */
30
- newPendingLimitOrder: (poolKey: string, params: PendingLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions113.TransactionResult;
30
+ newPendingLimitOrder: (poolKey: string, params: PendingLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions134.TransactionResult;
31
31
  /**
32
32
  * @description Create a new pending market order for use in conditional orders
33
33
  * @param {string} poolKey The key to identify the pool
34
34
  * @param {PendingMarketOrderParams} params Parameters for the pending market order
35
35
  * @returns A function that takes a Transaction object
36
36
  */
37
- newPendingMarketOrder: (poolKey: string, params: PendingMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions113.TransactionResult;
37
+ newPendingMarketOrder: (poolKey: string, params: PendingMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions134.TransactionResult;
38
38
  /**
39
39
  * @description Add a conditional order (take profit or stop loss)
40
40
  * @param {AddConditionalOrderParams} params Parameters for adding the conditional order
@@ -65,7 +65,7 @@ declare class MarginTPSLContract {
65
65
  * @param {number} maxOrdersToExecute Maximum number of orders to execute in this call
66
66
  * @returns A function that takes a Transaction object
67
67
  */
68
- executeConditionalOrders: (managerAddress: string, poolKey: string, maxOrdersToExecute: number) => (tx: Transaction) => _mysten_sui_transactions113.TransactionResult;
68
+ executeConditionalOrders: (managerAddress: string, poolKey: string, maxOrdersToExecute: number) => (tx: Transaction) => _mysten_sui_transactions134.TransactionResult;
69
69
  /**
70
70
  * @description Execute conditional orders, deleveraging on each market-type
71
71
  * fill. Permissionless, with the same trigger and cancellation handling as
@@ -83,14 +83,14 @@ declare class MarginTPSLContract {
83
83
  * @param {number} maxOrdersToExecute Maximum number of orders to execute in this call
84
84
  * @returns A function that takes a Transaction object
85
85
  */
86
- executeConditionalOrdersV3: (managerAddress: string, poolKey: string, maxOrdersToExecute: number) => (tx: Transaction) => _mysten_sui_transactions113.TransactionResult;
86
+ executeConditionalOrdersV3: (managerAddress: string, poolKey: string, maxOrdersToExecute: number) => (tx: Transaction) => _mysten_sui_transactions134.TransactionResult;
87
87
  /**
88
88
  * @description Get all conditional order IDs for a margin manager
89
89
  * @param {string} poolKey The key to identify the pool
90
90
  * @param {string} marginManagerId The ID of the margin manager
91
91
  * @returns A function that takes a Transaction object
92
92
  */
93
- conditionalOrderIds: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions113.TransactionResult;
93
+ conditionalOrderIds: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions134.TransactionResult;
94
94
  /**
95
95
  * @description Get a specific conditional order by ID
96
96
  * @param {string} poolKey The key to identify the pool
@@ -98,7 +98,7 @@ declare class MarginTPSLContract {
98
98
  * @param {string} conditionalOrderId The ID of the conditional order
99
99
  * @returns A function that takes a Transaction object
100
100
  */
101
- conditionalOrder: (poolKey: string, marginManagerId: string, conditionalOrderId: string) => (tx: Transaction) => _mysten_sui_transactions113.TransactionResult;
101
+ conditionalOrder: (poolKey: string, marginManagerId: string, conditionalOrderId: string) => (tx: Transaction) => _mysten_sui_transactions134.TransactionResult;
102
102
  /**
103
103
  * @description Get the lowest trigger price for trigger_above orders
104
104
  * Returns constants::max_u64() if there are no trigger_above orders
@@ -106,7 +106,7 @@ declare class MarginTPSLContract {
106
106
  * @param {string} marginManagerId The ID of the margin manager
107
107
  * @returns A function that takes a Transaction object
108
108
  */
109
- lowestTriggerAbovePrice: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions113.TransactionResult;
109
+ lowestTriggerAbovePrice: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions134.TransactionResult;
110
110
  /**
111
111
  * @description Get the highest trigger price for trigger_below orders
112
112
  * Returns 0 if there are no trigger_below orders
@@ -114,7 +114,7 @@ declare class MarginTPSLContract {
114
114
  * @param {string} marginManagerId The ID of the margin manager
115
115
  * @returns A function that takes a Transaction object
116
116
  */
117
- highestTriggerBelowPrice: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions113.TransactionResult;
117
+ highestTriggerBelowPrice: (poolKey: string, marginManagerId: string) => (tx: Transaction) => _mysten_sui_transactions134.TransactionResult;
118
118
  }
119
119
  //#endregion
120
120
  export { MarginTPSLContract };
@@ -1,6 +1,6 @@
1
1
  import { MarginProposalParams, PlaceMarginLimitOrderParams, PlaceMarginMarketOrderParams } from "../types/index.mjs";
2
2
  import { DeepBookConfig } from "../utils/config.mjs";
3
- import * as _mysten_sui_transactions106 from "@mysten/sui/transactions";
3
+ import * as _mysten_sui_transactions127 from "@mysten/sui/transactions";
4
4
  import { Transaction } from "@mysten/sui/transactions";
5
5
 
6
6
  //#region src/transactions/poolProxy.d.ts
@@ -20,7 +20,7 @@ declare class PoolProxyContract {
20
20
  * @param {PlaceMarginLimitOrderParams} params Parameters for placing a limit order
21
21
  * @returns A function that takes a Transaction object
22
22
  */
23
- placeLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions106.TransactionResult;
23
+ placeLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions127.TransactionResult;
24
24
  /**
25
25
  * @description Place a market order. Enforces a post-trade `risk_ratio >=
26
26
  * min_borrow_risk_ratio` invariant on the manager (skipped when the manager
@@ -28,7 +28,7 @@ declare class PoolProxyContract {
28
28
  * @param {PlaceMarginMarketOrderParams} params Parameters for placing a market order
29
29
  * @returns A function that takes a Transaction object
30
30
  */
31
- placeMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions106.TransactionResult;
31
+ placeMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions127.TransactionResult;
32
32
  /**
33
33
  * @description Place a reduce only limit order. Requires the manager to have
34
34
  * debt on the relevant side; enforces a monotonic `risk_ratio_after >=
@@ -37,7 +37,7 @@ declare class PoolProxyContract {
37
37
  * @param {PlaceMarginLimitOrderParams} params Parameters for placing a reduce only limit order
38
38
  * @returns A function that takes a Transaction object
39
39
  */
40
- placeReduceOnlyLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions106.TransactionResult;
40
+ placeReduceOnlyLimitOrder: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions127.TransactionResult;
41
41
  /**
42
42
  * @description Place a reduce only market order. Requires the manager to
43
43
  * have debt on the relevant side; enforces a monotonic `risk_ratio_after >=
@@ -46,7 +46,7 @@ declare class PoolProxyContract {
46
46
  * @param {PlaceMarginMarketOrderParams} params Parameters for placing a reduce only market order
47
47
  * @returns A function that takes a Transaction object
48
48
  */
49
- placeReduceOnlyMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions106.TransactionResult;
49
+ placeReduceOnlyMarketOrder: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions127.TransactionResult;
50
50
  /**
51
51
  * @description Place a market order and repay the loan from the fill proceeds.
52
52
  * The taker fill settles into the manager's balance, so the proceeds (plus any
@@ -58,7 +58,7 @@ declare class PoolProxyContract {
58
58
  * @param {PlaceMarginMarketOrderParams} params Parameters for placing a market order
59
59
  * @returns A function that takes a Transaction object
60
60
  */
61
- placeMarketOrderAndRepayLoan: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions106.TransactionResult;
61
+ placeMarketOrderAndRepayLoan: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions127.TransactionResult;
62
62
  /**
63
63
  * @description Place a reduce only limit order and repay the loan from the
64
64
  * fill proceeds. Requires debt on the relevant side (a bid needs base debt; an
@@ -68,7 +68,7 @@ declare class PoolProxyContract {
68
68
  * @param {PlaceMarginLimitOrderParams} params Parameters for placing a reduce only limit order
69
69
  * @returns A function that takes a Transaction object
70
70
  */
71
- placeReduceOnlyLimitOrderAndRepayLoan: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions106.TransactionResult;
71
+ placeReduceOnlyLimitOrderAndRepayLoan: (params: PlaceMarginLimitOrderParams) => (tx: Transaction) => _mysten_sui_transactions127.TransactionResult;
72
72
  /**
73
73
  * @description Place a reduce only market order and repay the loan from the
74
74
  * fill proceeds. Same reduce-only direction guard as
@@ -78,7 +78,7 @@ declare class PoolProxyContract {
78
78
  * @param {PlaceMarginMarketOrderParams} params Parameters for placing a reduce only market order
79
79
  * @returns A function that takes a Transaction object
80
80
  */
81
- placeReduceOnlyMarketOrderAndRepayLoan: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions106.TransactionResult;
81
+ placeReduceOnlyMarketOrderAndRepayLoan: (params: PlaceMarginMarketOrderParams) => (tx: Transaction) => _mysten_sui_transactions127.TransactionResult;
82
82
  /**
83
83
  * @description Modify an existing order
84
84
  * @param {string} marginManagerKey The key to identify the MarginManager
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@mysten/deepbook-v3",
3
3
  "author": "Mysten Labs <build@mystenlabs.com>",
4
4
  "description": "Sui Deepbook SDK",
5
- "version": "2.1.4",
5
+ "version": "2.4.0",
6
6
  "license": "Apache-2.0",
7
7
  "type": "module",
8
8
  "sideEffects": false,
@@ -61,11 +61,11 @@
61
61
  "ts-retry-promise": "^0.8.1",
62
62
  "typescript": "^7.0.2",
63
63
  "vite": "^8.2.1",
64
- "vitest": "^4.1.10",
64
+ "vitest": "^4.1.11",
65
65
  "wait-on": "^9.1.0"
66
66
  },
67
67
  "peerDependencies": {
68
- "@mysten/sui": "^2.29.0"
68
+ "@mysten/sui": "^2.30.0"
69
69
  },
70
70
  "scripts": {
71
71
  "clean": "rm -rf tsconfig.tsbuildinfo ./dist",
package/src/account.ts CHANGED
@@ -11,6 +11,7 @@ import { deriveObjectID } from '@mysten/sui/utils';
11
11
  import * as account from './contracts/account/account.js';
12
12
  import * as accountRegistry from './contracts/account/account_registry.js';
13
13
  import type { AccountConfig as GeneratedAccountConfig } from './contracts/account/config-arguments.js';
14
+ import { MAINNET_ACCOUNT } from './deployments/mainnet.js';
14
15
  import { TESTNET_ACCOUNT } from './deployments/testnet.js';
15
16
  import type { NetworkArg } from './deployments/index.js';
16
17
 
@@ -53,9 +54,10 @@ export interface AccountConfig extends GeneratedAccountConfig {
53
54
  */
54
55
  export function getAccountConfig(network: NetworkArg): AccountConfig {
55
56
  if (network === 'testnet') return TESTNET_ACCOUNT;
57
+ if (network === 'mainnet') return MAINNET_ACCOUNT;
56
58
  throw new Error(
57
59
  `@mysten/deepbook-v3/account: no account deployment recorded for network '${network}'. ` +
58
- 'The account primitive is testnet-only today; for your own deployment pass ' +
60
+ 'The account primitive is recorded for testnet and mainnet; for your own deployment pass ' +
59
61
  '`{ accountPackageId, accountRegistry }` to AccountContract directly.',
60
62
  );
61
63
  }
@@ -3,7 +3,7 @@
3
3
  **************************************************************/
4
4
 
5
5
  /**
6
- * Owns deterministic builder referral codes and the DUSDC fees delivered to their
6
+ * Owns deterministic builder referral codes and the USDC fees delivered to their
7
7
  * object addresses through the funds accumulator. Codes are derived per owner and
8
8
  * index, and only the immutable owner may withdraw accumulated fees.
9
9
  */
@@ -112,7 +112,7 @@ export interface ClaimableBuilderFeesOptions {
112
112
  predictPackageId?: string;
113
113
  };
114
114
  }
115
- /** Return visible DUSDC builder fees for SDK and devInspect reads. */
115
+ /** Return visible USDC builder fees for SDK and devInspect reads. */
116
116
  export function claimableBuilderFees(options: ClaimableBuilderFeesOptions) {
117
117
  const packageAddress =
118
118
  options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
@@ -137,7 +137,7 @@ export interface ClaimAllBuilderFeesOptions {
137
137
  };
138
138
  }
139
139
  /**
140
- * Claims all settled DUSDC builder fees for the immutable owner; an empty
140
+ * Claims all settled USDC builder fees for the immutable owner; an empty
141
141
  * accumulator returns a zero coin.
142
142
  */
143
143
  export function claimAllBuilderFees(options: ClaimAllBuilderFeesOptions) {
@@ -50,6 +50,13 @@ export const PlpFeeRatesUpdated = new MoveStruct({
50
50
  onchain_timestamp_ms: U64,
51
51
  },
52
52
  });
53
+ export const NoTradeWindowUpdated = new MoveStruct({
54
+ name: `${$moduleName}::NoTradeWindowUpdated`,
55
+ fields: {
56
+ no_trade_window_ms: U64,
57
+ onchain_timestamp_ms: U64,
58
+ },
59
+ });
53
60
  export const TradingPausedUpdated = new MoveStruct({
54
61
  name: `${$moduleName}::TradingPausedUpdated`,
55
62
  fields: {
@@ -79,9 +86,9 @@ export const MarketCreated = new MoveStruct({
79
86
  tick_size: U64,
80
87
  /** Coarser raw-price step that new finite mint boundaries must align to. */
81
88
  admission_tick_size: U64,
82
- /** DUSDC pool allocation cap snapshotted for this expiry. */
89
+ /** USDC pool allocation cap snapshotted for this expiry. */
83
90
  max_expiry_allocation: U64,
84
- /** Minimum DUSDC cash target snapshotted for this expiry. */
91
+ /** Minimum USDC cash target snapshotted for this expiry. */
85
92
  initial_expiry_cash: U64,
86
93
  backing_buffer_lambda: U64,
87
94
  base_fee: U64,
@@ -0,0 +1,33 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { type BcsType, bcs } from '@mysten/sui/bcs';
5
+ import { MoveStruct } from '../../../utils/index.js';
6
+ const $moduleName = '0x2::vec_map';
7
+ /** An entry in the map */
8
+ export function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [K, V]) {
9
+ return new MoveStruct({
10
+ name: `${$moduleName}::Entry<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`,
11
+ fields: {
12
+ key: typeParameters[0],
13
+ value: typeParameters[1],
14
+ },
15
+ });
16
+ }
17
+ /**
18
+ * A map data structure backed by a vector. The map is guaranteed not to contain
19
+ * duplicate keys, but entries are _not_ sorted by key--entries are included in
20
+ * insertion order. All operations are O(N) in the size of the map--the intention
21
+ * of this data structure is only to provide the convenience of programming against
22
+ * a map API. Large maps should use handwritten parent/child relationships instead.
23
+ * Maps that need sorted iteration rather than insertion order iteration should
24
+ * also be handwritten.
25
+ */
26
+ export function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [K, V]) {
27
+ return new MoveStruct({
28
+ name: `${$moduleName}::VecMap<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`,
29
+ fields: {
30
+ contents: bcs.vector(Entry(typeParameters[0], typeParameters[1])),
31
+ },
32
+ });
33
+ }
@@ -3,7 +3,7 @@
3
3
  **************************************************************/
4
4
 
5
5
  /**
6
- * Expiry-local DUSDC custody and isolated reserve accounting.
6
+ * Expiry-local USDC custody and isolated reserve accounting.
7
7
  *
8
8
  * This leaf owns cash balance arithmetic and the inventory-impact escrow used only
9
9
  * for live-close rebates. It does not decide payment eligibility, pool allocation,
@@ -19,14 +19,24 @@ import {
19
19
  type RawTransactionArgument,
20
20
  type ConfigValue,
21
21
  } from '../utils/index.js';
22
- import { bcs } from '@mysten/sui/bcs';
23
22
  import { U64 } from '../../bcs/integers.js';
23
+ import { bcs } from '@mysten/sui/bcs';
24
24
  import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
25
25
  import * as expiry_cash from './expiry_cash.js';
26
26
  import * as balance from './deps/sui/balance.js';
27
27
  import * as strike_exposure from './strike_exposure.js';
28
28
  import * as ewma from './ewma.js';
29
29
  const $moduleName = '@local-pkg/deepbook_predict::expiry_market';
30
+ export const ValuationStamp = new MoveStruct({
31
+ name: `${$moduleName}::ValuationStamp`,
32
+ fields: {
33
+ flush_seq: U64,
34
+ /** `cash.balance()` at the snapshot instant. */
35
+ snapshot_cash: U64,
36
+ /** `cash.inventory_impact_reserve()` at the snapshot instant. */
37
+ snapshot_impact_reserve: U64,
38
+ },
39
+ });
30
40
  export const ExpiryMarket = new MoveStruct({
31
41
  name: `${$moduleName}::ExpiryMarket`,
32
42
  fields: {
@@ -34,9 +44,9 @@ export const ExpiryMarket = new MoveStruct({
34
44
  /** Propbook underlying this market was created for. */
35
45
  propbook_underlying_id: bcs.u32(),
36
46
  expiry: U64,
37
- /** DUSDC custody and payout backing. */
47
+ /** USDC custody and payout backing. */
38
48
  cash: expiry_cash.ExpiryCash,
39
- /** Sponsor-funded DUSDC available to subsidize this market's taker fees. */
49
+ /** Sponsor-funded USDC available to subsidize this market's taker fees. */
40
50
  fee_incentive_balance: balance.Balance,
41
51
  /** Exposure lifecycle state for this expiry's strike ticks. */
42
52
  strike_exposure: strike_exposure.StrikeExposure,
@@ -48,6 +58,14 @@ export const ExpiryMarket = new MoveStruct({
48
58
  * through the registry (ungated kill switch).
49
59
  */
50
60
  mint_paused: bcs.bool(),
61
+ /**
62
+ * `Some` from the flush's snapshot stage until this market's `value_expiry` (or
63
+ * lazily discarded once the stamp goes stale — see `ValuationStamp`). Trading is
64
+ * never gated on it and never touches it: the cash rows are captured eagerly here
65
+ * at the snapshot instant, and the payout tree captures its own boundary shadows
66
+ * as trades first touch each node.
67
+ */
68
+ valuation_stamp: bcs.option(ValuationStamp),
51
69
  },
52
70
  });
53
71
  export const MintQuote = new MoveStruct({
@@ -224,7 +242,7 @@ export interface CashBalanceOptions {
224
242
  predictPackageId?: string;
225
243
  };
226
244
  }
227
- /** Return expiry DUSDC custody for SDK and devInspect state reads. */
245
+ /** Return expiry USDC custody for SDK and devInspect state reads. */
228
246
  export function cashBalance(options: CashBalanceOptions) {
229
247
  const packageAddress =
230
248
  options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
@@ -396,7 +414,7 @@ export interface InventoryImpactScaleOptions {
396
414
  };
397
415
  }
398
416
  /**
399
- * Return the immutable DUSDC scale of this market's inventory-impact curve for SDK
417
+ * Return the immutable USDC scale of this market's inventory-impact curve for SDK
400
418
  * and devInspect state reads.
401
419
  */
402
420
  export function inventoryImpactScale(options: InventoryImpactScaleOptions) {
@@ -614,6 +632,45 @@ export function loadLivePricer(options: LoadLivePricerOptions) {
614
632
  ),
615
633
  });
616
634
  }
635
+ export interface IsPendingValuationArguments {
636
+ market: RawTransactionArgument<string>;
637
+ config?: RawTransactionArgument<string>;
638
+ }
639
+ export interface IsPendingValuationOptions {
640
+ package?: string;
641
+ arguments: IsPendingValuationArguments;
642
+ config?: {
643
+ protocolConfig: ConfigValue;
644
+ predictPackageId?: string;
645
+ };
646
+ }
647
+ /**
648
+ * Return whether this market is snapshotted into the in-flight flush and still
649
+ * awaiting its `value_expiry`. For SDK, keeper, and devInspect reads. It gates
650
+ * nothing: settlement and trading both run regardless — the frozen mark is
651
+ * settlement-invariant, so a stamped market settles the instant it expires. Do not
652
+ * defer a settlement attempt on this read.
653
+ */
654
+ export function isPendingValuation(options: IsPendingValuationOptions) {
655
+ const packageAddress =
656
+ options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';
657
+ const argumentsTypes = [null, null] satisfies (string | null)[];
658
+ const parameterNames = ['market', 'config'];
659
+ return (tx: Transaction) =>
660
+ tx.moveCall({
661
+ package: packageAddress,
662
+ module: 'expiry_market',
663
+ function: 'is_pending_valuation',
664
+ arguments: normalizeMoveArguments(
665
+ {
666
+ ...options.arguments,
667
+ config: options.arguments?.config ?? options.config?.protocolConfig,
668
+ },
669
+ argumentsTypes,
670
+ parameterNames,
671
+ ),
672
+ });
673
+ }
617
674
  export interface CurrentNavArguments {
618
675
  market: RawTransactionArgument<string>;
619
676
  pricer: TransactionArgument;
@@ -1118,7 +1175,7 @@ export interface MintExactQuantityOptions {
1118
1175
  * withdraw through the loaded account. The position's strike range is the tick
1119
1176
  * pair `(lower_tick, higher_tick]` (`lower_tick = 0` is `-inf`,
1120
1177
  * `higher_tick = pos_inf_tick` is `+inf`); the SDK converts raw strikes to ticks.
1121
- * `max_cost` caps the all-in DUSDC withdrawal, while `max_probability` caps the
1178
+ * `max_cost` caps the all-in USDC withdrawal, while `max_probability` caps the
1122
1179
  * quoted per-contract probability before fees. Callers can pass
1123
1180
  * `std::u64::max_value!()` for either uncapped guard. Returns the minted order ID
1124
1181
  * for future order-scoped flows.
@@ -1193,12 +1250,12 @@ export interface MintExactAmountOptions {
1193
1250
  * must meet `min_quantity`.
1194
1251
  *
1195
1252
  * Fees, builder fees, and EWMA congestion penalties are charged on top of
1196
- * `max_premium`, so `max_cost` — not `max_premium` — bounds the all-in DUSDC
1253
+ * `max_premium`, so `max_cost` — not `max_premium` — bounds the all-in USDC
1197
1254
  * withdrawal (`premium + trader-paid fee + builder_fee + EWMA penalty`).
1198
1255
  * `max_cost` is required: unlike `mint_exact_quantity`'s guards there is no value
1199
1256
  * that disables it, because the budget shape exists to bound spend. The sizing
1200
- * budget is first capped to the account's available DUSDC after settlement; fees
1201
- * still require additional available DUSDC at payment time. Any unspent premium
1257
+ * budget is first capped to the account's available USDC after settlement; fees
1258
+ * still require additional available USDC at payment time. Any unspent premium
1202
1259
  * dust remains in the account because order quantity must be an integer number of
1203
1260
  * `position_lot_size` lots.
1204
1261
  */
@@ -1275,7 +1332,7 @@ export interface RedeemLiveOptions {
1275
1332
  * Two close-side slippage floors, the mirror of mint's `max_probability` /
1276
1333
  * `max_cost` pair; pass `0` to disable either. `min_probability` floors the quoted
1277
1334
  * per-contract range probability (same units as mint's `max_probability`).
1278
- * `min_proceeds` floors the all-in net DUSDC credited to the account
1335
+ * `min_proceeds` floors the all-in net USDC credited to the account
1279
1336
  * (`redeem_amount` minus trading fee, builder fee, and EWMA penalty), the mirror
1280
1337
  * of mint's all-in `max_cost`.
1281
1338
  */
@@ -1440,7 +1497,9 @@ export interface SetReferenceTickOptions {
1440
1497
  * Set this expiry's reference fine-grid tick from the exact previous-window
1441
1498
  * Propbook Pyth observation. The source observation must be inserted into the feed
1442
1499
  * at `reference_tick_source_timestamp_ms` before this call, and the normalized
1443
- * spot is floored to the market's `tick_size`.
1500
+ * spot is floored to the market's `tick_size`. Not gated on the valuation lock:
1501
+ * the reference tick shapes mint admission only, and a mint it admits mid-flush is
1502
+ * invisible to the captured snapshot like any other.
1444
1503
  */
1445
1504
  export function setReferenceTick(options: SetReferenceTickOptions) {
1446
1505
  const packageAddress =
@@ -3,10 +3,9 @@
3
3
  **************************************************************/
4
4
 
5
5
  /**
6
- * Defines revocable authority for market creation and coordinated pool valuation
7
- * without granting oracle-write or root-admin power. `Registry` owns the allowlist
8
- * and converts a valid capability into the ability-less proof consumed by
9
- * cross-module lifecycle flows.
6
+ * Defines revocable authority for market creation without granting pool-valuation,
7
+ * oracle-write, or root-admin power. `Registry` owns the allowlist and the
8
+ * creation entrypoint this capability gates.
10
9
  */
11
10
 
12
11
  import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
@@ -19,12 +18,6 @@ export const MarketLifecycleCap = new MoveStruct({
19
18
  id: bcs.Address,
20
19
  },
21
20
  });
22
- export const MarketLifecycleProof = new MoveStruct({
23
- name: `${$moduleName}::MarketLifecycleProof`,
24
- fields: {
25
- dummy_field: bcs.bool(),
26
- },
27
- });
28
21
  export interface IdArguments {
29
22
  cap: RawTransactionArgument<string>;
30
23
  }
@@ -40,12 +40,12 @@ export const CadenceConfig = new MoveStruct({
40
40
  /** Coarser raw-price step that new finite mint boundaries must align to. */
41
41
  admission_tick_size: U64,
42
42
  /**
43
- * DUSDC pool allocation cap snapshotted into pool accounting for each created
43
+ * USDC pool allocation cap snapshotted into pool accounting for each created
44
44
  * expiry.
45
45
  */
46
46
  max_expiry_allocation: U64,
47
47
  /**
48
- * Minimum DUSDC cash target snapshotted into pool accounting for each created
48
+ * Minimum USDC cash target snapshotted into pool accounting for each created
49
49
  * expiry.
50
50
  */
51
51
  initial_expiry_cash: U64,