@mysten/deepbook-v3 2.6.4 → 2.8.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 (250) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/PREDICT.md +389 -61
  3. package/dist/contracts/account/account.d.mts +23 -23
  4. package/dist/contracts/account/account.d.mts.map +1 -1
  5. package/dist/contracts/account/account_registry.d.mts +13 -13
  6. package/dist/contracts/deepbook/account.d.mts +18 -18
  7. package/dist/contracts/deepbook/balances.d.mts +4 -4
  8. package/dist/contracts/deepbook/deep_price.d.mts +3 -3
  9. package/dist/contracts/deepbook/order.d.mts +12 -12
  10. package/dist/contracts/deepbook_predict/admin.d.mts +4 -4
  11. package/dist/contracts/deepbook_predict/builder_code.d.mts +11 -11
  12. package/dist/contracts/deepbook_predict/builder_code_events.d.mts +10 -10
  13. package/dist/contracts/deepbook_predict/config_events.d.mts +93 -68
  14. package/dist/contracts/deepbook_predict/config_events.d.mts.map +1 -1
  15. package/dist/contracts/deepbook_predict/config_events.mjs +45 -1
  16. package/dist/contracts/deepbook_predict/config_events.mjs.map +1 -1
  17. package/dist/contracts/deepbook_predict/deps/std/type_name.mjs +17 -0
  18. package/dist/contracts/deepbook_predict/deps/std/type_name.mjs.map +1 -0
  19. package/dist/contracts/deepbook_predict/expiry_market.d.mts +652 -235
  20. package/dist/contracts/deepbook_predict/expiry_market.d.mts.map +1 -1
  21. package/dist/contracts/deepbook_predict/expiry_market.mjs +652 -186
  22. package/dist/contracts/deepbook_predict/expiry_market.mjs.map +1 -1
  23. package/dist/contracts/deepbook_predict/lp_book.mjs +1 -1
  24. package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts +5 -5
  25. package/dist/contracts/deepbook_predict/market_manager.d.mts +27 -27
  26. package/dist/contracts/deepbook_predict/order_events.d.mts +50 -50
  27. package/dist/contracts/deepbook_predict/order_events.d.mts.map +1 -1
  28. package/dist/contracts/deepbook_predict/order_events.mjs +3 -1
  29. package/dist/contracts/deepbook_predict/order_events.mjs.map +1 -1
  30. package/dist/contracts/deepbook_predict/pause_cap.d.mts +5 -5
  31. package/dist/contracts/deepbook_predict/plp.d.mts +184 -82
  32. package/dist/contracts/deepbook_predict/plp.d.mts.map +1 -1
  33. package/dist/contracts/deepbook_predict/plp.mjs +126 -7
  34. package/dist/contracts/deepbook_predict/plp.mjs.map +1 -1
  35. package/dist/contracts/deepbook_predict/pool_accounting.mjs +1 -1
  36. package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts +5 -5
  37. package/dist/contracts/deepbook_predict/predict_account.d.mts +14 -14
  38. package/dist/contracts/deepbook_predict/pricing.d.mts +91 -58
  39. package/dist/contracts/deepbook_predict/pricing.d.mts.map +1 -1
  40. package/dist/contracts/deepbook_predict/pricing.mjs +30 -3
  41. package/dist/contracts/deepbook_predict/pricing.mjs.map +1 -1
  42. package/dist/contracts/deepbook_predict/pricing_config.mjs.map +1 -1
  43. package/dist/contracts/deepbook_predict/protocol_config.d.mts +400 -92
  44. package/dist/contracts/deepbook_predict/protocol_config.d.mts.map +1 -1
  45. package/dist/contracts/deepbook_predict/protocol_config.mjs +451 -61
  46. package/dist/contracts/deepbook_predict/protocol_config.mjs.map +1 -1
  47. package/dist/contracts/deepbook_predict/range_codec.d.mts +2 -2
  48. package/dist/contracts/deepbook_predict/registry.d.mts +28 -28
  49. package/dist/contracts/deepbook_predict/strike_exposure.mjs +1 -1
  50. package/dist/contracts/deepbook_predict/strike_payout_tree.mjs +17 -12
  51. package/dist/contracts/deepbook_predict/strike_payout_tree.mjs.map +1 -1
  52. package/dist/contracts/deepbook_predict/vault_events.d.mts +154 -106
  53. package/dist/contracts/deepbook_predict/vault_events.d.mts.map +1 -1
  54. package/dist/contracts/deepbook_predict/vault_events.mjs +57 -1
  55. package/dist/contracts/deepbook_predict/vault_events.mjs.map +1 -1
  56. package/dist/contracts/deepbook_predict_math/config-arguments.d.mts +10 -0
  57. package/dist/contracts/deepbook_predict_math/config-arguments.d.mts.map +1 -0
  58. package/dist/contracts/deepbook_predict_math/lazer_price.d.mts +106 -0
  59. package/dist/contracts/deepbook_predict_math/lazer_price.d.mts.map +1 -0
  60. package/dist/contracts/deepbook_predict_math/lazer_price.mjs +125 -0
  61. package/dist/contracts/deepbook_predict_math/lazer_price.mjs.map +1 -0
  62. package/dist/contracts/deepbook_predict_math/math.d.mts +284 -0
  63. package/dist/contracts/deepbook_predict_math/math.d.mts.map +1 -0
  64. package/dist/contracts/deepbook_predict_math/math.mjs +364 -0
  65. package/dist/contracts/deepbook_predict_math/math.mjs.map +1 -0
  66. package/dist/contracts/deepbook_predict_orders/config-arguments.d.mts +13 -0
  67. package/dist/contracts/deepbook_predict_orders/config-arguments.d.mts.map +1 -0
  68. package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts +215 -0
  69. package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts.map +1 -0
  70. package/dist/contracts/deepbook_predict_orders/delayed_execution_config.mjs +215 -0
  71. package/dist/contracts/deepbook_predict_orders/delayed_execution_config.mjs.map +1 -0
  72. package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.mjs +87 -0
  73. package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.mjs.map +1 -0
  74. package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/pricing.mjs +52 -0
  75. package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/pricing.mjs.map +1 -0
  76. package/dist/contracts/deepbook_predict_orders/deps/fixed_math/i64.mjs +25 -0
  77. package/dist/contracts/deepbook_predict_orders/deps/fixed_math/i64.mjs.map +1 -0
  78. package/dist/contracts/deepbook_predict_orders/deps/sui/balance.mjs +21 -0
  79. package/dist/contracts/deepbook_predict_orders/deps/sui/balance.mjs.map +1 -0
  80. package/dist/contracts/deepbook_predict_orders/deps/sui/table.mjs +39 -0
  81. package/dist/contracts/deepbook_predict_orders/deps/sui/table.mjs.map +1 -0
  82. package/dist/contracts/deepbook_predict_orders/desk.d.mts +187 -0
  83. package/dist/contracts/deepbook_predict_orders/desk.d.mts.map +1 -0
  84. package/dist/contracts/deepbook_predict_orders/desk.mjs +261 -0
  85. package/dist/contracts/deepbook_predict_orders/desk.mjs.map +1 -0
  86. package/dist/contracts/deepbook_predict_orders/order_queue.d.mts +1042 -0
  87. package/dist/contracts/deepbook_predict_orders/order_queue.d.mts.map +1 -0
  88. package/dist/contracts/deepbook_predict_orders/order_queue.mjs +849 -0
  89. package/dist/contracts/deepbook_predict_orders/order_queue.mjs.map +1 -0
  90. package/dist/contracts/deepbook_predict_orders/queue.d.mts +683 -0
  91. package/dist/contracts/deepbook_predict_orders/queue.d.mts.map +1 -0
  92. package/dist/contracts/deepbook_predict_orders/queue.mjs +912 -0
  93. package/dist/contracts/deepbook_predict_orders/queue.mjs.map +1 -0
  94. package/dist/contracts/deepbook_predict_orders/queue_events.d.mts +195 -0
  95. package/dist/contracts/deepbook_predict_orders/queue_events.d.mts.map +1 -0
  96. package/dist/contracts/deepbook_predict_orders/queue_events.mjs +187 -0
  97. package/dist/contracts/deepbook_predict_orders/queue_events.mjs.map +1 -0
  98. package/dist/contracts/deepbook_sessions/session_config.d.mts +8 -8
  99. package/dist/contracts/deepbook_sessions/sessions.d.mts +163 -28
  100. package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -1
  101. package/dist/contracts/deepbook_sessions/sessions.mjs +234 -5
  102. package/dist/contracts/deepbook_sessions/sessions.mjs.map +1 -1
  103. package/dist/deployments/mainnet.mjs +7 -4
  104. package/dist/deployments/mainnet.mjs.map +1 -1
  105. package/dist/deployments/testnet.mjs +7 -4
  106. package/dist/deployments/testnet.mjs.map +1 -1
  107. package/dist/predict/bindings/expiry-market.d.mts +77 -0
  108. package/dist/predict/bindings/expiry-market.d.mts.map +1 -0
  109. package/dist/predict/bindings/expiry-market.mjs +139 -0
  110. package/dist/predict/bindings/expiry-market.mjs.map +1 -0
  111. package/dist/predict/bindings/protocol-config.d.mts +39 -0
  112. package/dist/predict/bindings/protocol-config.d.mts.map +1 -0
  113. package/dist/predict/bindings/protocol-config.mjs +90 -0
  114. package/dist/predict/bindings/protocol-config.mjs.map +1 -0
  115. package/dist/predict/bindings/rename.mjs +9 -0
  116. package/dist/predict/bindings/rename.mjs.map +1 -0
  117. package/dist/predict/client.d.mts +595 -16
  118. package/dist/predict/client.d.mts.map +1 -1
  119. package/dist/predict/client.mjs +986 -10
  120. package/dist/predict/client.mjs.map +1 -1
  121. package/dist/predict/config/generated.d.mts +22 -1
  122. package/dist/predict/config/generated.d.mts.map +1 -1
  123. package/dist/predict/config/generated.mjs +30 -1
  124. package/dist/predict/config/generated.mjs.map +1 -1
  125. package/dist/predict/config/mainnet.mjs +11 -3
  126. package/dist/predict/config/mainnet.mjs.map +1 -1
  127. package/dist/predict/config/testnet.mjs +11 -3
  128. package/dist/predict/config/testnet.mjs.map +1 -1
  129. package/dist/predict/config/types.d.mts +50 -1
  130. package/dist/predict/config/types.d.mts.map +1 -1
  131. package/dist/predict/cost.d.mts +38 -11
  132. package/dist/predict/cost.d.mts.map +1 -1
  133. package/dist/predict/cost.mjs +37 -11
  134. package/dist/predict/cost.mjs.map +1 -1
  135. package/dist/predict/decode.d.mts +251 -1
  136. package/dist/predict/decode.d.mts.map +1 -1
  137. package/dist/predict/decode.mjs +342 -4
  138. package/dist/predict/decode.mjs.map +1 -1
  139. package/dist/predict/errors.d.mts +69 -6
  140. package/dist/predict/errors.d.mts.map +1 -1
  141. package/dist/predict/errors.mjs +277 -4
  142. package/dist/predict/errors.mjs.map +1 -1
  143. package/dist/predict/index.d.mts +21 -10
  144. package/dist/predict/index.mjs +24 -12
  145. package/dist/predict/queue-id.d.mts +13 -0
  146. package/dist/predict/queue-id.d.mts.map +1 -0
  147. package/dist/predict/queue-id.mjs +19 -0
  148. package/dist/predict/queue-id.mjs.map +1 -0
  149. package/dist/predict/queue.d.mts +505 -0
  150. package/dist/predict/queue.d.mts.map +1 -0
  151. package/dist/predict/queue.mjs +774 -0
  152. package/dist/predict/queue.mjs.map +1 -0
  153. package/dist/predict/reads/balances.mjs +1 -1
  154. package/dist/predict/reads/markets.mjs +46 -5
  155. package/dist/predict/reads/markets.mjs.map +1 -1
  156. package/dist/predict/reads/pool.mjs +1 -1
  157. package/dist/predict/reads/pricing.d.mts +1 -1
  158. package/dist/predict/reads/queue.d.mts +105 -0
  159. package/dist/predict/reads/queue.d.mts.map +1 -0
  160. package/dist/predict/reads/queue.mjs +445 -0
  161. package/dist/predict/reads/queue.mjs.map +1 -0
  162. package/dist/predict/ticks.d.mts +9 -1
  163. package/dist/predict/ticks.d.mts.map +1 -1
  164. package/dist/predict/ticks.mjs +18 -1
  165. package/dist/predict/ticks.mjs.map +1 -1
  166. package/dist/predict/tx/authed.mjs +1 -1
  167. package/dist/predict/tx/common.d.mts.map +1 -1
  168. package/dist/predict/tx/common.mjs +12 -1
  169. package/dist/predict/tx/common.mjs.map +1 -1
  170. package/dist/predict/tx/queue.d.mts +220 -0
  171. package/dist/predict/tx/queue.d.mts.map +1 -0
  172. package/dist/predict/tx/queue.mjs +399 -0
  173. package/dist/predict/tx/queue.mjs.map +1 -0
  174. package/dist/predict/tx/trade.d.mts.map +1 -1
  175. package/dist/predict/tx/trade.mjs +61 -43
  176. package/dist/predict/tx/trade.mjs.map +1 -1
  177. package/dist/sessions.d.mts +90 -2
  178. package/dist/sessions.d.mts.map +1 -1
  179. package/dist/sessions.mjs +107 -2
  180. package/dist/sessions.mjs.map +1 -1
  181. package/dist/transactions/balanceManager.d.mts +12 -12
  182. package/dist/transactions/balanceManager.d.mts.map +1 -1
  183. package/dist/transactions/deepbook.d.mts +20 -20
  184. package/dist/transactions/deepbook.d.mts.map +1 -1
  185. package/dist/transactions/deepbookAdmin.d.mts +4 -4
  186. package/dist/transactions/deepbookAdmin.d.mts.map +1 -1
  187. package/dist/transactions/marginAdmin.d.mts +7 -7
  188. package/dist/transactions/marginAdmin.d.mts.map +1 -1
  189. package/dist/transactions/marginLiquidations.d.mts +3 -3
  190. package/dist/transactions/marginMaintainer.d.mts +5 -5
  191. package/dist/transactions/marginMaintainer.d.mts.map +1 -1
  192. package/dist/transactions/marginManager.d.mts +32 -32
  193. package/dist/transactions/marginManager.d.mts.map +1 -1
  194. package/dist/transactions/marginPool.d.mts +18 -18
  195. package/dist/transactions/marginRegistry.d.mts +16 -16
  196. package/dist/transactions/marginTPSL.d.mts +10 -10
  197. package/dist/transactions/marginTPSL.d.mts.map +1 -1
  198. package/dist/transactions/poolProxy.d.mts +8 -8
  199. package/dist/transactions/poolProxy.d.mts.map +1 -1
  200. package/package.json +4 -4
  201. package/src/contracts/deepbook_predict/config_events.ts +39 -0
  202. package/src/contracts/deepbook_predict/deps/std/type_name.ts +24 -0
  203. package/src/contracts/deepbook_predict/expiry_market.ts +960 -169
  204. package/src/contracts/deepbook_predict/order_events.ts +3 -1
  205. package/src/contracts/deepbook_predict/plp.ts +150 -9
  206. package/src/contracts/deepbook_predict/pricing.ts +46 -7
  207. package/src/contracts/deepbook_predict/pricing_config.ts +3 -1
  208. package/src/contracts/deepbook_predict/protocol_config.ts +648 -33
  209. package/src/contracts/deepbook_predict/strike_payout_tree.ts +25 -21
  210. package/src/contracts/deepbook_predict/vault_events.ts +65 -0
  211. package/src/contracts/deepbook_predict_math/config-arguments.ts +6 -0
  212. package/src/contracts/deepbook_predict_math/lazer_price.ts +196 -0
  213. package/src/contracts/deepbook_predict_math/math.ts +553 -0
  214. package/src/contracts/deepbook_predict_orders/config-arguments.ts +11 -0
  215. package/src/contracts/deepbook_predict_orders/delayed_execution_config.ts +430 -0
  216. package/src/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.ts +108 -0
  217. package/src/contracts/deepbook_predict_orders/deps/deepbook_predict/pricing.ts +58 -0
  218. package/src/contracts/deepbook_predict_orders/deps/fixed_math/i64.ts +21 -0
  219. package/src/contracts/deepbook_predict_orders/deps/sui/balance.ts +19 -0
  220. package/src/contracts/deepbook_predict_orders/deps/sui/table.ts +37 -0
  221. package/src/contracts/deepbook_predict_orders/desk.ts +419 -0
  222. package/src/contracts/deepbook_predict_orders/order_flow.ts +19 -0
  223. package/src/contracts/deepbook_predict_orders/order_queue.ts +1670 -0
  224. package/src/contracts/deepbook_predict_orders/queue.ts +1394 -0
  225. package/src/contracts/deepbook_predict_orders/queue_events.ts +189 -0
  226. package/src/contracts/deepbook_sessions/sessions.ts +355 -4
  227. package/src/deployments/mainnet.ts +7 -2
  228. package/src/deployments/testnet.ts +7 -2
  229. package/src/deployments/types.ts +14 -1
  230. package/src/predict/bindings/expiry-market.ts +127 -0
  231. package/src/predict/bindings/protocol-config.ts +59 -0
  232. package/src/predict/bindings/rename.ts +14 -0
  233. package/src/predict/client.ts +2076 -13
  234. package/src/predict/config/generated.ts +50 -0
  235. package/src/predict/config/mainnet.ts +16 -2
  236. package/src/predict/config/testnet.ts +16 -2
  237. package/src/predict/config/types.ts +51 -1
  238. package/src/predict/cost.ts +62 -14
  239. package/src/predict/decode.ts +691 -2
  240. package/src/predict/errors.ts +391 -14
  241. package/src/predict/index.ts +87 -6
  242. package/src/predict/queue-id.ts +22 -0
  243. package/src/predict/queue.ts +1231 -0
  244. package/src/predict/reads/markets.ts +30 -0
  245. package/src/predict/reads/queue.ts +606 -0
  246. package/src/predict/ticks.ts +35 -0
  247. package/src/predict/tx/common.ts +25 -1
  248. package/src/predict/tx/queue.ts +525 -0
  249. package/src/predict/tx/trade.ts +80 -49
  250. package/src/sessions.ts +206 -1
