import { ConfigValue, MoveStruct, MoveTuple, RawTransactionArgument } from "../utils/index.mjs"; import { BcsType } from "@mysten/sui/bcs"; import * as _mysten_sui_transactions490 from "@mysten/sui/transactions"; import { Transaction, TransactionArgument } from "@mysten/sui/transactions"; //#region src/contracts/deepbook_predict/expiry_market.d.ts declare const ValuationStamp: MoveStruct<{ flush_seq: BcsType; /** `cash.balance()` at the snapshot instant. */ snapshot_cash: BcsType; /** `cash.inventory_impact_reserve()` at the snapshot instant. */ snapshot_impact_reserve: BcsType; }, "@local-pkg/deepbook_predict::expiry_market::ValuationStamp">; declare const ExpiryMarket: MoveStruct<{ id: BcsType, "bytes[32]">; /** Propbook underlying this market was created for. */ propbook_underlying_id: BcsType; expiry: BcsType; /** USDC custody and payout backing. */ cash: MoveStruct<{ cash_balance: MoveStruct<{ value: BcsType; }, "0x2::balance::Balance">; inventory_impact_reserve: BcsType; }, "@local-pkg/deepbook_predict::expiry_cash::ExpiryCash">; /** Sponsor-funded USDC available to subsidize this market's taker fees. */ fee_incentive_balance: MoveStruct<{ value: BcsType; }, "0x2::balance::Balance">; /** Exposure lifecycle state for this expiry's strike ticks. */ strike_exposure: MoveStruct<{ expiry_market_id: BcsType, "bytes[32]">; tick_size: BcsType; admission_tick_size: BcsType; reference_tick_source_timestamp_ms: BcsType; reference_tick: BcsType">; config: MoveStruct<{ backing_buffer_lambda: BcsType; base_fee: BcsType; min_fee: BcsType; min_entry_probability: BcsType; max_entry_probability: BcsType; expiry_fee_window_ms: BcsType; expiry_fee_max_multiplier: BcsType; inventory_impact_max_rate: BcsType; }, "@local-pkg/deepbook_predict::strike_exposure_config::StrikeExposureConfig">; inventory_impact_scale: BcsType; next_order_sequence: BcsType; settlement_price: BcsType">; settled_payout_liability: BcsType; payout: MoveStruct<{ root: BcsType">; nodes: MoveStruct<{ id: BcsType, "bytes[32]">; size: BcsType; }, "0x2::table::Table">; node_count: BcsType; base: BcsType; snapshot_seq: BcsType; snapshot_active: BcsType; snapshot_base: BcsType; }, "@local-pkg/deepbook_predict::strike_payout_tree::StrikePayoutTree">; }, "@local-pkg/deepbook_predict::strike_exposure::StrikeExposure">; /** Smoothed gas-price stats backing the congestion trade penalty. */ ewma: MoveStruct<{ mean: BcsType; variance: BcsType; last_updated_timestamp_ms: BcsType; }, "@local-pkg/deepbook_predict::ewma::EwmaState">; /** * When true, new mints on this expiry abort. Other flows stay available. Admin * sets/unsets it (version-gated); a `PauseCap` holder can force it true one-way * through the registry (ungated kill switch). */ mint_paused: BcsType; /** * `Some` from the flush's snapshot stage until this market's `value_expiry` (or * lazily discarded once the stamp goes stale — see `ValuationStamp`). Trading is * never gated on it and never touches it: the cash rows are captured eagerly here * at the snapshot instant, and the payout tree captures its own boundary shadows * as trades first touch each node. */ valuation_stamp: BcsType<{ flush_seq: bigint; snapshot_cash: bigint; snapshot_impact_reserve: bigint; } | null, { flush_seq: string | number | bigint; snapshot_cash: string | number | bigint; snapshot_impact_reserve: string | number | bigint; } | null | undefined, "Option<@local-pkg/deepbook_predict::expiry_market::ValuationStamp>">; }, "@local-pkg/deepbook_predict::expiry_market::ExpiryMarket">; declare const MintQuote: MoveStruct<{ quantity: BcsType; entry_probability: BcsType; premium: BcsType; trading_fee: BcsType; fee_incentive_subsidy: BcsType; builder_fee: BcsType; penalty_fee: BcsType; inventory_impact_charge: BcsType; all_in_cost: BcsType; }, "@local-pkg/deepbook_predict::expiry_market::MintQuote">; declare const RedeemQuote: MoveStruct<{ close_quantity: BcsType; probability: BcsType; proceeds: BcsType; trading_fee: BcsType; builder_fee: BcsType; inventory_impact_rebate: BcsType; }, "@local-pkg/deepbook_predict::expiry_market::RedeemQuote">; declare const OrderParties: MoveStruct<{ account_id: BcsType, "bytes[32]">; owner: BcsType, "bytes[32]">; /** Sell proceeds and the settled payout go only here. */ receive_address: BcsType, "bytes[32]">; referrer_account_id: BcsType | null | undefined, "Option">; referrer_receive_address: BcsType | null | undefined, "Option">; builder_code_id: BcsType | null | undefined, "Option">; }, "@local-pkg/deepbook_predict::expiry_market::OrderParties">; declare const OrderReceipt: MoveStruct<{ expiry_market_id: BcsType, "bytes[32]">; stage: BcsType; /** A `constants` mint kind, or `order_kind_sell` once a sell is admitted. */ kind: BcsType; /** The account's snapshot at the last admission. */ parties: MoveStruct<{ account_id: BcsType, "bytes[32]">; owner: BcsType, "bytes[32]">; /** Sell proceeds and the settled payout go only here. */ receive_address: BcsType, "bytes[32]">; referrer_account_id: BcsType | null | undefined, "Option">; referrer_receive_address: BcsType | null | undefined, "Option">; builder_code_id: BcsType | null | undefined, "Option">; }, "@local-pkg/deepbook_predict::expiry_market::OrderParties">; lower_tick: BcsType; higher_tick: BcsType; /** The exact mint quantity, or the sell's close quantity. */ quantity: BcsType; /** * A mint's premium cap. A sell never uses it, so a sell admitted with a builder * keeps its capped builder fee per contract here. */ max_premium: BcsType; min_quantity: BcsType; max_probability: BcsType; min_probability: BcsType; /** * A sell's proceeds floor. A mint never uses it, so a mint admitted with a builder * keeps its capped builder fee per contract here. */ min_proceeds: BcsType; /** Earliest Pyth generation time the order may price at. */ tau_ms: BcsType; /** At or past it the order is refunded, never filled. */ deadline_ms: BcsType; /** The Lazer channel τ was planned on; the committed price must come from it. */ channel: BcsType; vol: MoveStruct<{ pyth_source_id: BcsType; bs_spot: BcsType; bs_forward: BcsType; svi_a: MoveStruct<{ magnitude: BcsType; is_negative: BcsType; }, "fixed_math::i64::I64">; svi_b: BcsType; svi_rho: MoveStruct<{ magnitude: BcsType; is_negative: BcsType; }, "fixed_math::i64::I64">; svi_m: MoveStruct<{ magnitude: BcsType; is_negative: BcsType; }, "fixed_math::i64::I64">; svi_sigma: BcsType; bs_spot_source_timestamp_ms: BcsType; bs_forward_source_timestamp_ms: BcsType; svi_source_timestamp_ms: BcsType; }, "@local-pkg/deepbook_predict::pricing::VolSnapshot">; budget: BcsType; order_fee: BcsType; /** * Worst-case market cash the fill can consume. Counted in the ledger's * `waiting_cash_need` while the order is admitted. */ cash_need: BcsType; /** * The t₀ quote's pre-subsidy trading fee, capped at `budget`. Bounds the subsidy * `commit` reserves. */ subsidy_bound: BcsType; subsidy_rate: BcsType; subsidy_reserved: BcsType; /** The committed Pyth price, 1e9-normalized; `0` until `commit`. */ spot: BcsType; /** The committed update's envelope, in ms. The fill prices at it. */ tick_ms: BcsType; /** The committed feed's own update time, in µs. */ generation_us: BcsType; /** The open position's order ID; `0` until the mint fills. */ order_id: BcsType; /** Stable economic-position handle, constant across partial closes. */ root_id: BcsType; opened_at_ms: BcsType; /** * The open position's size, the quantity `order_id` names. The request's * `quantity` is the mint or close quantity, so a sell admission never overwrites * the size it closes. */ held_quantity: BcsType; }, "@local-pkg/deepbook_predict::expiry_market::OrderReceipt">; declare const OrderFlowLedgerKey: MoveTuple], "@local-pkg/deepbook_predict::expiry_market::OrderFlowLedgerKey">; declare const OrderFlowLedger: MoveStruct<{ /** * Admitted mints per payout-tree tick (tick -> count). A pinned node is never * pruned, so a fill never creates one. */ pins: MoveStruct<{ contents: BcsType<{ key: bigint; value: bigint; }[], Iterable<{ key: string | number | bigint; value: string | number | bigint; }> & { length: number; }, string>; }, "0x2::vec_map::VecMap">; /** * Sum of the admitted orders' cash needs. `rebalance_expiry_cash` funds a live * market to at least required cash plus this. */ waiting_cash_need: BcsType; }, "@local-pkg/deepbook_predict::expiry_market::OrderFlowLedger">; interface IdArguments { market: RawTransactionArgument; } interface IdOptions { package?: string; arguments: IdArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the market object ID for external discovery and PTB construction. */ declare function id(options: IdOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface PropbookUnderlyingIdArguments { market: RawTransactionArgument; } interface PropbookUnderlyingIdOptions { package?: string; arguments: PropbookUnderlyingIdArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the Propbook underlying for SDK and devInspect market reads. */ declare function propbookUnderlyingId(options: PropbookUnderlyingIdOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface ExpiryArguments { market: RawTransactionArgument; } interface ExpiryOptions { package?: string; arguments: ExpiryArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the expiry timestamp for SDK and devInspect market reads. */ declare function expiry(options: ExpiryOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface SettlementPriceArguments { market: RawTransactionArgument; } interface SettlementPriceOptions { package?: string; arguments: SettlementPriceArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the recorded settlement price. Aborts if the market is not settled. */ declare function settlementPrice(options: SettlementPriceOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface IsSettledArguments { market: RawTransactionArgument; } interface IsSettledOptions { package?: string; arguments: IsSettledArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return whether terminal settlement has been recorded for this market. Public * read for SDK/devInspect settlement-state checks. */ declare function isSettled(options: IsSettledOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface TrySettlementPriceArguments { market: RawTransactionArgument; } interface TrySettlementPriceOptions { package?: string; arguments: TrySettlementPriceArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return the recorded settlement price, or `none` while the market is live. * Non-aborting companion to `settlement_price` for SDK/devInspect reads. */ declare function trySettlementPrice(options: TrySettlementPriceOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface CashBalanceArguments { market: RawTransactionArgument; } interface CashBalanceOptions { package?: string; arguments: CashBalanceArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return expiry USDC custody for SDK and devInspect state reads. */ declare function cashBalance(options: CashBalanceOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface InventoryImpactReserveArguments { market: RawTransactionArgument; } interface InventoryImpactReserveOptions { package?: string; arguments: InventoryImpactReserveArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the isolated inventory-impact escrow for SDK and devInspect state reads. */ declare function inventoryImpactReserve(options: InventoryImpactReserveOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface FeeIncentiveBalanceArguments { market: RawTransactionArgument; } interface FeeIncentiveBalanceOptions { package?: string; arguments: FeeIncentiveBalanceArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return local fee incentives for SDK and devInspect state reads. */ declare function feeIncentiveBalance(options: FeeIncentiveBalanceOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface BackingBufferLambdaArguments { market: RawTransactionArgument; } interface BackingBufferLambdaOptions { package?: string; arguments: BackingBufferLambdaArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the snapshotted backing-buffer lambda for SDK and devInspect reads. */ declare function backingBufferLambda(options: BackingBufferLambdaOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface ExpiryFeeWindowMsArguments { market: RawTransactionArgument; } interface ExpiryFeeWindowMsOptions { package?: string; arguments: ExpiryFeeWindowMsArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the snapshotted fee-ramp window for SDK and devInspect reads. */ declare function expiryFeeWindowMs(options: ExpiryFeeWindowMsOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface ExpiryFeeMaxMultiplierArguments { market: RawTransactionArgument; } interface ExpiryFeeMaxMultiplierOptions { package?: string; arguments: ExpiryFeeMaxMultiplierArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the snapshotted fee-ramp multiplier for SDK and devInspect reads. */ declare function expiryFeeMaxMultiplier(options: ExpiryFeeMaxMultiplierOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface InventoryImpactMaxRateArguments { market: RawTransactionArgument; } interface InventoryImpactMaxRateOptions { package?: string; arguments: InventoryImpactMaxRateArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return this market's immutable maximum marginal inventory-impact rate for SDK * and devInspect state reads. */ declare function inventoryImpactMaxRate(options: InventoryImpactMaxRateOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface InventoryImpactScaleArguments { market: RawTransactionArgument; } interface InventoryImpactScaleOptions { package?: string; arguments: InventoryImpactScaleArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return the immutable USDC scale of this market's inventory-impact curve for SDK * and devInspect state reads. */ declare function inventoryImpactScale(options: InventoryImpactScaleOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface TickSizeArguments { market: RawTransactionArgument; } interface TickSizeOptions { package?: string; arguments: TickSizeArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return the strike tick size for SDK and devInspect range construction. Raw * strikes are `tick * tick_size`. */ declare function tickSize(options: TickSizeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface AdmissionTickSizeArguments { market: RawTransactionArgument; } interface AdmissionTickSizeOptions { package?: string; arguments: AdmissionTickSizeArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the admission-grid step for SDK and devInspect range construction. */ declare function admissionTickSize(options: AdmissionTickSizeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface ReferenceTickArguments { market: RawTransactionArgument; } interface ReferenceTickOptions { package?: string; arguments: ReferenceTickArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the admitted reference tick for SDK and devInspect range construction. */ declare function referenceTick(options: ReferenceTickOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface ReferenceTickSourceTimestampMsArguments { market: RawTransactionArgument; } interface ReferenceTickSourceTimestampMsOptions { package?: string; arguments: ReferenceTickSourceTimestampMsArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the reference observation timestamp for SDK and devInspect reads. */ declare function referenceTickSourceTimestampMs(options: ReferenceTickSourceTimestampMsOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface PayoutLiabilityArguments { market: RawTransactionArgument; } interface PayoutLiabilityOptions { package?: string; arguments: PayoutLiabilityArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return payout reserve or settled liability for external accounting * observability. */ declare function payoutLiability(options: PayoutLiabilityOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface RequiredCashArguments { market: RawTransactionArgument; } interface RequiredCashOptions { package?: string; arguments: RequiredCashArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return required expiry cash for external accounting observability. */ declare function requiredCash(options: RequiredCashOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface LoadLivePricerArguments { market: RawTransactionArgument; config?: RawTransactionArgument; propbookRegistry?: RawTransactionArgument; pyth: RawTransactionArgument; bsValues: RawTransactionArgument; bsSvi: RawTransactionArgument; } interface LoadLivePricerOptions { package?: string; arguments: LoadLivePricerArguments; config?: { protocolConfig: ConfigValue; oracleRegistry: ConfigValue; predictPackageId?: string; }; } /** * Load a PTB-local live pricing snapshot for this market. * * The returned `Pricer` is bound to `market.id()` and can be passed into live * mint, redeem, and NAV functions in the same transaction. * * Aborts `pricing::EOracleWrittenInThisTransaction` when any observation that * feeds the returned forward or SVI was written in this transaction (RP-24). * Independently submitted refresh-then-trade PTBs are unaffected: the guard * compares observation `writer_digest` to `tx_context::digest()`, not sender * identity, and does not prohibit reads of older observations. */ declare function loadLivePricer(options: LoadLivePricerOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface IsPendingValuationArguments { market: RawTransactionArgument; config?: RawTransactionArgument; } interface IsPendingValuationOptions { package?: string; arguments: IsPendingValuationArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * Return whether this market is snapshotted into the in-flight flush and still * awaiting its `value_expiry`. For SDK, keeper, and devInspect reads. It gates * nothing: settlement and trading both run regardless — the frozen mark is * settlement-invariant, so a stamped market settles the instant it expires. Do not * defer a settlement attempt on this read. */ declare function isPendingValuation(options: IsPendingValuationOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface CurrentNavArguments { market: RawTransactionArgument; pricer: TransactionArgument; } interface CurrentNavOptions { package?: string; arguments: CurrentNavArguments | [market: RawTransactionArgument, pricer: TransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return live marked NAV as free expiry cash minus the exposure book's marked * liability, floored at zero. This read requires a market-bound pre-expiry * `Pricer`; an expired but unsettled market cannot be valued through this path. * Public for PTB composition and devInspect pool valuation. */ declare function currentNav(options: CurrentNavOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface LiveOrderValueArguments { market: RawTransactionArgument; pricer: TransactionArgument; orderId: RawTransactionArgument; } interface LiveOrderValueOptions { package?: string; arguments: LiveOrderValueArguments | [market: RawTransactionArgument, pricer: TransactionArgument, orderId: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return one live order's full-close range value before fees. Requires a * market-bound `Pricer` and does not prove account ownership of `order_id`. Public * for SDK, PTB, and devInspect position valuation. */ declare function liveOrderValue(options: LiveOrderValueOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface SettledOrderPayoutArguments { market: RawTransactionArgument; orderId: RawTransactionArgument; } interface SettledOrderPayoutOptions { package?: string; arguments: SettledOrderPayoutArguments | [market: RawTransactionArgument, orderId: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return one settled order's terminal payout. This function does not prove account * ownership of `order_id`. Public for SDK, PTB, and devInspect position valuation. */ declare function settledOrderPayout(options: SettledOrderPayoutOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface MintPausedArguments { market: RawTransactionArgument; } interface MintPausedOptions { package?: string; arguments: MintPausedArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the market mint-pause state for SDK and devInspect reads. */ declare function mintPaused(options: MintPausedOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface QuoteMintArguments { market: RawTransactionArgument; config?: RawTransactionArgument; pricer: TransactionArgument; lowerTick: RawTransactionArgument; higherTick: RawTransactionArgument; maxPremium: RawTransactionArgument; minQuantity: RawTransactionArgument; exactQuantity: RawTransactionArgument; } interface QuoteMintOptions { package?: string; arguments: QuoteMintArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * Quote a prospective mint at a market-bound `Pricer`, priced like a queued fill * at the clock, for SDK and devInspect previews. `exact_quantity` quotes * `min_quantity` exactly; otherwise the largest quantity whose premium fits * `max_premium`, at least `min_quantity`. No builder fee. The fee subsidy is the * configured rate capped by the market's incentive balance, and `penalty_fee` is * always 0. Gated only on the pricer binding (`EWrongPricer`) and `now < expiry` * (`EInvalidOrderTiming`). Aborts `EOrderFailsLimits` when the mint would be * refused at the clock. */ declare function quoteMint(options: QuoteMintOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface QuoteMintForAccountArguments { market: RawTransactionArgument; wrapper: RawTransactionArgument; config?: RawTransactionArgument; pricer: TransactionArgument; lowerTick: RawTransactionArgument; higherTick: RawTransactionArgument; maxPremium: RawTransactionArgument; minQuantity: RawTransactionArgument; exactQuantity: RawTransactionArgument; } interface QuoteMintForAccountOptions { package?: string; arguments: QuoteMintForAccountArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * `quote_mint` for the wrapper's account: `max_premium` is capped at the account's * balance. No builder fee, matching the enqueue calls that name no builder: * `quote_mint_with_builder_fee` at a zero fee. */ declare function quoteMintForAccount(options: QuoteMintForAccountOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface QuoteMintWithBuilderFeeArguments { market: RawTransactionArgument; wrapper: RawTransactionArgument; config?: RawTransactionArgument; pricer: TransactionArgument; lowerTick: RawTransactionArgument; higherTick: RawTransactionArgument; maxPremium: RawTransactionArgument; minQuantity: RawTransactionArgument; exactQuantity: RawTransactionArgument; builderFeePerContract: RawTransactionArgument; } interface QuoteMintWithBuilderFeeOptions { package?: string; arguments: QuoteMintWithBuilderFeeArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * `quote_mint_for_account` for an order that names a builder: charges * `builder_fee_per_contract`, in FLOAT_SCALING of the $1 payout, capped at * `protocol_config::builder_fee_cap` as admission caps it. Prices and gates like * `quote_mint`. For SDK and devInspect previews of the `_with_builder` enqueue * calls. */ declare function quoteMintWithBuilderFee(options: QuoteMintWithBuilderFeeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface QuoteMintExactCostForAccountArguments { market: RawTransactionArgument; wrapper: RawTransactionArgument; config?: RawTransactionArgument; pricer: TransactionArgument; lowerTick: RawTransactionArgument; higherTick: RawTransactionArgument; maxCost: RawTransactionArgument; minQuantity: RawTransactionArgument; } interface QuoteMintExactCostForAccountOptions { package?: string; arguments: QuoteMintExactCostForAccountArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * Quote the largest mint whose all-in cost fits `min(max_cost, account balance)`, * at least `min_quantity`, for the wrapper's account, priced like a queued * exact-cost fill at the clock. No builder fee, matching the enqueue calls that * name no builder: `quote_mint_exact_cost_with_builder_fee` at a zero fee. * Otherwise prices and gates like `quote_mint`. */ declare function quoteMintExactCostForAccount(options: QuoteMintExactCostForAccountOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface QuoteMintExactCostWithBuilderFeeArguments { market: RawTransactionArgument; wrapper: RawTransactionArgument; config?: RawTransactionArgument; pricer: TransactionArgument; lowerTick: RawTransactionArgument; higherTick: RawTransactionArgument; maxCost: RawTransactionArgument; minQuantity: RawTransactionArgument; builderFeePerContract: RawTransactionArgument; } interface QuoteMintExactCostWithBuilderFeeOptions { package?: string; arguments: QuoteMintExactCostWithBuilderFeeArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * `quote_mint_exact_cost_for_account` for an order that names a builder: the * budget search fits `builder_fee_per_contract`, in FLOAT_SCALING of the $1 payout * and capped at `protocol_config::builder_fee_cap`, inside the budget. For SDK and * devInspect previews of `enqueue_exact_cost_with_builder`. */ declare function quoteMintExactCostWithBuilderFee(options: QuoteMintExactCostWithBuilderFeeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface OrderFlowStateArguments { market: RawTransactionArgument; } interface OrderFlowStateOptions { package?: string; arguments: OrderFlowStateArguments | [market: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return `(waiting_cash_need, payout_tree_node_count, min_entry_probability)`: the * summed cash need of the market's admitted orders, above required cash, that * `rebalance_expiry_cash` keeps a live market funded with; the payout tree's node * count, pinned zero nodes included, which sizes the keeper's fill batches; and * the snapshotted minimum entry probability the SDK computes a queued mint's cash * need from. For SDK, keeper, and devInspect reads. */ declare function orderFlowState(options: OrderFlowStateOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface ReceiptInfoArguments { receipt: TransactionArgument; } interface ReceiptInfoOptions { package?: string; arguments: ReceiptInfoArguments | [receipt: TransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return a receipt's * `(expiry_market_id, stage, account_id, order_id, pyth_source_id, cash_need, subsidy_bound, vol)`. * For the order-flow companion's queue events and Lazer decoding, and devInspect * reads of queue records. */ declare function receiptInfo(options: ReceiptInfoOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface BuilderFeePerContractArguments { receipt: TransactionArgument; } interface BuilderFeePerContractOptions { package?: string; arguments: BuilderFeePerContractArguments | [receipt: TransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return the capped builder fee per contract an admitted order pays at its fill, * which the fill charges to the code the receipt records: `0` for an order that * names no builder and for an open receipt. For the order-flow companion's reads * and SDK previews of a waiting order. */ declare function builderFeePerContract(options: BuilderFeePerContractOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface QuantityArguments { quote: TransactionArgument; } interface QuantityOptions { package?: string; arguments: QuantityArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the sized quantity for SDK and devInspect quote consumers. */ declare function quantity(options: QuantityOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface EntryProbabilityArguments { quote: TransactionArgument; } interface EntryProbabilityOptions { package?: string; arguments: EntryProbabilityArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the quoted range probability for SDK and devInspect consumers. */ declare function entryProbability(options: EntryProbabilityOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface PremiumArguments { quote: TransactionArgument; } interface PremiumOptions { package?: string; arguments: PremiumArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the quoted premium for SDK and devInspect consumers. */ declare function premium(options: PremiumOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface TradingFeeArguments { quote: TransactionArgument; } interface TradingFeeOptions { package?: string; arguments: TradingFeeArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the quoted trading fee before subsidy for SDK and devInspect consumers. */ declare function tradingFee(options: TradingFeeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface FeeIncentiveSubsidyArguments { quote: TransactionArgument; } interface FeeIncentiveSubsidyOptions { package?: string; arguments: FeeIncentiveSubsidyArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return the sponsor-funded portion of the quoted fee for SDK and devInspect * consumers. */ declare function feeIncentiveSubsidy(options: FeeIncentiveSubsidyOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface BuilderFeeArguments { quote: TransactionArgument; } interface BuilderFeeOptions { package?: string; arguments: BuilderFeeArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the quoted builder fee for SDK and devInspect consumers. */ declare function builderFee(options: BuilderFeeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface PenaltyFeeArguments { quote: TransactionArgument; } interface PenaltyFeeOptions { package?: string; arguments: PenaltyFeeArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the quoted EWMA congestion surcharge for SDK and devInspect consumers. */ declare function penaltyFee(options: PenaltyFeeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface InventoryImpactChargeArguments { quote: TransactionArgument; } interface InventoryImpactChargeOptions { package?: string; arguments: InventoryImpactChargeArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } /** * Return the separate inventory-impact charge for SDK and devInspect quote * consumers. */ declare function inventoryImpactCharge(options: InventoryImpactChargeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface AllInCostArguments { quote: TransactionArgument; } interface AllInCostOptions { package?: string; arguments: AllInCostArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } /** Return the total quoted account withdrawal for SDK and devInspect consumers. */ declare function allInCost(options: AllInCostOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface RedeemCloseQuantityArguments { quote: TransactionArgument; } interface RedeemCloseQuantityOptions { package?: string; arguments: RedeemCloseQuantityArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } declare function redeemCloseQuantity(options: RedeemCloseQuantityOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface RedeemProbabilityArguments { quote: TransactionArgument; } interface RedeemProbabilityOptions { package?: string; arguments: RedeemProbabilityArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } declare function redeemProbability(options: RedeemProbabilityOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface RedeemProceedsArguments { quote: TransactionArgument; } interface RedeemProceedsOptions { package?: string; arguments: RedeemProceedsArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } declare function redeemProceeds(options: RedeemProceedsOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface RedeemTradingFeeArguments { quote: TransactionArgument; } interface RedeemTradingFeeOptions { package?: string; arguments: RedeemTradingFeeArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } declare function redeemTradingFee(options: RedeemTradingFeeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface RedeemBuilderFeeArguments { quote: TransactionArgument; } interface RedeemBuilderFeeOptions { package?: string; arguments: RedeemBuilderFeeArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } declare function redeemBuilderFee(options: RedeemBuilderFeeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface RedeemInventoryImpactRebateArguments { quote: TransactionArgument; } interface RedeemInventoryImpactRebateOptions { package?: string; arguments: RedeemInventoryImpactRebateArguments | [quote: TransactionArgument]; config?: { predictPackageId?: string; }; } declare function redeemInventoryImpactRebate(options: RedeemInventoryImpactRebateOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface QuoteCloseArguments { market: RawTransactionArgument; pricer: TransactionArgument; receipt: TransactionArgument; closeQuantity: RawTransactionArgument; BuilderCodeId: RawTransactionArgument; } interface QuoteCloseOptions { package?: string; arguments: QuoteCloseArguments | [market: RawTransactionArgument, pricer: TransactionArgument, receipt: TransactionArgument, closeQuantity: RawTransactionArgument, BuilderCodeId: RawTransactionArgument]; config?: { predictPackageId?: string; }; } interface QuoteCloseWithBuilderFeeArguments { market: RawTransactionArgument; config?: RawTransactionArgument; pricer: TransactionArgument; receipt: TransactionArgument; closeQuantity: RawTransactionArgument; builderFeePerContract: RawTransactionArgument; } interface QuoteCloseWithBuilderFeeOptions { package?: string; arguments: QuoteCloseWithBuilderFeeArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * `quote_close` for a sell that names a builder: charges * `builder_fee_per_contract`, in FLOAT_SCALING of the $1 payout, capped at * `protocol_config::builder_fee_cap` and then at the redeem value left after the * trading fee, as the fill charges it. Public for the order-flow companion's sell * preview and SDK reads. */ declare function quoteCloseWithBuilderFee(options: QuoteCloseWithBuilderFeeOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface MintExactQuantityArguments { Market: RawTransactionArgument; Wrapper: RawTransactionArgument; Auth: TransactionArgument; Config?: RawTransactionArgument; Pricer: TransactionArgument; LowerTick: RawTransactionArgument; HigherTick: RawTransactionArgument; Quantity: RawTransactionArgument; MaxCost: RawTransactionArgument; MaxProbability: RawTransactionArgument; } interface MintExactQuantityOptions { package?: string; arguments: MintExactQuantityArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } interface MintExactAmountArguments { Market: RawTransactionArgument; Wrapper: RawTransactionArgument; Auth: TransactionArgument; Config?: RawTransactionArgument; Pricer: TransactionArgument; LowerTick: RawTransactionArgument; HigherTick: RawTransactionArgument; MaxPremium: RawTransactionArgument; MinQuantity: RawTransactionArgument; MaxCost: RawTransactionArgument; } interface MintExactAmountOptions { package?: string; arguments: MintExactAmountArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } interface MintExactCostArguments { Market: RawTransactionArgument; Wrapper: RawTransactionArgument; Auth: TransactionArgument; Config?: RawTransactionArgument; Pricer: TransactionArgument; LowerTick: RawTransactionArgument; HigherTick: RawTransactionArgument; MaxCost: RawTransactionArgument; MinQuantity: RawTransactionArgument; } interface MintExactCostOptions { package?: string; arguments: MintExactCostArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } interface RedeemLiveArguments { Market: RawTransactionArgument; Wrapper: RawTransactionArgument; Auth: TransactionArgument; Config?: RawTransactionArgument; Pricer: TransactionArgument; OrderId: RawTransactionArgument; CloseQuantity: RawTransactionArgument; MinProbability: RawTransactionArgument; MinProceeds: RawTransactionArgument; } interface RedeemLiveOptions { package?: string; arguments: RedeemLiveArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } interface RedeemSettledArguments { Market: RawTransactionArgument; Wrapper: RawTransactionArgument; Auth: TransactionArgument; Config?: RawTransactionArgument; OrderId: RawTransactionArgument; } interface RedeemSettledOptions { package?: string; arguments: RedeemSettledArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } interface RedeemSettledPermissionlessArguments { Market: RawTransactionArgument; AccountRegistry: RawTransactionArgument; Wrapper: RawTransactionArgument; Config?: RawTransactionArgument; OrderId: RawTransactionArgument; } interface RedeemSettledPermissionlessOptions { package?: string; arguments: RedeemSettledPermissionlessArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } interface SetReferenceTickArguments { market: RawTransactionArgument; config?: RawTransactionArgument; propbookRegistry?: RawTransactionArgument; pyth: RawTransactionArgument; } interface SetReferenceTickOptions { package?: string; arguments: SetReferenceTickArguments; config?: { protocolConfig: ConfigValue; oracleRegistry: ConfigValue; predictPackageId?: string; }; } /** * Set this expiry's reference fine-grid tick from the exact previous-window * Propbook Pyth observation. The source observation must be inserted into the feed * at `reference_tick_source_timestamp_ms` before this call, and the normalized * spot is floored to the market's `tick_size`. Not gated on the valuation lock: * the reference tick shapes mint admission only, and a mint it admits mid-flush is * invisible to the captured snapshot like any other. */ declare function setReferenceTick(options: SetReferenceTickOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface SetMintPausedArguments { market: RawTransactionArgument; config?: RawTransactionArgument; AdminCap: RawTransactionArgument; paused: RawTransactionArgument; } interface SetMintPausedOptions { package?: string; arguments: SetMintPausedArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * Set whether new mints are paused on this expiry market. Admin-only and * version-gated. A `PauseCap` holder can force-engage the pause one-way under a * version freeze via `registry::pause_expiry_market_mint_pause_cap`. */ declare function setMintPaused(options: SetMintPausedOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface TrySettleArguments { market: RawTransactionArgument; config?: RawTransactionArgument; propbookRegistry?: RawTransactionArgument; pyth: RawTransactionArgument; bsValues: RawTransactionArgument; } interface TrySettleOptions { package?: string; arguments: TrySettleArguments; config?: { protocolConfig: ConfigValue; oracleRegistry: ConfigValue; predictPackageId?: string; }; } /** * Settle from Propbook's exact positive Pyth spot at expiry, or from the exact * Block Scholes minute-boundary spot when Pyth remains unavailable after the * compiled grace period. Permissionless and idempotent; missing or unusable * observations leave the market unsettled. * * Settlement reads nothing from the order-flow queue. Every admission's deadline * is at least `constants::deadline_expiry_margin_ms!()` before expiry, so at * expiry a waiting order can only be released, and the settled liability already * covers every queue-held position, which lives in the payout tree. The companion * drains and pays its queue afterwards. */ declare function trySettle(options: TrySettleOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface AdmitMintArguments> { W: RawTransactionArgument; market: RawTransactionArgument; config?: RawTransactionArgument; account: TransactionArgument; propbookRegistry?: RawTransactionArgument; pyth: RawTransactionArgument; bsValues: RawTransactionArgument; bsSvi: RawTransactionArgument; kind: RawTransactionArgument; lowerTick: RawTransactionArgument; higherTick: RawTransactionArgument; quantity: RawTransactionArgument; maxPremium: RawTransactionArgument; minQuantity: RawTransactionArgument; maxProbability: RawTransactionArgument; budget: RawTransactionArgument; orderFee: RawTransactionArgument; sviMaxAgeMs: RawTransactionArgument; channel: RawTransactionArgument; tauMs: RawTransactionArgument; deadlineMs: RawTransactionArgument; } interface AdmitMintOptions> { package?: string; arguments: AdmitMintArguments; config?: { protocolConfig: ConfigValue; oracleRegistry: ConfigValue; predictPackageId?: string; }; typeArguments: [string]; } /** * Admit one queued mint for the order-flow companion and return its receipt. * * `kind` is a `constants` mint kind. The companion has already taken * `budget + order_fee` from the account and escrows it. `budget` caps the fill's * all-in cost; the companion sets it to `min(max_cost, balance - order_fee)`, and * to at most `quantity` for an exact-quantity mint. The order prices at a Pyth * price on Lazer channel `channel`, generated at or after `tau_ms`, and must fill * before `deadline_ms`. * * Aborts unless `W` is allowlisted, the version and cutover gates pass, trading * and this market's mints are unpaused, and the snapshot stage is closed. The * timing must fit (`EInvalidOrderTiming`): `channel` a supported fixed-rate * channel (`lazer_price::channel_fixed_rate_*`), `tau_ms` on its grid, at most one * of its ticks before now, and before `deadline_ms`, τ before the no-trade window, * and the deadline at least `constants::deadline_expiry_margin_ms!()` before * expiry. Then `svi_max_age_ms` must be within `constants::max_svi_max_age_ms!()` * and `kind` a mint kind (`EInvalidOrderTerms`), the volatility snapshot must * load, `budget` must be positive (`EMintCostCapRequired`), the order must pass * its own limits at the clock without subsidy (`EOrderFailsLimits`), and its cash * need must fit the market's spare cash (`EInsufficientMarketCash`). Admission * then pins both boundary nodes, creating them under the node cap, and adds the * cash need to the ledger. */ declare function admitMint>(options: AdmitMintOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface AdmitMintWithBuilderArguments> { W: RawTransactionArgument; market: RawTransactionArgument; config?: RawTransactionArgument; account: TransactionArgument; propbookRegistry?: RawTransactionArgument; pyth: RawTransactionArgument; bsValues: RawTransactionArgument; bsSvi: RawTransactionArgument; builder: TransactionArgument; kind: RawTransactionArgument; lowerTick: RawTransactionArgument; higherTick: RawTransactionArgument; quantity: RawTransactionArgument; maxPremium: RawTransactionArgument; minQuantity: RawTransactionArgument; maxProbability: RawTransactionArgument; budget: RawTransactionArgument; orderFee: RawTransactionArgument; sviMaxAgeMs: RawTransactionArgument; channel: RawTransactionArgument; tauMs: RawTransactionArgument; deadlineMs: RawTransactionArgument; } interface AdmitMintWithBuilderOptions> { package?: string; arguments: AdmitMintWithBuilderArguments; config?: { protocolConfig: ConfigValue; oracleRegistry: ConfigValue; predictPackageId?: string; }; typeArguments: [string]; } /** * `admit_mint` for an order that may name a builder. `builder` is the code the * trade pays and its fee per contract, or none, which admits exactly as * `admit_mint` does. Admission caps the fee at `protocol_config::builder_fee_cap`, * records the code and the capped fee in the receipt, and prices the order's own * limits at the clock with that fee. The fill charges the recorded fee, so a later * cap change does not reach the order. Aborts as `admit_mint` does, and, for an * order that names a builder, `EBuilderFeeCutoverNotReached` until the version * watermark retires every version whose fill charges the legacy fee instead * (`constants::builder_fee_version!()`). */ declare function admitMintWithBuilder>(options: AdmitMintWithBuilderOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface AdmitSellArguments> { W: RawTransactionArgument; market: RawTransactionArgument; config?: RawTransactionArgument; account: TransactionArgument; receipt: TransactionArgument; propbookRegistry?: RawTransactionArgument; pyth: RawTransactionArgument; bsValues: RawTransactionArgument; bsSvi: RawTransactionArgument; closeQuantity: RawTransactionArgument; minProbability: RawTransactionArgument; minProceeds: RawTransactionArgument; orderFee: RawTransactionArgument; sviMaxAgeMs: RawTransactionArgument; channel: RawTransactionArgument; tauMs: RawTransactionArgument; deadlineMs: RawTransactionArgument; } interface AdmitSellOptions> { package?: string; arguments: AdmitSellArguments; config?: { protocolConfig: ConfigValue; oracleRegistry: ConfigValue; predictPackageId?: string; }; typeArguments: [string]; } /** * Admit an early sell of `close_quantity` of an open receipt's position: the * receipt moves to the sell stage in place, with the sell's request, the account's * current owner and no builder code, a fresh volatility snapshot, τ, the deadline, * and no price. The companion escrows `order_fee` and owns the minimum-sell * checks. * * Open during the trading pause and a market mint pause. Aborts unless `W` is * allowlisted, the version, cutover, and snapshot-stage gates and `admit_mint`'s * timing and SVI-age checks pass, the receipt is this market's (`EWrongMarket`), * open (`EWrongStage`), and `account`'s (`ENotRecordOwner`), the volatility * snapshot loads, and the close passes its own floors at the clock * (`EOrderFailsLimits`). Then adds the sell's cash need, * `ceil(close_quantity * (1 - backing_buffer_lambda)) + 1`, to the ledger: a close * lowers payout liability by at least `lambda * close_quantity` and pays at most * `close_quantity`. There is no spare-cash check. The keeper funds the market * before τ, and the fill refunds a sell the market cannot cover. */ declare function admitSell>(options: AdmitSellOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface AdmitSellWithBuilderArguments> { W: RawTransactionArgument; market: RawTransactionArgument; config?: RawTransactionArgument; account: TransactionArgument; receipt: TransactionArgument; propbookRegistry?: RawTransactionArgument; pyth: RawTransactionArgument; bsValues: RawTransactionArgument; bsSvi: RawTransactionArgument; builder: TransactionArgument; closeQuantity: RawTransactionArgument; minProbability: RawTransactionArgument; minProceeds: RawTransactionArgument; orderFee: RawTransactionArgument; sviMaxAgeMs: RawTransactionArgument; channel: RawTransactionArgument; tauMs: RawTransactionArgument; deadlineMs: RawTransactionArgument; } interface AdmitSellWithBuilderOptions> { package?: string; arguments: AdmitSellWithBuilderArguments; config?: { protocolConfig: ConfigValue; oracleRegistry: ConfigValue; predictPackageId?: string; }; typeArguments: [string]; } /** * `admit_sell` for a sell that may name a builder. `builder` is the code the sell * pays and its fee per contract, or none, which admits exactly as `admit_sell` * does. Admission caps the fee at `protocol_config::builder_fee_cap`, records the * code in the receipt in place of the mint's along with the capped fee, and prices * the close's floors at the clock with that fee. The fill charges the recorded * fee. Aborts as `admit_sell` does, and, for a sell that names a builder, * `EBuilderFeeCutoverNotReached` until the version watermark reaches * `constants::builder_fee_version!()`. */ declare function admitSellWithBuilder>(options: AdmitSellWithBuilderOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface CommitArguments> { W: RawTransactionArgument; market: RawTransactionArgument; config?: RawTransactionArgument; receipt: TransactionArgument; price: TransactionArgument; } interface CommitOptions> { package?: string; arguments: CommitArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; typeArguments: [string]; } /** * Commit the Pyth price an admitted order fills at: a `LazerPrice`, which only the * `deepbook_predict_math` library builds, from a Pyth-verified Lazer update. * Stores the spot, the envelope time (the tick the fill prices at), and the feed's * generation time. For a mint it also reserves the fee subsidy, * `min(subsidy_bound * fee_incentive_subsidy_rate, incentives left)`, records the * rate and amount, and returns the reservation for the companion to escrow with * the order. A sell returns a zero balance. * * The price must be the receipt's: its Pyth feed and channel, an envelope at * exactly τ or one tick of that channel later (the backup tick), a generation time * between τ and the envelope, an envelope at or before now, and a pricing-safe * spot (`EWrongPrice`). Aborts unless `W` is allowlisted, the version gate passes, * the receipt is this market's (`EWrongMarket`), admitted with no price yet * (`EWrongStage`), and before its deadline (`EInvalidOrderTiming`). */ declare function commit>(options: CommitOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface TryFillArguments> { W: RawTransactionArgument; market: RawTransactionArgument; config?: RawTransactionArgument; receipt: TransactionArgument; escrow: TransactionArgument; } interface TryFillOptions> { package?: string; arguments: TryFillArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; typeArguments: [string]; } /** * Fill or refund one committed order at its committed price and consume or return * its receipt. `escrow` is the order's escrowed budget, order fee, and reserved * subsidy. Returns * `(reason, receipt to keep, escrow left over, quantity, amount, trading_fee, builder_fee, referral_fee, subsidy_used, inventory_impact)`. * The amounts are zero on a refund. For a mint `amount` is the all-in cost and * `inventory_impact` the charge; for a sell `amount` is the proceeds and * `inventory_impact` the rebate. * * Aborts only on a companion bookkeeping error: `W` not allowlisted, the version, * freeze, or snapshot-stage gate, another market's receipt (`EWrongMarket`), a * receipt not admitted or without a price (`EWrongStage`), or `escrow` below * `budget + order_fee + subsidy_reserved` (`EEscrowMismatch`). Every market * condition returns a refund reason instead, `0` for a fill: 5 at or past the * deadline, which also covers expiry and settlement; 9 when USDC sent to the * receipt's receive address would abort the transaction (`denied`: the address is * on USDC's deny list for the current epoch, or USDC is globally paused), so * nothing is sent there; 2 when no `Pricer` exists at the tick; then the fill's * own 1 (the order's limits), 2 (admission), 4 (a pinned node is missing, a * backstop), and 8 (the market's cash after the fill would not cover its required * cash). * * A mint fill pays the premium, the trading fee net of the referral share, the * used subsidy, the order fee, and the inventory-impact charge into market cash, * sends the builder and referral fees, returns unused subsidy to the incentive * balance, emits `OrderMinted` with no congestion penalty, and returns the receipt * open. A sell fill pays the proceeds (redeem value plus inventory-impact rebate, * less the trading and builder fees) to the receipt's receive address, keeps the * trading and order fees in market cash, emits `LiveOrderRedeemed`, and returns * the receipt open with the replacement position of a partial close, or consumes * it on a full close. A builder or referral fee whose recipient is denied stays in * market cash instead, and the events still report it as charged. A refund keeps * the order fee in market cash for reasons 1 and 2, returns the reserved subsidy * to the incentive balance, prunes a mint's emptied unpinned nodes, returns the * rest of the escrow, and returns a sell's receipt open or consumes a mint's. * Every outcome takes the order out of the ledger. */ declare function tryFill>(options: TryFillOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface ReleaseArguments { market: RawTransactionArgument; config?: RawTransactionArgument; receipt: TransactionArgument; escrow: TransactionArgument; reason: RawTransactionArgument; prune: RawTransactionArgument; } interface ReleaseOptions { package?: string; arguments: ReleaseArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * Take an admitted order out without filling it: the companion's deadline, admin, * and settlement-drain refunds release their receipt here. `escrow` is the order's * escrowed budget, order fee, and reserved subsidy, and `reason` the refund's * `constants::fill_reason_*` code. The order fee follows `try_fill`'s refund rule: * reasons 1 and 2 keep it in market cash, and every other reason leaves it in the * escrow returned. Returns the reservation to the incentive balance, subtracts the * exact cash need from the ledger, and unpins a mint's boundary ticks, pruning * emptied, unpinned, unretained nodes only when `prune` and the market is * unsettled. Returns a sell's receipt open, still holding its position, or `none` * for a mint's, which it consumes, and the rest of the escrow. * * Needs no allowlisting and checks only the version floor, so the drain works * while the protocol is frozen and after the witness is removed. Keeping an order * fee moves market cash, so like a fill it aborts inside the keeper's snapshot * stage (`ESnapshotInProgress`). Aborts on another market's receipt * (`EWrongMarket`), a receipt not admitted (`EWrongStage`), or `escrow` below * `budget + order_fee + subsidy_reserved` (`EEscrowMismatch`). */ declare function release(options: ReleaseOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; interface TryPaySettledArguments { market: RawTransactionArgument; config?: RawTransactionArgument; receipt: TransactionArgument; } interface TryPaySettledOptions { package?: string; arguments: TryPaySettledArguments; config?: { protocolConfig: ConfigValue; predictPackageId?: string; }; } /** * Pay an open receipt's settled payout, zero for a loser, to its receive address * and consume the receipt. Returns the payout and `none`. When the payout is above * market cash or above the settled liability left, or a nonzero payout's receive * address is denied (`try_fill`'s reason 9: on USDC's deny list for the current * epoch, or USDC globally paused), changes nothing and returns that payout with * the receipt, so the companion's payout walk moves on and a later call pays it * once the cause clears. Needs no allowlisting and checks only the version floor. * Aborts on another market's receipt (`EWrongMarket`), a receipt that is not open * (`EWrongStage`), or an unsettled market (`EMarketNotSettled`). */ declare function tryPaySettled(options: TryPaySettledOptions): (tx: Transaction) => _mysten_sui_transactions490.TransactionResult; //#endregion export { AdmissionTickSizeArguments, AdmissionTickSizeOptions, AdmitMintArguments, AdmitMintOptions, AdmitMintWithBuilderArguments, AdmitMintWithBuilderOptions, AdmitSellArguments, AdmitSellOptions, AdmitSellWithBuilderArguments, AdmitSellWithBuilderOptions, AllInCostArguments, AllInCostOptions, BackingBufferLambdaArguments, BackingBufferLambdaOptions, BuilderFeeArguments, BuilderFeeOptions, BuilderFeePerContractArguments, BuilderFeePerContractOptions, CashBalanceArguments, CashBalanceOptions, CommitArguments, CommitOptions, CurrentNavArguments, CurrentNavOptions, EntryProbabilityArguments, EntryProbabilityOptions, ExpiryArguments, ExpiryFeeMaxMultiplierArguments, ExpiryFeeMaxMultiplierOptions, ExpiryFeeWindowMsArguments, ExpiryFeeWindowMsOptions, ExpiryMarket, ExpiryOptions, FeeIncentiveBalanceArguments, FeeIncentiveBalanceOptions, FeeIncentiveSubsidyArguments, FeeIncentiveSubsidyOptions, IdArguments, IdOptions, InventoryImpactChargeArguments, InventoryImpactChargeOptions, InventoryImpactMaxRateArguments, InventoryImpactMaxRateOptions, InventoryImpactReserveArguments, InventoryImpactReserveOptions, InventoryImpactScaleArguments, InventoryImpactScaleOptions, IsPendingValuationArguments, IsPendingValuationOptions, IsSettledArguments, IsSettledOptions, LiveOrderValueArguments, LiveOrderValueOptions, LoadLivePricerArguments, LoadLivePricerOptions, MintExactAmountOptions, MintExactCostOptions, MintExactQuantityOptions, MintPausedArguments, MintPausedOptions, MintQuote, OrderFlowLedger, OrderFlowLedgerKey, OrderFlowStateArguments, OrderFlowStateOptions, OrderParties, OrderReceipt, PayoutLiabilityArguments, PayoutLiabilityOptions, PenaltyFeeArguments, PenaltyFeeOptions, PremiumArguments, PremiumOptions, PropbookUnderlyingIdArguments, PropbookUnderlyingIdOptions, QuantityArguments, QuantityOptions, QuoteCloseOptions, QuoteCloseWithBuilderFeeArguments, QuoteCloseWithBuilderFeeOptions, QuoteMintArguments, QuoteMintExactCostForAccountArguments, QuoteMintExactCostForAccountOptions, QuoteMintExactCostWithBuilderFeeArguments, QuoteMintExactCostWithBuilderFeeOptions, QuoteMintForAccountArguments, QuoteMintForAccountOptions, QuoteMintOptions, QuoteMintWithBuilderFeeArguments, QuoteMintWithBuilderFeeOptions, ReceiptInfoArguments, ReceiptInfoOptions, RedeemBuilderFeeArguments, RedeemBuilderFeeOptions, RedeemCloseQuantityArguments, RedeemCloseQuantityOptions, RedeemInventoryImpactRebateArguments, RedeemInventoryImpactRebateOptions, RedeemLiveOptions, RedeemProbabilityArguments, RedeemProbabilityOptions, RedeemProceedsArguments, RedeemProceedsOptions, RedeemQuote, RedeemSettledOptions, RedeemSettledPermissionlessOptions, RedeemTradingFeeArguments, RedeemTradingFeeOptions, ReferenceTickArguments, ReferenceTickOptions, ReferenceTickSourceTimestampMsArguments, ReferenceTickSourceTimestampMsOptions, ReleaseArguments, ReleaseOptions, RequiredCashArguments, RequiredCashOptions, SetMintPausedArguments, SetMintPausedOptions, SetReferenceTickArguments, SetReferenceTickOptions, SettledOrderPayoutArguments, SettledOrderPayoutOptions, SettlementPriceArguments, SettlementPriceOptions, TickSizeArguments, TickSizeOptions, TradingFeeArguments, TradingFeeOptions, TryFillArguments, TryFillOptions, TryPaySettledArguments, TryPaySettledOptions, TrySettleArguments, TrySettleOptions, TrySettlementPriceArguments, TrySettlementPriceOptions, ValuationStamp, admissionTickSize, admitMint, admitMintWithBuilder, admitSell, admitSellWithBuilder, allInCost, backingBufferLambda, builderFee, builderFeePerContract, cashBalance, commit, currentNav, entryProbability, expiry, expiryFeeMaxMultiplier, expiryFeeWindowMs, feeIncentiveBalance, feeIncentiveSubsidy, id, inventoryImpactCharge, inventoryImpactMaxRate, inventoryImpactReserve, inventoryImpactScale, isPendingValuation, isSettled, liveOrderValue, loadLivePricer, mintPaused, orderFlowState, payoutLiability, penaltyFee, premium, propbookUnderlyingId, quantity, quoteCloseWithBuilderFee, quoteMint, quoteMintExactCostForAccount, quoteMintExactCostWithBuilderFee, quoteMintForAccount, quoteMintWithBuilderFee, receiptInfo, redeemBuilderFee, redeemCloseQuantity, redeemInventoryImpactRebate, redeemProbability, redeemProceeds, redeemTradingFee, referenceTick, referenceTickSourceTimestampMs, release, requiredCash, setMintPaused, setReferenceTick, settledOrderPayout, settlementPrice, tickSize, tradingFee, tryFill, tryPaySettled, trySettle, trySettlementPrice }; //# sourceMappingURL=expiry_market.d.mts.map