{"version":3,"file":"queue.mjs","names":["order_queue.OrderBook"],"sources":["../../../src/contracts/deepbook_predict_orders/queue.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * One expiry market's delayed-execution queue, `MarketQueue`, and its flows:\n * placement of queued mints and early sells, commit of verified Pyth Lazer prices,\n * resolve at the committed tick, the deadline and admin refunds, the settlement\n * drain and payout walk, cleanup, and the queue reads.\n *\n * Every money-moving step runs inside one of Predict's order-flow primitives,\n * which check their own gates and bindings when they run: admission (`admit_mint`,\n * `admit_sell`), `commit`, `try_fill`, `release`, and `try_pay_settled`. The queue\n * owns what Predict leaves to the companion: τ and the deadline, the stuck gate,\n * capacities and per-account caps, cohort order, the exact-or-backup tick choice,\n * escrow custody, refund routing, and the queue events. Each record holds\n * Predict's receipt for its order and that order's own escrow, so a refund pays\n * exactly that record's escrow.\n *\n * A queued fill never enters the account: it stays an Open record until\n * `enqueue_redeem_open` sells it or the settlement payout walk or `pay_open` pays\n * it.\n *\n * Mainnet USDC is a regulated coin: Sui aborts a transaction that sends it to an\n * address on its deny list for the current epoch, or to anyone while it is\n * globally paused. Every walker restarts at the same head record, so one such send\n * would block the market's fills, refunds, and payouts for good. So nothing here,\n * and nothing in Predict's primitives, sends to a denied address. Predict refuses\n * a fill for a denied receive address (reason 9), keeps a denied builder's or\n * referrer's fee in market cash, and skips a denied winner's payout. The queue\n * parks change and refunds it cannot send in the record, which finishes as usual\n * with the funds kept (`RecordFundsParked`). `claim_parked` sends them, and\n * `pay_open` pays a skipped Open record, once the address is clear. While USDC is\n * globally paused every address counts as denied: fills refuse, refunds park, and\n * payouts skip until the pause lifts.\n */\n\nimport {\n\tMoveStruct,\n\tnormalizeMoveArguments,\n\ttype RawTransactionArgument,\n\ttype ConfigValue,\n} from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';\nimport * as order_queue from './order_queue.js';\nconst $moduleName = '@local-pkg/deepbook_predict_orders::queue';\nexport const MarketQueue = new MoveStruct({\n\tname: `${$moduleName}::MarketQueue`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\tdesk_id: bcs.Address,\n\t\texpiry_market_id: bcs.Address,\n\t\tbook: order_queue.OrderBook,\n\t\t/** Set by the `settle_step` call that emits `MarketPayoutsCompleted`. */\n\t\tpayouts_completed: bcs.bool(),\n\t},\n});\nexport interface PhaseDrainOptions {\n\tpackage?: string;\n\targuments?: [];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\nexport function phaseDrain(options: PhaseDrainOptions = {}) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'phase_drain',\n\t\t});\n}\nexport interface PhasePayOptions {\n\tpackage?: string;\n\targuments?: [];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\nexport function phasePay(options: PhasePayOptions = {}) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'phase_pay',\n\t\t});\n}\nexport interface PhaseDoneOptions {\n\tpackage?: string;\n\targuments?: [];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\nexport function phaseDone(options: PhaseDoneOptions = {}) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'phase_done',\n\t\t});\n}\nexport interface QueueIdArguments {\n\tregistryId: RawTransactionArgument<string>;\n\texpiryMarketId: RawTransactionArgument<string>;\n}\nexport interface QueueIdOptions {\n\tpackage?: string;\n\targuments:\n\t\t| QueueIdArguments\n\t\t| [registryId: RawTransactionArgument<string>, expiryMarketId: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Return the ID of `expiry_market_id`'s queue under the queue registry\n * `registry_id`, whether or not it exists yet. For PTB construction.\n */\nexport function queueId(options: QueueIdOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = ['0x2::object::ID', '0x2::object::ID'] satisfies (string | null)[];\n\tconst parameterNames = ['registryId', 'expiryMarketId'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'queue_id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface IdArguments {\n\tqueue: RawTransactionArgument<string>;\n}\nexport interface IdOptions {\n\tpackage?: string;\n\targuments: IdArguments | [queue: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\nexport function id(options: IdOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['queue'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface DeskIdArguments {\n\tqueue: RawTransactionArgument<string>;\n}\nexport interface DeskIdOptions {\n\tpackage?: string;\n\targuments: DeskIdArguments | [queue: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\nexport function deskId(options: DeskIdOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['queue'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'desk_id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface ExpiryMarketIdArguments {\n\tqueue: RawTransactionArgument<string>;\n}\nexport interface ExpiryMarketIdOptions {\n\tpackage?: string;\n\targuments: ExpiryMarketIdArguments | [queue: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\nexport function expiryMarketId(options: ExpiryMarketIdOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['queue'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'expiry_market_id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface OrderArguments {\n\tqueue: RawTransactionArgument<string>;\n\trecordId: RawTransactionArgument<number | bigint>;\n}\nexport interface OrderOptions {\n\tpackage?: string;\n\targuments:\n\t\t| OrderArguments\n\t\t| [queue: RawTransactionArgument<string>, recordId: RawTransactionArgument<number | bigint>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/** Return one record, or `none` for a missing or deleted record ID. */\nexport function order(options: OrderOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null, 'u64'] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'recordId'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'order',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface QueueHeadsArguments {\n\tqueue: RawTransactionArgument<string>;\n}\nexport interface QueueHeadsOptions {\n\tpackage?: string;\n\targuments: QueueHeadsArguments | [queue: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Return `(resolve_head, next_id, last_tau_ms, last_committed_tau_ms)`.\n * `resolve_head` is a lower bound on the first unfinished record.\n */\nexport function queueHeads(options: QueueHeadsOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['queue'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'queue_heads',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface PayoutProgressArguments {\n\tqueue: RawTransactionArgument<string>;\n}\nexport interface PayoutProgressOptions {\n\tpackage?: string;\n\targuments: PayoutProgressArguments | [queue: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Return `(payout_cursor, next_id, payouts_completed)`. The settlement payout walk\n * is finished once `payouts_completed` is set.\n */\nexport function payoutProgress(options: PayoutProgressOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['queue'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'payout_progress',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface WaitingCohortsArguments {\n\tqueue: RawTransactionArgument<string>;\n}\nexport interface WaitingCohortsOptions {\n\tpackage?: string;\n\targuments: WaitingCohortsArguments | [queue: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Return\n * `(cohort count, oldest uncommitted τ, oldest uncommitted τ above  last_committed_tau_ms)`.\n * The third value is the cohort the stuck gate's first rule watches.\n */\nexport function waitingCohorts(options: WaitingCohortsOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['queue'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'waiting_cohorts',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface QueueStuckArguments {\n\tqueue: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n}\nexport interface QueueStuckOptions {\n\tpackage?: string;\n\targuments: QueueStuckArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Whether placement would refuse a new order as stuck right now (both rules of the\n * stuck gate). Drives the app's \"pricing delayed\" banner.\n */\nexport function queueStuck(options: QueueStuckOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null, null, '0x2::clock::Clock'] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'desk'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'queue_stuck',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface PendingCountsArguments {\n\tqueue: RawTransactionArgument<string>;\n}\nexport interface PendingCountsOptions {\n\tpackage?: string;\n\targuments: PendingCountsArguments | [queue: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Return `(pending_mints, pending_sells)`, the unfinished orders counted against\n * the policy capacities.\n */\nexport function pendingCounts(options: PendingCountsOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['queue'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'pending_counts',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface WaitingOrdersArguments {\n\tqueue: RawTransactionArgument<string>;\n\taccountId: RawTransactionArgument<string>;\n}\nexport interface WaitingOrdersOptions {\n\tpackage?: string;\n\targuments:\n\t\t| WaitingOrdersArguments\n\t\t| [queue: RawTransactionArgument<string>, accountId: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Return the unfinished queued orders `account_id` holds in this queue, the count\n * the per-account cap checks. The settlement drain (`settle_step`) refunds without\n * lowering it, since no placement reads it once the market has expired, so after\n * expiry it can overstate what the account still has waiting. Read `order` for\n * each record's status instead.\n */\nexport function waitingOrders(options: WaitingOrdersOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null, '0x2::object::ID'] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'accountId'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'waiting_orders',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface OldestUnfinishedTauMsArguments {\n\tqueue: RawTransactionArgument<string>;\n}\nexport interface OldestUnfinishedTauMsOptions {\n\tpackage?: string;\n\targuments: OldestUnfinishedTauMsArguments | [queue: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/** Return τ of the oldest cohort with an unfinished order, for monitoring. */\nexport function oldestUnfinishedTauMs(options: OldestUnfinishedTauMsOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['queue'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'oldest_unfinished_tau_ms',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface BuilderFeePerContractArguments {\n\tqueue: RawTransactionArgument<string>;\n\trecordId: RawTransactionArgument<number | bigint>;\n}\nexport interface BuilderFeePerContractOptions {\n\tpackage?: string;\n\targuments:\n\t\t| BuilderFeePerContractArguments\n\t\t| [queue: RawTransactionArgument<string>, recordId: RawTransactionArgument<number | bigint>];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Return the builder fee per contract `record_id`'s order pays at its fill, in\n * FLOAT_SCALING of the $1 payout: the capped fee its receipt records, or `0` for a\n * missing record, a record holding no receipt or an open one, and an order that\n * names no builder. For SDK and devInspect reads of a waiting order.\n */\nexport function builderFeePerContract(options: BuilderFeePerContractOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null, 'u64'] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'recordId'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'builder_fee_per_contract',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface QuoteRedeemOpenArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\tWrapper: RawTransactionArgument<string>;\n\tpricer: TransactionArgument;\n\trecordId: RawTransactionArgument<number | bigint>;\n\tcloseQuantity: RawTransactionArgument<number | bigint>;\n}\nexport interface QuoteRedeemOpenOptions {\n\tpackage?: string;\n\targuments:\n\t\t| QuoteRedeemOpenArguments\n\t\t| [\n\t\t\t\tqueue: RawTransactionArgument<string>,\n\t\t\t\tmarket: RawTransactionArgument<string>,\n\t\t\t\tWrapper: RawTransactionArgument<string>,\n\t\t\t\tpricer: TransactionArgument,\n\t\t\t\trecordId: RawTransactionArgument<number | bigint>,\n\t\t\t\tcloseQuantity: RawTransactionArgument<number | bigint>,\n\t\t  ];\n\tconfig?: {\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Quote an early sell of `close_quantity` from the Open record `record_id` at a\n * live `Pricer` through Predict's `quote_close`: the close a queued sell fills,\n * with the trading fee at the clock instead of a committed tick. No builder fee,\n * matching `enqueue_redeem_open`; `quote_redeem_open_with_builder_fee` quotes a\n * sell that names a builder. `proceeds` is before the order fee. Changes nothing.\n * Aborts `ERecordNotOpen` for a missing or non-Open record, and otherwise as\n * `quote_close` does. Does not check that the account owns the record. For SDK and\n * devInspect pricing before `enqueue_redeem_open`.\n */\nexport function quoteRedeemOpen(options: QuoteRedeemOpenOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null, null, null, null, 'u64', 'u64', '0x2::clock::Clock'] satisfies (\n\t\tstring | null\n\t)[];\n\tconst parameterNames = ['queue', 'market', 'Wrapper', 'pricer', 'recordId', 'closeQuantity'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'quote_redeem_open',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface QuoteRedeemOpenWithBuilderFeeArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tpricer: TransactionArgument;\n\trecordId: RawTransactionArgument<number | bigint>;\n\tcloseQuantity: RawTransactionArgument<number | bigint>;\n\tbuilderFeePerContract: RawTransactionArgument<number | bigint>;\n}\nexport interface QuoteRedeemOpenWithBuilderFeeOptions {\n\tpackage?: string;\n\targuments: QuoteRedeemOpenWithBuilderFeeArguments;\n\tconfig?: {\n\t\tprotocolConfig: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * `quote_redeem_open` for a sell that names a builder, through Predict's\n * `quote_close_with_builder_fee`: charges `builder_fee_per_contract`, in\n * FLOAT_SCALING of the $1 payout, capped at `protocol_config::builder_fee_cap` and\n * then at the redeem value left after the trading fee, as the fill charges it.\n * Changes nothing and aborts like `quote_redeem_open`. For SDK and devInspect\n * pricing before `enqueue_redeem_open_with_builder`.\n */\nexport function quoteRedeemOpenWithBuilderFee(options: QuoteRedeemOpenWithBuilderFeeOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = [\n\t\t'queue',\n\t\t'market',\n\t\t'config',\n\t\t'pricer',\n\t\t'recordId',\n\t\t'closeQuantity',\n\t\t'builderFeePerContract',\n\t];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'quote_redeem_open_with_builder_fee',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface CreateAndShareArguments {\n\tregistry?: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n}\nexport interface CreateAndShareOptions {\n\tpackage?: string;\n\targuments: CreateAndShareArguments;\n\tconfig?: {\n\t\tqueueRegistry: ConfigValue;\n\t\torderDesk: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Create and share `market`'s queue under `desk`. Permissionless; the caller pays\n * its storage. The queue's ID is derived from the desk's registry and the market,\n * so a second call for the same market aborts. Writes only the registry, which no\n * trading call reads, so creation never contends with trading on the desk. Aborts\n * `EWrongDesk` for another desk's registry.\n */\nexport function createAndShare(options: CreateAndShareOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null, null, null] satisfies (string | null)[];\n\tconst parameterNames = ['registry', 'desk', 'market'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'create_and_share',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tregistry: options.arguments?.registry ?? options.config?.queueRegistry,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface EnqueueExactQuantityArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tpropbookRegistry?: RawTransactionArgument<string>;\n\tpyth: RawTransactionArgument<string>;\n\tbsValues: RawTransactionArgument<string>;\n\tbsSvi: RawTransactionArgument<string>;\n\tlowerTick: RawTransactionArgument<number | bigint>;\n\thigherTick: RawTransactionArgument<number | bigint>;\n\tquantity: RawTransactionArgument<number | bigint>;\n\tmaxCost: RawTransactionArgument<number | bigint>;\n\tmaxProbability: RawTransactionArgument<number | bigint>;\n}\nexport interface EnqueueExactQuantityOptions {\n\tpackage?: string;\n\targuments: EnqueueExactQuantityArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\toracleRegistry: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Place a queued mint for an exact quantity, priced later at Pyth's signed price\n * for its τ. `max_cost` caps the all-in withdrawal and is mandatory;\n * `max_probability` caps the entry probability at τ. Escrows the budget,\n * `min(max_cost, quantity, available - order_fee)`, and the order fee, and returns\n * the new record ID.\n *\n * Aborts, charging nothing, when the queue refuses the order: the desk floor,\n * another desk's or market's queue (`EWrongDesk`, `EWrongMarket`), a stuck or full\n * queue (`EQueueStuck`, `EQueueFull`, `EAccountOrderCap`), τ at or past the cutoff\n * (`EPastCutoff`), an unlimited or zero `max_cost` (`EMintCostCapRequired`), or a\n * balance not above the order fee (`EFeeNotCovered`). Then Predict's `admit_mint`\n * applies its gates, the order's own limits at the clock, and the market's spare\n * cash.\n */\nexport function enqueueExactQuantity(options: EnqueueExactQuantityOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = [\n\t\t'queue',\n\t\t'market',\n\t\t'wrapper',\n\t\t'auth',\n\t\t'desk',\n\t\t'config',\n\t\t'propbookRegistry',\n\t\t'pyth',\n\t\t'bsValues',\n\t\t'bsSvi',\n\t\t'lowerTick',\n\t\t'higherTick',\n\t\t'quantity',\n\t\t'maxCost',\n\t\t'maxProbability',\n\t];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'enqueue_exact_quantity',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t\tpropbookRegistry: options.arguments?.propbookRegistry ?? options.config?.oracleRegistry,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface EnqueueExactQuantityWithBuilderArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tpropbookRegistry?: RawTransactionArgument<string>;\n\tpyth: RawTransactionArgument<string>;\n\tbsValues: RawTransactionArgument<string>;\n\tbsSvi: RawTransactionArgument<string>;\n\tcode: RawTransactionArgument<string>;\n\tbuilderFeePerContract: RawTransactionArgument<number | bigint>;\n\tlowerTick: RawTransactionArgument<number | bigint>;\n\thigherTick: RawTransactionArgument<number | bigint>;\n\tquantity: RawTransactionArgument<number | bigint>;\n\tmaxCost: RawTransactionArgument<number | bigint>;\n\tmaxProbability: RawTransactionArgument<number | bigint>;\n}\nexport interface EnqueueExactQuantityWithBuilderOptions {\n\tpackage?: string;\n\targuments: EnqueueExactQuantityWithBuilderArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\toracleRegistry: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * `enqueue_exact_quantity` for an order that names a builder: `code` is the\n * builder code the trade pays and `builder_fee_per_contract` its fee per contract,\n * in FLOAT_SCALING of the $1 payout. Predict caps the fee at\n * `protocol_config::builder_fee_cap`, records it in the order's receipt, and\n * prices the order's limits with it, and the fill pays `quantity * fee`, rounded\n * down, to the code. Refuses orders like `enqueue_exact_quantity`. Returns the new\n * record ID.\n */\nexport function enqueueExactQuantityWithBuilder(options: EnqueueExactQuantityWithBuilderOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = [\n\t\t'queue',\n\t\t'market',\n\t\t'wrapper',\n\t\t'auth',\n\t\t'desk',\n\t\t'config',\n\t\t'propbookRegistry',\n\t\t'pyth',\n\t\t'bsValues',\n\t\t'bsSvi',\n\t\t'code',\n\t\t'builderFeePerContract',\n\t\t'lowerTick',\n\t\t'higherTick',\n\t\t'quantity',\n\t\t'maxCost',\n\t\t'maxProbability',\n\t];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'enqueue_exact_quantity_with_builder',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t\tpropbookRegistry: options.arguments?.propbookRegistry ?? options.config?.oracleRegistry,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface EnqueueExactAmountArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tpropbookRegistry?: RawTransactionArgument<string>;\n\tpyth: RawTransactionArgument<string>;\n\tbsValues: RawTransactionArgument<string>;\n\tbsSvi: RawTransactionArgument<string>;\n\tlowerTick: RawTransactionArgument<number | bigint>;\n\thigherTick: RawTransactionArgument<number | bigint>;\n\tmaxPremium: RawTransactionArgument<number | bigint>;\n\tminQuantity: RawTransactionArgument<number | bigint>;\n\tmaxCost: RawTransactionArgument<number | bigint>;\n}\nexport interface EnqueueExactAmountOptions {\n\tpackage?: string;\n\targuments: EnqueueExactAmountArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\toracleRegistry: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Place a queued premium-budget mint: sized at τ under `max_premium`, at least\n * `min_quantity`, with the all-in withdrawal capped by the mandatory `max_cost`.\n * Escrows `min(max_cost, available - order_fee)` and the order fee. Refuses orders\n * like `enqueue_exact_quantity`. Returns the new record ID.\n */\nexport function enqueueExactAmount(options: EnqueueExactAmountOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = [\n\t\t'queue',\n\t\t'market',\n\t\t'wrapper',\n\t\t'auth',\n\t\t'desk',\n\t\t'config',\n\t\t'propbookRegistry',\n\t\t'pyth',\n\t\t'bsValues',\n\t\t'bsSvi',\n\t\t'lowerTick',\n\t\t'higherTick',\n\t\t'maxPremium',\n\t\t'minQuantity',\n\t\t'maxCost',\n\t];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'enqueue_exact_amount',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t\tpropbookRegistry: options.arguments?.propbookRegistry ?? options.config?.oracleRegistry,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface EnqueueExactAmountWithBuilderArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tpropbookRegistry?: RawTransactionArgument<string>;\n\tpyth: RawTransactionArgument<string>;\n\tbsValues: RawTransactionArgument<string>;\n\tbsSvi: RawTransactionArgument<string>;\n\tcode: RawTransactionArgument<string>;\n\tbuilderFeePerContract: RawTransactionArgument<number | bigint>;\n\tlowerTick: RawTransactionArgument<number | bigint>;\n\thigherTick: RawTransactionArgument<number | bigint>;\n\tmaxPremium: RawTransactionArgument<number | bigint>;\n\tminQuantity: RawTransactionArgument<number | bigint>;\n\tmaxCost: RawTransactionArgument<number | bigint>;\n}\nexport interface EnqueueExactAmountWithBuilderOptions {\n\tpackage?: string;\n\targuments: EnqueueExactAmountWithBuilderArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\toracleRegistry: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * `enqueue_exact_amount` for an order that names a builder, charging the capped\n * `builder_fee_per_contract` to `code` like `enqueue_exact_quantity_with_builder`.\n * The fee is inside the `max_cost` withdrawal cap. Returns the new record ID.\n */\nexport function enqueueExactAmountWithBuilder(options: EnqueueExactAmountWithBuilderOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = [\n\t\t'queue',\n\t\t'market',\n\t\t'wrapper',\n\t\t'auth',\n\t\t'desk',\n\t\t'config',\n\t\t'propbookRegistry',\n\t\t'pyth',\n\t\t'bsValues',\n\t\t'bsSvi',\n\t\t'code',\n\t\t'builderFeePerContract',\n\t\t'lowerTick',\n\t\t'higherTick',\n\t\t'maxPremium',\n\t\t'minQuantity',\n\t\t'maxCost',\n\t];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'enqueue_exact_amount_with_builder',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t\tpropbookRegistry: options.arguments?.propbookRegistry ?? options.config?.oracleRegistry,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface EnqueueExactCostArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tpropbookRegistry?: RawTransactionArgument<string>;\n\tpyth: RawTransactionArgument<string>;\n\tbsValues: RawTransactionArgument<string>;\n\tbsSvi: RawTransactionArgument<string>;\n\tlowerTick: RawTransactionArgument<number | bigint>;\n\thigherTick: RawTransactionArgument<number | bigint>;\n\tmaxCost: RawTransactionArgument<number | bigint>;\n\tminQuantity: RawTransactionArgument<number | bigint>;\n}\nexport interface EnqueueExactCostOptions {\n\tpackage?: string;\n\targuments: EnqueueExactCostArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\toracleRegistry: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Place a queued all-in-budget mint: sized at τ so the all-in cost fits\n * `max_cost`, at least `min_quantity`. Escrows\n * `min(max_cost, available -  order_fee)` and the order fee. `max_cost` is\n * mandatory here too: the unlimited value is refused. Refuses orders like\n * `enqueue_exact_quantity`. Returns the new record ID.\n */\nexport function enqueueExactCost(options: EnqueueExactCostOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = [\n\t\t'queue',\n\t\t'market',\n\t\t'wrapper',\n\t\t'auth',\n\t\t'desk',\n\t\t'config',\n\t\t'propbookRegistry',\n\t\t'pyth',\n\t\t'bsValues',\n\t\t'bsSvi',\n\t\t'lowerTick',\n\t\t'higherTick',\n\t\t'maxCost',\n\t\t'minQuantity',\n\t];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'enqueue_exact_cost',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t\tpropbookRegistry: options.arguments?.propbookRegistry ?? options.config?.oracleRegistry,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface EnqueueExactCostWithBuilderArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tpropbookRegistry?: RawTransactionArgument<string>;\n\tpyth: RawTransactionArgument<string>;\n\tbsValues: RawTransactionArgument<string>;\n\tbsSvi: RawTransactionArgument<string>;\n\tcode: RawTransactionArgument<string>;\n\tbuilderFeePerContract: RawTransactionArgument<number | bigint>;\n\tlowerTick: RawTransactionArgument<number | bigint>;\n\thigherTick: RawTransactionArgument<number | bigint>;\n\tmaxCost: RawTransactionArgument<number | bigint>;\n\tminQuantity: RawTransactionArgument<number | bigint>;\n}\nexport interface EnqueueExactCostWithBuilderOptions {\n\tpackage?: string;\n\targuments: EnqueueExactCostWithBuilderArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\toracleRegistry: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * `enqueue_exact_cost` for an order that names a builder, charging the capped\n * `builder_fee_per_contract` to `code` like `enqueue_exact_quantity_with_builder`.\n * The fill sizes the order so the fee fits inside `max_cost`. Returns the new\n * record ID.\n */\nexport function enqueueExactCostWithBuilder(options: EnqueueExactCostWithBuilderOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = [\n\t\t'queue',\n\t\t'market',\n\t\t'wrapper',\n\t\t'auth',\n\t\t'desk',\n\t\t'config',\n\t\t'propbookRegistry',\n\t\t'pyth',\n\t\t'bsValues',\n\t\t'bsSvi',\n\t\t'code',\n\t\t'builderFeePerContract',\n\t\t'lowerTick',\n\t\t'higherTick',\n\t\t'maxCost',\n\t\t'minQuantity',\n\t];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'enqueue_exact_cost_with_builder',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t\tpropbookRegistry: options.arguments?.propbookRegistry ?? options.config?.oracleRegistry,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface EnqueueRedeemOpenArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tpropbookRegistry?: RawTransactionArgument<string>;\n\tpyth: RawTransactionArgument<string>;\n\tbsValues: RawTransactionArgument<string>;\n\tbsSvi: RawTransactionArgument<string>;\n\trecordId: RawTransactionArgument<number | bigint>;\n\tcloseQuantity: RawTransactionArgument<number | bigint>;\n\tminProbability: RawTransactionArgument<number | bigint>;\n\tminProceeds: RawTransactionArgument<number | bigint>;\n}\nexport interface EnqueueRedeemOpenOptions {\n\tpackage?: string;\n\targuments: EnqueueRedeemOpenArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\toracleRegistry: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Place a queued early sell of `close_quantity` of an Open record's position.\n * `record_id` is the record's queue ID, not the position's order ID. The source\n * record must belong to this account (`ENotRecordOwner`) and be Open\n * (`ERecordNotOpen`, also for a missing ID). It is marked Closed and its receipt\n * and whole position move into the new record until the sell fills or refunds.\n * `min_probability` and `min_proceeds` are the close-side floors at τ. Returns the\n * new record ID.\n *\n * Escrows only the order fee, so a balance equal to it is enough. Refuses a sell\n * below `min_sell_quantity` or one leaving a remainder below it (`EBelowMinSell`),\n * and otherwise like `enqueue_exact_quantity`. Predict's `admit_sell` is open\n * during the trading pause and a market mint pause and has no spare-cash check:\n * the keeper funds the market before τ, and resolve refunds a sell the market\n * still cannot cover.\n */\nexport function enqueueRedeemOpen(options: EnqueueRedeemOpenOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = [\n\t\t'queue',\n\t\t'market',\n\t\t'wrapper',\n\t\t'auth',\n\t\t'desk',\n\t\t'config',\n\t\t'propbookRegistry',\n\t\t'pyth',\n\t\t'bsValues',\n\t\t'bsSvi',\n\t\t'recordId',\n\t\t'closeQuantity',\n\t\t'minProbability',\n\t\t'minProceeds',\n\t];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'enqueue_redeem_open',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t\tpropbookRegistry: options.arguments?.propbookRegistry ?? options.config?.oracleRegistry,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface EnqueueRedeemOpenWithBuilderArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\twrapper: RawTransactionArgument<string>;\n\tauth: TransactionArgument;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tpropbookRegistry?: RawTransactionArgument<string>;\n\tpyth: RawTransactionArgument<string>;\n\tbsValues: RawTransactionArgument<string>;\n\tbsSvi: RawTransactionArgument<string>;\n\tcode: RawTransactionArgument<string>;\n\tbuilderFeePerContract: RawTransactionArgument<number | bigint>;\n\trecordId: RawTransactionArgument<number | bigint>;\n\tcloseQuantity: RawTransactionArgument<number | bigint>;\n\tminProbability: RawTransactionArgument<number | bigint>;\n\tminProceeds: RawTransactionArgument<number | bigint>;\n}\nexport interface EnqueueRedeemOpenWithBuilderOptions {\n\tpackage?: string;\n\targuments: EnqueueRedeemOpenWithBuilderArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\toracleRegistry: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * `enqueue_redeem_open` for a sell that names a builder: `code` is the builder\n * code the sell pays and `builder_fee_per_contract` its fee per contract, in\n * FLOAT_SCALING of the $1 payout. Predict caps the fee at\n * `protocol_config::builder_fee_cap`, records it in the order's receipt, and\n * checks `min_proceeds` with it, and the fill pays `close_quantity * fee`, rounded\n * down, to the code, capped at the redeem value left after the trading fee.\n * Refuses sells like `enqueue_redeem_open`. Returns the new record ID.\n */\nexport function enqueueRedeemOpenWithBuilder(options: EnqueueRedeemOpenWithBuilderOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'u64',\n\t\t'0x2::accumulator::AccumulatorRoot',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = [\n\t\t'queue',\n\t\t'market',\n\t\t'wrapper',\n\t\t'auth',\n\t\t'desk',\n\t\t'config',\n\t\t'propbookRegistry',\n\t\t'pyth',\n\t\t'bsValues',\n\t\t'bsSvi',\n\t\t'code',\n\t\t'builderFeePerContract',\n\t\t'recordId',\n\t\t'closeQuantity',\n\t\t'minProbability',\n\t\t'minProceeds',\n\t];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'enqueue_redeem_open_with_builder',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t\tpropbookRegistry: options.arguments?.propbookRegistry ?? options.config?.oracleRegistry,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface CommitArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tupdates: TransactionArgument;\n}\nexport interface CommitOptions {\n\tpackage?: string;\n\targuments: CommitArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Attach verified Pyth Lazer prices to the waiting cohorts whose τ they match.\n * Permissionless. Each update must come from the Pyth Lazer verifier earlier in\n * the same PTB; their order in `updates` does not matter. An update that matches\n * no waiting cohort is skipped.\n *\n * Matching reads only the inline cohort list and picks at most one update per\n * waiting cohort before its deadline: the one stamped exactly its τ on its\n * channel, or else, once the price buffer is above zero and now is at least\n * `gap_wait_ms` past τ, the one stamped one tick of the cohort's own channel\n * later. Each matched cohort then commits whole or not at all: one price per feed\n * is decoded through `lazer_price::from_update`, every Pending order is checked\n * against it before any is written, and an empty price, a price generated before\n * τ, or an envelope after now leaves the cohort for a later commit or its deadline\n * refund. The decode aborts on an update that lacks an order's feed or one of its\n * properties, because the caller passed the wrong update. Each committed mint\n * escrows the subsidy Predict reserves for it.\n *\n * Uses Lazer's v1 `Update`, which Pyth marked deprecated on Mainnet but still\n * serves; v2 arrives with a later library constructor.\n */\nexport function commit(options: CommitOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null, null, null, null, 'vector<null>', '0x2::clock::Clock'] satisfies (\n\t\tstring | null\n\t)[];\n\tconst parameterNames = ['queue', 'market', 'desk', 'config', 'updates'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'commit',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface ResolveArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tmaxOrders: RawTransactionArgument<number | bigint>;\n}\nexport interface ResolveOptions {\n\tpackage?: string;\n\targuments: ResolveArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Fill or refund committed orders in τ order, visiting at most `max_orders`\n * records, and never more than 450 (each emits up to two events, and Sui caps a\n * transaction at 1,024). Permissionless. Returns how many orders it finished.\n *\n * Walks the cohorts in τ order and loads only committed or overdue ones; a cohort\n * still waiting for its price is skipped without loading a record. Every record\n * visited counts against `max_orders`, finished or missing ones included. The 450\n * cap bounds events, not loaded objects (`MAX_ORDERS_PER_CALL`), so the caller\n * sizes `max_orders` to stay inside Sui's per-transaction object limit. An order\n * at or past its deadline is refunded (reason 5), never filled. A committed order\n * goes to Predict's `try_fill`, which fills it or returns the refund reason (1, 2,\n * 4, 8, or 9); the queue returns the escrow Predict hands back to the trader, or\n * parks it in the record when the receive address is denied. Returns 0 on a\n * settled market, whose waiting orders the settlement drain refunds.\n */\nexport function resolve(options: ResolveOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'0x2::deny_list::DenyList',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'market', 'desk', 'config', 'maxOrders'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'resolve',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface RefundArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\tmaxOrders: RawTransactionArgument<number | bigint>;\n}\nexport interface RefundOptions {\n\tpackage?: string;\n\targuments: RefundArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Refund waiting orders at or past their deadline (reason 5), visiting at most\n * `max_orders` records, refunded or not, and never more than 450, as `resolve`\n * does. It walks the cohorts in τ order and stops at the first one not yet due,\n * since deadlines never decrease along the queue. Permissionless, and available\n * while Predict is frozen or this companion's witness is disabled: Predict's\n * `release` checks only its version floor. A refund the receive address cannot\n * take is parked in its record. Returns how many orders it refunded: `0`, without\n * aborting, when none is due.\n */\nexport function refund(options: RefundOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'0x2::deny_list::DenyList',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'market', 'desk', 'config', 'maxOrders'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'refund',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface AdminRefundArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\tAdminCap: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\trecordIds: RawTransactionArgument<Array<number | bigint>>;\n}\nexport interface AdminRefundOptions {\n\tpackage?: string;\n\targuments: AdminRefundArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Refund the listed waiting orders at once (reason 7), wherever they sit in the\n * queue. Predict's `AdminCap` only, and available while Predict is frozen. Missing\n * and finished IDs are skipped, and a refund the receive address cannot take is\n * parked in its record.\n */\nexport function adminRefund(options: AdminRefundOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'vector<u64>',\n\t\t'0x2::deny_list::DenyList',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'market', 'AdminCap', 'desk', 'config', 'recordIds'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'admin_refund',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface CleanupArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n\trecordIds: RawTransactionArgument<Array<number | bigint>>;\n}\nexport interface CleanupOptions {\n\tpackage?: string;\n\targuments: CleanupArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Delete Refunded and Closed records of a settled market. Permissionless; the\n * storage rebate goes to the caller. Missing IDs, other statuses, and records\n * still holding a receipt or funds (parked funds included, until `claim_parked`)\n * are skipped; `QueuedOrdersCleaned` is emitted only when a record was deleted.\n * Takes `&Clock` only to stamp the event.\n */\nexport function cleanup(options: CleanupOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [null, null, null, 'vector<u64>', '0x2::clock::Clock'] satisfies (\n\t\tstring | null\n\t)[];\n\tconst parameterNames = ['queue', 'market', 'desk', 'recordIds'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'cleanup',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface SettleStepArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n}\nexport interface SettleStepOptions {\n\tpackage?: string;\n\targuments: SettleStepArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Run one bounded settlement phase on this queue and return the phase the queue is\n * in afterwards, which the next call runs (`phase_drain`, `phase_pay`, or\n * `phase_done`). Permissionless; aborts `EMarketNotExpired` before expiry.\n *\n * - DRAIN, while unfinished orders remain: refund them in τ order with reason 5,\n *   visiting at most the policy's `settle_refund_batch` records, refunded or not.\n *   No pruning and no account rows, so each refund loads its record alone. A\n *   refund the receive address cannot take is parked in its record. Runs before\n *   and after Predict settles, and while Predict is frozen.\n * - PAY, once nothing is unfinished and Predict has settled the market: from the\n *   payout cursor, visit at most `settle_payout_batch` records. Each Open record\n *   is paid its settled payout through `try_pay_settled` (zero for a loser),\n *   marked Closed, and reported with `OpenRecordSettled`. A record the market\n *   cannot pay, or whose receive address is denied, stays Open with\n *   `OpenRecordPayoutSkipped`, and `pay_open` pays it later. Before Predict\n *   settles, a PAY call changes nothing.\n * - DONE: the call whose walk reaches the last record emits\n *   `MarketPayoutsCompleted`; later calls change nothing. Skipped records are\n *   still paid through `pay_open`.\n *\n * The keeper sends one call per transaction until it returns `phase_done()`.\n */\nexport function settleStep(options: SettleStepOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'0x2::deny_list::DenyList',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'market', 'desk', 'config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'settle_step',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface PayOpenArguments {\n\tqueue: RawTransactionArgument<string>;\n\tmarket: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n\tconfig?: RawTransactionArgument<string>;\n\trecordId: RawTransactionArgument<number | bigint>;\n}\nexport interface PayOpenOptions {\n\tpackage?: string;\n\targuments: PayOpenArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tprotocolConfig: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Pay one Open record of a settled market its settled payout through Predict's\n * `try_pay_settled`, at any time after settlement, before or after `settle_step`\n * completes: the record the payout walk skipped because the market was short of\n * cash or its receive address was denied. Permissionless. Emits\n * `OpenRecordSettled` and closes the record, or emits `OpenRecordPayoutSkipped`\n * and leaves it Open if the cause persists. A missing or non-Open record is left\n * alone. Aborts `EMarketNotSettled` before Predict settles the market.\n */\nexport function payOpen(options: PayOpenOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'0x2::deny_list::DenyList',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'market', 'desk', 'config', 'recordId'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'pay_open',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t\tconfig: options.arguments?.config ?? options.config?.protocolConfig,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t\t});\n}\nexport interface ClaimParkedArguments {\n\tqueue: RawTransactionArgument<string>;\n\tdesk?: RawTransactionArgument<string>;\n\trecordId: RawTransactionArgument<number | bigint>;\n}\nexport interface ClaimParkedOptions {\n\tpackage?: string;\n\targuments: ClaimParkedArguments;\n\tconfig?: {\n\t\torderDesk: ConfigValue;\n\t\tpredictOrdersPackageId?: string;\n\t};\n}\n/**\n * Send a finished record's parked funds, change or a refund its receive address\n * could not take, to that address once a send would go through (`denied` is\n * false). Permissionless: the funds go only to the record's own receive address.\n * Emits `RecordFundsClaimed` and returns the amount sent, or returns `0` and\n * changes nothing for a missing or unfinished record, one with nothing parked, or\n * an address still denied.\n */\nexport function claimParked(options: ClaimParkedOptions) {\n\tconst packageAddress =\n\t\toptions.package ??\n\t\toptions.config?.predictOrdersPackageId ??\n\t\t'@local-pkg/deepbook_predict_orders';\n\tconst argumentsTypes = [\n\t\tnull,\n\t\tnull,\n\t\t'u64',\n\t\t'0x2::deny_list::DenyList',\n\t\t'0x2::clock::Clock',\n\t] satisfies (string | null)[];\n\tconst parameterNames = ['queue', 'desk', 'recordId'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'queue',\n\t\t\tfunction: 'claim_parked',\n\t\t\targuments: normalizeMoveArguments(\n\t\t\t\t{\n\t\t\t\t\t...options.arguments,\n\t\t\t\t\tdesk: options.arguments?.desk ?? options.config?.orderDesk,\n\t\t\t\t},\n\t\t\t\targumentsTypes,\n\t\t\t\tparameterNames,\n\t\t\t),\n\t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