@@ -20,28 +20,33 @@ import { bcs } from "@mysten/sui/bcs";
20
20
  * anything the caller supplies: rotations are driven by measured subtree height,
21
21
  * which bounds depth at `O(log n)` for _every_ tick set rather than in expectation
22
22
  * over a random one. Depth is the cost model that matters — each node is a
23
- * dynamic-field child, and `apply_at` and `settlement_prefix_payout` touch one per
24
- * level against a per-transaction cached-object ceiling.
23
+ * dynamic-field child, and `apply_at` and `prefix_pay` touch one per level against
24
+ * a per-transaction cached-object ceiling.
25
25
  *
26
26
  * It tracks each order's quantity, which is also its settled payout: a winning
27
27
  * order pays its full quantity. Live cash backing is the max-point payout plus a
28
28
  * buffer over the disjoint-book gap; the tree's max-point term is the floor anchor
29
29
  * of that enforced reserve.
30
30
  *
31
- * Shape carries no value for a consistent index: `combine_summaries` is
32
- * associative over the in-order sequence, so any arrangement of the same
33
- * boundaries yields identical summaries, settlement prefixes, and linear-walk
34
- * totals. That holds only while every prefix is non-negative, which a consistent
35
- * book guarantees. Under a caller/index desync the settlement walk's underflow
36
- * abort depends on which prefixes a given shape happens to visit, so it is not a
37
- * desync detector — the per-boundary underflow in `apply_net_delta` is the
38
- * authority.
31
+ * Shape carries no value for a consistent index: `combine` is associative over the
32
+ * in-order sequence, so any arrangement of the same boundaries yields identical
33
+ * summaries, settlement prefixes, and linear-walk totals. That holds only while
34
+ * every prefix is non-negative, which a consistent book guarantees. Under a
35
+ * caller/index desync the settlement walk's underflow abort depends on which
36
+ * prefixes a given shape happens to visit, so it is not a desync detector — the
37
+ * per-boundary underflow in `apply_net` is the authority.
39
38
  *
