@mysten/deepbook-v3 2.6.4 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +153 -0
- package/PREDICT.md +389 -61
- package/dist/contracts/account/account.d.mts +23 -23
- package/dist/contracts/account/account.d.mts.map +1 -1
- package/dist/contracts/account/account_registry.d.mts +13 -13
- package/dist/contracts/deepbook/account.d.mts +18 -18
- package/dist/contracts/deepbook/balances.d.mts +4 -4
- package/dist/contracts/deepbook/deep_price.d.mts +3 -3
- package/dist/contracts/deepbook/order.d.mts +12 -12
- package/dist/contracts/deepbook_predict/admin.d.mts +4 -4
- package/dist/contracts/deepbook_predict/builder_code.d.mts +11 -11
- package/dist/contracts/deepbook_predict/builder_code_events.d.mts +10 -10
- package/dist/contracts/deepbook_predict/config_events.d.mts +93 -68
- package/dist/contracts/deepbook_predict/config_events.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/config_events.mjs +45 -1
- package/dist/contracts/deepbook_predict/config_events.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/deps/std/type_name.mjs +17 -0
- package/dist/contracts/deepbook_predict/deps/std/type_name.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/expiry_market.d.mts +652 -235
- package/dist/contracts/deepbook_predict/expiry_market.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/expiry_market.mjs +652 -186
- package/dist/contracts/deepbook_predict/expiry_market.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/lp_book.mjs +1 -1
- package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/market_manager.d.mts +27 -27
- package/dist/contracts/deepbook_predict/order_events.d.mts +50 -50
- package/dist/contracts/deepbook_predict/order_events.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/order_events.mjs +3 -1
- package/dist/contracts/deepbook_predict/order_events.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/pause_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/plp.d.mts +184 -82
- package/dist/contracts/deepbook_predict/plp.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/plp.mjs +126 -7
- package/dist/contracts/deepbook_predict/plp.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/pool_accounting.mjs +1 -1
- package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/predict_account.d.mts +14 -14
- package/dist/contracts/deepbook_predict/pricing.d.mts +91 -58
- package/dist/contracts/deepbook_predict/pricing.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/pricing.mjs +30 -3
- package/dist/contracts/deepbook_predict/pricing.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/pricing_config.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/protocol_config.d.mts +400 -92
- package/dist/contracts/deepbook_predict/protocol_config.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/protocol_config.mjs +451 -61
- package/dist/contracts/deepbook_predict/protocol_config.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/range_codec.d.mts +2 -2
- package/dist/contracts/deepbook_predict/registry.d.mts +28 -28
- package/dist/contracts/deepbook_predict/strike_exposure.mjs +1 -1
- package/dist/contracts/deepbook_predict/strike_payout_tree.mjs +17 -12
- package/dist/contracts/deepbook_predict/strike_payout_tree.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/vault_events.d.mts +154 -106
- package/dist/contracts/deepbook_predict/vault_events.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/vault_events.mjs +57 -1
- package/dist/contracts/deepbook_predict/vault_events.mjs.map +1 -1
- package/dist/contracts/deepbook_predict_math/config-arguments.d.mts +10 -0
- package/dist/contracts/deepbook_predict_math/config-arguments.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_math/lazer_price.d.mts +106 -0
- package/dist/contracts/deepbook_predict_math/lazer_price.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_math/lazer_price.mjs +125 -0
- package/dist/contracts/deepbook_predict_math/lazer_price.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_math/math.d.mts +284 -0
- package/dist/contracts/deepbook_predict_math/math.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_math/math.mjs +364 -0
- package/dist/contracts/deepbook_predict_math/math.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/config-arguments.d.mts +13 -0
- package/dist/contracts/deepbook_predict_orders/config-arguments.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts +215 -0
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.mjs +215 -0
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.mjs +87 -0
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/pricing.mjs +52 -0
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/pricing.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/fixed_math/i64.mjs +25 -0
- package/dist/contracts/deepbook_predict_orders/deps/fixed_math/i64.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/sui/balance.mjs +21 -0
- package/dist/contracts/deepbook_predict_orders/deps/sui/balance.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/sui/table.mjs +39 -0
- package/dist/contracts/deepbook_predict_orders/deps/sui/table.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/desk.d.mts +187 -0
- package/dist/contracts/deepbook_predict_orders/desk.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/desk.mjs +261 -0
- package/dist/contracts/deepbook_predict_orders/desk.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/order_queue.d.mts +1042 -0
- package/dist/contracts/deepbook_predict_orders/order_queue.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/order_queue.mjs +849 -0
- package/dist/contracts/deepbook_predict_orders/order_queue.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/queue.d.mts +683 -0
- package/dist/contracts/deepbook_predict_orders/queue.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/queue.mjs +912 -0
- package/dist/contracts/deepbook_predict_orders/queue.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/queue_events.d.mts +195 -0
- package/dist/contracts/deepbook_predict_orders/queue_events.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/queue_events.mjs +187 -0
- package/dist/contracts/deepbook_predict_orders/queue_events.mjs.map +1 -0
- package/dist/contracts/deepbook_sessions/session_config.d.mts +8 -8
- package/dist/contracts/deepbook_sessions/sessions.d.mts +163 -28
- package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -1
- package/dist/contracts/deepbook_sessions/sessions.mjs +234 -5
- package/dist/contracts/deepbook_sessions/sessions.mjs.map +1 -1
- package/dist/deployments/mainnet.mjs +7 -4
- package/dist/deployments/mainnet.mjs.map +1 -1
- package/dist/deployments/testnet.mjs +7 -4
- package/dist/deployments/testnet.mjs.map +1 -1
- package/dist/predict/bindings/expiry-market.d.mts +77 -0
- package/dist/predict/bindings/expiry-market.d.mts.map +1 -0
- package/dist/predict/bindings/expiry-market.mjs +139 -0
- package/dist/predict/bindings/expiry-market.mjs.map +1 -0
- package/dist/predict/bindings/protocol-config.d.mts +39 -0
- package/dist/predict/bindings/protocol-config.d.mts.map +1 -0
- package/dist/predict/bindings/protocol-config.mjs +90 -0
- package/dist/predict/bindings/protocol-config.mjs.map +1 -0
- package/dist/predict/bindings/rename.mjs +9 -0
- package/dist/predict/bindings/rename.mjs.map +1 -0
- package/dist/predict/client.d.mts +595 -16
- package/dist/predict/client.d.mts.map +1 -1
- package/dist/predict/client.mjs +986 -10
- package/dist/predict/client.mjs.map +1 -1
- package/dist/predict/config/generated.d.mts +22 -1
- package/dist/predict/config/generated.d.mts.map +1 -1
- package/dist/predict/config/generated.mjs +30 -1
- package/dist/predict/config/generated.mjs.map +1 -1
- package/dist/predict/config/mainnet.mjs +11 -3
- package/dist/predict/config/mainnet.mjs.map +1 -1
- package/dist/predict/config/testnet.mjs +11 -3
- package/dist/predict/config/testnet.mjs.map +1 -1
- package/dist/predict/config/types.d.mts +50 -1
- package/dist/predict/config/types.d.mts.map +1 -1
- package/dist/predict/cost.d.mts +38 -11
- package/dist/predict/cost.d.mts.map +1 -1
- package/dist/predict/cost.mjs +37 -11
- package/dist/predict/cost.mjs.map +1 -1
- package/dist/predict/decode.d.mts +251 -1
- package/dist/predict/decode.d.mts.map +1 -1
- package/dist/predict/decode.mjs +342 -4
- package/dist/predict/decode.mjs.map +1 -1
- package/dist/predict/errors.d.mts +69 -6
- package/dist/predict/errors.d.mts.map +1 -1
- package/dist/predict/errors.mjs +277 -4
- package/dist/predict/errors.mjs.map +1 -1
- package/dist/predict/index.d.mts +21 -10
- package/dist/predict/index.mjs +24 -12
- package/dist/predict/queue-id.d.mts +13 -0
- package/dist/predict/queue-id.d.mts.map +1 -0
- package/dist/predict/queue-id.mjs +19 -0
- package/dist/predict/queue-id.mjs.map +1 -0
- package/dist/predict/queue.d.mts +505 -0
- package/dist/predict/queue.d.mts.map +1 -0
- package/dist/predict/queue.mjs +774 -0
- package/dist/predict/queue.mjs.map +1 -0
- package/dist/predict/reads/balances.mjs +1 -1
- package/dist/predict/reads/markets.mjs +46 -5
- package/dist/predict/reads/markets.mjs.map +1 -1
- package/dist/predict/reads/pool.mjs +1 -1
- package/dist/predict/reads/pricing.d.mts +1 -1
- package/dist/predict/reads/queue.d.mts +105 -0
- package/dist/predict/reads/queue.d.mts.map +1 -0
- package/dist/predict/reads/queue.mjs +445 -0
- package/dist/predict/reads/queue.mjs.map +1 -0
- package/dist/predict/ticks.d.mts +9 -1
- package/dist/predict/ticks.d.mts.map +1 -1
- package/dist/predict/ticks.mjs +18 -1
- package/dist/predict/ticks.mjs.map +1 -1
- package/dist/predict/tx/authed.mjs +1 -1
- package/dist/predict/tx/common.d.mts.map +1 -1
- package/dist/predict/tx/common.mjs +12 -1
- package/dist/predict/tx/common.mjs.map +1 -1
- package/dist/predict/tx/queue.d.mts +220 -0
- package/dist/predict/tx/queue.d.mts.map +1 -0
- package/dist/predict/tx/queue.mjs +399 -0
- package/dist/predict/tx/queue.mjs.map +1 -0
- package/dist/predict/tx/trade.d.mts.map +1 -1
- package/dist/predict/tx/trade.mjs +61 -43
- package/dist/predict/tx/trade.mjs.map +1 -1
- package/dist/sessions.d.mts +90 -2
- package/dist/sessions.d.mts.map +1 -1
- package/dist/sessions.mjs +107 -2
- package/dist/sessions.mjs.map +1 -1
- package/dist/transactions/balanceManager.d.mts +12 -12
- package/dist/transactions/balanceManager.d.mts.map +1 -1
- package/dist/transactions/deepbook.d.mts +20 -20
- package/dist/transactions/deepbook.d.mts.map +1 -1
- package/dist/transactions/deepbookAdmin.d.mts +4 -4
- package/dist/transactions/deepbookAdmin.d.mts.map +1 -1
- package/dist/transactions/marginAdmin.d.mts +7 -7
- package/dist/transactions/marginAdmin.d.mts.map +1 -1
- package/dist/transactions/marginLiquidations.d.mts +3 -3
- package/dist/transactions/marginMaintainer.d.mts +5 -5
- package/dist/transactions/marginMaintainer.d.mts.map +1 -1
- package/dist/transactions/marginManager.d.mts +32 -32
- package/dist/transactions/marginManager.d.mts.map +1 -1
- package/dist/transactions/marginPool.d.mts +18 -18
- package/dist/transactions/marginRegistry.d.mts +16 -16
- package/dist/transactions/marginTPSL.d.mts +10 -10
- package/dist/transactions/marginTPSL.d.mts.map +1 -1
- package/dist/transactions/poolProxy.d.mts +8 -8
- package/dist/transactions/poolProxy.d.mts.map +1 -1
- package/package.json +4 -4
- package/src/contracts/deepbook_predict/config_events.ts +39 -0
- package/src/contracts/deepbook_predict/deps/std/type_name.ts +24 -0
- package/src/contracts/deepbook_predict/expiry_market.ts +960 -169
- package/src/contracts/deepbook_predict/order_events.ts +3 -1
- package/src/contracts/deepbook_predict/plp.ts +150 -9
- package/src/contracts/deepbook_predict/pricing.ts +46 -7
- package/src/contracts/deepbook_predict/pricing_config.ts +3 -1
- package/src/contracts/deepbook_predict/protocol_config.ts +648 -33
- package/src/contracts/deepbook_predict/strike_payout_tree.ts +25 -21
- package/src/contracts/deepbook_predict/vault_events.ts +65 -0
- package/src/contracts/deepbook_predict_math/config-arguments.ts +6 -0
- package/src/contracts/deepbook_predict_math/lazer_price.ts +196 -0
- package/src/contracts/deepbook_predict_math/math.ts +553 -0
- package/src/contracts/deepbook_predict_orders/config-arguments.ts +11 -0
- package/src/contracts/deepbook_predict_orders/delayed_execution_config.ts +430 -0
- package/src/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.ts +108 -0
- package/src/contracts/deepbook_predict_orders/deps/deepbook_predict/pricing.ts +58 -0
- package/src/contracts/deepbook_predict_orders/deps/fixed_math/i64.ts +21 -0
- package/src/contracts/deepbook_predict_orders/deps/sui/balance.ts +19 -0
- package/src/contracts/deepbook_predict_orders/deps/sui/table.ts +37 -0
- package/src/contracts/deepbook_predict_orders/desk.ts +419 -0
- package/src/contracts/deepbook_predict_orders/order_flow.ts +19 -0
- package/src/contracts/deepbook_predict_orders/order_queue.ts +1670 -0
- package/src/contracts/deepbook_predict_orders/queue.ts +1394 -0
- package/src/contracts/deepbook_predict_orders/queue_events.ts +189 -0
- package/src/contracts/deepbook_sessions/sessions.ts +355 -4
- package/src/deployments/mainnet.ts +7 -2
- package/src/deployments/testnet.ts +7 -2
- package/src/deployments/types.ts +14 -1
- package/src/predict/bindings/expiry-market.ts +127 -0
- package/src/predict/bindings/protocol-config.ts +59 -0
- package/src/predict/bindings/rename.ts +14 -0
- package/src/predict/client.ts +2076 -13
- package/src/predict/config/generated.ts +50 -0
- package/src/predict/config/mainnet.ts +16 -2
- package/src/predict/config/testnet.ts +16 -2
- package/src/predict/config/types.ts +51 -1
- package/src/predict/cost.ts +62 -14
- package/src/predict/decode.ts +691 -2
- package/src/predict/errors.ts +391 -14
- package/src/predict/index.ts +87 -6
- package/src/predict/queue-id.ts +22 -0
- package/src/predict/queue.ts +1231 -0
- package/src/predict/reads/markets.ts +30 -0
- package/src/predict/reads/queue.ts +606 -0
- package/src/predict/ticks.ts +35 -0
- package/src/predict/tx/common.ts +25 -1
- package/src/predict/tx/queue.ts +525 -0
- package/src/predict/tx/trade.ts +80 -49
- package/src/sessions.ts +206 -1
|
@@ -1,74 +1,71 @@
|
|
|
1
|
-
import { ConfigValue, MoveStruct, RawTransactionArgument } from "../utils/index.mjs";
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
1
|
+
import { ConfigValue, MoveStruct, MoveTuple, RawTransactionArgument } from "../utils/index.mjs";
|
|
2
|
+
import { BcsType } from "@mysten/sui/bcs";
|
|
3
|
+
import * as _mysten_sui_transactions415 from "@mysten/sui/transactions";
|
|
4
4
|
import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
|
|
5
5
|
|
|
6
6
|
//#region src/contracts/deepbook_predict/expiry_market.d.ts
|
|
7
|
-
declare namespace expiry_market_d_exports {
|
|
8
|
-
export { AdmissionTickSizeArguments, AdmissionTickSizeOptions, AllInCostArguments, AllInCostOptions, BackingBufferLambdaArguments, BackingBufferLambdaOptions, BuilderFeeArguments, BuilderFeeOptions, CashBalanceArguments, CashBalanceOptions, 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, MintExactAmountArguments, MintExactAmountOptions, MintExactCostArguments, MintExactCostOptions, MintExactQuantityArguments, MintExactQuantityOptions, MintPausedArguments, MintPausedOptions, MintQuote, PayoutLiabilityArguments, PayoutLiabilityOptions, PenaltyFeeArguments, PenaltyFeeOptions, PremiumArguments, PremiumOptions, PropbookUnderlyingIdArguments, PropbookUnderlyingIdOptions, QuantityArguments, QuantityOptions, QuoteMintArguments, QuoteMintExactCostForAccountArguments, QuoteMintExactCostForAccountOptions, QuoteMintForAccountArguments, QuoteMintForAccountOptions, QuoteMintOptions, RedeemLiveArguments, RedeemLiveOptions, RedeemSettledArguments, RedeemSettledOptions, RedeemSettledPermissionlessArguments, RedeemSettledPermissionlessOptions, ReferenceTickArguments, ReferenceTickOptions, ReferenceTickSourceTimestampMsArguments, ReferenceTickSourceTimestampMsOptions, RequiredCashArguments, RequiredCashOptions, SetMintPausedArguments, SetMintPausedOptions, SetReferenceTickArguments, SetReferenceTickOptions, SettledOrderPayoutArguments, SettledOrderPayoutOptions, SettlementPriceArguments, SettlementPriceOptions, TickSizeArguments, TickSizeOptions, TradingFeeArguments, TradingFeeOptions, TrySettleArguments, TrySettleOptions, TrySettlementPriceArguments, TrySettlementPriceOptions, ValuationStamp, admissionTickSize, allInCost, backingBufferLambda, builderFee, cashBalance, currentNav, entryProbability, expiry, expiryFeeMaxMultiplier, expiryFeeWindowMs, feeIncentiveBalance, feeIncentiveSubsidy, id, inventoryImpactCharge, inventoryImpactMaxRate, inventoryImpactReserve, inventoryImpactScale, isPendingValuation, isSettled, liveOrderValue, loadLivePricer, mintExactAmount, mintExactCost, mintExactQuantity, mintPaused, payoutLiability, penaltyFee, premium, propbookUnderlyingId, quantity, quoteMint, quoteMintExactCostForAccount, quoteMintForAccount, redeemLive, redeemSettled, redeemSettledPermissionless, referenceTick, referenceTickSourceTimestampMs, requiredCash, setMintPaused, setReferenceTick, settledOrderPayout, settlementPrice, tickSize, tradingFee, trySettle, trySettlementPrice };
|
|
9
|
-
}
|
|
10
7
|
declare const ValuationStamp: MoveStruct<{
|
|
11
|
-
flush_seq:
|
|
12
|
-
snapshot_cash:
|
|
13
|
-
snapshot_impact_reserve:
|
|
8
|
+
flush_seq: BcsType<bigint, string | number | bigint, "u64">; /** `cash.balance()` at the snapshot instant. */
|
|
9
|
+
snapshot_cash: BcsType<bigint, string | number | bigint, "u64">; /** `cash.inventory_impact_reserve()` at the snapshot instant. */
|
|
10
|
+
snapshot_impact_reserve: BcsType<bigint, string | number | bigint, "u64">;
|
|
14
11
|
}, "@local-pkg/deepbook_predict::expiry_market::ValuationStamp">;
|
|
15
12
|
declare const ExpiryMarket: MoveStruct<{
|
|
16
|
-
id:
|
|
17
|
-
propbook_underlying_id:
|
|
18
|
-
expiry:
|
|
13
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">; /** Propbook underlying this market was created for. */
|
|
14
|
+
propbook_underlying_id: BcsType<number, number, "u32">;
|
|
15
|
+
expiry: BcsType<bigint, string | number | bigint, "u64">; /** USDC custody and payout backing. */
|
|
19
16
|
cash: MoveStruct<{
|
|
20
17
|
cash_balance: MoveStruct<{
|
|
21
|
-
value:
|
|
18
|
+
value: BcsType<bigint, string | number | bigint, "u64">;
|
|
22
19
|
}, "0x2::balance::Balance<phantom T>">;
|
|
23
|
-
inventory_impact_reserve:
|
|
20
|
+
inventory_impact_reserve: BcsType<bigint, string | number | bigint, "u64">;
|
|
24
21
|
}, "@local-pkg/deepbook_predict::expiry_cash::ExpiryCash">; /** Sponsor-funded USDC available to subsidize this market's taker fees. */
|
|
25
22
|
fee_incentive_balance: MoveStruct<{
|
|
26
|
-
value:
|
|
23
|
+
value: BcsType<bigint, string | number | bigint, "u64">;
|
|
27
24
|
}, "0x2::balance::Balance<phantom T>">; /** Exposure lifecycle state for this expiry's strike ticks. */
|
|
28
25
|
strike_exposure: MoveStruct<{
|
|
29
|
-
expiry_market_id:
|
|
30
|
-
tick_size:
|
|
31
|
-
admission_tick_size:
|
|
32
|
-
reference_tick_source_timestamp_ms:
|
|
33
|
-
reference_tick:
|
|
26
|
+
expiry_market_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
27
|
+
tick_size: BcsType<bigint, string | number | bigint, "u64">;
|
|
28
|
+
admission_tick_size: BcsType<bigint, string | number | bigint, "u64">;
|
|
29
|
+
reference_tick_source_timestamp_ms: BcsType<bigint, string | number | bigint, "u64">;
|
|
30
|
+
reference_tick: BcsType<bigint | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
34
31
|
config: MoveStruct<{
|
|
35
|
-
backing_buffer_lambda:
|
|
36
|
-
base_fee:
|
|
37
|
-
min_fee:
|
|
38
|
-
min_entry_probability:
|
|
39
|
-
max_entry_probability:
|
|
40
|
-
expiry_fee_window_ms:
|
|
41
|
-
expiry_fee_max_multiplier:
|
|
42
|
-
inventory_impact_max_rate:
|
|
32
|
+
backing_buffer_lambda: BcsType<bigint, string | number | bigint, "u64">;
|
|
33
|
+
base_fee: BcsType<bigint, string | number | bigint, "u64">;
|
|
34
|
+
min_fee: BcsType<bigint, string | number | bigint, "u64">;
|
|
35
|
+
min_entry_probability: BcsType<bigint, string | number | bigint, "u64">;
|
|
36
|
+
max_entry_probability: BcsType<bigint, string | number | bigint, "u64">;
|
|
37
|
+
expiry_fee_window_ms: BcsType<bigint, string | number | bigint, "u64">;
|
|
38
|
+
expiry_fee_max_multiplier: BcsType<bigint, string | number | bigint, "u64">;
|
|
39
|
+
inventory_impact_max_rate: BcsType<bigint, string | number | bigint, "u64">;
|
|
43
40
|
}, "@local-pkg/deepbook_predict::strike_exposure_config::StrikeExposureConfig">;
|
|
44
|
-
inventory_impact_scale:
|
|
45
|
-
next_order_sequence:
|
|
46
|
-
settlement_price:
|
|
47
|
-
settled_payout_liability:
|
|
41
|
+
inventory_impact_scale: BcsType<bigint, string | number | bigint, "u64">;
|
|
42
|
+
next_order_sequence: BcsType<bigint, string | number | bigint, "u64">;
|
|
43
|
+
settlement_price: BcsType<bigint | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
44
|
+
settled_payout_liability: BcsType<bigint, string | number | bigint, "u64">;
|
|
48
45
|
payout: MoveStruct<{
|
|
49
|
-
root:
|
|
46
|
+
root: BcsType<bigint | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
50
47
|
nodes: MoveStruct<{
|
|
51
|
-
id:
|
|
52
|
-
size:
|
|
48
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
49
|
+
size: BcsType<bigint, string | number | bigint, "u64">;
|
|
53
50
|
}, "0x2::table::Table<phantom K, phantom V>">;
|
|
54
|
-
node_count:
|
|
55
|
-
base:
|
|
56
|
-
snapshot_seq:
|
|
57
|
-
snapshot_active:
|
|
58
|
-
snapshot_base:
|
|
51
|
+
node_count: BcsType<bigint, string | number | bigint, "u64">;
|
|
52
|
+
base: BcsType<bigint, string | number | bigint, "u64">;
|
|
53
|
+
snapshot_seq: BcsType<bigint, string | number | bigint, "u64">;
|
|
54
|
+
snapshot_active: BcsType<boolean, boolean, "bool">;
|
|
55
|
+
snapshot_base: BcsType<bigint, string | number | bigint, "u64">;
|
|
59
56
|
}, "@local-pkg/deepbook_predict::strike_payout_tree::StrikePayoutTree">;
|
|
60
57
|
}, "@local-pkg/deepbook_predict::strike_exposure::StrikeExposure">; /** Smoothed gas-price stats backing the congestion trade penalty. */
|
|
61
58
|
ewma: MoveStruct<{
|
|
62
|
-
mean:
|
|
63
|
-
variance:
|
|
64
|
-
last_updated_timestamp_ms:
|
|
59
|
+
mean: BcsType<bigint, string | number | bigint, "u64">;
|
|
60
|
+
variance: BcsType<bigint, string | number | bigint, "u64">;
|
|
61
|
+
last_updated_timestamp_ms: BcsType<bigint, string | number | bigint, "u64">;
|
|
65
62
|
}, "@local-pkg/deepbook_predict::ewma::EwmaState">;
|
|
66
63
|
/**
|
|
67
64
|
* When true, new mints on this expiry abort. Other flows stay available. Admin
|
|
68
65
|
* sets/unsets it (version-gated); a `PauseCap` holder can force it true one-way
|
|
69
66
|
* through the registry (ungated kill switch).
|
|
70
67
|
*/
|
|
71
|
-
mint_paused:
|
|
68
|
+
mint_paused: BcsType<boolean, boolean, "bool">;
|
|
72
69
|
/**
|
|
73
70
|
* `Some` from the flush's snapshot stage until this market's `value_expiry` (or
|
|
74
71
|
* lazily discarded once the stamp goes stale — see `ValuationStamp`). Trading is
|
|
@@ -76,7 +73,7 @@ declare const ExpiryMarket: MoveStruct<{
|
|
|
76
73
|
* at the snapshot instant, and the payout tree captures its own boundary shadows
|
|
77
74
|
* as trades first touch each node.
|
|
78
75
|
*/
|
|
79
|
-
valuation_stamp:
|
|
76
|
+
valuation_stamp: BcsType<{
|
|
80
77
|
flush_seq: bigint;
|
|
81
78
|
snapshot_cash: bigint;
|
|
82
79
|
snapshot_impact_reserve: bigint;
|
|
@@ -87,16 +84,127 @@ declare const ExpiryMarket: MoveStruct<{
|
|
|
87
84
|
} | null | undefined, "Option<@local-pkg/deepbook_predict::expiry_market::ValuationStamp>">;
|
|
88
85
|
}, "@local-pkg/deepbook_predict::expiry_market::ExpiryMarket">;
|
|
89
86
|
declare const MintQuote: MoveStruct<{
|
|
90
|
-
quantity:
|
|
91
|
-
entry_probability:
|
|
92
|
-
premium:
|
|
93
|
-
trading_fee:
|
|
94
|
-
fee_incentive_subsidy:
|
|
95
|
-
builder_fee:
|
|
96
|
-
penalty_fee:
|
|
97
|
-
inventory_impact_charge:
|
|
98
|
-
all_in_cost:
|
|
87
|
+
quantity: BcsType<bigint, string | number | bigint, "u64">;
|
|
88
|
+
entry_probability: BcsType<bigint, string | number | bigint, "u64">;
|
|
89
|
+
premium: BcsType<bigint, string | number | bigint, "u64">;
|
|
90
|
+
trading_fee: BcsType<bigint, string | number | bigint, "u64">;
|
|
91
|
+
fee_incentive_subsidy: BcsType<bigint, string | number | bigint, "u64">;
|
|
92
|
+
builder_fee: BcsType<bigint, string | number | bigint, "u64">;
|
|
93
|
+
penalty_fee: BcsType<bigint, string | number | bigint, "u64">;
|
|
94
|
+
inventory_impact_charge: BcsType<bigint, string | number | bigint, "u64">;
|
|
95
|
+
all_in_cost: BcsType<bigint, string | number | bigint, "u64">;
|
|
99
96
|
}, "@local-pkg/deepbook_predict::expiry_market::MintQuote">;
|
|
97
|
+
declare const RedeemQuote: MoveStruct<{
|
|
98
|
+
close_quantity: BcsType<bigint, string | number | bigint, "u64">;
|
|
99
|
+
probability: BcsType<bigint, string | number | bigint, "u64">;
|
|
100
|
+
proceeds: BcsType<bigint, string | number | bigint, "u64">;
|
|
101
|
+
trading_fee: BcsType<bigint, string | number | bigint, "u64">;
|
|
102
|
+
builder_fee: BcsType<bigint, string | number | bigint, "u64">;
|
|
103
|
+
inventory_impact_rebate: BcsType<bigint, string | number | bigint, "u64">;
|
|
104
|
+
}, "@local-pkg/deepbook_predict::expiry_market::RedeemQuote">;
|
|
105
|
+
declare const OrderParties: MoveStruct<{
|
|
106
|
+
account_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
107
|
+
owner: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">; /** Sell proceeds and the settled payout go only here. */
|
|
108
|
+
receive_address: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
109
|
+
referrer_account_id: BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
110
|
+
referrer_receive_address: BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
111
|
+
builder_code_id: BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
112
|
+
}, "@local-pkg/deepbook_predict::expiry_market::OrderParties">;
|
|
113
|
+
declare const OrderReceipt: MoveStruct<{
|
|
114
|
+
expiry_market_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
115
|
+
stage: BcsType<number, number, "u8">; /** A `constants` mint kind, or `order_kind_sell` once a sell is admitted. */
|
|
116
|
+
kind: BcsType<number, number, "u8">; /** The account's snapshot at the last admission. */
|
|
117
|
+
parties: MoveStruct<{
|
|
118
|
+
account_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
119
|
+
owner: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">; /** Sell proceeds and the settled payout go only here. */
|
|
120
|
+
receive_address: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
121
|
+
referrer_account_id: BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
122
|
+
referrer_receive_address: BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
123
|
+
builder_code_id: BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
124
|
+
}, "@local-pkg/deepbook_predict::expiry_market::OrderParties">;
|
|
125
|
+
lower_tick: BcsType<bigint, string | number | bigint, "u64">;
|
|
126
|
+
higher_tick: BcsType<bigint, string | number | bigint, "u64">; /** The exact mint quantity, or the sell's close quantity. */
|
|
127
|
+
quantity: BcsType<bigint, string | number | bigint, "u64">;
|
|
128
|
+
max_premium: BcsType<bigint, string | number | bigint, "u64">;
|
|
129
|
+
min_quantity: BcsType<bigint, string | number | bigint, "u64">;
|
|
130
|
+
max_probability: BcsType<bigint, string | number | bigint, "u64">;
|
|
131
|
+
min_probability: BcsType<bigint, string | number | bigint, "u64">;
|
|
132
|
+
min_proceeds: BcsType<bigint, string | number | bigint, "u64">; /** Earliest Pyth generation time the order may price at. */
|
|
133
|
+
tau_ms: BcsType<bigint, string | number | bigint, "u64">; /** At or past it the order is refunded, never filled. */
|
|
134
|
+
deadline_ms: BcsType<bigint, string | number | bigint, "u64">; /** The Lazer channel τ was planned on; the committed price must come from it. */
|
|
135
|
+
channel: BcsType<number, number, "u8">;
|
|
136
|
+
vol: MoveStruct<{
|
|
137
|
+
pyth_source_id: BcsType<number, number, "u32">;
|
|
138
|
+
bs_spot: BcsType<bigint, string | number | bigint, "u64">;
|
|
139
|
+
bs_forward: BcsType<bigint, string | number | bigint, "u64">;
|
|
140
|
+
svi_a: MoveStruct<{
|
|
141
|
+
magnitude: BcsType<bigint, string | number | bigint, "u64">;
|
|
142
|
+
is_negative: BcsType<boolean, boolean, "bool">;
|
|
143
|
+
}, "fixed_math::i64::I64">;
|
|
144
|
+
svi_b: BcsType<bigint, string | number | bigint, "u64">;
|
|
145
|
+
svi_rho: MoveStruct<{
|
|
146
|
+
magnitude: BcsType<bigint, string | number | bigint, "u64">;
|
|
147
|
+
is_negative: BcsType<boolean, boolean, "bool">;
|
|
148
|
+
}, "fixed_math::i64::I64">;
|
|
149
|
+
svi_m: MoveStruct<{
|
|
150
|
+
magnitude: BcsType<bigint, string | number | bigint, "u64">;
|
|
151
|
+
is_negative: BcsType<boolean, boolean, "bool">;
|
|
152
|
+
}, "fixed_math::i64::I64">;
|
|
153
|
+
svi_sigma: BcsType<bigint, string | number | bigint, "u64">;
|
|
154
|
+
bs_spot_source_timestamp_ms: BcsType<bigint, string | number | bigint, "u64">;
|
|
155
|
+
bs_forward_source_timestamp_ms: BcsType<bigint, string | number | bigint, "u64">;
|
|
156
|
+
svi_source_timestamp_ms: BcsType<bigint, string | number | bigint, "u64">;
|
|
157
|
+
}, "@local-pkg/deepbook_predict::pricing::VolSnapshot">;
|
|
158
|
+
budget: BcsType<bigint, string | number | bigint, "u64">;
|
|
159
|
+
order_fee: BcsType<bigint, string | number | bigint, "u64">;
|
|
160
|
+
/**
|
|
161
|
+
* Worst-case market cash the fill can consume. Counted in the ledger's
|
|
162
|
+
* `waiting_cash_need` while the order is admitted.
|
|
163
|
+
*/
|
|
164
|
+
cash_need: BcsType<bigint, string | number | bigint, "u64">;
|
|
165
|
+
/**
|
|
166
|
+
* The t₀ quote's pre-subsidy trading fee, capped at `budget`. Bounds the subsidy
|
|
167
|
+
* `commit` reserves.
|
|
168
|
+
*/
|
|
169
|
+
subsidy_bound: BcsType<bigint, string | number | bigint, "u64">;
|
|
170
|
+
subsidy_rate: BcsType<bigint, string | number | bigint, "u64">;
|
|
171
|
+
subsidy_reserved: BcsType<bigint, string | number | bigint, "u64">; /** The committed Pyth price, 1e9-normalized; `0` until `commit`. */
|
|
172
|
+
spot: BcsType<bigint, string | number | bigint, "u64">; /** The committed update's envelope, in ms. The fill prices at it. */
|
|
173
|
+
tick_ms: BcsType<bigint, string | number | bigint, "u64">; /** The committed feed's own update time, in µs. */
|
|
174
|
+
generation_us: BcsType<bigint, string | number | bigint, "u64">; /** The open position's order ID; `0` until the mint fills. */
|
|
175
|
+
order_id: BcsType<bigint, string | number | bigint, "u256">; /** Stable economic-position handle, constant across partial closes. */
|
|
176
|
+
root_id: BcsType<bigint, string | number | bigint, "u256">;
|
|
177
|
+
opened_at_ms: BcsType<bigint, string | number | bigint, "u64">;
|
|
178
|
+
/**
|
|
179
|
+
* The open position's size, the quantity `order_id` names. The request's
|
|
180
|
+
* `quantity` is the mint or close quantity, so a sell admission never overwrites
|
|
181
|
+
* the size it closes.
|
|
182
|
+
*/
|
|
183
|
+
held_quantity: BcsType<bigint, string | number | bigint, "u64">;
|
|
184
|
+
}, "@local-pkg/deepbook_predict::expiry_market::OrderReceipt">;
|
|
185
|
+
declare const OrderFlowLedgerKey: MoveTuple<readonly [BcsType<boolean, boolean, "bool">], "@local-pkg/deepbook_predict::expiry_market::OrderFlowLedgerKey">;
|
|
186
|
+
declare const OrderFlowLedger: MoveStruct<{
|
|
187
|
+
/**
|
|
188
|
+
* Admitted mints per payout-tree tick (tick -> count). A pinned node is never
|
|
189
|
+
* pruned, so a fill never creates one.
|
|
190
|
+
*/
|
|
191
|
+
pins: MoveStruct<{
|
|
192
|
+
contents: BcsType<{
|
|
193
|
+
key: bigint;
|
|
194
|
+
value: bigint;
|
|
195
|
+
}[], Iterable<{
|
|
196
|
+
key: string | number | bigint;
|
|
197
|
+
value: string | number | bigint;
|
|
198
|
+
}> & {
|
|
199
|
+
length: number;
|
|
200
|
+
}, string>;
|
|
201
|
+
}, "0x2::vec_map::VecMap<u64, u64>">;
|
|
202
|
+
/**
|
|
203
|
+
* Sum of the admitted orders' cash needs. `rebalance_expiry_cash` funds a live
|
|
204
|
+
* market to at least required cash plus this.
|
|
205
|
+
*/
|
|
206
|
+
waiting_cash_need: BcsType<bigint, string | number | bigint, "u64">;
|
|
207
|
+
}, "@local-pkg/deepbook_predict::expiry_market::OrderFlowLedger">;
|
|
100
208
|
interface IdArguments {
|
|
101
209
|
market: RawTransactionArgument<string>;
|
|
102
210
|
}
|
|
@@ -108,7 +216,7 @@ interface IdOptions {
|
|
|
108
216
|
};
|
|
109
217
|
}
|
|
110
218
|
/** Return the market object ID for external discovery and PTB construction. */
|
|
111
|
-
declare function id(options: IdOptions): (tx: Transaction) =>
|
|
219
|
+
declare function id(options: IdOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
112
220
|
interface PropbookUnderlyingIdArguments {
|
|
113
221
|
market: RawTransactionArgument<string>;
|
|
114
222
|
}
|
|
@@ -120,7 +228,7 @@ interface PropbookUnderlyingIdOptions {
|
|
|
120
228
|
};
|
|
121
229
|
}
|
|
122
230
|
/** Return the Propbook underlying for SDK and devInspect market reads. */
|
|
123
|
-
declare function propbookUnderlyingId(options: PropbookUnderlyingIdOptions): (tx: Transaction) =>
|
|
231
|
+
declare function propbookUnderlyingId(options: PropbookUnderlyingIdOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
124
232
|
interface ExpiryArguments {
|
|
125
233
|
market: RawTransactionArgument<string>;
|
|
126
234
|
}
|
|
@@ -132,7 +240,7 @@ interface ExpiryOptions {
|
|
|
132
240
|
};
|
|
133
241
|
}
|
|
134
242
|
/** Return the expiry timestamp for SDK and devInspect market reads. */
|
|
135
|
-
declare function expiry(options: ExpiryOptions): (tx: Transaction) =>
|
|
243
|
+
declare function expiry(options: ExpiryOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
136
244
|
interface SettlementPriceArguments {
|
|
137
245
|
market: RawTransactionArgument<string>;
|
|
138
246
|
}
|
|
@@ -144,7 +252,7 @@ interface SettlementPriceOptions {
|
|
|
144
252
|
};
|
|
145
253
|
}
|
|
146
254
|
/** Return the recorded settlement price. Aborts if the market is not settled. */
|
|
147
|
-
declare function settlementPrice(options: SettlementPriceOptions): (tx: Transaction) =>
|
|
255
|
+
declare function settlementPrice(options: SettlementPriceOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
148
256
|
interface IsSettledArguments {
|
|
149
257
|
market: RawTransactionArgument<string>;
|
|
150
258
|
}
|
|
@@ -159,7 +267,7 @@ interface IsSettledOptions {
|
|
|
159
267
|
* Return whether terminal settlement has been recorded for this market. Public
|
|
160
268
|
* read for SDK/devInspect settlement-state checks.
|
|
161
269
|
*/
|
|
162
|
-
declare function isSettled(options: IsSettledOptions): (tx: Transaction) =>
|
|
270
|
+
declare function isSettled(options: IsSettledOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
163
271
|
interface TrySettlementPriceArguments {
|
|
164
272
|
market: RawTransactionArgument<string>;
|
|
165
273
|
}
|
|
@@ -174,7 +282,7 @@ interface TrySettlementPriceOptions {
|
|
|
174
282
|
* Return the recorded settlement price, or `none` while the market is live.
|
|
175
283
|
* Non-aborting companion to `settlement_price` for SDK/devInspect reads.
|
|
176
284
|
*/
|
|
177
|
-
declare function trySettlementPrice(options: TrySettlementPriceOptions): (tx: Transaction) =>
|
|
285
|
+
declare function trySettlementPrice(options: TrySettlementPriceOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
178
286
|
interface CashBalanceArguments {
|
|
179
287
|
market: RawTransactionArgument<string>;
|
|
180
288
|
}
|
|
@@ -186,7 +294,7 @@ interface CashBalanceOptions {
|
|
|
186
294
|
};
|
|
187
295
|
}
|
|
188
296
|
/** Return expiry USDC custody for SDK and devInspect state reads. */
|
|
189
|
-
declare function cashBalance(options: CashBalanceOptions): (tx: Transaction) =>
|
|
297
|
+
declare function cashBalance(options: CashBalanceOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
190
298
|
interface InventoryImpactReserveArguments {
|
|
191
299
|
market: RawTransactionArgument<string>;
|
|
192
300
|
}
|
|
@@ -198,7 +306,7 @@ interface InventoryImpactReserveOptions {
|
|
|
198
306
|
};
|
|
199
307
|
}
|
|
200
308
|
/** Return the isolated inventory-impact escrow for SDK and devInspect state reads. */
|
|
201
|
-
declare function inventoryImpactReserve(options: InventoryImpactReserveOptions): (tx: Transaction) =>
|
|
309
|
+
declare function inventoryImpactReserve(options: InventoryImpactReserveOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
202
310
|
interface FeeIncentiveBalanceArguments {
|
|
203
311
|
market: RawTransactionArgument<string>;
|
|
204
312
|
}
|
|
@@ -210,7 +318,7 @@ interface FeeIncentiveBalanceOptions {
|
|
|
210
318
|
};
|
|
211
319
|
}
|
|
212
320
|
/** Return local fee incentives for SDK and devInspect state reads. */
|
|
213
|
-
declare function feeIncentiveBalance(options: FeeIncentiveBalanceOptions): (tx: Transaction) =>
|
|
321
|
+
declare function feeIncentiveBalance(options: FeeIncentiveBalanceOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
214
322
|
interface BackingBufferLambdaArguments {
|
|
215
323
|
market: RawTransactionArgument<string>;
|
|
216
324
|
}
|
|
@@ -222,7 +330,7 @@ interface BackingBufferLambdaOptions {
|
|
|
222
330
|
};
|
|
223
331
|
}
|
|
224
332
|
/** Return the snapshotted backing-buffer lambda for SDK and devInspect reads. */
|
|
225
|
-
declare function backingBufferLambda(options: BackingBufferLambdaOptions): (tx: Transaction) =>
|
|
333
|
+
declare function backingBufferLambda(options: BackingBufferLambdaOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
226
334
|
interface ExpiryFeeWindowMsArguments {
|
|
227
335
|
market: RawTransactionArgument<string>;
|
|
228
336
|
}
|
|
@@ -234,7 +342,7 @@ interface ExpiryFeeWindowMsOptions {
|
|
|
234
342
|
};
|
|
235
343
|
}
|
|
236
344
|
/** Return the snapshotted fee-ramp window for SDK and devInspect reads. */
|
|
237
|
-
declare function expiryFeeWindowMs(options: ExpiryFeeWindowMsOptions): (tx: Transaction) =>
|
|
345
|
+
declare function expiryFeeWindowMs(options: ExpiryFeeWindowMsOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
238
346
|
interface ExpiryFeeMaxMultiplierArguments {
|
|
239
347
|
market: RawTransactionArgument<string>;
|
|
240
348
|
}
|
|
@@ -246,7 +354,7 @@ interface ExpiryFeeMaxMultiplierOptions {
|
|
|
246
354
|
};
|
|
247
355
|
}
|
|
248
356
|
/** Return the snapshotted fee-ramp multiplier for SDK and devInspect reads. */
|
|
249
|
-
declare function expiryFeeMaxMultiplier(options: ExpiryFeeMaxMultiplierOptions): (tx: Transaction) =>
|
|
357
|
+
declare function expiryFeeMaxMultiplier(options: ExpiryFeeMaxMultiplierOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
250
358
|
interface InventoryImpactMaxRateArguments {
|
|
251
359
|
market: RawTransactionArgument<string>;
|
|
252
360
|
}
|
|
@@ -261,7 +369,7 @@ interface InventoryImpactMaxRateOptions {
|
|
|
261
369
|
* Return this market's immutable maximum marginal inventory-impact rate for SDK
|
|
262
370
|
* and devInspect state reads.
|
|
263
371
|
*/
|
|
264
|
-
declare function inventoryImpactMaxRate(options: InventoryImpactMaxRateOptions): (tx: Transaction) =>
|
|
372
|
+
declare function inventoryImpactMaxRate(options: InventoryImpactMaxRateOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
265
373
|
interface InventoryImpactScaleArguments {
|
|
266
374
|
market: RawTransactionArgument<string>;
|
|
267
375
|
}
|
|
@@ -276,7 +384,7 @@ interface InventoryImpactScaleOptions {
|
|
|
276
384
|
* Return the immutable USDC scale of this market's inventory-impact curve for SDK
|
|
277
385
|
* and devInspect state reads.
|
|
278
386
|
*/
|
|
279
|
-
declare function inventoryImpactScale(options: InventoryImpactScaleOptions): (tx: Transaction) =>
|
|
387
|
+
declare function inventoryImpactScale(options: InventoryImpactScaleOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
280
388
|
interface TickSizeArguments {
|
|
281
389
|
market: RawTransactionArgument<string>;
|
|
282
390
|
}
|
|
@@ -291,7 +399,7 @@ interface TickSizeOptions {
|
|
|
291
399
|
* Return the strike tick size for SDK and devInspect range construction. Raw
|
|
292
400
|
* strikes are `tick * tick_size`.
|
|
293
401
|
*/
|
|
294
|
-
declare function tickSize(options: TickSizeOptions): (tx: Transaction) =>
|
|
402
|
+
declare function tickSize(options: TickSizeOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
295
403
|
interface AdmissionTickSizeArguments {
|
|
296
404
|
market: RawTransactionArgument<string>;
|
|
297
405
|
}
|
|
@@ -303,7 +411,7 @@ interface AdmissionTickSizeOptions {
|
|
|
303
411
|
};
|
|
304
412
|
}
|
|
305
413
|
/** Return the admission-grid step for SDK and devInspect range construction. */
|
|
306
|
-
declare function admissionTickSize(options: AdmissionTickSizeOptions): (tx: Transaction) =>
|
|
414
|
+
declare function admissionTickSize(options: AdmissionTickSizeOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
307
415
|
interface ReferenceTickArguments {
|
|
308
416
|
market: RawTransactionArgument<string>;
|
|
309
417
|
}
|
|
@@ -315,7 +423,7 @@ interface ReferenceTickOptions {
|
|
|
315
423
|
};
|
|
316
424
|
}
|
|
317
425
|
/** Return the admitted reference tick for SDK and devInspect range construction. */
|
|
318
|
-
declare function referenceTick(options: ReferenceTickOptions): (tx: Transaction) =>
|
|
426
|
+
declare function referenceTick(options: ReferenceTickOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
319
427
|
interface ReferenceTickSourceTimestampMsArguments {
|
|
320
428
|
market: RawTransactionArgument<string>;
|
|
321
429
|
}
|
|
@@ -327,7 +435,7 @@ interface ReferenceTickSourceTimestampMsOptions {
|
|
|
327
435
|
};
|
|
328
436
|
}
|
|
329
437
|
/** Return the reference observation timestamp for SDK and devInspect reads. */
|
|
330
|
-
declare function referenceTickSourceTimestampMs(options: ReferenceTickSourceTimestampMsOptions): (tx: Transaction) =>
|
|
438
|
+
declare function referenceTickSourceTimestampMs(options: ReferenceTickSourceTimestampMsOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
331
439
|
interface PayoutLiabilityArguments {
|
|
332
440
|
market: RawTransactionArgument<string>;
|
|
333
441
|
}
|
|
@@ -342,7 +450,7 @@ interface PayoutLiabilityOptions {
|
|
|
342
450
|
* Return payout reserve or settled liability for external accounting
|
|
343
451
|
* observability.
|
|
344
452
|
*/
|
|
345
|
-
declare function payoutLiability(options: PayoutLiabilityOptions): (tx: Transaction) =>
|
|
453
|
+
declare function payoutLiability(options: PayoutLiabilityOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
346
454
|
interface RequiredCashArguments {
|
|
347
455
|
market: RawTransactionArgument<string>;
|
|
348
456
|
}
|
|
@@ -354,7 +462,7 @@ interface RequiredCashOptions {
|
|
|
354
462
|
};
|
|
355
463
|
}
|
|
356
464
|
/** Return required expiry cash for external accounting observability. */
|
|
357
|
-
declare function requiredCash(options: RequiredCashOptions): (tx: Transaction) =>
|
|
465
|
+
declare function requiredCash(options: RequiredCashOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
358
466
|
interface LoadLivePricerArguments {
|
|
359
467
|
market: RawTransactionArgument<string>;
|
|
360
468
|
config?: RawTransactionArgument<string>;
|
|
@@ -384,7 +492,7 @@ interface LoadLivePricerOptions {
|
|
|
384
492
|
* compares observation `writer_digest` to `tx_context::digest()`, not sender
|
|
385
493
|
* identity, and does not prohibit reads of older observations.
|
|
386
494
|
*/
|
|
387
|
-
declare function loadLivePricer(options: LoadLivePricerOptions): (tx: Transaction) =>
|
|
495
|
+
declare function loadLivePricer(options: LoadLivePricerOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
388
496
|
interface IsPendingValuationArguments {
|
|
389
497
|
market: RawTransactionArgument<string>;
|
|
390
498
|
config?: RawTransactionArgument<string>;
|
|
@@ -404,7 +512,7 @@ interface IsPendingValuationOptions {
|
|
|
404
512
|
* settlement-invariant, so a stamped market settles the instant it expires. Do not
|
|
405
513
|
* defer a settlement attempt on this read.
|
|
406
514
|
*/
|
|
407
|
-
declare function isPendingValuation(options: IsPendingValuationOptions): (tx: Transaction) =>
|
|
515
|
+
declare function isPendingValuation(options: IsPendingValuationOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
408
516
|
interface CurrentNavArguments {
|
|
409
517
|
market: RawTransactionArgument<string>;
|
|
410
518
|
pricer: TransactionArgument;
|
|
@@ -422,7 +530,7 @@ interface CurrentNavOptions {
|
|
|
422
530
|
* `Pricer`; an expired but unsettled market cannot be valued through this path.
|
|
423
531
|
* Public for PTB composition and devInspect pool valuation.
|
|
424
532
|
*/
|
|
425
|
-
declare function currentNav(options: CurrentNavOptions): (tx: Transaction) =>
|
|
533
|
+
declare function currentNav(options: CurrentNavOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
426
534
|
interface LiveOrderValueArguments {
|
|
427
535
|
market: RawTransactionArgument<string>;
|
|
428
536
|
pricer: TransactionArgument;
|
|
@@ -440,7 +548,7 @@ interface LiveOrderValueOptions {
|
|
|
440
548
|
* market-bound `Pricer` and does not prove account ownership of `order_id`. Public
|
|
441
549
|
* for SDK, PTB, and devInspect position valuation.
|
|
442
550
|
*/
|
|
443
|
-
declare function liveOrderValue(options: LiveOrderValueOptions): (tx: Transaction) =>
|
|
551
|
+
declare function liveOrderValue(options: LiveOrderValueOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
444
552
|
interface SettledOrderPayoutArguments {
|
|
445
553
|
market: RawTransactionArgument<string>;
|
|
446
554
|
orderId: RawTransactionArgument<number | bigint>;
|
|
@@ -456,7 +564,7 @@ interface SettledOrderPayoutOptions {
|
|
|
456
564
|
* Return one settled order's terminal payout. This function does not prove account
|
|
457
565
|
* ownership of `order_id`. Public for SDK, PTB, and devInspect position valuation.
|
|
458
566
|
*/
|
|
459
|
-
declare function settledOrderPayout(options: SettledOrderPayoutOptions): (tx: Transaction) =>
|
|
567
|
+
declare function settledOrderPayout(options: SettledOrderPayoutOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
460
568
|
interface MintPausedArguments {
|
|
461
569
|
market: RawTransactionArgument<string>;
|
|
462
570
|
}
|
|
@@ -468,7 +576,7 @@ interface MintPausedOptions {
|
|
|
468
576
|
};
|
|
469
577
|
}
|
|
470
578
|
/** Return the market mint-pause state for SDK and devInspect reads. */
|
|
471
|
-
declare function mintPaused(options: MintPausedOptions): (tx: Transaction) =>
|
|
579
|
+
declare function mintPaused(options: MintPausedOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
472
580
|
interface QuoteMintArguments {
|
|
473
581
|
market: RawTransactionArgument<string>;
|
|
474
582
|
config?: RawTransactionArgument<string>;
|
|
@@ -488,14 +596,16 @@ interface QuoteMintOptions {
|
|
|
488
596
|
};
|
|
489
597
|
}
|
|
490
598
|
/**
|
|
491
|
-
* Quote
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
*
|
|
599
|
+
* Quote a prospective mint at a market-bound `Pricer`, priced like a queued fill
|
|
600
|
+
* at the clock, for SDK and devInspect previews. `exact_quantity` quotes
|
|
601
|
+
* `min_quantity` exactly; otherwise the largest quantity whose premium fits
|
|
602
|
+
* `max_premium`, at least `min_quantity`. No builder fee. The fee subsidy is the
|
|
603
|
+
* configured rate capped by the market's incentive balance, and `penalty_fee` is
|
|
604
|
+
* always 0. Gated only on the pricer binding (`EWrongPricer`) and `now < expiry`
|
|
605
|
+
* (`EInvalidOrderTiming`). Aborts `EOrderFailsLimits` when the mint would be
|
|
606
|
+
* refused at the clock.
|
|
497
607
|
*/
|
|
498
|
-
declare function quoteMint(options: QuoteMintOptions): (tx: Transaction) =>
|
|
608
|
+
declare function quoteMint(options: QuoteMintOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
499
609
|
interface QuoteMintForAccountArguments {
|
|
500
610
|
market: RawTransactionArgument<string>;
|
|
501
611
|
wrapper: RawTransactionArgument<string>;
|
|
@@ -516,11 +626,10 @@ interface QuoteMintForAccountOptions {
|
|
|
516
626
|
};
|
|
517
627
|
}
|
|
518
628
|
/**
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
* accumulator funds. Public for SDK and devInspect pre-trade pricing.
|
|
629
|
+
* `quote_mint` for the wrapper's account: `max_premium` is capped at the account's
|
|
630
|
+
* balance and the account's builder fee is charged.
|
|
522
631
|
*/
|
|
523
|
-
declare function quoteMintForAccount(options: QuoteMintForAccountOptions): (tx: Transaction) =>
|
|
632
|
+
declare function quoteMintForAccount(options: QuoteMintForAccountOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
524
633
|
interface QuoteMintExactCostForAccountArguments {
|
|
525
634
|
market: RawTransactionArgument<string>;
|
|
526
635
|
wrapper: RawTransactionArgument<string>;
|
|
@@ -540,15 +649,48 @@ interface QuoteMintExactCostForAccountOptions {
|
|
|
540
649
|
};
|
|
541
650
|
}
|
|
542
651
|
/**
|
|
543
|
-
* Quote
|
|
544
|
-
* `
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
652
|
+
* Quote the largest mint whose all-in cost fits `min(max_cost, account balance)`,
|
|
653
|
+
* at least `min_quantity`, for the wrapper's account, priced like a queued
|
|
654
|
+
* exact-cost fill at the clock. Charges the account's builder fee, and otherwise
|
|
655
|
+
* prices and gates like `quote_mint`.
|
|
656
|
+
*/
|
|
657
|
+
declare function quoteMintExactCostForAccount(options: QuoteMintExactCostForAccountOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
658
|
+
interface OrderFlowStateArguments {
|
|
659
|
+
market: RawTransactionArgument<string>;
|
|
660
|
+
}
|
|
661
|
+
interface OrderFlowStateOptions {
|
|
662
|
+
package?: string;
|
|
663
|
+
arguments: OrderFlowStateArguments | [market: RawTransactionArgument<string>];
|
|
664
|
+
config?: {
|
|
665
|
+
predictPackageId?: string;
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Return `(waiting_cash_need, payout_tree_node_count, min_entry_probability)`: the
|
|
670
|
+
* summed cash need of the market's admitted orders, above required cash, that
|
|
671
|
+
* `rebalance_expiry_cash` keeps a live market funded with; the payout tree's node
|
|
672
|
+
* count, pinned zero nodes included, which sizes the keeper's fill batches; and
|
|
673
|
+
* the snapshotted minimum entry probability the SDK computes a queued mint's cash
|
|
674
|
+
* need from. For SDK, keeper, and devInspect reads.
|
|
675
|
+
*/
|
|
676
|
+
declare function orderFlowState(options: OrderFlowStateOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
677
|
+
interface ReceiptInfoArguments {
|
|
678
|
+
receipt: TransactionArgument;
|
|
679
|
+
}
|
|
680
|
+
interface ReceiptInfoOptions {
|
|
681
|
+
package?: string;
|
|
682
|
+
arguments: ReceiptInfoArguments | [receipt: TransactionArgument];
|
|
683
|
+
config?: {
|
|
684
|
+
predictPackageId?: string;
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Return a receipt's
|
|
689
|
+
* `(expiry_market_id, stage, account_id, order_id, pyth_source_id, cash_need, subsidy_bound, vol)`.
|
|
690
|
+
* For the order-flow companion's queue events and Lazer decoding, and devInspect
|
|
691
|
+
* reads of queue records.
|
|
550
692
|
*/
|
|
551
|
-
declare function
|
|
693
|
+
declare function receiptInfo(options: ReceiptInfoOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
552
694
|
interface QuantityArguments {
|
|
553
695
|
quote: TransactionArgument;
|
|
554
696
|
}
|
|
@@ -560,7 +702,7 @@ interface QuantityOptions {
|
|
|
560
702
|
};
|
|
561
703
|
}
|
|
562
704
|
/** Return the sized quantity for SDK and devInspect quote consumers. */
|
|
563
|
-
declare function quantity(options: QuantityOptions): (tx: Transaction) =>
|
|
705
|
+
declare function quantity(options: QuantityOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
564
706
|
interface EntryProbabilityArguments {
|
|
565
707
|
quote: TransactionArgument;
|
|
566
708
|
}
|
|
@@ -572,7 +714,7 @@ interface EntryProbabilityOptions {
|
|
|
572
714
|
};
|
|
573
715
|
}
|
|
574
716
|
/** Return the quoted range probability for SDK and devInspect consumers. */
|
|
575
|
-
declare function entryProbability(options: EntryProbabilityOptions): (tx: Transaction) =>
|
|
717
|
+
declare function entryProbability(options: EntryProbabilityOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
576
718
|
interface PremiumArguments {
|
|
577
719
|
quote: TransactionArgument;
|
|
578
720
|
}
|
|
@@ -584,7 +726,7 @@ interface PremiumOptions {
|
|
|
584
726
|
};
|
|
585
727
|
}
|
|
586
728
|
/** Return the quoted premium for SDK and devInspect consumers. */
|
|
587
|
-
declare function premium(options: PremiumOptions): (tx: Transaction) =>
|
|
729
|
+
declare function premium(options: PremiumOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
588
730
|
interface TradingFeeArguments {
|
|
589
731
|
quote: TransactionArgument;
|
|
590
732
|
}
|
|
@@ -596,7 +738,7 @@ interface TradingFeeOptions {
|
|
|
596
738
|
};
|
|
597
739
|
}
|
|
598
740
|
/** Return the quoted trading fee before subsidy for SDK and devInspect consumers. */
|
|
599
|
-
declare function tradingFee(options: TradingFeeOptions): (tx: Transaction) =>
|
|
741
|
+
declare function tradingFee(options: TradingFeeOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
600
742
|
interface FeeIncentiveSubsidyArguments {
|
|
601
743
|
quote: TransactionArgument;
|
|
602
744
|
}
|
|
@@ -611,7 +753,7 @@ interface FeeIncentiveSubsidyOptions {
|
|
|
611
753
|
* Return the sponsor-funded portion of the quoted fee for SDK and devInspect
|
|
612
754
|
* consumers.
|
|
613
755
|
*/
|
|
614
|
-
declare function feeIncentiveSubsidy(options: FeeIncentiveSubsidyOptions): (tx: Transaction) =>
|
|
756
|
+
declare function feeIncentiveSubsidy(options: FeeIncentiveSubsidyOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
615
757
|
interface BuilderFeeArguments {
|
|
616
758
|
quote: TransactionArgument;
|
|
617
759
|
}
|
|
@@ -623,7 +765,7 @@ interface BuilderFeeOptions {
|
|
|
623
765
|
};
|
|
624
766
|
}
|
|
625
767
|
/** Return the quoted builder fee for SDK and devInspect consumers. */
|
|
626
|
-
declare function builderFee(options: BuilderFeeOptions): (tx: Transaction) =>
|
|
768
|
+
declare function builderFee(options: BuilderFeeOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
627
769
|
interface PenaltyFeeArguments {
|
|
628
770
|
quote: TransactionArgument;
|
|
629
771
|
}
|
|
@@ -635,7 +777,7 @@ interface PenaltyFeeOptions {
|
|
|
635
777
|
};
|
|
636
778
|
}
|
|
637
779
|
/** Return the quoted EWMA congestion surcharge for SDK and devInspect consumers. */
|
|
638
|
-
declare function penaltyFee(options: PenaltyFeeOptions): (tx: Transaction) =>
|
|
780
|
+
declare function penaltyFee(options: PenaltyFeeOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
639
781
|
interface InventoryImpactChargeArguments {
|
|
640
782
|
quote: TransactionArgument;
|
|
641
783
|
}
|
|
@@ -650,7 +792,7 @@ interface InventoryImpactChargeOptions {
|
|
|
650
792
|
* Return the separate inventory-impact charge for SDK and devInspect quote
|
|
651
793
|
* consumers.
|
|
652
794
|
*/
|
|
653
|
-
declare function inventoryImpactCharge(options: InventoryImpactChargeOptions): (tx: Transaction) =>
|
|
795
|
+
declare function inventoryImpactCharge(options: InventoryImpactChargeOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
654
796
|
interface AllInCostArguments {
|
|
655
797
|
quote: TransactionArgument;
|
|
656
798
|
}
|
|
@@ -662,18 +804,109 @@ interface AllInCostOptions {
|
|
|
662
804
|
};
|
|
663
805
|
}
|
|
664
806
|
/** Return the total quoted account withdrawal for SDK and devInspect consumers. */
|
|
665
|
-
declare function allInCost(options: AllInCostOptions): (tx: Transaction) =>
|
|
666
|
-
interface
|
|
807
|
+
declare function allInCost(options: AllInCostOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
808
|
+
interface RedeemCloseQuantityArguments {
|
|
809
|
+
quote: TransactionArgument;
|
|
810
|
+
}
|
|
811
|
+
interface RedeemCloseQuantityOptions {
|
|
812
|
+
package?: string;
|
|
813
|
+
arguments: RedeemCloseQuantityArguments | [quote: TransactionArgument];
|
|
814
|
+
config?: {
|
|
815
|
+
predictPackageId?: string;
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
declare function redeemCloseQuantity(options: RedeemCloseQuantityOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
819
|
+
interface RedeemProbabilityArguments {
|
|
820
|
+
quote: TransactionArgument;
|
|
821
|
+
}
|
|
822
|
+
interface RedeemProbabilityOptions {
|
|
823
|
+
package?: string;
|
|
824
|
+
arguments: RedeemProbabilityArguments | [quote: TransactionArgument];
|
|
825
|
+
config?: {
|
|
826
|
+
predictPackageId?: string;
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
declare function redeemProbability(options: RedeemProbabilityOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
830
|
+
interface RedeemProceedsArguments {
|
|
831
|
+
quote: TransactionArgument;
|
|
832
|
+
}
|
|
833
|
+
interface RedeemProceedsOptions {
|
|
834
|
+
package?: string;
|
|
835
|
+
arguments: RedeemProceedsArguments | [quote: TransactionArgument];
|
|
836
|
+
config?: {
|
|
837
|
+
predictPackageId?: string;
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
declare function redeemProceeds(options: RedeemProceedsOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
841
|
+
interface RedeemTradingFeeArguments {
|
|
842
|
+
quote: TransactionArgument;
|
|
843
|
+
}
|
|
844
|
+
interface RedeemTradingFeeOptions {
|
|
845
|
+
package?: string;
|
|
846
|
+
arguments: RedeemTradingFeeArguments | [quote: TransactionArgument];
|
|
847
|
+
config?: {
|
|
848
|
+
predictPackageId?: string;
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
declare function redeemTradingFee(options: RedeemTradingFeeOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
852
|
+
interface RedeemBuilderFeeArguments {
|
|
853
|
+
quote: TransactionArgument;
|
|
854
|
+
}
|
|
855
|
+
interface RedeemBuilderFeeOptions {
|
|
856
|
+
package?: string;
|
|
857
|
+
arguments: RedeemBuilderFeeArguments | [quote: TransactionArgument];
|
|
858
|
+
config?: {
|
|
859
|
+
predictPackageId?: string;
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
declare function redeemBuilderFee(options: RedeemBuilderFeeOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
863
|
+
interface RedeemInventoryImpactRebateArguments {
|
|
864
|
+
quote: TransactionArgument;
|
|
865
|
+
}
|
|
866
|
+
interface RedeemInventoryImpactRebateOptions {
|
|
867
|
+
package?: string;
|
|
868
|
+
arguments: RedeemInventoryImpactRebateArguments | [quote: TransactionArgument];
|
|
869
|
+
config?: {
|
|
870
|
+
predictPackageId?: string;
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
declare function redeemInventoryImpactRebate(options: RedeemInventoryImpactRebateOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
874
|
+
interface QuoteCloseArguments {
|
|
667
875
|
market: RawTransactionArgument<string>;
|
|
668
|
-
wrapper: RawTransactionArgument<string>;
|
|
669
|
-
auth: TransactionArgument;
|
|
670
|
-
config?: RawTransactionArgument<string>;
|
|
671
876
|
pricer: TransactionArgument;
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
877
|
+
receipt: TransactionArgument;
|
|
878
|
+
closeQuantity: RawTransactionArgument<number | bigint>;
|
|
879
|
+
builderCodeId: RawTransactionArgument<string | null>;
|
|
880
|
+
}
|
|
881
|
+
interface QuoteCloseOptions {
|
|
882
|
+
package?: string;
|
|
883
|
+
arguments: QuoteCloseArguments | [market: RawTransactionArgument<string>, pricer: TransactionArgument, receipt: TransactionArgument, closeQuantity: RawTransactionArgument<number | bigint>, builderCodeId: RawTransactionArgument<string | null>];
|
|
884
|
+
config?: {
|
|
885
|
+
predictPackageId?: string;
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Quote an early sell of `close_quantity` of an open receipt's position at a
|
|
890
|
+
* market-bound `Pricer` and the clock, charging `builder_code_id`'s builder fee:
|
|
891
|
+
* the close a sell fill prices, without the trader's floors. `proceeds` is before
|
|
892
|
+
* the order fee. Changes nothing. Aborts on the pricer binding (`EWrongPricer`),
|
|
893
|
+
* another market's receipt (`EWrongMarket`), a receipt that is not open
|
|
894
|
+
* (`EWrongStage`), `now >= expiry` (`EInvalidOrderTiming`), or a close that cannot
|
|
895
|
+
* be priced (`EOrderFailsLimits`). Public for the order-flow companion's sell
|
|
896
|
+
* preview and SDK reads.
|
|
897
|
+
*/
|
|
898
|
+
declare function quoteClose(options: QuoteCloseOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
899
|
+
interface MintExactQuantityArguments {
|
|
900
|
+
Market: RawTransactionArgument<string>;
|
|
901
|
+
Wrapper: RawTransactionArgument<string>;
|
|
902
|
+
Auth: TransactionArgument;
|
|
903
|
+
Config?: RawTransactionArgument<string>;
|
|
904
|
+
Pricer: TransactionArgument;
|
|
905
|
+
LowerTick: RawTransactionArgument<number | bigint>;
|
|
906
|
+
HigherTick: RawTransactionArgument<number | bigint>;
|
|
907
|
+
Quantity: RawTransactionArgument<number | bigint>;
|
|
908
|
+
MaxCost: RawTransactionArgument<number | bigint>;
|
|
909
|
+
MaxProbability: RawTransactionArgument<number | bigint>;
|
|
677
910
|
}
|
|
678
911
|
interface MintExactQuantityOptions {
|
|
679
912
|
package?: string;
|
|
@@ -683,33 +916,17 @@ interface MintExactQuantityOptions {
|
|
|
683
916
|
predictPackageId?: string;
|
|
684
917
|
};
|
|
685
918
|
}
|
|
686
|
-
/**
|
|
687
|
-
* Mint an exact live position quantity against this expiry market.
|
|
688
|
-
*
|
|
689
|
-
* Requires the running package version to be at or above the protocol version
|
|
690
|
-
* watermark, per-market mint pause to be off, trading globally enabled, valid
|
|
691
|
-
* owner or authorized-app account auth, a market-bound live `Pricer`, and enough
|
|
692
|
-
* expiry cash to back the post-mint max payout. Mint fees are paid by routing a
|
|
693
|
-
* withdraw through the loaded account. The position's strike range is the tick
|
|
694
|
-
* pair `(lower_tick, higher_tick]` (`lower_tick = 0` is `-inf`,
|
|
695
|
-
* `higher_tick = pos_inf_tick` is `+inf`); the SDK converts raw strikes to ticks.
|
|
696
|
-
* `max_cost` caps the all-in USDC withdrawal, while `max_probability` caps the
|
|
697
|
-
* quoted per-contract probability before fees. Callers can pass
|
|
698
|
-
* `std::u64::max_value!()` for either uncapped guard. Returns the minted order ID
|
|
699
|
-
* for future order-scoped flows.
|
|
700
|
-
*/
|
|
701
|
-
declare function mintExactQuantity(options: MintExactQuantityOptions): (tx: Transaction) => _mysten_sui_transactions152.TransactionResult;
|
|
702
919
|
interface MintExactAmountArguments {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
920
|
+
Market: RawTransactionArgument<string>;
|
|
921
|
+
Wrapper: RawTransactionArgument<string>;
|
|
922
|
+
Auth: TransactionArgument;
|
|
923
|
+
Config?: RawTransactionArgument<string>;
|
|
924
|
+
Pricer: TransactionArgument;
|
|
925
|
+
LowerTick: RawTransactionArgument<number | bigint>;
|
|
926
|
+
HigherTick: RawTransactionArgument<number | bigint>;
|
|
927
|
+
MaxPremium: RawTransactionArgument<number | bigint>;
|
|
928
|
+
MinQuantity: RawTransactionArgument<number | bigint>;
|
|
929
|
+
MaxCost: RawTransactionArgument<number | bigint>;
|
|
713
930
|
}
|
|
714
931
|
interface MintExactAmountOptions {
|
|
715
932
|
package?: string;
|
|
@@ -719,32 +936,16 @@ interface MintExactAmountOptions {
|
|
|
719
936
|
predictPackageId?: string;
|
|
720
937
|
};
|
|
721
938
|
}
|
|
722
|
-
/**
|
|
723
|
-
* Mint a conservatively sized lot-rounded position whose premium does not exceed
|
|
724
|
-
* `max_premium`. The result may be one lot below the largest fitting quantity and
|
|
725
|
-
* must meet `min_quantity`.
|
|
726
|
-
*
|
|
727
|
-
* Fees, builder fees, and EWMA congestion penalties are charged on top of
|
|
728
|
-
* `max_premium`, so `max_cost` — not `max_premium` — bounds the all-in USDC
|
|
729
|
-
* withdrawal (`premium + trader-paid fee + builder_fee + EWMA penalty`).
|
|
730
|
-
* `max_cost` is required: unlike `mint_exact_quantity`'s guards there is no value
|
|
731
|
-
* that disables it, because the budget shape exists to bound spend. The sizing
|
|
732
|
-
* budget is first capped to the account's available USDC after settlement; fees
|
|
733
|
-
* still require additional available USDC at payment time. Any unspent premium
|
|
734
|
-
* dust remains in the account because order quantity must be an integer number of
|
|
735
|
-
* `position_lot_size` lots.
|
|
736
|
-
*/
|
|
737
|
-
declare function mintExactAmount(options: MintExactAmountOptions): (tx: Transaction) => _mysten_sui_transactions152.TransactionResult;
|
|
738
939
|
interface MintExactCostArguments {
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
940
|
+
Market: RawTransactionArgument<string>;
|
|
941
|
+
Wrapper: RawTransactionArgument<string>;
|
|
942
|
+
Auth: TransactionArgument;
|
|
943
|
+
Config?: RawTransactionArgument<string>;
|
|
944
|
+
Pricer: TransactionArgument;
|
|
945
|
+
LowerTick: RawTransactionArgument<number | bigint>;
|
|
946
|
+
HigherTick: RawTransactionArgument<number | bigint>;
|
|
947
|
+
MaxCost: RawTransactionArgument<number | bigint>;
|
|
948
|
+
MinQuantity: RawTransactionArgument<number | bigint>;
|
|
748
949
|
}
|
|
749
950
|
interface MintExactCostOptions {
|
|
750
951
|
package?: string;
|
|
@@ -754,49 +955,16 @@ interface MintExactCostOptions {
|
|
|
754
955
|
predictPackageId?: string;
|
|
755
956
|
};
|
|
756
957
|
}
|
|
757
|
-
/**
|
|
758
|
-
* Mint a lot-rounded position within an all-in `max_cost` budget.
|
|
759
|
-
*
|
|
760
|
-
* Unlike `mint_exact_amount`, fees are sized inside the budget: the quantity
|
|
761
|
-
* search evaluates the all-in withdrawal the mint charges
|
|
762
|
-
* (`premium + trader-paid fee + builder_fee + EWMA penalty + inventory_impact_charge`)
|
|
763
|
-
* against the fee-incentive, congestion, and book state at execution, so the debit
|
|
764
|
-
* never exceeds `max_cost`. `max_cost` is first capped to the account's available
|
|
765
|
-
* USDC after settlement, so `std::u64::max_value!()` sizes against the whole
|
|
766
|
-
* balance.
|
|
767
|
-
*
|
|
768
|
-
* The budget search finds the largest fitting quantity. If that quantity costs
|
|
769
|
-
* more than its maximum payout, a conservative search tries a smaller fill;
|
|
770
|
-
* rounding can make that fallback miss a larger admissible fill. Only when the
|
|
771
|
-
* budget is the limiting constraint is the remainder less than the incremental
|
|
772
|
-
* all-in cost of one more lot. Payout-limited fills and lot-cap saturation can
|
|
773
|
-
* leave more. Insufficient expiry cash backing aborts the mint; sizing does not
|
|
774
|
-
* shrink the fill to available backing, and the quote does not preflight it.
|
|
775
|
-
*
|
|
776
|
-
* `min_quantity` is this entrypoint's slippage guard. The budget is fixed, so
|
|
777
|
-
* every adverse move between building the transaction and executing it — the
|
|
778
|
-
* price, the congestion surcharge, the sponsor subsidy, the inventory-impact
|
|
779
|
-
* charge — shows up as fewer contracts, and a fill below `min_quantity` aborts
|
|
780
|
-
* `EMintQuantityBelowMin`. It bounds the all-in price per contract at
|
|
781
|
-
* `max_cost / min_quantity`, which is why the shape carries no separate
|
|
782
|
-
* probability cap; passing `0` accepts any fill the budget buys. A budget too
|
|
783
|
-
* small to admit `constants::min_premium` aborts `EPremiumBelowMinimum` rather
|
|
784
|
-
* than minting nothing, and zero is such a budget: unlike `mint_exact_amount`
|
|
785
|
-
* there is no `max_cost` cap to require, because here the budget IS the sizing
|
|
786
|
-
* input. Other requirements match `mint_exact_quantity`. Returns the minted order
|
|
787
|
-
* ID.
|
|
788
|
-
*/
|
|
789
|
-
declare function mintExactCost(options: MintExactCostOptions): (tx: Transaction) => _mysten_sui_transactions152.TransactionResult;
|
|
790
958
|
interface RedeemLiveArguments {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
959
|
+
Market: RawTransactionArgument<string>;
|
|
960
|
+
Wrapper: RawTransactionArgument<string>;
|
|
961
|
+
Auth: TransactionArgument;
|
|
962
|
+
Config?: RawTransactionArgument<string>;
|
|
963
|
+
Pricer: TransactionArgument;
|
|
964
|
+
OrderId: RawTransactionArgument<number | bigint>;
|
|
965
|
+
CloseQuantity: RawTransactionArgument<number | bigint>;
|
|
966
|
+
MinProbability: RawTransactionArgument<number | bigint>;
|
|
967
|
+
MinProceeds: RawTransactionArgument<number | bigint>;
|
|
800
968
|
}
|
|
801
969
|
interface RedeemLiveOptions {
|
|
802
970
|
package?: string;
|
|
@@ -806,21 +974,6 @@ interface RedeemLiveOptions {
|
|
|
806
974
|
predictPackageId?: string;
|
|
807
975
|
};
|
|
808
976
|
}
|
|
809
|
-
/**
|
|
810
|
-
* Redeem a live order you hold account authority over.
|
|
811
|
-
*
|
|
812
|
-
* A live order is priced and closed (partial or full). Settled orders must use
|
|
813
|
-
* `redeem_settled`. Returns a replacement order ID only when a partial close
|
|
814
|
-
* leaves quantity open.
|
|
815
|
-
*
|
|
816
|
-
* Two close-side slippage floors, the mirror of mint's `max_probability` /
|
|
817
|
-
* `max_cost` pair; pass `0` to disable either. `min_probability` floors the quoted
|
|
818
|
-
* per-contract range probability (same units as mint's `max_probability`).
|
|
819
|
-
* `min_proceeds` floors the all-in net USDC credited to the account
|
|
820
|
-
* (`redeem_amount` minus trading fee, builder fee, and EWMA penalty), the mirror
|
|
821
|
-
* of mint's all-in `max_cost`.
|
|
822
|
-
*/
|
|
823
|
-
declare function redeemLive(options: RedeemLiveOptions): (tx: Transaction) => _mysten_sui_transactions152.TransactionResult;
|
|
824
977
|
interface RedeemSettledArguments {
|
|
825
978
|
market: RawTransactionArgument<string>;
|
|
826
979
|
wrapper: RawTransactionArgument<string>;
|
|
@@ -843,7 +996,7 @@ interface RedeemSettledOptions {
|
|
|
843
996
|
* Explicit owner auth remains available when Predict app automation is
|
|
844
997
|
* deauthorized; another authorized app may also supply valid account auth.
|
|
845
998
|
*/
|
|
846
|
-
declare function redeemSettled(options: RedeemSettledOptions): (tx: Transaction) =>
|
|
999
|
+
declare function redeemSettled(options: RedeemSettledOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
847
1000
|
interface RedeemSettledPermissionlessArguments {
|
|
848
1001
|
market: RawTransactionArgument<string>;
|
|
849
1002
|
accountRegistry: RawTransactionArgument<string>;
|
|
@@ -860,13 +1013,17 @@ interface RedeemSettledPermissionlessOptions {
|
|
|
860
1013
|
};
|
|
861
1014
|
}
|
|
862
1015
|
/**
|
|
863
|
-
*
|
|
1016
|
+
* Redeem a settled order without account-owner authority, as an allowlisted
|
|
1017
|
+
* keeper.
|
|
864
1018
|
*
|
|
865
|
-
*
|
|
866
|
-
* `
|
|
867
|
-
*
|
|
1019
|
+
* Despite the name, only a sender admin has added through
|
|
1020
|
+
* `protocol_config::add_settled_redeem_keeper` may call this; the allowlist starts
|
|
1021
|
+
* empty. The payout still goes to the order's account. This keeper path uses
|
|
1022
|
+
* Predict app-auth from the account registry, so `deauthorize_app<PredictApp>`
|
|
1023
|
+
* also disables it. Owners can still use `redeem_settled` with owner auth to
|
|
1024
|
+
* redeem their own settled positions.
|
|
868
1025
|
*/
|
|
869
|
-
declare function redeemSettledPermissionless(options: RedeemSettledPermissionlessOptions): (tx: Transaction) =>
|
|
1026
|
+
declare function redeemSettledPermissionless(options: RedeemSettledPermissionlessOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
870
1027
|
interface SetReferenceTickArguments {
|
|
871
1028
|
market: RawTransactionArgument<string>;
|
|
872
1029
|
config?: RawTransactionArgument<string>;
|
|
@@ -890,7 +1047,7 @@ interface SetReferenceTickOptions {
|
|
|
890
1047
|
* the reference tick shapes mint admission only, and a mint it admits mid-flush is
|
|
891
1048
|
* invisible to the captured snapshot like any other.
|
|
892
1049
|
*/
|
|
893
|
-
declare function setReferenceTick(options: SetReferenceTickOptions): (tx: Transaction) =>
|
|
1050
|
+
declare function setReferenceTick(options: SetReferenceTickOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
894
1051
|
interface SetMintPausedArguments {
|
|
895
1052
|
market: RawTransactionArgument<string>;
|
|
896
1053
|
config?: RawTransactionArgument<string>;
|
|
@@ -910,7 +1067,7 @@ interface SetMintPausedOptions {
|
|
|
910
1067
|
* version-gated. A `PauseCap` holder can force-engage the pause one-way under a
|
|
911
1068
|
* version freeze via `registry::pause_expiry_market_mint_pause_cap`.
|
|
912
1069
|
*/
|
|
913
|
-
declare function setMintPaused(options: SetMintPausedOptions): (tx: Transaction) =>
|
|
1070
|
+
declare function setMintPaused(options: SetMintPausedOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
914
1071
|
interface TrySettleArguments {
|
|
915
1072
|
market: RawTransactionArgument<string>;
|
|
916
1073
|
config?: RawTransactionArgument<string>;
|
|
@@ -932,8 +1089,268 @@ interface TrySettleOptions {
|
|
|
932
1089
|
* Block Scholes minute-boundary spot when Pyth remains unavailable after the
|
|
933
1090
|
* compiled grace period. Permissionless and idempotent; missing or unusable
|
|
934
1091
|
* observations leave the market unsettled.
|
|
1092
|
+
*
|
|
1093
|
+
* Settlement reads nothing from the order-flow queue. Every admission's deadline
|
|
1094
|
+
* is at least `constants::deadline_expiry_margin_ms!()` before expiry, so at
|
|
1095
|
+
* expiry a waiting order can only be released, and the settled liability already
|
|
1096
|
+
* covers every queue-held position, which lives in the payout tree. The companion
|
|
1097
|
+
* drains and pays its queue afterwards.
|
|
1098
|
+
*/
|
|
1099
|
+
declare function trySettle(options: TrySettleOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
1100
|
+
interface AdmitMintArguments<W extends BcsType<any>> {
|
|
1101
|
+
W: RawTransactionArgument<W>;
|
|
1102
|
+
market: RawTransactionArgument<string>;
|
|
1103
|
+
config?: RawTransactionArgument<string>;
|
|
1104
|
+
account: TransactionArgument;
|
|
1105
|
+
propbookRegistry?: RawTransactionArgument<string>;
|
|
1106
|
+
pyth: RawTransactionArgument<string>;
|
|
1107
|
+
bsValues: RawTransactionArgument<string>;
|
|
1108
|
+
bsSvi: RawTransactionArgument<string>;
|
|
1109
|
+
kind: RawTransactionArgument<number>;
|
|
1110
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
1111
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
1112
|
+
quantity: RawTransactionArgument<number | bigint>;
|
|
1113
|
+
maxPremium: RawTransactionArgument<number | bigint>;
|
|
1114
|
+
minQuantity: RawTransactionArgument<number | bigint>;
|
|
1115
|
+
maxProbability: RawTransactionArgument<number | bigint>;
|
|
1116
|
+
budget: RawTransactionArgument<number | bigint>;
|
|
1117
|
+
orderFee: RawTransactionArgument<number | bigint>;
|
|
1118
|
+
sviMaxAgeMs: RawTransactionArgument<number | bigint>;
|
|
1119
|
+
channel: RawTransactionArgument<number>;
|
|
1120
|
+
tauMs: RawTransactionArgument<number | bigint>;
|
|
1121
|
+
deadlineMs: RawTransactionArgument<number | bigint>;
|
|
1122
|
+
}
|
|
1123
|
+
interface AdmitMintOptions<W extends BcsType<any>> {
|
|
1124
|
+
package?: string;
|
|
1125
|
+
arguments: AdmitMintArguments<W>;
|
|
1126
|
+
config?: {
|
|
1127
|
+
protocolConfig: ConfigValue;
|
|
1128
|
+
oracleRegistry: ConfigValue;
|
|
1129
|
+
predictPackageId?: string;
|
|
1130
|
+
};
|
|
1131
|
+
typeArguments: [string];
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Admit one queued mint for the order-flow companion and return its receipt.
|
|
1135
|
+
*
|
|
1136
|
+
* `kind` is a `constants` mint kind. The companion has already taken
|
|
1137
|
+
* `budget + order_fee` from the account and escrows it. `budget` caps the fill's
|
|
1138
|
+
* all-in cost; the companion sets it to `min(max_cost, balance - order_fee)`, and
|
|
1139
|
+
* to at most `quantity` for an exact-quantity mint. The order prices at a Pyth
|
|
1140
|
+
* price on Lazer channel `channel`, generated at or after `tau_ms`, and must fill
|
|
1141
|
+
* before `deadline_ms`.
|
|
1142
|
+
*
|
|
1143
|
+
* Aborts unless `W` is allowlisted, the version and cutover gates pass, trading
|
|
1144
|
+
* and this market's mints are unpaused, and the snapshot stage is closed. The
|
|
1145
|
+
* timing must fit (`EInvalidOrderTiming`): `channel` a supported fixed-rate
|
|
1146
|
+
* channel (`lazer_price::channel_fixed_rate_*`), `tau_ms` on its grid, at most one
|
|
1147
|
+
* of its ticks before now, and before `deadline_ms`, τ before the no-trade window,
|
|
1148
|
+
* and the deadline at least `constants::deadline_expiry_margin_ms!()` before
|
|
1149
|
+
* expiry. Then `svi_max_age_ms` must be within `constants::max_svi_max_age_ms!()`
|
|
1150
|
+
* and `kind` a mint kind (`EInvalidOrderTerms`), the volatility snapshot must
|
|
1151
|
+
* load, `budget` must be positive (`EMintCostCapRequired`), the order must pass
|
|
1152
|
+
* its own limits at the clock without subsidy (`EOrderFailsLimits`), and its cash
|
|
1153
|
+
* need must fit the market's spare cash (`EInsufficientMarketCash`). Admission
|
|
1154
|
+
* then pins both boundary nodes, creating them under the node cap, and adds the
|
|
1155
|
+
* cash need to the ledger.
|
|
1156
|
+
*/
|
|
1157
|
+
declare function admitMint<W extends BcsType<any>>(options: AdmitMintOptions<W>): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
1158
|
+
interface AdmitSellArguments<W extends BcsType<any>> {
|
|
1159
|
+
W: RawTransactionArgument<W>;
|
|
1160
|
+
market: RawTransactionArgument<string>;
|
|
1161
|
+
config?: RawTransactionArgument<string>;
|
|
1162
|
+
account: TransactionArgument;
|
|
1163
|
+
receipt: TransactionArgument;
|
|
1164
|
+
propbookRegistry?: RawTransactionArgument<string>;
|
|
1165
|
+
pyth: RawTransactionArgument<string>;
|
|
1166
|
+
bsValues: RawTransactionArgument<string>;
|
|
1167
|
+
bsSvi: RawTransactionArgument<string>;
|
|
1168
|
+
closeQuantity: RawTransactionArgument<number | bigint>;
|
|
1169
|
+
minProbability: RawTransactionArgument<number | bigint>;
|
|
1170
|
+
minProceeds: RawTransactionArgument<number | bigint>;
|
|
1171
|
+
orderFee: RawTransactionArgument<number | bigint>;
|
|
1172
|
+
sviMaxAgeMs: RawTransactionArgument<number | bigint>;
|
|
1173
|
+
channel: RawTransactionArgument<number>;
|
|
1174
|
+
tauMs: RawTransactionArgument<number | bigint>;
|
|
1175
|
+
deadlineMs: RawTransactionArgument<number | bigint>;
|
|
1176
|
+
}
|
|
1177
|
+
interface AdmitSellOptions<W extends BcsType<any>> {
|
|
1178
|
+
package?: string;
|
|
1179
|
+
arguments: AdmitSellArguments<W>;
|
|
1180
|
+
config?: {
|
|
1181
|
+
protocolConfig: ConfigValue;
|
|
1182
|
+
oracleRegistry: ConfigValue;
|
|
1183
|
+
predictPackageId?: string;
|
|
1184
|
+
};
|
|
1185
|
+
typeArguments: [string];
|
|
1186
|
+
}
|
|
1187
|
+
/**
|
|
1188
|
+
* Admit an early sell of `close_quantity` of an open receipt's position: the
|
|
1189
|
+
* receipt moves to the sell stage in place, with the sell's request, the account's
|
|
1190
|
+
* current owner and builder code, a fresh volatility snapshot, τ, the deadline,
|
|
1191
|
+
* and no price. The companion escrows `order_fee` and owns the minimum-sell
|
|
1192
|
+
* checks.
|
|
1193
|
+
*
|
|
1194
|
+
* Open during the trading pause and a market mint pause. Aborts unless `W` is
|
|
1195
|
+
* allowlisted, the version, cutover, and snapshot-stage gates and `admit_mint`'s
|
|
1196
|
+
* timing and SVI-age checks pass, the receipt is this market's (`EWrongMarket`),
|
|
1197
|
+
* open (`EWrongStage`), and `account`'s (`ENotRecordOwner`), the volatility
|
|
1198
|
+
* snapshot loads, and the close passes its own floors at the clock
|
|
1199
|
+
* (`EOrderFailsLimits`). Then adds the sell's cash need,
|
|
1200
|
+
* `ceil(close_quantity * (1 - backing_buffer_lambda)) + 1`, to the ledger: a close
|
|
1201
|
+
* lowers payout liability by at least `lambda * close_quantity` and pays at most
|
|
1202
|
+
* `close_quantity`. There is no spare-cash check. The keeper funds the market
|
|
1203
|
+
* before τ, and the fill refunds a sell the market cannot cover.
|
|
1204
|
+
*/
|
|
1205
|
+
declare function admitSell<W extends BcsType<any>>(options: AdmitSellOptions<W>): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
1206
|
+
interface CommitArguments<W extends BcsType<any>> {
|
|
1207
|
+
W: RawTransactionArgument<W>;
|
|
1208
|
+
market: RawTransactionArgument<string>;
|
|
1209
|
+
config?: RawTransactionArgument<string>;
|
|
1210
|
+
receipt: TransactionArgument;
|
|
1211
|
+
price: TransactionArgument;
|
|
1212
|
+
}
|
|
1213
|
+
interface CommitOptions<W extends BcsType<any>> {
|
|
1214
|
+
package?: string;
|
|
1215
|
+
arguments: CommitArguments<W>;
|
|
1216
|
+
config?: {
|
|
1217
|
+
protocolConfig: ConfigValue;
|
|
1218
|
+
predictPackageId?: string;
|
|
1219
|
+
};
|
|
1220
|
+
typeArguments: [string];
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* Commit the Pyth price an admitted order fills at: a `LazerPrice`, which only the
|
|
1224
|
+
* `deepbook_predict_math` library builds, from a Pyth-verified Lazer update.
|
|
1225
|
+
* Stores the spot, the envelope time (the tick the fill prices at), and the feed's
|
|
1226
|
+
* generation time. For a mint it also reserves the fee subsidy,
|
|
1227
|
+
* `min(subsidy_bound * fee_incentive_subsidy_rate, incentives left)`, records the
|
|
1228
|
+
* rate and amount, and returns the reservation for the companion to escrow with
|
|
1229
|
+
* the order. A sell returns a zero balance.
|
|
1230
|
+
*
|
|
1231
|
+
* The price must be the receipt's: its Pyth feed and channel, an envelope at
|
|
1232
|
+
* exactly τ or one tick of that channel later (the backup tick), a generation time
|
|
1233
|
+
* between τ and the envelope, an envelope at or before now, and a pricing-safe
|
|
1234
|
+
* spot (`EWrongPrice`). Aborts unless `W` is allowlisted, the version gate passes,
|
|
1235
|
+
* the receipt is this market's (`EWrongMarket`), admitted with no price yet
|
|
1236
|
+
* (`EWrongStage`), and before its deadline (`EInvalidOrderTiming`).
|
|
1237
|
+
*/
|
|
1238
|
+
declare function commit<W extends BcsType<any>>(options: CommitOptions<W>): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
1239
|
+
interface TryFillArguments<W extends BcsType<any>> {
|
|
1240
|
+
W: RawTransactionArgument<W>;
|
|
1241
|
+
market: RawTransactionArgument<string>;
|
|
1242
|
+
config?: RawTransactionArgument<string>;
|
|
1243
|
+
receipt: TransactionArgument;
|
|
1244
|
+
escrow: TransactionArgument;
|
|
1245
|
+
}
|
|
1246
|
+
interface TryFillOptions<W extends BcsType<any>> {
|
|
1247
|
+
package?: string;
|
|
1248
|
+
arguments: TryFillArguments<W>;
|
|
1249
|
+
config?: {
|
|
1250
|
+
protocolConfig: ConfigValue;
|
|
1251
|
+
predictPackageId?: string;
|
|
1252
|
+
};
|
|
1253
|
+
typeArguments: [string];
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Fill or refund one committed order at its committed price and consume or return
|
|
1257
|
+
* its receipt. `escrow` is the order's escrowed budget, order fee, and reserved
|
|
1258
|
+
* subsidy. Returns
|
|
1259
|
+
* `(reason, receipt to keep, escrow left over, quantity, amount, trading_fee, builder_fee, referral_fee, subsidy_used, inventory_impact)`.
|
|
1260
|
+
* The amounts are zero on a refund. For a mint `amount` is the all-in cost and
|
|
1261
|
+
* `inventory_impact` the charge; for a sell `amount` is the proceeds and
|
|
1262
|
+
* `inventory_impact` the rebate.
|
|
1263
|
+
*
|
|
1264
|
+
* Aborts only on a companion bookkeeping error: `W` not allowlisted, the version,
|
|
1265
|
+
* freeze, or snapshot-stage gate, another market's receipt (`EWrongMarket`), a
|
|
1266
|
+
* receipt not admitted or without a price (`EWrongStage`), or `escrow` below
|
|
1267
|
+
* `budget + order_fee + subsidy_reserved` (`EEscrowMismatch`). Every market
|
|
1268
|
+
* condition returns a refund reason instead, `0` for a fill: 5 at or past the
|
|
1269
|
+
* deadline, which also covers expiry and settlement; 9 when USDC sent to the
|
|
1270
|
+
* receipt's receive address would abort the transaction (`denied`: the address is
|
|
1271
|
+
* on USDC's deny list for the current epoch, or USDC is globally paused), so
|
|
1272
|
+
* nothing is sent there; 2 when no `Pricer` exists at the tick; then the fill's
|
|
1273
|
+
* own 1 (the order's limits), 2 (admission), 4 (a pinned node is missing, a
|
|
1274
|
+
* backstop), and 8 (the market's cash after the fill would not cover its required
|
|
1275
|
+
* cash).
|
|
1276
|
+
*
|
|
1277
|
+
* A mint fill pays the premium, the trading fee net of the referral share, the
|
|
1278
|
+
* used subsidy, the order fee, and the inventory-impact charge into market cash,
|
|
1279
|
+
* sends the builder and referral fees, returns unused subsidy to the incentive
|
|
1280
|
+
* balance, emits `OrderMinted` with no congestion penalty, and returns the receipt
|
|
1281
|
+
* open. A sell fill pays the proceeds (redeem value plus inventory-impact rebate,
|
|
1282
|
+
* less the trading and builder fees) to the receipt's receive address, keeps the
|
|
1283
|
+
* trading and order fees in market cash, emits `LiveOrderRedeemed`, and returns
|
|
1284
|
+
* the receipt open with the replacement position of a partial close, or consumes
|
|
1285
|
+
* it on a full close. A builder or referral fee whose recipient is denied stays in
|
|
1286
|
+
* market cash instead, and the events still report it as charged. A refund keeps
|
|
1287
|
+
* the order fee in market cash for reasons 1 and 2, returns the reserved subsidy
|
|
1288
|
+
* to the incentive balance, prunes a mint's emptied unpinned nodes, returns the
|
|
1289
|
+
* rest of the escrow, and returns a sell's receipt open or consumes a mint's.
|
|
1290
|
+
* Every outcome takes the order out of the ledger.
|
|
1291
|
+
*/
|
|
1292
|
+
declare function tryFill<W extends BcsType<any>>(options: TryFillOptions<W>): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
1293
|
+
interface ReleaseArguments {
|
|
1294
|
+
market: RawTransactionArgument<string>;
|
|
1295
|
+
config?: RawTransactionArgument<string>;
|
|
1296
|
+
receipt: TransactionArgument;
|
|
1297
|
+
escrow: TransactionArgument;
|
|
1298
|
+
reason: RawTransactionArgument<number>;
|
|
1299
|
+
prune: RawTransactionArgument<boolean>;
|
|
1300
|
+
}
|
|
1301
|
+
interface ReleaseOptions {
|
|
1302
|
+
package?: string;
|
|
1303
|
+
arguments: ReleaseArguments;
|
|
1304
|
+
config?: {
|
|
1305
|
+
protocolConfig: ConfigValue;
|
|
1306
|
+
predictPackageId?: string;
|
|
1307
|
+
};
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* Take an admitted order out without filling it: the companion's deadline, admin,
|
|
1311
|
+
* and settlement-drain refunds release their receipt here. `escrow` is the order's
|
|
1312
|
+
* escrowed budget, order fee, and reserved subsidy, and `reason` the refund's
|
|
1313
|
+
* `constants::fill_reason_*` code. The order fee follows `try_fill`'s refund rule:
|
|
1314
|
+
* reasons 1 and 2 keep it in market cash, and every other reason leaves it in the
|
|
1315
|
+
* escrow returned. Returns the reservation to the incentive balance, subtracts the
|
|
1316
|
+
* exact cash need from the ledger, and unpins a mint's boundary ticks, pruning
|
|
1317
|
+
* emptied, unpinned, unretained nodes only when `prune` and the market is
|
|
1318
|
+
* unsettled. Returns a sell's receipt open, still holding its position, or `none`
|
|
1319
|
+
* for a mint's, which it consumes, and the rest of the escrow.
|
|
1320
|
+
*
|
|
1321
|
+
* Needs no allowlisting and checks only the version floor, so the drain works
|
|
1322
|
+
* while the protocol is frozen and after the witness is removed. Keeping an order
|
|
1323
|
+
* fee moves market cash, so like a fill it aborts inside the keeper's snapshot
|
|
1324
|
+
* stage (`ESnapshotInProgress`). Aborts on another market's receipt
|
|
1325
|
+
* (`EWrongMarket`), a receipt not admitted (`EWrongStage`), or `escrow` below
|
|
1326
|
+
* `budget + order_fee + subsidy_reserved` (`EEscrowMismatch`).
|
|
1327
|
+
*/
|
|
1328
|
+
declare function release(options: ReleaseOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
1329
|
+
interface TryPaySettledArguments {
|
|
1330
|
+
market: RawTransactionArgument<string>;
|
|
1331
|
+
config?: RawTransactionArgument<string>;
|
|
1332
|
+
receipt: TransactionArgument;
|
|
1333
|
+
}
|
|
1334
|
+
interface TryPaySettledOptions {
|
|
1335
|
+
package?: string;
|
|
1336
|
+
arguments: TryPaySettledArguments;
|
|
1337
|
+
config?: {
|
|
1338
|
+
protocolConfig: ConfigValue;
|
|
1339
|
+
predictPackageId?: string;
|
|
1340
|
+
};
|
|
1341
|
+
}
|
|
1342
|
+
/**
|
|
1343
|
+
* Pay an open receipt's settled payout, zero for a loser, to its receive address
|
|
1344
|
+
* and consume the receipt. Returns the payout and `none`. When the payout is above
|
|
1345
|
+
* market cash or above the settled liability left, or a nonzero payout's receive
|
|
1346
|
+
* address is denied (`try_fill`'s reason 9: on USDC's deny list for the current
|
|
1347
|
+
* epoch, or USDC globally paused), changes nothing and returns that payout with
|
|
1348
|
+
* the receipt, so the companion's payout walk moves on and a later call pays it
|
|
1349
|
+
* once the cause clears. Needs no allowlisting and checks only the version floor.
|
|
1350
|
+
* Aborts on another market's receipt (`EWrongMarket`), a receipt that is not open
|
|
1351
|
+
* (`EWrongStage`), or an unsettled market (`EMarketNotSettled`).
|
|
935
1352
|
*/
|
|
936
|
-
declare function
|
|
1353
|
+
declare function tryPaySettled(options: TryPaySettledOptions): (tx: Transaction) => _mysten_sui_transactions415.TransactionResult;
|
|
937
1354
|
//#endregion
|
|
938
|
-
export {
|
|
1355
|
+
export { AdmissionTickSizeArguments, AdmissionTickSizeOptions, AdmitMintArguments, AdmitMintOptions, AdmitSellArguments, AdmitSellOptions, AllInCostArguments, AllInCostOptions, BackingBufferLambdaArguments, BackingBufferLambdaOptions, BuilderFeeArguments, BuilderFeeOptions, 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, QuoteCloseArguments, QuoteCloseOptions, QuoteMintArguments, QuoteMintExactCostForAccountArguments, QuoteMintExactCostForAccountOptions, QuoteMintForAccountArguments, QuoteMintForAccountOptions, QuoteMintOptions, ReceiptInfoArguments, ReceiptInfoOptions, RedeemBuilderFeeArguments, RedeemBuilderFeeOptions, RedeemCloseQuantityArguments, RedeemCloseQuantityOptions, RedeemInventoryImpactRebateArguments, RedeemInventoryImpactRebateOptions, RedeemLiveOptions, RedeemProbabilityArguments, RedeemProbabilityOptions, RedeemProceedsArguments, RedeemProceedsOptions, RedeemQuote, RedeemSettledArguments, RedeemSettledOptions, RedeemSettledPermissionlessArguments, 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, admitSell, allInCost, backingBufferLambda, builderFee, 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, quoteClose, quoteMint, quoteMintExactCostForAccount, quoteMintForAccount, receiptInfo, redeemBuilderFee, redeemCloseQuantity, redeemInventoryImpactRebate, redeemProbability, redeemProceeds, redeemSettled, redeemSettledPermissionless, redeemTradingFee, referenceTick, referenceTickSourceTimestampMs, release, requiredCash, setMintPaused, setReferenceTick, settledOrderPayout, settlementPrice, tickSize, tradingFee, tryFill, tryPaySettled, trySettle, trySettlementPrice };
|
|
939
1356
|
//# sourceMappingURL=expiry_market.d.mts.map
|