{"version":3,"file":"lp_book.mjs","names":["table.Table","balance.Balance","coin.TreasuryCap"],"sources":["../../../src/contracts/deepbook_predict/lp_book.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * LP request book and share issuance for the pool vault.\n *\n * `LpBook` owns the PLP treasury cap plus the async supply/withdraw queues. `plp`\n * owns the shared `PoolVault`, valuation, and pool cash accounting; it delegates\n * request/cancel and frozen-mark queue drains here.\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';\nimport * as balance from './deps/sui/balance.js';\nimport * as coin from './deps/sui/coin.js';\nconst $moduleName = '@local-pkg/deepbook_predict::lp_book';\nexport const RequestQueue = new MoveStruct({\n\tname: `${$moduleName}::RequestQueue<phantom T>`,\n\tfields: {\n\t\tpages: table.Table,\n\t\thead_page_id: bcs.option(U64),\n\t\ttail_page_id: bcs.option(U64),\n\t\tnext_index: U64,\n\t\tpending: U64,\n\t\tescrow: balance.Balance,\n\t},\n});\nexport const LpBook = new MoveStruct({\n\tname: `${$moduleName}::LpBook<phantom LP>`,\n\tfields: {\n\t\ttreasury_cap: coin.TreasuryCap,\n\t\tsupply_queue: RequestQueue,\n\t\twithdraw_queue: RequestQueue,\n\t\t/**\n\t\t * Permanent minimum-liquidity shares minted once at genesis (`plp::lock_capital`).\n\t\t * Held here with no withdraw path, so `total_supply` stays > 0 for the life of the\n\t\t * pool and the supply==0 bootstrap branch is unreachable. Withdrawal-rounding dust\n\t\t * accrues to this position.\n\t\t */\n\t\tlocked_lp: balance.Balance,\n\t},\n});\nexport const RequestEntry = new MoveStruct({\n\tname: `${$moduleName}::RequestEntry`,\n\tfields: {\n\t\tindex: U64,\n\t\t/**\n\t\t * Owning account, carried so a fill can attribute to the account directly rather\n\t\t * than only the derived `recipient` address (address is not invertible).\n\t\t */\n\t\taccount_id: bcs.Address,\n\t\trecipient: bcs.Address,\n\t\tamount: U64,\n\t\tmin_output: U64,\n\t\t/**\n\t\t * Frozen marks this request has already missed. Only ever non-zero when the\n\t\t * protocol allows more than one attempt (`ProtocolConfig`), since at one attempt a\n\t\t * miss refunds immediately.\n\t\t */\n\t\tmissed_flushes: U64,\n\t},\n});\nexport const RequestPage = new MoveStruct({\n\tname: `${$moduleName}::RequestPage`,\n\tfields: {\n\t\tprev: bcs.option(U64),\n\t\tnext: bcs.option(U64),\n\t\tentries: bcs.vector(RequestEntry),\n\t},\n});\nexport const FlushMark = new MoveStruct({\n\tname: `${$moduleName}::FlushMark`,\n\tfields: {\n\t\tpool_value: U64,\n\t\ttotal_supply: U64,\n\t\texecutable: bcs.bool(),\n\t},\n});\nexport const FeeRates = new MoveStruct({\n\tname: `${$moduleName}::FeeRates`,\n\tfields: {\n\t\t/** Supply-leg rate. Ships at zero: a deposit dilutes the pool's risk per dollar. */\n\t\tsupply: U64,\n\t\t/** Withdraw-leg rate, frozen with it so one flush charges one pair. */\n\t\twithdraw: U64,\n\t},\n});\nexport const FillQuote = new MoveStruct({\n\tname: `${$moduleName}::FillQuote`,\n\tfields: {\n\t\toutput: U64,\n\t\tfee: U64,\n\t},\n});\nexport const DrainSummary = new MoveStruct({\n\tname: `${$moduleName}::DrainSummary`,\n\tfields: {\n\t\tsupplies_filled: U64,\n\t\twithdrawals_filled: U64,\n\t\trequests_processed: U64,\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,cAAc;AACpB,MAAa,eAAe,IAAI,WAAW;CAC1C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,OAAOA;EACP,cAAc,IAAI,OAAO,IAAI;EAC7B,cAAc,IAAI,OAAO,IAAI;EAC7B,YAAY;EACZ,SAAS;EACT,QAAQC;EACR;CACD,CAAC;AACF,MAAa,SAAS,IAAI,WAAW;CACpC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,cAAcC;EAC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