40
39
  * The module also owns the valuation snapshot for the resumable flush: while a
41
40
  * flush generation is active, each node lazily captures its boundary quantities
42
41
  * immediately before its first mutation under that generation (an untouched node
43
- * is its own snapshot), and `walk_linear_frozen` prices the tree exactly as it
44
- * stood at the snapshot instant through the same walk the live read uses.
42
+ * is its own snapshot), and `walk_frozen` prices the tree exactly as it stood at
43
+ * the snapshot instant through the same walk the live read uses.
44
+ *
45
+ * Delayed execution adds pins: a waiting order's boundary ticks, passed in as
46
+ * `pins` (tick -> count of waiting orders; a key is present only while its count
47
+ * is positive). Enqueue creates the nodes up front (`ensure_node`), no deletion
48
+ * path removes a pinned node, and a resolve fill inserts over existing nodes only
49
+ * (`insert_exist`), so the keeper never creates a node.
45
50
  */
46
51
  const $moduleName = "@local-pkg/deepbook_predict::strike_payout_tree";
47
52
  const StrikePayoutTree = new MoveStruct({
@@ -1 +1 @@
1
- {"version":3,"file":"strike_payout_tree.mjs","names":["table.Table"],"sources":["../../../src/contracts/deepbook_predict/strike_payout_tree.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Sparse strike exposure index for payout-liability accounting.\n *\n * The tree keys finite interval boundaries by absolute tick, matching the tick\n * pair packed into the durable order ID. Raw strikes are recovered only at the\n * pricing/settlement boundary, where callers pass the owning market's `tick_size`\n * (`raw_strike = tick * tick_size`); the tree stores no grid geometry.\n *\n * This height-balanced (AVL) tree stores finite interval boundaries touched by\n * positions. Boundary ticks are caller-chosen, so the balancing rule must not read\n * anything the caller supplies: rotations are driven by measured subtree height,\n * which bounds depth at `O(log n)` for _every_ tick set rather than in expectation\n * over a random one. Depth is the cost model that matters — each node is a\n * dynamic-field child, and `apply_at` and `settlement_prefix_payout` touch one per\n * level against a per-transaction cached-object ceiling.\n *\n * It tracks each order's quantity, which is also its settled payout: a winning\n * order pays its full quantity. Live cash backing is the max-point payout plus a\n * buffer over the disjoint-book gap; the tree's max-point term is the floor anchor\n * of that enforced reserve.\n *\n * Shape carries no value for a consistent index: `combine_summaries` is\n * associative over the in-order sequence, so any arrangement of the same\n * boundaries yields identical summaries, settlement prefixes, and linear-walk\n * totals. That holds only while every prefix is non-negative, which a consistent\n * book guarantees. Under a caller/index desync the settlement walk's underflow\n * abort depends on which prefixes a given shape happens to visit, so it is not a\n * desync detector — the per-boundary underflow in `apply_net_delta` is the\n * authority.\n *\n * The module also owns the valuation snapshot for the resumable flush: while a\n * flush generation is active, each node lazily captures its boundary quantities\n * immediately before its first mutation under that generation (an untouched node\n * is its own snapshot), and `walk_linear_frozen` prices the tree exactly as it\n * stood at the snapshot instant through the same walk the live read uses.\n */\n\nimport { MoveStruct } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { U64 } from '../../bcs/integers.js';\nimport * as table from './deps/sui/table.js';\nconst $moduleName = '@local-pkg/deepbook_predict::strike_payout_tree';\nexport const StrikePayoutTree = new MoveStruct({\n\tname: `${$moduleName}::StrikePayoutTree`,\n\tfields: {\n\t\troot: bcs.option(U64),\n\t\tnodes: table.Table,\n\t\tnode_count: U64,\n\t\t/**\n\t\t * Aggregate order quantity over the open-lower prefix, which is also its aggregate\n\t\t * settled payout.\n\t\t */\n\t\tbase: U64,\n\t\t/**\n\t\t * Flush generation whose snapshot this tree holds. Node shadows are valid only\n\t\t * against this value; monotonically increasing, 0 = never snapshotted.\n\t\t */\n\t\tsnapshot_seq: U64,\n\t\t/**\n\t\t * True from `activate_snapshot` until `release_snapshot`/`deactivate_snapshot`.\n\t\t * While set, mutations capture shadows and emptied nodes with shadow quantities\n\t\t * are retained for the frozen walk instead of removed.\n\t\t */\n\t\tsnapshot_active: bcs.bool(),\n\t\t/** `base` as of the snapshot instant, captured eagerly at activation. */\n\t\tsnapshot_base: U64,\n\t},\n});\nexport const PayoutSummary = new MoveStruct({\n\tname: `${$moduleName}::PayoutSummary`,\n\tfields: {\n\t\tstart: U64,\n\t\tend: U64,\n\t\t/**\n\t\t * Never exceeds `start`, by construction in `boundary_summary` and\n\t\t * `combine_summaries`. That bound is what makes `combine_summaries` associative at\n\t\t * u64 scale — and therefore what makes the tree's shape irrelevant to every value\n\t\t * it reports. A summary term that could outgrow `start` would break\n\t\t * shape-independence with no test to catch it, and would also abort\n\t\t * `strike_exposure`'s plain `total - max` subtraction.\n\t\t */\n\t\tmax_payout_prefix_gain: U64,\n\t},\n});\nexport const PayoutNode = new MoveStruct({\n\tname: `${$moduleName}::PayoutNode`,\n\tfields: {\n\t\t/**\n\t\t * Longest root-to-leaf path in this subtree, counting this node. A leaf is 1; an\n\t\t * absent child is 0. Maintained by `resummarize` alongside `summary`, and read\n\t\t * only by `rebalance` — never by a caller, and never derived from a tick.\n\t\t */\n\t\theight: U64,\n\t\tleft: bcs.option(U64),\n\t\tright: bcs.option(U64),\n\t\t/**\n\t\t * This node's own boundary terms, stored so the subtree `summary` can be\n\t\t * recomputed without deriving locals by subtracting child summaries.\n\t\t */\n\t\tlocal_start: U64,\n\t\tlocal_end: U64,\n\t\t/**\n\t\t * Boundary terms at generation `snapshot_seq`'s instant, captured before the first\n\t\t * mutation under it. Active generation + zero shadows = created post-snapshot;\n\t\t * older generation = untouched, live terms ARE the shadow.\n\t\t */\n\t\tsnapshot_local_start: U64,\n\t\tsnapshot_local_end: U64,\n\t\tsnapshot_seq: U64,\n\t\tsummary: PayoutSummary,\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAM,cAAc;AACpB,MAAa,mBAAmB,IAAI,WAAW;CAC9C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,MAAM,IAAI,OAAO,IAAI;EACrB,OAAOA;EACP,YAAY;EAKZ,MAAM;EAKN,cAAc;EAMd,iBAAiB,IAAI,MAAM;EAE3B,eAAe;EACf;CACD,CAAC;AACF,MAAa,gBAAgB,IAAI,WAAW;CAC3C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,OAAO;EACP,KAAK;EASL,wBAAwB;EACxB;CACD,CAAC;AACF,MAAa,aAAa,IAAI,WAAW;CACxC,MAAM,GAAG,YAAY;CACrB,QAAQ;EAMP,QAAQ;EACR,MAAM,IAAI,OAAO,IAAI;EACrB,OAAO,IAAI,OAAO,IAAI;EAKtB,aAAa;EACb,WAAW;EAMX,sBAAsB;EACtB,oBAAoB;EACpB,cAAc;EACd,SAAS;EACT;CACD,CAAC"}
1
+ {"version":3,"file":"strike_payout_tree.mjs","names":["table.Table"],"sources":["../../../src/contracts/deepbook_predict/strike_payout_tree.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Sparse strike exposure index for payout-liability accounting.\n *\n * The tree keys finite interval boundaries by absolute tick, matching the tick\n * pair packed into the durable order ID. Raw strikes are recovered only at the\n * pricing/settlement boundary, where callers pass the owning market's `tick_size`\n * (`raw_strike = tick * tick_size`); the tree stores no grid geometry.\n *\n * This height-balanced (AVL) tree stores finite interval boundaries touched by\n * positions. Boundary ticks are caller-chosen, so the balancing rule must not read\n * anything the caller supplies: rotations are driven by measured subtree height,\n * which bounds depth at `O(log n)` for _every_ tick set rather than in expectation\n * over a random one. Depth is the cost model that matters — each node is a\n * dynamic-field child, and `apply_at` and `prefix_pay` touch one per level against\n * a per-transaction cached-object ceiling.\n *\n * It tracks each order's quantity, which is also its settled payout: a winning\n * order pays its full quantity. Live cash backing is the max-point payout plus a\n * buffer over the disjoint-book gap; the tree's max-point term is the floor anchor\n * of that enforced reserve.\n *\n * Shape carries no value for a consistent index: `combine` is associative over the\n * in-order sequence, so any arrangement of the same boundaries yields identical\n * summaries, settlement prefixes, and linear-walk totals. That holds only while\n * every prefix is non-negative, which a consistent book guarantees. Under a\n * caller/index desync the settlement walk's underflow abort depends on which\n * prefixes a given shape happens to visit, so it is not a desync detector — the\n * per-boundary underflow in `apply_net` is the authority.\n *\n * The module also owns the valuation snapshot for the resumable flush: while a\n * flush generation is active, each node lazily captures its boundary quantities\n * immediately before its first mutation under that generation (an untouched node\n * is its own snapshot), and `walk_frozen` prices the tree exactly as it stood at\n * the snapshot instant through the same walk the live read uses.\n *\n * Delayed execution adds pins: a waiting order's boundary ticks, passed in as\n * `pins` (tick -> count of waiting orders; a key is present only while its count\n * is positive). Enqueue creates the nodes up front (`ensure_node`), no deletion\n * path removes a pinned node, and a resolve fill inserts over existing nodes only\n * (`insert_exist`), so the keeper never creates a node.\n */\n\nimport { MoveStruct } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { U64 } from '../../bcs/integers.js';\nimport * as table from './deps/sui/table.js';\nconst $moduleName = '@local-pkg/deepbook_predict::strike_payout_tree';\nexport const StrikePayoutTree = new MoveStruct({\n\tname: `${$moduleName}::StrikePayoutTree`,\n\tfields: {\n\t\troot: bcs.option(U64),\n\t\tnodes: table.Table,\n\t\tnode_count: U64,\n\t\t/**\n\t\t * Aggregate order quantity over the open-lower prefix, which is also its aggregate\n\t\t * settled payout.\n\t\t */\n\t\tbase: U64,\n\t\t/**\n\t\t * Flush generation whose snapshot this tree holds. Node shadows are valid only\n\t\t * against this value; monotonically increasing, 0 = never snapshotted.\n\t\t */\n\t\tsnapshot_seq: U64,\n\t\t/**\n\t\t * True from `snap_on` until `snap_done`/`snap_off`. While set, mutations capture\n\t\t * shadows and emptied nodes with shadow quantities are retained for the frozen\n\t\t * walk instead of removed.\n\t\t */\n\t\tsnapshot_active: bcs.bool(),\n\t\t/** `base` as of the snapshot instant, captured eagerly at activation. */\n\t\tsnapshot_base: U64,\n\t},\n});\nexport const PayoutSummary = new MoveStruct({\n\tname: `${$moduleName}::PayoutSummary`,\n\tfields: {\n\t\tstart: U64,\n\t\tend: U64,\n\t\t/**\n\t\t * Never exceeds `start`, by construction in `bound_sum` and `combine`. That bound\n\t\t * is what makes `combine` associative at u64 scale — and therefore what makes the\n\t\t * tree's shape irrelevant to every value it reports. A summary term that could\n\t\t * outgrow `start` would break shape-independence with no test to catch it, and\n\t\t * would also abort `strike_exposure`'s plain `total - max` subtraction.\n\t\t */\n\t\tmax_payout_prefix_gain: U64,\n\t},\n});\nexport const PayoutNode = new MoveStruct({\n\tname: `${$moduleName}::PayoutNode`,\n\tfields: {\n\t\t/**\n\t\t * Longest root-to-leaf path in this subtree, counting this node. A leaf is 1; an\n\t\t * absent child is 0. Maintained by `resummarize` alongside `summary`, and read\n\t\t * only by `rebalance` — never by a caller, and never derived from a tick.\n\t\t */\n\t\theight: U64,\n\t\tleft: bcs.option(U64),\n\t\tright: bcs.option(U64),\n\t\t/**\n\t\t * This node's own boundary terms, stored so the subtree `summary` can be\n\t\t * recomputed without deriving locals by subtracting child summaries.\n\t\t */\n\t\tlocal_start: U64,\n\t\tlocal_end: U64,\n\t\t/**\n\t\t * Boundary terms at generation `snapshot_seq`'s instant, captured before the first\n\t\t * mutation under it. Active generation + zero shadows = created post-snapshot;\n\t\t * older generation = untouched, live terms ARE the shadow.\n\t\t */\n\t\tsnapshot_local_start: U64,\n\t\tsnapshot_local_end: U64,\n\t\tsnapshot_seq: U64,\n\t\tsummary: PayoutSummary,\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,MAAM,cAAc;AACpB,MAAa,mBAAmB,IAAI,WAAW;CAC9C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,MAAM,IAAI,OAAO,IAAI;EACrB,OAAOA;EACP,YAAY;EAKZ,MAAM;EAKN,cAAc;EAMd,iBAAiB,IAAI,MAAM;EAE3B,eAAe;EACf;CACD,CAAC;AACF,MAAa,gBAAgB,IAAI,WAAW;CAC3C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,OAAO;EACP,KAAK;EAQL,wBAAwB;EACxB;CACD,CAAC;AACF,MAAa,aAAa,IAAI,WAAW;CACxC,MAAM,GAAG,YAAY;CACrB,QAAQ;EAMP,QAAQ;EACR,MAAM,IAAI,OAAO,IAAI;EACrB,OAAO,IAAI,OAAO,IAAI;EAKtB,aAAa;EACb,WAAW;EAMX,sBAAsB;EACtB,oBAAoB;EACpB,cAAc;EACd,SAAS;EACT;CACD,CAAC"}
@@ -1,198 +1,246 @@
1
1
  import { MoveStruct } from "../utils/index.mjs";
2
- import * as _mysten_sui_bcs238 from "@mysten/sui/bcs";
2
+ import * as _mysten_sui_bcs310 from "@mysten/sui/bcs";
3
3
 
4
4
  //#region src/contracts/deepbook_predict/vault_events.d.ts
5
5
  declare namespace vault_events_d_exports {
6
- export { CapitalLocked, ExpiryCashRebalanced, ExpiryCashReceived, ExpiryProfitMaterialized, FeeIncentivesAllocated, FeeIncentivesReturned, FeeIncentivesSponsored, FlushExecuted, FlushRestarted, RequestCancelled, RequestLimitMissed, SupplyFilled, SupplyRequested, WithdrawFilled, WithdrawRequested };
6
+ export { CapitalLocked, ExpiryCashRebalanced, ExpiryCashReceived, ExpiryPnl, ExpiryPnlRealized, ExpiryProfitMaterialized, FeeIncentiveLifetimeCapSnapshotted, FeeIncentivesAllocated, FeeIncentivesReturned, FeeIncentivesSponsored, FeeIncentivesWithdrawn, FlushExecuted, FlushRestarted, RequestCancelled, RequestLimitMissed, SupplyFilled, SupplyRequested, UsdcAddedToPlp, WithdrawFilled, WithdrawRequested };
7
7
  }
8
8
  declare const ExpiryCashReceived: MoveStruct<{
9
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
10
- expiry_market_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
11
- settlement_price: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
12
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
9
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
10
+ expiry_market_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
11
+ settlement_price: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
12
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
13
13
  }, "@local-pkg/deepbook_predict::vault_events::ExpiryCashReceived">;
14
14
  declare const ExpiryCashRebalanced: MoveStruct<{
15
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
16
- expiry_market_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
17
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
18
- to_expiry: _mysten_sui_bcs238.BcsType<boolean, boolean, "bool">;
19
- target_cash: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
20
- protocol_profit_realized: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
15
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
16
+ expiry_market_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
17
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
18
+ to_expiry: _mysten_sui_bcs310.BcsType<boolean, boolean, "bool">;
19
+ target_cash: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
20
+ protocol_profit_realized: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
21
21
  }, "@local-pkg/deepbook_predict::vault_events::ExpiryCashRebalanced">;
22
22
  declare const ExpiryProfitMaterialized: MoveStruct<{
23
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
24
- expiry_market_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
25
- lp_profit: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
26
- protocol_profit: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
27
- protocol_reserve_balance_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
28
- profit_basis_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
29
- pending_protocol_profit_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
23
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
24
+ expiry_market_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
25
+ lp_profit: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
26
+ protocol_profit: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
27
+ protocol_reserve_balance_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
28
+ profit_basis_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
29
+ pending_protocol_profit_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
30
30
  }, "@local-pkg/deepbook_predict::vault_events::ExpiryProfitMaterialized">;
31
+ declare const ExpiryPnl: MoveStruct<{
32
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
33
+ expiry_market_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
34
+ propbook_underlying_id: _mysten_sui_bcs310.BcsType<number, number, "u32">;
35
+ /**
36
+ * Start of the market's cadence period (`expiry` minus the cadence period), in
37
+ * milliseconds. The market's creation transaction may land before it.
38
+ */
39
+ period_start_ms: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
40
+ expiry: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
41
+ settlement_price: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
42
+ sent_to_expiry: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
43
+ received_from_expiry: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
44
+ /**
45
+ * True when `received_from_expiry >= sent_to_expiry`; break-even reports a zero
46
+ * profit.
47
+ */
48
+ in_profit: _mysten_sui_bcs310.BcsType<boolean, boolean, "bool">; /** Absolute difference between `received_from_expiry` and `sent_to_expiry`. */
49
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
50
+ }, "@local-pkg/deepbook_predict::vault_events::ExpiryPnl">;
51
+ declare const ExpiryPnlRealized: MoveStruct<{
52
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
53
+ expiry_market_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
54
+ propbook_underlying_id: _mysten_sui_bcs310.BcsType<number, number, "u32">;
55
+ expiry: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
56
+ settlement_price: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">; /** False only for a loss, which only an expiry's first emission can report. */
57
+ in_profit: _mysten_sui_bcs310.BcsType<boolean, boolean, "bool">;
58
+ /**
59
+ * Magnitude of the change in the gross realized result since the previous
60
+ * emission.
61
+ */
62
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
63
+ }, "@local-pkg/deepbook_predict::vault_events::ExpiryPnlRealized">;
31
64
  declare const SupplyRequested: MoveStruct<{
32
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
33
- account_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
34
- recipient: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
35
- index: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
36
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
37
- min_plp_out: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
38
- requests_pending_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
65
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
66
+ account_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
67
+ recipient: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
68
+ index: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
69
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
70
+ min_plp_out: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
71
+ requests_pending_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
39
72
  }, "@local-pkg/deepbook_predict::vault_events::SupplyRequested">;
40
73
  declare const WithdrawRequested: MoveStruct<{
41
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
42
- account_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
43
- recipient: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
44
- index: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
45
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
46
- min_usdc_out: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
47
- requests_pending_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
74
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
75
+ account_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
76
+ recipient: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
77
+ index: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
78
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
79
+ min_usdc_out: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
80
+ requests_pending_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
48
81
  }, "@local-pkg/deepbook_predict::vault_events::WithdrawRequested">;
49
82
  declare const RequestCancelled: MoveStruct<{
50
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
51
- account_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
52
- recipient: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
53
- index: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
54
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
55
- is_supply: _mysten_sui_bcs238.BcsType<boolean, boolean, "bool">;
83
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
84
+ account_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
85
+ recipient: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
86
+ index: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
87
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
88
+ is_supply: _mysten_sui_bcs310.BcsType<boolean, boolean, "bool">;
56
89
  /**
57
90
  * 0=user, 1=non-executable frozen mark, 2=quote below the request's minimum
58
91
  * output.
59
92
  */
60
- reason: _mysten_sui_bcs238.BcsType<number, number, "u8">;
61
- requests_pending_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
93
+ reason: _mysten_sui_bcs310.BcsType<number, number, "u8">;
94
+ requests_pending_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
62
95
  }, "@local-pkg/deepbook_predict::vault_events::RequestCancelled">;
63
96
  declare const RequestLimitMissed: MoveStruct<{
64
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
65
- account_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
66
- recipient: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
67
- index: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
68
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
69
- is_supply: _mysten_sui_bcs238.BcsType<boolean, boolean, "bool">;
70
- quoted_output: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
71
- min_output: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
72
- missed_flushes: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
73
- max_misses: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
97
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
98
+ account_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
99
+ recipient: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
100
+ index: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
101
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
102
+ is_supply: _mysten_sui_bcs310.BcsType<boolean, boolean, "bool">;
103
+ quoted_output: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
104
+ min_output: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
105
+ missed_flushes: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
106
+ max_misses: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
74
107
  }, "@local-pkg/deepbook_predict::vault_events::RequestLimitMissed">;
75
108
  declare const SupplyFilled: MoveStruct<{
76
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
77
- account_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
78
- recipient: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
79
- index: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
109
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
110
+ account_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
111
+ recipient: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
112
+ index: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
80
113
  /**
81
114
  * USDC actually taken into the pool, which is less than the request's escrow when
82
115
  * the supply cap left only part of it room. Shares were priced on
83
116
  * `usdc_amount - fee_usdc`.
84
117
  */
85
- usdc_amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
86
- shares_minted: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">; /** Supply fee withheld from `usdc_amount` and retained by the pool. */
87
- fee_usdc: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
118
+ usdc_amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
119
+ shares_minted: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">; /** Supply fee withheld from `usdc_amount` and retained by the pool. */
120
+ fee_usdc: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
88
121
  /**
89
122
  * Escrow still queued at the head after a partial fill; `0` on a full fill, in
90
123
  * which case the request is gone. `usdc_amount + usdc_remaining` is the amount the
91
124
  * request carried into this flush.
92
125
  */
93
- usdc_remaining: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
94
- requests_pending_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
126
+ usdc_remaining: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
127
+ requests_pending_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
95
128
  }, "@local-pkg/deepbook_predict::vault_events::SupplyFilled">;
96
129
  declare const WithdrawFilled: MoveStruct<{
97
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
98
- account_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
99
- recipient: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
100
- index: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
101
- shares_burned: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
130
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
131
+ account_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
132
+ recipient: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
133
+ index: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
134
+ shares_burned: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
102
135
  /**
103
136
  * Net USDC delivered to `recipient`. The gross marked value of `shares_burned` was
104
137
  * `usdc_amount + fee_usdc`.
105
138
  */
106
- usdc_amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">; /** Withdraw fee withheld from the payout and retained by the pool. */
107
- fee_usdc: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
139
+ usdc_amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">; /** Withdraw fee withheld from the payout and retained by the pool. */
140
+ fee_usdc: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
108
141
  /**
109
142
  * Escrowed PLP still queued at the head after a partial fill; `0` on a full fill,
110
143
  * in which case the request is gone. `shares_burned + shares_remaining` is the
111
144
  * amount the request carried into this flush.
112
145
  */
113
- shares_remaining: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
114
- requests_pending_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
146
+ shares_remaining: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
147
+ requests_pending_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
115
148
  }, "@local-pkg/deepbook_predict::vault_events::WithdrawFilled">;
116
149
  declare const FlushExecuted: MoveStruct<{
117
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
118
- epoch: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
150
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
151
+ epoch: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
119
152
  /**
120
153
  * LP-attributable pool NAV every fill was priced at: idle plus
121
154
  * `active_market_nav`, excluding unrealized and pending protocol profit.
122
155
  */
123
- pool_value: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">; /** PLP supply in the frozen pre-drain mark used to price every fill. */
124
- total_supply: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
156
+ pool_value: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">; /** PLP supply in the frozen pre-drain mark used to price every fill. */
157
+ total_supply: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
125
158
  /**
126
159
  * Supply-leg fee rate in FLOAT_SCALING, frozen with the mark and charged on every
127
160
  * supply fill in this flush.
128
161
  */
129
- supply_fee_rate: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">; /** Withdraw-leg fee rate in FLOAT_SCALING, frozen alongside it. */
130
- withdraw_fee_rate: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
162
+ supply_fee_rate: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">; /** Withdraw-leg fee rate in FLOAT_SCALING, frozen alongside it. */
163
+ withdraw_fee_rate: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
131
164
  /**
132
165
  * Sum of the marked NAV contributed by each active market; settled markets add
133
166
  * zero.
134
167
  */
135
- active_market_nav: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">; /** Number of active markets valued for this flush. */
136
- market_count: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
168
+ active_market_nav: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">; /** Number of active markets valued for this flush. */
169
+ market_count: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
137
170
  /**
138
171
  * LIVE idle USDC read at finish time, immediately before the drain — NOT a mark
139
172
  * input. It brackets the drain with `idle_balance_after`; because maintenance,
140
173
  * settlement sweeps, and trading run mid-window, it can differ from
141
174
  * `frozen_idle_balance` below. Drain telemetry, not the mark.
142
175
  */
143
- idle_balance_before: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
176
+ idle_balance_before: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
144
177
  /**
145
178
  * The mark's idle component: idle USDC FROZEN at the seal. `frozen_idle_balance
146
179
  *
147
180
  * - active_market_nav`reconstructs the priced mark's gross; every fill in the flush is priced from this, never from`idle_balance_before`.
148
181
  */
149
- frozen_idle_balance: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
150
- supplies_filled: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
151
- withdrawals_filled: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
152
- requests_processed: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
153
- idle_balance_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">; /** PLP supply after the drain's completed mints and burns. */
154
- total_supply_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
182
+ frozen_idle_balance: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
183
+ supplies_filled: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
184
+ withdrawals_filled: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
185
+ requests_processed: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
186
+ idle_balance_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">; /** PLP supply after the drain's completed mints and burns. */
187
+ total_supply_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
155
188
  /**
156
189
  * Each queue's `next_index` at this flush's snapshot instant; the drain filled
157
190
  * only requests indexed strictly below these.
158
191
  */
159
- supply_request_cutoff: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
160
- withdraw_request_cutoff: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
192
+ supply_request_cutoff: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
193
+ withdraw_request_cutoff: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
161
194
  /**
162
195
  * Clock instant the snapshot stage froze every market's pricer — the moment the
163
196
  * mark prices the pool at. Fills execute later in the same flush; this is the
164
197
  * timestamp they were priced as of.
165
198
  */
166
- snapshot_timestamp_ms: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
199
+ snapshot_timestamp_ms: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
167
200
  }, "@local-pkg/deepbook_predict::vault_events::FlushExecuted">;
168
201
  declare const FlushRestarted: MoveStruct<{
169
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
170
- expected_market_count: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
171
- valued_market_count: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
202
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
203
+ expected_market_count: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
204
+ valued_market_count: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
172
205
  }, "@local-pkg/deepbook_predict::vault_events::FlushRestarted">;
173
206
  declare const CapitalLocked: MoveStruct<{
174
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
175
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
207
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
208
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
176
209
  }, "@local-pkg/deepbook_predict::vault_events::CapitalLocked">;
210
+ declare const UsdcAddedToPlp: MoveStruct<{
211
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
212
+ contributor: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
213
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
214
+ }, "@local-pkg/deepbook_predict::vault_events::UsdcAddedToPlp">;
177
215
  declare const FeeIncentivesSponsored: MoveStruct<{
178
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
179
- sponsor: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
180
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
181
- reserve_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
216
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
217
+ sponsor: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
218
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
219
+ reserve_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
182
220
  }, "@local-pkg/deepbook_predict::vault_events::FeeIncentivesSponsored">;
221
+ declare const FeeIncentivesWithdrawn: MoveStruct<{
222
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
223
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
224
+ reserve_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
225
+ }, "@local-pkg/deepbook_predict::vault_events::FeeIncentivesWithdrawn">;
226
+ declare const FeeIncentiveLifetimeCapSnapshotted: MoveStruct<{
227
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
228
+ expiry_market_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
229
+ fee_incentive_lifetime_cap: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
230
+ }, "@local-pkg/deepbook_predict::vault_events::FeeIncentiveLifetimeCapSnapshotted">;
183
231
  declare const FeeIncentivesAllocated: MoveStruct<{
184
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
185
- expiry_market_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
186
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
187
- pool_reserve_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
188
- expiry_incentive_balance_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
189
- expiry_incentives_allocated_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
232
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
233
+ expiry_market_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
234
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
235
+ pool_reserve_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
236
+ expiry_incentive_balance_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
237
+ expiry_incentives_allocated_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
190
238
  }, "@local-pkg/deepbook_predict::vault_events::FeeIncentivesAllocated">;
191
239
  declare const FeeIncentivesReturned: MoveStruct<{
192
- pool_vault_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
193
- expiry_market_id: _mysten_sui_bcs238.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
194
- amount: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
195
- pool_reserve_after: _mysten_sui_bcs238.BcsType<bigint, string | number | bigint, "u64">;
240
+ pool_vault_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
241
+ expiry_market_id: _mysten_sui_bcs310.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
242
+ amount: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
243
+ pool_reserve_after: _mysten_sui_bcs310.BcsType<bigint, string | number | bigint, "u64">;
196
244
  }, "@local-pkg/deepbook_predict::vault_events::FeeIncentivesReturned">;
197
245
  //#endregion
198
246
  export { vault_events_d_exports };
@@ -1 +1 @@
1
- {"version":3,"file":"vault_events.d.mts","names":[],"sources":["../../../src/contracts/deepbook_predict/vault_events.ts"],"mappings":";;;;;;;cAaa,kBAAA,EAAkB,UAAA;;;;;;cASlB,oBAAA,EAAoB,UAAA;;;;;;;;cAWpB,wBAAA,EAAwB,UAAA;;;;;;;;;cAYxB,eAAA,EAAe,UAAA;;;;;;;;;cAYf,iBAAA,EAAiB,UAAA;;;;;;;;;cAYjB,gBAAA,EAAgB,UAAA;;;;;;;;;;;;;;cAiBhB,kBAAA,EAAkB,UAAA;;;;;;;;;;;;cAelB,YAAA,EAAY,UAAA;;;;;;;;;;;sFAzDvB;;;;;;;;;;cAkFW,cAAA,EAAc,UAAA;;;;;;EA7FU;;;;;;;;;;;;;;cAqHxB,aAAA,EAAa,UAAA;;;;;;AAzG1B;;;;;;;;;;;;;0FAA4B;;EAAA;;;;;;;;;;;;;;;;;;;;;;;;EAuB1B;;;;;;;cA6IW,cAAA,EAAc,UAAA;;;;;cAQd,aAAA,EAAa,UAAA;;;;cAOb,sBAAA,EAAsB,UAAA;;;;;;cAStB,sBAAA,EAAsB,UAAA;;;;;;;;cAWtB,qBAAA,EAAqB,UAAA"}
1
+ {"version":3,"file":"vault_events.d.mts","names":[],"sources":["../../../src/contracts/deepbook_predict/vault_events.ts"],"mappings":";;;;;;;cAaa,kBAAA,EAAkB,UAAA;;;;;;cASlB,oBAAA,EAAoB,UAAA;;;;;;;;cAWpB,wBAAA,EAAwB,UAAA;;;;;;;;;cAYxB,SAAA,EAAS,UAAA;;;;;;;;;;;;;;;;;;;;cAwBT,iBAAA,EAAiB,UAAA;;;;;;;;;;;;;cAiBjB,eAAA,EAAe,UAAA;;;;;;;;;cAYf,iBAAA,EAAiB,UAAA;;;;;;;;;cAYjB,gBAAA,EAAgB,UAAA;;;;;;;EA7EhB;;;;;;;cA8FA,kBAAA,EAAkB,UAAA;;;;;;;;;;;;cAelB,YAAA,EAAY,UAAA;;;;;;;;;;;;;;;;;;;;;cAyBZ,cAAA,EAAc,UAAA;;;;;;;;;;;;;;;;;;;;cAwBd,aAAA,EAAa,UAAA;;;;;;;;;;;;;;;;;;;;;EA1GxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqKW,cAAA,EAAc,UAAA;;;;;cAQd,aAAA,EAAa,UAAA;;;;cAOb,cAAA,EAAc,UAAA;;;;;cAQd,sBAAA,EAAsB,UAAA;;;;;;cAStB,sBAAA,EAAsB,UAAA;;;;;cAQtB,kCAAA,EAAkC,UAAA;;;;;cAQlC,sBAAA,EAAsB,UAAA;;;;;;;;cAWtB,qBAAA,EAAqB,UAAA"}
@@ -15,16 +15,21 @@ var vault_events_exports = /* @__PURE__ */ __exportAll({
15
15
  CapitalLocked: () => CapitalLocked,
16
16
  ExpiryCashRebalanced: () => ExpiryCashRebalanced,
17
17
  ExpiryCashReceived: () => ExpiryCashReceived,
18
+ ExpiryPnl: () => ExpiryPnl,
19
+ ExpiryPnlRealized: () => ExpiryPnlRealized,
18
20
  ExpiryProfitMaterialized: () => ExpiryProfitMaterialized,
21
+ FeeIncentiveLifetimeCapSnapshotted: () => FeeIncentiveLifetimeCapSnapshotted,
19
22
  FeeIncentivesAllocated: () => FeeIncentivesAllocated,
20
23
  FeeIncentivesReturned: () => FeeIncentivesReturned,
21
24
  FeeIncentivesSponsored: () => FeeIncentivesSponsored,
25
+ FeeIncentivesWithdrawn: () => FeeIncentivesWithdrawn,
22
26
  FlushExecuted: () => FlushExecuted,
23
27
  FlushRestarted: () => FlushRestarted,
24
28
  RequestCancelled: () => RequestCancelled,
25
29
  RequestLimitMissed: () => RequestLimitMissed,
26
30
  SupplyFilled: () => SupplyFilled,
27
31
  SupplyRequested: () => SupplyRequested,
32
+ UsdcAddedToPlp: () => UsdcAddedToPlp,
28
33
  WithdrawFilled: () => WithdrawFilled,
29
34
  WithdrawRequested: () => WithdrawRequested
30
35
  });
@@ -61,6 +66,33 @@ const ExpiryProfitMaterialized = new MoveStruct({
61
66
  pending_protocol_profit_after: U64
62
67
  }
63
68
  });
69
+ const ExpiryPnl = new MoveStruct({
70
+ name: `${$moduleName}::ExpiryPnl`,
71
+ fields: {
72
+ pool_vault_id: bcs.Address,
73
+ expiry_market_id: bcs.Address,
74
+ propbook_underlying_id: bcs.u32(),
75
+ period_start_ms: U64,
76
+ expiry: U64,
77
+ settlement_price: U64,
78
+ sent_to_expiry: U64,
79
+ received_from_expiry: U64,
80
+ in_profit: bcs.bool(),
81
+ amount: U64
82
+ }
83
+ });
84
+ const ExpiryPnlRealized = new MoveStruct({
85
+ name: `${$moduleName}::ExpiryPnlRealized`,
86
+ fields: {
87
+ pool_vault_id: bcs.Address,
88
+ expiry_market_id: bcs.Address,
89
+ propbook_underlying_id: bcs.u32(),
90
+ expiry: U64,
91
+ settlement_price: U64,
92
+ in_profit: bcs.bool(),
93
+ amount: U64
94
+ }
95
+ });
64
96
  const SupplyRequested = new MoveStruct({
65
97
  name: `${$moduleName}::SupplyRequested`,
66
98
  fields: {
@@ -179,6 +211,14 @@ const CapitalLocked = new MoveStruct({
179
211
  amount: U64
180
212
  }
181
213
  });
214
+ const UsdcAddedToPlp = new MoveStruct({
215
+ name: `${$moduleName}::UsdcAddedToPlp`,
216
+ fields: {
217
+ pool_vault_id: bcs.Address,
218
+ contributor: bcs.Address,
219
+ amount: U64
220
+ }
221
+ });
182
222
  const FeeIncentivesSponsored = new MoveStruct({
183
223
  name: `${$moduleName}::FeeIncentivesSponsored`,
184
224
  fields: {
@@ -188,6 +228,22 @@ const FeeIncentivesSponsored = new MoveStruct({
188
228
  reserve_after: U64
189
229
  }
190
230
  });
231
+ const FeeIncentivesWithdrawn = new MoveStruct({
232
+ name: `${$moduleName}::FeeIncentivesWithdrawn`,
233
+ fields: {
234
+ pool_vault_id: bcs.Address,
235
+ amount: U64,
236
+ reserve_after: U64
237
+ }
238
+ });
239
+ const FeeIncentiveLifetimeCapSnapshotted = new MoveStruct({
240
+ name: `${$moduleName}::FeeIncentiveLifetimeCapSnapshotted`,
241
+ fields: {
242
+ pool_vault_id: bcs.Address,
243
+ expiry_market_id: bcs.Address,
244
+ fee_incentive_lifetime_cap: U64
245
+ }
246
+ });
191
247
  const FeeIncentivesAllocated = new MoveStruct({
192
248
  name: `${$moduleName}::FeeIncentivesAllocated`,
193
249
  fields: {
@@ -210,5 +266,5 @@ const FeeIncentivesReturned = new MoveStruct({
210
266
  });
211
267
 
212
268
  //#endregion
213
- export { RequestCancelled, SupplyRequested, WithdrawRequested, vault_events_exports };
269
+ export { ExpiryPnlRealized, RequestCancelled, SupplyRequested, WithdrawRequested, vault_events_exports };
214
270
  //# sourceMappingURL=vault_events.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"vault_events.mjs","names":[],"sources":["../../../src/contracts/deepbook_predict/vault_events.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Pool-vault events for expiry cash and profit, fee incentives, and the queued LP\n * request lifecycle. A flush records the frozen pool mark used by fills.\n */\n\nimport { MoveStruct } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { U64 } from '../../bcs/integers.js';\nconst $moduleName = '@local-pkg/deepbook_predict::vault_events';\nexport const ExpiryCashReceived = new MoveStruct({\n\tname: `${$moduleName}::ExpiryCashReceived`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tsettlement_price: U64,\n\t\tamount: U64,\n\t},\n});\nexport const ExpiryCashRebalanced = new MoveStruct({\n\tname: `${$moduleName}::ExpiryCashRebalanced`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tamount: U64,\n\t\tto_expiry: bcs.bool(),\n\t\ttarget_cash: U64,\n\t\tprotocol_profit_realized: U64,\n\t},\n});\nexport const ExpiryProfitMaterialized = new MoveStruct({\n\tname: `${$moduleName}::ExpiryProfitMaterialized`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tlp_profit: U64,\n\t\tprotocol_profit: U64,\n\t\tprotocol_reserve_balance_after: U64,\n\t\tprofit_basis_after: U64,\n\t\tpending_protocol_profit_after: U64,\n\t},\n});\nexport const SupplyRequested = new MoveStruct({\n\tname: `${$moduleName}::SupplyRequested`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tamount: U64,\n\t\tmin_plp_out: U64,\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const WithdrawRequested = new MoveStruct({\n\tname: `${$moduleName}::WithdrawRequested`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tamount: U64,\n\t\tmin_usdc_out: U64,\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const RequestCancelled = new MoveStruct({\n\tname: `${$moduleName}::RequestCancelled`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tamount: U64,\n\t\tis_supply: bcs.bool(),\n\t\t/**\n\t\t * 0=user, 1=non-executable frozen mark, 2=quote below the request's minimum\n\t\t * output.\n\t\t */\n\t\treason: bcs.u8(),\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const RequestLimitMissed = new MoveStruct({\n\tname: `${$moduleName}::RequestLimitMissed`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tamount: U64,\n\t\tis_supply: bcs.bool(),\n\t\tquoted_output: U64,\n\t\tmin_output: U64,\n\t\tmissed_flushes: U64,\n\t\tmax_misses: U64,\n\t},\n});\nexport const SupplyFilled = new MoveStruct({\n\tname: `${$moduleName}::SupplyFilled`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\t/**\n\t\t * USDC actually taken into the pool, which is less than the request's escrow when\n\t\t * the supply cap left only part of it room. Shares were priced on\n\t\t * `usdc_amount - fee_usdc`.\n\t\t */\n\t\tusdc_amount: U64,\n\t\tshares_minted: U64,\n\t\t/** Supply fee withheld from `usdc_amount` and retained by the pool. */\n\t\tfee_usdc: U64,\n\t\t/**\n\t\t * Escrow still queued at the head after a partial fill; `0` on a full fill, in\n\t\t * which case the request is gone. `usdc_amount + usdc_remaining` is the amount the\n\t\t * request carried into this flush.\n\t\t */\n\t\tusdc_remaining: U64,\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const WithdrawFilled = new MoveStruct({\n\tname: `${$moduleName}::WithdrawFilled`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tshares_burned: U64,\n\t\t/**\n\t\t * Net USDC delivered to `recipient`. The gross marked value of `shares_burned` was\n\t\t * `usdc_amount + fee_usdc`.\n\t\t */\n\t\tusdc_amount: U64,\n\t\t/** Withdraw fee withheld from the payout and retained by the pool. */\n\t\tfee_usdc: U64,\n\t\t/**\n\t\t * Escrowed PLP still queued at the head after a partial fill; `0` on a full fill,\n\t\t * in which case the request is gone. `shares_burned + shares_remaining` is the\n\t\t * amount the request carried into this flush.\n\t\t */\n\t\tshares_remaining: U64,\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const FlushExecuted = new MoveStruct({\n\tname: `${$moduleName}::FlushExecuted`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\tepoch: U64,\n\t\t/**\n\t\t * LP-attributable pool NAV every fill was priced at: idle plus\n\t\t * `active_market_nav`, excluding unrealized and pending protocol profit.\n\t\t */\n\t\tpool_value: U64,\n\t\t/** PLP supply in the frozen pre-drain mark used to price every fill. */\n\t\ttotal_supply: U64,\n\t\t/**\n\t\t * Supply-leg fee rate in FLOAT_SCALING, frozen with the mark and charged on every\n\t\t * supply fill in this flush.\n\t\t */\n\t\tsupply_fee_rate: U64,\n\t\t/** Withdraw-leg fee rate in FLOAT_SCALING, frozen alongside it. */\n\t\twithdraw_fee_rate: U64,\n\t\t/**\n\t\t * Sum of the marked NAV contributed by each active market; settled markets add\n\t\t * zero.\n\t\t */\n\t\tactive_market_nav: U64,\n\t\t/** Number of active markets valued for this flush. */\n\t\tmarket_count: U64,\n\t\t/**\n\t\t * LIVE idle USDC read at finish time, immediately before the drain — NOT a mark\n\t\t * input. It brackets the drain with `idle_balance_after`; because maintenance,\n\t\t * settlement sweeps, and trading run mid-window, it can differ from\n\t\t * `frozen_idle_balance` below. Drain telemetry, not the mark.\n\t\t */\n\t\tidle_balance_before: U64,\n\t\t/**\n\t\t * The mark's idle component: idle USDC FROZEN at the seal. `frozen_idle_balance\n\t\t *\n\t\t * - active_market_nav`reconstructs the priced mark's gross; every fill in the flush is priced from this, never from`idle_balance_before`.\n\t\t */\n\t\tfrozen_idle_balance: U64,\n\t\tsupplies_filled: U64,\n\t\twithdrawals_filled: U64,\n\t\trequests_processed: U64,\n\t\tidle_balance_after: U64,\n\t\t/** PLP supply after the drain's completed mints and burns. */\n\t\ttotal_supply_after: U64,\n\t\t/**\n\t\t * Each queue's `next_index` at this flush's snapshot instant; the drain filled\n\t\t * only requests indexed strictly below these.\n\t\t */\n\t\tsupply_request_cutoff: U64,\n\t\twithdraw_request_cutoff: U64,\n\t\t/**\n\t\t * Clock instant the snapshot stage froze every market's pricer — the moment the\n\t\t * mark prices the pool at. Fills execute later in the same flush; this is the\n\t\t * timestamp they were priced as of.\n\t\t */\n\t\tsnapshot_timestamp_ms: U64,\n\t},\n});\nexport const FlushRestarted = new MoveStruct({\n\tname: `${$moduleName}::FlushRestarted`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpected_market_count: U64,\n\t\tvalued_market_count: U64,\n\t},\n});\nexport const CapitalLocked = new MoveStruct({\n\tname: `${$moduleName}::CapitalLocked`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\tamount: U64,\n\t},\n});\nexport const FeeIncentivesSponsored = new MoveStruct({\n\tname: `${$moduleName}::FeeIncentivesSponsored`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\tsponsor: bcs.Address,\n\t\tamount: U64,\n\t\treserve_after: U64,\n\t},\n});\nexport const FeeIncentivesAllocated = new MoveStruct({\n\tname: `${$moduleName}::FeeIncentivesAllocated`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tamount: U64,\n\t\tpool_reserve_after: U64,\n\t\texpiry_incentive_balance_after: U64,\n\t\texpiry_incentives_allocated_after: U64,\n\t},\n});\nexport const FeeIncentivesReturned = new MoveStruct({\n\tname: `${$moduleName}::FeeIncentivesReturned`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tamount: U64,\n\t\tpool_reserve_after: U64,\n\t},\n});\n"],"mappings":"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"}
1
+ {"version":3,"file":"vault_events.mjs","names":[],"sources":["../../../src/contracts/deepbook_predict/vault_events.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Pool-vault events for expiry cash and profit, fee incentives, and the queued LP\n * request lifecycle. A flush records the frozen pool mark used by fills.\n */\n\nimport { MoveStruct } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { U64 } from '../../bcs/integers.js';\nconst $moduleName = '@local-pkg/deepbook_predict::vault_events';\nexport const ExpiryCashReceived = new MoveStruct({\n\tname: `${$moduleName}::ExpiryCashReceived`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tsettlement_price: U64,\n\t\tamount: U64,\n\t},\n});\nexport const ExpiryCashRebalanced = new MoveStruct({\n\tname: `${$moduleName}::ExpiryCashRebalanced`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tamount: U64,\n\t\tto_expiry: bcs.bool(),\n\t\ttarget_cash: U64,\n\t\tprotocol_profit_realized: U64,\n\t},\n});\nexport const ExpiryProfitMaterialized = new MoveStruct({\n\tname: `${$moduleName}::ExpiryProfitMaterialized`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tlp_profit: U64,\n\t\tprotocol_profit: U64,\n\t\tprotocol_reserve_balance_after: U64,\n\t\tprofit_basis_after: U64,\n\t\tpending_protocol_profit_after: U64,\n\t},\n});\nexport const ExpiryPnl = new MoveStruct({\n\tname: `${$moduleName}::ExpiryPnl`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tpropbook_underlying_id: bcs.u32(),\n\t\t/**\n\t\t * Start of the market's cadence period (`expiry` minus the cadence period), in\n\t\t * milliseconds. The market's creation transaction may land before it.\n\t\t */\n\t\tperiod_start_ms: U64,\n\t\texpiry: U64,\n\t\tsettlement_price: U64,\n\t\tsent_to_expiry: U64,\n\t\treceived_from_expiry: U64,\n\t\t/**\n\t\t * True when `received_from_expiry >= sent_to_expiry`; break-even reports a zero\n\t\t * profit.\n\t\t */\n\t\tin_profit: bcs.bool(),\n\t\t/** Absolute difference between `received_from_expiry` and `sent_to_expiry`. */\n\t\tamount: U64,\n\t},\n});\nexport const ExpiryPnlRealized = new MoveStruct({\n\tname: `${$moduleName}::ExpiryPnlRealized`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tpropbook_underlying_id: bcs.u32(),\n\t\texpiry: U64,\n\t\tsettlement_price: U64,\n\t\t/** False only for a loss, which only an expiry's first emission can report. */\n\t\tin_profit: bcs.bool(),\n\t\t/**\n\t\t * Magnitude of the change in the gross realized result since the previous\n\t\t * emission.\n\t\t */\n\t\tamount: U64,\n\t},\n});\nexport const SupplyRequested = new MoveStruct({\n\tname: `${$moduleName}::SupplyRequested`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tamount: U64,\n\t\tmin_plp_out: U64,\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const WithdrawRequested = new MoveStruct({\n\tname: `${$moduleName}::WithdrawRequested`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tamount: U64,\n\t\tmin_usdc_out: U64,\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const RequestCancelled = new MoveStruct({\n\tname: `${$moduleName}::RequestCancelled`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tamount: U64,\n\t\tis_supply: bcs.bool(),\n\t\t/**\n\t\t * 0=user, 1=non-executable frozen mark, 2=quote below the request's minimum\n\t\t * output.\n\t\t */\n\t\treason: bcs.u8(),\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const RequestLimitMissed = new MoveStruct({\n\tname: `${$moduleName}::RequestLimitMissed`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tamount: U64,\n\t\tis_supply: bcs.bool(),\n\t\tquoted_output: U64,\n\t\tmin_output: U64,\n\t\tmissed_flushes: U64,\n\t\tmax_misses: U64,\n\t},\n});\nexport const SupplyFilled = new MoveStruct({\n\tname: `${$moduleName}::SupplyFilled`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\t/**\n\t\t * USDC actually taken into the pool, which is less than the request's escrow when\n\t\t * the supply cap left only part of it room. Shares were priced on\n\t\t * `usdc_amount - fee_usdc`.\n\t\t */\n\t\tusdc_amount: U64,\n\t\tshares_minted: U64,\n\t\t/** Supply fee withheld from `usdc_amount` and retained by the pool. */\n\t\tfee_usdc: U64,\n\t\t/**\n\t\t * Escrow still queued at the head after a partial fill; `0` on a full fill, in\n\t\t * which case the request is gone. `usdc_amount + usdc_remaining` is the amount the\n\t\t * request carried into this flush.\n\t\t */\n\t\tusdc_remaining: U64,\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const WithdrawFilled = new MoveStruct({\n\tname: `${$moduleName}::WithdrawFilled`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tindex: U64,\n\t\tshares_burned: U64,\n\t\t/**\n\t\t * Net USDC delivered to `recipient`. The gross marked value of `shares_burned` was\n\t\t * `usdc_amount + fee_usdc`.\n\t\t */\n\t\tusdc_amount: U64,\n\t\t/** Withdraw fee withheld from the payout and retained by the pool. */\n\t\tfee_usdc: U64,\n\t\t/**\n\t\t * Escrowed PLP still queued at the head after a partial fill; `0` on a full fill,\n\t\t * in which case the request is gone. `shares_burned + shares_remaining` is the\n\t\t * amount the request carried into this flush.\n\t\t */\n\t\tshares_remaining: U64,\n\t\trequests_pending_after: U64,\n\t},\n});\nexport const FlushExecuted = new MoveStruct({\n\tname: `${$moduleName}::FlushExecuted`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\tepoch: U64,\n\t\t/**\n\t\t * LP-attributable pool NAV every fill was priced at: idle plus\n\t\t * `active_market_nav`, excluding unrealized and pending protocol profit.\n\t\t */\n\t\tpool_value: U64,\n\t\t/** PLP supply in the frozen pre-drain mark used to price every fill. */\n\t\ttotal_supply: U64,\n\t\t/**\n\t\t * Supply-leg fee rate in FLOAT_SCALING, frozen with the mark and charged on every\n\t\t * supply fill in this flush.\n\t\t */\n\t\tsupply_fee_rate: U64,\n\t\t/** Withdraw-leg fee rate in FLOAT_SCALING, frozen alongside it. */\n\t\twithdraw_fee_rate: U64,\n\t\t/**\n\t\t * Sum of the marked NAV contributed by each active market; settled markets add\n\t\t * zero.\n\t\t */\n\t\tactive_market_nav: U64,\n\t\t/** Number of active markets valued for this flush. */\n\t\tmarket_count: U64,\n\t\t/**\n\t\t * LIVE idle USDC read at finish time, immediately before the drain — NOT a mark\n\t\t * input. It brackets the drain with `idle_balance_after`; because maintenance,\n\t\t * settlement sweeps, and trading run mid-window, it can differ from\n\t\t * `frozen_idle_balance` below. Drain telemetry, not the mark.\n\t\t */\n\t\tidle_balance_before: U64,\n\t\t/**\n\t\t * The mark's idle component: idle USDC FROZEN at the seal. `frozen_idle_balance\n\t\t *\n\t\t * - active_market_nav`reconstructs the priced mark's gross; every fill in the flush is priced from this, never from`idle_balance_before`.\n\t\t */\n\t\tfrozen_idle_balance: U64,\n\t\tsupplies_filled: U64,\n\t\twithdrawals_filled: U64,\n\t\trequests_processed: U64,\n\t\tidle_balance_after: U64,\n\t\t/** PLP supply after the drain's completed mints and burns. */\n\t\ttotal_supply_after: U64,\n\t\t/**\n\t\t * Each queue's `next_index` at this flush's snapshot instant; the drain filled\n\t\t * only requests indexed strictly below these.\n\t\t */\n\t\tsupply_request_cutoff: U64,\n\t\twithdraw_request_cutoff: U64,\n\t\t/**\n\t\t * Clock instant the snapshot stage froze every market's pricer — the moment the\n\t\t * mark prices the pool at. Fills execute later in the same flush; this is the\n\t\t * timestamp they were priced as of.\n\t\t */\n\t\tsnapshot_timestamp_ms: U64,\n\t},\n});\nexport const FlushRestarted = new MoveStruct({\n\tname: `${$moduleName}::FlushRestarted`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpected_market_count: U64,\n\t\tvalued_market_count: U64,\n\t},\n});\nexport const CapitalLocked = new MoveStruct({\n\tname: `${$moduleName}::CapitalLocked`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\tamount: U64,\n\t},\n});\nexport const UsdcAddedToPlp = new MoveStruct({\n\tname: `${$moduleName}::UsdcAddedToPlp`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\tcontributor: bcs.Address,\n\t\tamount: U64,\n\t},\n});\nexport const FeeIncentivesSponsored = new MoveStruct({\n\tname: `${$moduleName}::FeeIncentivesSponsored`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\tsponsor: bcs.Address,\n\t\tamount: U64,\n\t\treserve_after: U64,\n\t},\n});\nexport const FeeIncentivesWithdrawn = new MoveStruct({\n\tname: `${$moduleName}::FeeIncentivesWithdrawn`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\tamount: U64,\n\t\treserve_after: U64,\n\t},\n});\nexport const FeeIncentiveLifetimeCapSnapshotted = new MoveStruct({\n\tname: `${$moduleName}::FeeIncentiveLifetimeCapSnapshotted`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tfee_incentive_lifetime_cap: U64,\n\t},\n});\nexport const FeeIncentivesAllocated = new MoveStruct({\n\tname: `${$moduleName}::FeeIncentivesAllocated`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tamount: U64,\n\t\tpool_reserve_after: U64,\n\t\texpiry_incentive_balance_after: U64,\n\t\texpiry_incentives_allocated_after: U64,\n\t},\n});\nexport const FeeIncentivesReturned = new MoveStruct({\n\tname: `${$moduleName}::FeeIncentivesReturned`,\n\tfields: {\n\t\tpool_vault_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tamount: U64,\n\t\tpool_reserve_after: U64,\n\t},\n});\n"],"mappings":"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"}