@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
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
import { ConfigValue, MoveStruct, RawTransactionArgument } from "../utils/index.mjs";
|
|
2
|
+
import * as _mysten_sui_bcs440 from "@mysten/sui/bcs";
|
|
3
|
+
import * as _mysten_sui_transactions224 from "@mysten/sui/transactions";
|
|
4
|
+
import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
|
|
5
|
+
|
|
6
|
+
//#region src/contracts/deepbook_predict_orders/queue.d.ts
|
|
7
|
+
declare namespace queue_d_exports {
|
|
8
|
+
export { AdminRefundArguments, AdminRefundOptions, ClaimParkedArguments, ClaimParkedOptions, CleanupArguments, CleanupOptions, CommitArguments, CommitOptions, CreateAndShareArguments, CreateAndShareOptions, DeskIdArguments, DeskIdOptions, EnqueueExactAmountArguments, EnqueueExactAmountOptions, EnqueueExactCostArguments, EnqueueExactCostOptions, EnqueueExactQuantityArguments, EnqueueExactQuantityOptions, EnqueueRedeemOpenArguments, EnqueueRedeemOpenOptions, ExpiryMarketIdArguments, ExpiryMarketIdOptions, IdArguments, IdOptions, MarketQueue, OldestUnfinishedTauMsArguments, OldestUnfinishedTauMsOptions, OrderArguments, OrderOptions, PayOpenArguments, PayOpenOptions, PayoutProgressArguments, PayoutProgressOptions, PendingCountsArguments, PendingCountsOptions, PhaseDoneOptions, PhaseDrainOptions, PhasePayOptions, QueueHeadsArguments, QueueHeadsOptions, QueueIdArguments, QueueIdOptions, QueueStuckArguments, QueueStuckOptions, QuoteRedeemOpenArguments, QuoteRedeemOpenOptions, RefundArguments, RefundOptions, ResolveArguments, ResolveOptions, SettleStepArguments, SettleStepOptions, WaitingCohortsArguments, WaitingCohortsOptions, WaitingOrdersArguments, WaitingOrdersOptions, adminRefund, claimParked, cleanup, commit, createAndShare, deskId, enqueueExactAmount, enqueueExactCost, enqueueExactQuantity, enqueueRedeemOpen, expiryMarketId, id, oldestUnfinishedTauMs, order, payOpen, payoutProgress, pendingCounts, phaseDone, phaseDrain, phasePay, queueHeads, queueId, queueStuck, quoteRedeemOpen, refund, resolve, settleStep, waitingCohorts, waitingOrders };
|
|
9
|
+
}
|
|
10
|
+
declare const MarketQueue: MoveStruct<{
|
|
11
|
+
id: _mysten_sui_bcs440.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
12
|
+
desk_id: _mysten_sui_bcs440.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
13
|
+
expiry_market_id: _mysten_sui_bcs440.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
14
|
+
book: MoveStruct<{
|
|
15
|
+
orders: MoveStruct<{
|
|
16
|
+
id: _mysten_sui_bcs440.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
17
|
+
size: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
18
|
+
}, "0x2::table::Table<phantom K, phantom V>">;
|
|
19
|
+
next_id: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
20
|
+
resolve_head: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
21
|
+
payout_cursor: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
22
|
+
cohorts: _mysten_sui_bcs440.BcsType<{
|
|
23
|
+
tau_ms: bigint;
|
|
24
|
+
deadline_ms: bigint;
|
|
25
|
+
first_id: bigint;
|
|
26
|
+
end_id: bigint;
|
|
27
|
+
pyth_channel: number;
|
|
28
|
+
committed: boolean;
|
|
29
|
+
unfinished: bigint;
|
|
30
|
+
}[], Iterable<{
|
|
31
|
+
tau_ms: string | number | bigint;
|
|
32
|
+
deadline_ms: string | number | bigint;
|
|
33
|
+
first_id: string | number | bigint;
|
|
34
|
+
end_id: string | number | bigint;
|
|
35
|
+
pyth_channel: number;
|
|
36
|
+
committed: boolean;
|
|
37
|
+
unfinished: string | number | bigint;
|
|
38
|
+
}> & {
|
|
39
|
+
length: number;
|
|
40
|
+
}, string>;
|
|
41
|
+
last_tau_ms: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
42
|
+
last_committed_tau_ms: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
43
|
+
last_deadline_ms: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
44
|
+
last_channel: _mysten_sui_bcs440.BcsType<number, number, "u8">;
|
|
45
|
+
per_account: MoveStruct<{
|
|
46
|
+
id: _mysten_sui_bcs440.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
47
|
+
size: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
48
|
+
}, "0x2::table::Table<phantom K, phantom V>">;
|
|
49
|
+
pending_mints: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
50
|
+
pending_sells: _mysten_sui_bcs440.BcsType<bigint, string | number | bigint, "u64">;
|
|
51
|
+
}, "@local-pkg/deepbook_predict_orders::order_queue::OrderBook">; /** Set by the `settle_step` call that emits `MarketPayoutsCompleted`. */
|
|
52
|
+
payouts_completed: _mysten_sui_bcs440.BcsType<boolean, boolean, "bool">;
|
|
53
|
+
}, "@local-pkg/deepbook_predict_orders::queue::MarketQueue">;
|
|
54
|
+
interface PhaseDrainOptions {
|
|
55
|
+
package?: string;
|
|
56
|
+
arguments?: [];
|
|
57
|
+
config?: {
|
|
58
|
+
predictOrdersPackageId?: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
declare function phaseDrain(options?: PhaseDrainOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
62
|
+
interface PhasePayOptions {
|
|
63
|
+
package?: string;
|
|
64
|
+
arguments?: [];
|
|
65
|
+
config?: {
|
|
66
|
+
predictOrdersPackageId?: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
declare function phasePay(options?: PhasePayOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
70
|
+
interface PhaseDoneOptions {
|
|
71
|
+
package?: string;
|
|
72
|
+
arguments?: [];
|
|
73
|
+
config?: {
|
|
74
|
+
predictOrdersPackageId?: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
declare function phaseDone(options?: PhaseDoneOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
78
|
+
interface QueueIdArguments {
|
|
79
|
+
registryId: RawTransactionArgument<string>;
|
|
80
|
+
expiryMarketId: RawTransactionArgument<string>;
|
|
81
|
+
}
|
|
82
|
+
interface QueueIdOptions {
|
|
83
|
+
package?: string;
|
|
84
|
+
arguments: QueueIdArguments | [registryId: RawTransactionArgument<string>, expiryMarketId: RawTransactionArgument<string>];
|
|
85
|
+
config?: {
|
|
86
|
+
predictOrdersPackageId?: string;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Return the ID of `expiry_market_id`'s queue under the queue registry
|
|
91
|
+
* `registry_id`, whether or not it exists yet. For PTB construction.
|
|
92
|
+
*/
|
|
93
|
+
declare function queueId(options: QueueIdOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
94
|
+
interface IdArguments {
|
|
95
|
+
queue: RawTransactionArgument<string>;
|
|
96
|
+
}
|
|
97
|
+
interface IdOptions {
|
|
98
|
+
package?: string;
|
|
99
|
+
arguments: IdArguments | [queue: RawTransactionArgument<string>];
|
|
100
|
+
config?: {
|
|
101
|
+
predictOrdersPackageId?: string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
declare function id(options: IdOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
105
|
+
interface DeskIdArguments {
|
|
106
|
+
queue: RawTransactionArgument<string>;
|
|
107
|
+
}
|
|
108
|
+
interface DeskIdOptions {
|
|
109
|
+
package?: string;
|
|
110
|
+
arguments: DeskIdArguments | [queue: RawTransactionArgument<string>];
|
|
111
|
+
config?: {
|
|
112
|
+
predictOrdersPackageId?: string;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
declare function deskId(options: DeskIdOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
116
|
+
interface ExpiryMarketIdArguments {
|
|
117
|
+
queue: RawTransactionArgument<string>;
|
|
118
|
+
}
|
|
119
|
+
interface ExpiryMarketIdOptions {
|
|
120
|
+
package?: string;
|
|
121
|
+
arguments: ExpiryMarketIdArguments | [queue: RawTransactionArgument<string>];
|
|
122
|
+
config?: {
|
|
123
|
+
predictOrdersPackageId?: string;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
declare function expiryMarketId(options: ExpiryMarketIdOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
127
|
+
interface OrderArguments {
|
|
128
|
+
queue: RawTransactionArgument<string>;
|
|
129
|
+
recordId: RawTransactionArgument<number | bigint>;
|
|
130
|
+
}
|
|
131
|
+
interface OrderOptions {
|
|
132
|
+
package?: string;
|
|
133
|
+
arguments: OrderArguments | [queue: RawTransactionArgument<string>, recordId: RawTransactionArgument<number | bigint>];
|
|
134
|
+
config?: {
|
|
135
|
+
predictOrdersPackageId?: string;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/** Return one record, or `none` for a missing or deleted record ID. */
|
|
139
|
+
declare function order(options: OrderOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
140
|
+
interface QueueHeadsArguments {
|
|
141
|
+
queue: RawTransactionArgument<string>;
|
|
142
|
+
}
|
|
143
|
+
interface QueueHeadsOptions {
|
|
144
|
+
package?: string;
|
|
145
|
+
arguments: QueueHeadsArguments | [queue: RawTransactionArgument<string>];
|
|
146
|
+
config?: {
|
|
147
|
+
predictOrdersPackageId?: string;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Return `(resolve_head, next_id, last_tau_ms, last_committed_tau_ms)`.
|
|
152
|
+
* `resolve_head` is a lower bound on the first unfinished record.
|
|
153
|
+
*/
|
|
154
|
+
declare function queueHeads(options: QueueHeadsOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
155
|
+
interface PayoutProgressArguments {
|
|
156
|
+
queue: RawTransactionArgument<string>;
|
|
157
|
+
}
|
|
158
|
+
interface PayoutProgressOptions {
|
|
159
|
+
package?: string;
|
|
160
|
+
arguments: PayoutProgressArguments | [queue: RawTransactionArgument<string>];
|
|
161
|
+
config?: {
|
|
162
|
+
predictOrdersPackageId?: string;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Return `(payout_cursor, next_id, payouts_completed)`. The settlement payout walk
|
|
167
|
+
* is finished once `payouts_completed` is set.
|
|
168
|
+
*/
|
|
169
|
+
declare function payoutProgress(options: PayoutProgressOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
170
|
+
interface WaitingCohortsArguments {
|
|
171
|
+
queue: RawTransactionArgument<string>;
|
|
172
|
+
}
|
|
173
|
+
interface WaitingCohortsOptions {
|
|
174
|
+
package?: string;
|
|
175
|
+
arguments: WaitingCohortsArguments | [queue: RawTransactionArgument<string>];
|
|
176
|
+
config?: {
|
|
177
|
+
predictOrdersPackageId?: string;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Return
|
|
182
|
+
* `(cohort count, oldest uncommitted τ, oldest uncommitted τ above last_committed_tau_ms)`.
|
|
183
|
+
* The third value is the cohort the stuck gate's first rule watches.
|
|
184
|
+
*/
|
|
185
|
+
declare function waitingCohorts(options: WaitingCohortsOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
186
|
+
interface QueueStuckArguments {
|
|
187
|
+
queue: RawTransactionArgument<string>;
|
|
188
|
+
desk?: RawTransactionArgument<string>;
|
|
189
|
+
}
|
|
190
|
+
interface QueueStuckOptions {
|
|
191
|
+
package?: string;
|
|
192
|
+
arguments: QueueStuckArguments;
|
|
193
|
+
config?: {
|
|
194
|
+
orderDesk: ConfigValue;
|
|
195
|
+
predictOrdersPackageId?: string;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Whether placement would refuse a new order as stuck right now (both rules of the
|
|
200
|
+
* stuck gate). Drives the app's "pricing delayed" banner.
|
|
201
|
+
*/
|
|
202
|
+
declare function queueStuck(options: QueueStuckOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
203
|
+
interface PendingCountsArguments {
|
|
204
|
+
queue: RawTransactionArgument<string>;
|
|
205
|
+
}
|
|
206
|
+
interface PendingCountsOptions {
|
|
207
|
+
package?: string;
|
|
208
|
+
arguments: PendingCountsArguments | [queue: RawTransactionArgument<string>];
|
|
209
|
+
config?: {
|
|
210
|
+
predictOrdersPackageId?: string;
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Return `(pending_mints, pending_sells)`, the unfinished orders counted against
|
|
215
|
+
* the policy capacities.
|
|
216
|
+
*/
|
|
217
|
+
declare function pendingCounts(options: PendingCountsOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
218
|
+
interface WaitingOrdersArguments {
|
|
219
|
+
queue: RawTransactionArgument<string>;
|
|
220
|
+
accountId: RawTransactionArgument<string>;
|
|
221
|
+
}
|
|
222
|
+
interface WaitingOrdersOptions {
|
|
223
|
+
package?: string;
|
|
224
|
+
arguments: WaitingOrdersArguments | [queue: RawTransactionArgument<string>, accountId: RawTransactionArgument<string>];
|
|
225
|
+
config?: {
|
|
226
|
+
predictOrdersPackageId?: string;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Return the unfinished queued orders `account_id` holds in this queue, the count
|
|
231
|
+
* the per-account cap checks. The settlement drain (`settle_step`) refunds without
|
|
232
|
+
* lowering it, since no placement reads it once the market has expired, so after
|
|
233
|
+
* expiry it can overstate what the account still has waiting. Read `order` for
|
|
234
|
+
* each record's status instead.
|
|
235
|
+
*/
|
|
236
|
+
declare function waitingOrders(options: WaitingOrdersOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
237
|
+
interface OldestUnfinishedTauMsArguments {
|
|
238
|
+
queue: RawTransactionArgument<string>;
|
|
239
|
+
}
|
|
240
|
+
interface OldestUnfinishedTauMsOptions {
|
|
241
|
+
package?: string;
|
|
242
|
+
arguments: OldestUnfinishedTauMsArguments | [queue: RawTransactionArgument<string>];
|
|
243
|
+
config?: {
|
|
244
|
+
predictOrdersPackageId?: string;
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
/** Return τ of the oldest cohort with an unfinished order, for monitoring. */
|
|
248
|
+
declare function oldestUnfinishedTauMs(options: OldestUnfinishedTauMsOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
249
|
+
interface QuoteRedeemOpenArguments {
|
|
250
|
+
queue: RawTransactionArgument<string>;
|
|
251
|
+
market: RawTransactionArgument<string>;
|
|
252
|
+
wrapper: RawTransactionArgument<string>;
|
|
253
|
+
pricer: TransactionArgument;
|
|
254
|
+
recordId: RawTransactionArgument<number | bigint>;
|
|
255
|
+
closeQuantity: RawTransactionArgument<number | bigint>;
|
|
256
|
+
}
|
|
257
|
+
interface QuoteRedeemOpenOptions {
|
|
258
|
+
package?: string;
|
|
259
|
+
arguments: QuoteRedeemOpenArguments | [queue: RawTransactionArgument<string>, market: RawTransactionArgument<string>, wrapper: RawTransactionArgument<string>, pricer: TransactionArgument, recordId: RawTransactionArgument<number | bigint>, closeQuantity: RawTransactionArgument<number | bigint>];
|
|
260
|
+
config?: {
|
|
261
|
+
predictOrdersPackageId?: string;
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Quote an early sell of `close_quantity` from the Open record `record_id` at a
|
|
266
|
+
* live `Pricer`, with the wrapper account's builder code, through Predict's
|
|
267
|
+
* `quote_close`: the close a queued sell fills, with the trading fee at the clock
|
|
268
|
+
* instead of a committed tick. `proceeds` is before the order fee. Changes
|
|
269
|
+
* nothing. Aborts `ERecordNotOpen` for a missing or non-Open record, and otherwise
|
|
270
|
+
* as `quote_close` does. Does not check that the account owns the record. For SDK
|
|
271
|
+
* and devInspect pricing before `enqueue_redeem_open`.
|
|
272
|
+
*/
|
|
273
|
+
declare function quoteRedeemOpen(options: QuoteRedeemOpenOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
274
|
+
interface CreateAndShareArguments {
|
|
275
|
+
registry?: RawTransactionArgument<string>;
|
|
276
|
+
desk?: RawTransactionArgument<string>;
|
|
277
|
+
market: RawTransactionArgument<string>;
|
|
278
|
+
}
|
|
279
|
+
interface CreateAndShareOptions {
|
|
280
|
+
package?: string;
|
|
281
|
+
arguments: CreateAndShareArguments;
|
|
282
|
+
config?: {
|
|
283
|
+
queueRegistry: ConfigValue;
|
|
284
|
+
orderDesk: ConfigValue;
|
|
285
|
+
predictOrdersPackageId?: string;
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Create and share `market`'s queue under `desk`. Permissionless; the caller pays
|
|
290
|
+
* its storage. The queue's ID is derived from the desk's registry and the market,
|
|
291
|
+
* so a second call for the same market aborts. Writes only the registry, which no
|
|
292
|
+
* trading call reads, so creation never contends with trading on the desk. Aborts
|
|
293
|
+
* `EWrongDesk` for another desk's registry.
|
|
294
|
+
*/
|
|
295
|
+
declare function createAndShare(options: CreateAndShareOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
296
|
+
interface EnqueueExactQuantityArguments {
|
|
297
|
+
queue: RawTransactionArgument<string>;
|
|
298
|
+
market: RawTransactionArgument<string>;
|
|
299
|
+
wrapper: RawTransactionArgument<string>;
|
|
300
|
+
auth: TransactionArgument;
|
|
301
|
+
desk?: RawTransactionArgument<string>;
|
|
302
|
+
config?: RawTransactionArgument<string>;
|
|
303
|
+
propbookRegistry?: RawTransactionArgument<string>;
|
|
304
|
+
pyth: RawTransactionArgument<string>;
|
|
305
|
+
bsValues: RawTransactionArgument<string>;
|
|
306
|
+
bsSvi: RawTransactionArgument<string>;
|
|
307
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
308
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
309
|
+
quantity: RawTransactionArgument<number | bigint>;
|
|
310
|
+
maxCost: RawTransactionArgument<number | bigint>;
|
|
311
|
+
maxProbability: RawTransactionArgument<number | bigint>;
|
|
312
|
+
}
|
|
313
|
+
interface EnqueueExactQuantityOptions {
|
|
314
|
+
package?: string;
|
|
315
|
+
arguments: EnqueueExactQuantityArguments;
|
|
316
|
+
config?: {
|
|
317
|
+
orderDesk: ConfigValue;
|
|
318
|
+
protocolConfig: ConfigValue;
|
|
319
|
+
oracleRegistry: ConfigValue;
|
|
320
|
+
predictOrdersPackageId?: string;
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Place a queued mint for an exact quantity, priced later at Pyth's signed price
|
|
325
|
+
* for its τ. `max_cost` caps the all-in withdrawal and is mandatory;
|
|
326
|
+
* `max_probability` caps the entry probability at τ. Escrows the budget,
|
|
327
|
+
* `min(max_cost, quantity, available - order_fee)`, and the order fee, and returns
|
|
328
|
+
* the new record ID.
|
|
329
|
+
*
|
|
330
|
+
* Aborts, charging nothing, when the queue refuses the order: the desk floor,
|
|
331
|
+
* another desk's or market's queue (`EWrongDesk`, `EWrongMarket`), a stuck or full
|
|
332
|
+
* queue (`EQueueStuck`, `EQueueFull`, `EAccountOrderCap`), τ at or past the cutoff
|
|
333
|
+
* (`EPastCutoff`), an unlimited or zero `max_cost` (`EMintCostCapRequired`), or a
|
|
334
|
+
* balance not above the order fee (`EFeeNotCovered`). Then Predict's `admit_mint`
|
|
335
|
+
* applies its gates, the order's own limits at the clock, and the market's spare
|
|
336
|
+
* cash.
|
|
337
|
+
*/
|
|
338
|
+
declare function enqueueExactQuantity(options: EnqueueExactQuantityOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
339
|
+
interface EnqueueExactAmountArguments {
|
|
340
|
+
queue: RawTransactionArgument<string>;
|
|
341
|
+
market: RawTransactionArgument<string>;
|
|
342
|
+
wrapper: RawTransactionArgument<string>;
|
|
343
|
+
auth: TransactionArgument;
|
|
344
|
+
desk?: RawTransactionArgument<string>;
|
|
345
|
+
config?: RawTransactionArgument<string>;
|
|
346
|
+
propbookRegistry?: RawTransactionArgument<string>;
|
|
347
|
+
pyth: RawTransactionArgument<string>;
|
|
348
|
+
bsValues: RawTransactionArgument<string>;
|
|
349
|
+
bsSvi: RawTransactionArgument<string>;
|
|
350
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
351
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
352
|
+
maxPremium: RawTransactionArgument<number | bigint>;
|
|
353
|
+
minQuantity: RawTransactionArgument<number | bigint>;
|
|
354
|
+
maxCost: RawTransactionArgument<number | bigint>;
|
|
355
|
+
}
|
|
356
|
+
interface EnqueueExactAmountOptions {
|
|
357
|
+
package?: string;
|
|
358
|
+
arguments: EnqueueExactAmountArguments;
|
|
359
|
+
config?: {
|
|
360
|
+
orderDesk: ConfigValue;
|
|
361
|
+
protocolConfig: ConfigValue;
|
|
362
|
+
oracleRegistry: ConfigValue;
|
|
363
|
+
predictOrdersPackageId?: string;
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Place a queued premium-budget mint: sized at τ under `max_premium`, at least
|
|
368
|
+
* `min_quantity`, with the all-in withdrawal capped by the mandatory `max_cost`.
|
|
369
|
+
* Escrows `min(max_cost, available - order_fee)` and the order fee. Refuses orders
|
|
370
|
+
* like `enqueue_exact_quantity`. Returns the new record ID.
|
|
371
|
+
*/
|
|
372
|
+
declare function enqueueExactAmount(options: EnqueueExactAmountOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
373
|
+
interface EnqueueExactCostArguments {
|
|
374
|
+
queue: RawTransactionArgument<string>;
|
|
375
|
+
market: RawTransactionArgument<string>;
|
|
376
|
+
wrapper: RawTransactionArgument<string>;
|
|
377
|
+
auth: TransactionArgument;
|
|
378
|
+
desk?: RawTransactionArgument<string>;
|
|
379
|
+
config?: RawTransactionArgument<string>;
|
|
380
|
+
propbookRegistry?: RawTransactionArgument<string>;
|
|
381
|
+
pyth: RawTransactionArgument<string>;
|
|
382
|
+
bsValues: RawTransactionArgument<string>;
|
|
383
|
+
bsSvi: RawTransactionArgument<string>;
|
|
384
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
385
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
386
|
+
maxCost: RawTransactionArgument<number | bigint>;
|
|
387
|
+
minQuantity: RawTransactionArgument<number | bigint>;
|
|
388
|
+
}
|
|
389
|
+
interface EnqueueExactCostOptions {
|
|
390
|
+
package?: string;
|
|
391
|
+
arguments: EnqueueExactCostArguments;
|
|
392
|
+
config?: {
|
|
393
|
+
orderDesk: ConfigValue;
|
|
394
|
+
protocolConfig: ConfigValue;
|
|
395
|
+
oracleRegistry: ConfigValue;
|
|
396
|
+
predictOrdersPackageId?: string;
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Place a queued all-in-budget mint: sized at τ so the all-in cost fits
|
|
401
|
+
* `max_cost`, at least `min_quantity`. Escrows
|
|
402
|
+
* `min(max_cost, available - order_fee)` and the order fee. `max_cost` is
|
|
403
|
+
* mandatory here too: the unlimited value is refused. Refuses orders like
|
|
404
|
+
* `enqueue_exact_quantity`. Returns the new record ID.
|
|
405
|
+
*/
|
|
406
|
+
declare function enqueueExactCost(options: EnqueueExactCostOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
407
|
+
interface EnqueueRedeemOpenArguments {
|
|
408
|
+
queue: RawTransactionArgument<string>;
|
|
409
|
+
market: RawTransactionArgument<string>;
|
|
410
|
+
wrapper: RawTransactionArgument<string>;
|
|
411
|
+
auth: TransactionArgument;
|
|
412
|
+
desk?: RawTransactionArgument<string>;
|
|
413
|
+
config?: RawTransactionArgument<string>;
|
|
414
|
+
propbookRegistry?: RawTransactionArgument<string>;
|
|
415
|
+
pyth: RawTransactionArgument<string>;
|
|
416
|
+
bsValues: RawTransactionArgument<string>;
|
|
417
|
+
bsSvi: RawTransactionArgument<string>;
|
|
418
|
+
recordId: RawTransactionArgument<number | bigint>;
|
|
419
|
+
closeQuantity: RawTransactionArgument<number | bigint>;
|
|
420
|
+
minProbability: RawTransactionArgument<number | bigint>;
|
|
421
|
+
minProceeds: RawTransactionArgument<number | bigint>;
|
|
422
|
+
}
|
|
423
|
+
interface EnqueueRedeemOpenOptions {
|
|
424
|
+
package?: string;
|
|
425
|
+
arguments: EnqueueRedeemOpenArguments;
|
|
426
|
+
config?: {
|
|
427
|
+
orderDesk: ConfigValue;
|
|
428
|
+
protocolConfig: ConfigValue;
|
|
429
|
+
oracleRegistry: ConfigValue;
|
|
430
|
+
predictOrdersPackageId?: string;
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Place a queued early sell of `close_quantity` of an Open record's position.
|
|
435
|
+
* `record_id` is the record's queue ID, not the position's order ID. The source
|
|
436
|
+
* record must belong to this account (`ENotRecordOwner`) and be Open
|
|
437
|
+
* (`ERecordNotOpen`, also for a missing ID). It is marked Closed and its receipt
|
|
438
|
+
* and whole position move into the new record until the sell fills or refunds.
|
|
439
|
+
* `min_probability` and `min_proceeds` are the close-side floors at τ. Returns the
|
|
440
|
+
* new record ID.
|
|
441
|
+
*
|
|
442
|
+
* Escrows only the order fee, so a balance equal to it is enough. Refuses a sell
|
|
443
|
+
* below `min_sell_quantity` or one leaving a remainder below it (`EBelowMinSell`),
|
|
444
|
+
* and otherwise like `enqueue_exact_quantity`. Predict's `admit_sell` is open
|
|
445
|
+
* during the trading pause and a market mint pause and has no spare-cash check:
|
|
446
|
+
* the keeper funds the market before τ, and resolve refunds a sell the market
|
|
447
|
+
* still cannot cover.
|
|
448
|
+
*/
|
|
449
|
+
declare function enqueueRedeemOpen(options: EnqueueRedeemOpenOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
450
|
+
interface CommitArguments {
|
|
451
|
+
queue: RawTransactionArgument<string>;
|
|
452
|
+
market: RawTransactionArgument<string>;
|
|
453
|
+
desk?: RawTransactionArgument<string>;
|
|
454
|
+
config?: RawTransactionArgument<string>;
|
|
455
|
+
updates: TransactionArgument;
|
|
456
|
+
}
|
|
457
|
+
interface CommitOptions {
|
|
458
|
+
package?: string;
|
|
459
|
+
arguments: CommitArguments;
|
|
460
|
+
config?: {
|
|
461
|
+
orderDesk: ConfigValue;
|
|
462
|
+
protocolConfig: ConfigValue;
|
|
463
|
+
predictOrdersPackageId?: string;
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Attach verified Pyth Lazer prices to the waiting cohorts whose τ they match.
|
|
468
|
+
* Permissionless. Each update must come from the Pyth Lazer verifier earlier in
|
|
469
|
+
* the same PTB; their order in `updates` does not matter. An update that matches
|
|
470
|
+
* no waiting cohort is skipped.
|
|
471
|
+
*
|
|
472
|
+
* Matching reads only the inline cohort list and picks at most one update per
|
|
473
|
+
* waiting cohort before its deadline: the one stamped exactly its τ on its
|
|
474
|
+
* channel, or else, once the price buffer is above zero and now is at least
|
|
475
|
+
* `gap_wait_ms` past τ, the one stamped one tick of the cohort's own channel
|
|
476
|
+
* later. Each matched cohort then commits whole or not at all: one price per feed
|
|
477
|
+
* is decoded through `lazer_price::from_update`, every Pending order is checked
|
|
478
|
+
* against it before any is written, and an empty price, a price generated before
|
|
479
|
+
* τ, or an envelope after now leaves the cohort for a later commit or its deadline
|
|
480
|
+
* refund. The decode aborts on an update that lacks an order's feed or one of its
|
|
481
|
+
* properties, because the caller passed the wrong update. Each committed mint
|
|
482
|
+
* escrows the subsidy Predict reserves for it.
|
|
483
|
+
*
|
|
484
|
+
* Uses Lazer's v1 `Update`, which Pyth marked deprecated on Mainnet but still
|
|
485
|
+
* serves; v2 arrives with a later library constructor.
|
|
486
|
+
*/
|
|
487
|
+
declare function commit(options: CommitOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
488
|
+
interface ResolveArguments {
|
|
489
|
+
queue: RawTransactionArgument<string>;
|
|
490
|
+
market: RawTransactionArgument<string>;
|
|
491
|
+
desk?: RawTransactionArgument<string>;
|
|
492
|
+
config?: RawTransactionArgument<string>;
|
|
493
|
+
maxOrders: RawTransactionArgument<number | bigint>;
|
|
494
|
+
}
|
|
495
|
+
interface ResolveOptions {
|
|
496
|
+
package?: string;
|
|
497
|
+
arguments: ResolveArguments;
|
|
498
|
+
config?: {
|
|
499
|
+
orderDesk: ConfigValue;
|
|
500
|
+
protocolConfig: ConfigValue;
|
|
501
|
+
predictOrdersPackageId?: string;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Fill or refund committed orders in τ order, visiting at most `max_orders`
|
|
506
|
+
* records, and never more than 450 (each emits up to two events, and Sui caps a
|
|
507
|
+
* transaction at 1,024). Permissionless. Returns how many orders it finished.
|
|
508
|
+
*
|
|
509
|
+
* Walks the cohorts in τ order and loads only committed or overdue ones; a cohort
|
|
510
|
+
* still waiting for its price is skipped without loading a record. Every record
|
|
511
|
+
* visited counts against `max_orders`, finished or missing ones included. The 450
|
|
512
|
+
* cap bounds events, not loaded objects (`MAX_ORDERS_PER_CALL`), so the caller
|
|
513
|
+
* sizes `max_orders` to stay inside Sui's per-transaction object limit. An order
|
|
514
|
+
* at or past its deadline is refunded (reason 5), never filled. A committed order
|
|
515
|
+
* goes to Predict's `try_fill`, which fills it or returns the refund reason (1, 2,
|
|
516
|
+
* 4, 8, or 9); the queue returns the escrow Predict hands back to the trader, or
|
|
517
|
+
* parks it in the record when the receive address is denied. Returns 0 on a
|
|
518
|
+
* settled market, whose waiting orders the settlement drain refunds.
|
|
519
|
+
*/
|
|
520
|
+
declare function resolve(options: ResolveOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
521
|
+
interface RefundArguments {
|
|
522
|
+
queue: RawTransactionArgument<string>;
|
|
523
|
+
market: RawTransactionArgument<string>;
|
|
524
|
+
desk?: RawTransactionArgument<string>;
|
|
525
|
+
config?: RawTransactionArgument<string>;
|
|
526
|
+
maxOrders: RawTransactionArgument<number | bigint>;
|
|
527
|
+
}
|
|
528
|
+
interface RefundOptions {
|
|
529
|
+
package?: string;
|
|
530
|
+
arguments: RefundArguments;
|
|
531
|
+
config?: {
|
|
532
|
+
orderDesk: ConfigValue;
|
|
533
|
+
protocolConfig: ConfigValue;
|
|
534
|
+
predictOrdersPackageId?: string;
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Refund waiting orders at or past their deadline (reason 5), visiting at most
|
|
539
|
+
* `max_orders` records, refunded or not, and never more than 450, as `resolve`
|
|
540
|
+
* does. It walks the cohorts in τ order and stops at the first one not yet due,
|
|
541
|
+
* since deadlines never decrease along the queue. Permissionless, and available
|
|
542
|
+
* while Predict is frozen or this companion's witness is disabled: Predict's
|
|
543
|
+
* `release` checks only its version floor. A refund the receive address cannot
|
|
544
|
+
* take is parked in its record. Returns how many orders it refunded: `0`, without
|
|
545
|
+
* aborting, when none is due.
|
|
546
|
+
*/
|
|
547
|
+
declare function refund(options: RefundOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
548
|
+
interface AdminRefundArguments {
|
|
549
|
+
queue: RawTransactionArgument<string>;
|
|
550
|
+
market: RawTransactionArgument<string>;
|
|
551
|
+
AdminCap: RawTransactionArgument<string>;
|
|
552
|
+
desk?: RawTransactionArgument<string>;
|
|
553
|
+
config?: RawTransactionArgument<string>;
|
|
554
|
+
recordIds: RawTransactionArgument<Array<number | bigint>>;
|
|
555
|
+
}
|
|
556
|
+
interface AdminRefundOptions {
|
|
557
|
+
package?: string;
|
|
558
|
+
arguments: AdminRefundArguments;
|
|
559
|
+
config?: {
|
|
560
|
+
orderDesk: ConfigValue;
|
|
561
|
+
protocolConfig: ConfigValue;
|
|
562
|
+
predictOrdersPackageId?: string;
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Refund the listed waiting orders at once (reason 7), wherever they sit in the
|
|
567
|
+
* queue. Predict's `AdminCap` only, and available while Predict is frozen. Missing
|
|
568
|
+
* and finished IDs are skipped, and a refund the receive address cannot take is
|
|
569
|
+
* parked in its record.
|
|
570
|
+
*/
|
|
571
|
+
declare function adminRefund(options: AdminRefundOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
572
|
+
interface CleanupArguments {
|
|
573
|
+
queue: RawTransactionArgument<string>;
|
|
574
|
+
market: RawTransactionArgument<string>;
|
|
575
|
+
desk?: RawTransactionArgument<string>;
|
|
576
|
+
recordIds: RawTransactionArgument<Array<number | bigint>>;
|
|
577
|
+
}
|
|
578
|
+
interface CleanupOptions {
|
|
579
|
+
package?: string;
|
|
580
|
+
arguments: CleanupArguments;
|
|
581
|
+
config?: {
|
|
582
|
+
orderDesk: ConfigValue;
|
|
583
|
+
predictOrdersPackageId?: string;
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Delete Refunded and Closed records of a settled market. Permissionless; the
|
|
588
|
+
* storage rebate goes to the caller. Missing IDs, other statuses, and records
|
|
589
|
+
* still holding a receipt or funds (parked funds included, until `claim_parked`)
|
|
590
|
+
* are skipped; `QueuedOrdersCleaned` is emitted only when a record was deleted.
|
|
591
|
+
* Takes `&Clock` only to stamp the event.
|
|
592
|
+
*/
|
|
593
|
+
declare function cleanup(options: CleanupOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
594
|
+
interface SettleStepArguments {
|
|
595
|
+
queue: RawTransactionArgument<string>;
|
|
596
|
+
market: RawTransactionArgument<string>;
|
|
597
|
+
desk?: RawTransactionArgument<string>;
|
|
598
|
+
config?: RawTransactionArgument<string>;
|
|
599
|
+
}
|
|
600
|
+
interface SettleStepOptions {
|
|
601
|
+
package?: string;
|
|
602
|
+
arguments: SettleStepArguments;
|
|
603
|
+
config?: {
|
|
604
|
+
orderDesk: ConfigValue;
|
|
605
|
+
protocolConfig: ConfigValue;
|
|
606
|
+
predictOrdersPackageId?: string;
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Run one bounded settlement phase on this queue and return the phase the queue is
|
|
611
|
+
* in afterwards, which the next call runs (`phase_drain`, `phase_pay`, or
|
|
612
|
+
* `phase_done`). Permissionless; aborts `EMarketNotExpired` before expiry.
|
|
613
|
+
*
|
|
614
|
+
* - DRAIN, while unfinished orders remain: refund them in τ order with reason 5,
|
|
615
|
+
* visiting at most the policy's `settle_refund_batch` records, refunded or not.
|
|
616
|
+
* No pruning and no account rows, so each refund loads its record alone. A
|
|
617
|
+
* refund the receive address cannot take is parked in its record. Runs before
|
|
618
|
+
* and after Predict settles, and while Predict is frozen.
|
|
619
|
+
* - PAY, once nothing is unfinished and Predict has settled the market: from the
|
|
620
|
+
* payout cursor, visit at most `settle_payout_batch` records. Each Open record
|
|
621
|
+
* is paid its settled payout through `try_pay_settled` (zero for a loser),
|
|
622
|
+
* marked Closed, and reported with `OpenRecordSettled`. A record the market
|
|
623
|
+
* cannot pay, or whose receive address is denied, stays Open with
|
|
624
|
+
* `OpenRecordPayoutSkipped`, and `pay_open` pays it later. Before Predict
|
|
625
|
+
* settles, a PAY call changes nothing.
|
|
626
|
+
* - DONE: the call whose walk reaches the last record emits
|
|
627
|
+
* `MarketPayoutsCompleted`; later calls change nothing. Skipped records are
|
|
628
|
+
* still paid through `pay_open`.
|
|
629
|
+
*
|
|
630
|
+
* The keeper sends one call per transaction until it returns `phase_done()`.
|
|
631
|
+
*/
|
|
632
|
+
declare function settleStep(options: SettleStepOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
633
|
+
interface PayOpenArguments {
|
|
634
|
+
queue: RawTransactionArgument<string>;
|
|
635
|
+
market: RawTransactionArgument<string>;
|
|
636
|
+
desk?: RawTransactionArgument<string>;
|
|
637
|
+
config?: RawTransactionArgument<string>;
|
|
638
|
+
recordId: RawTransactionArgument<number | bigint>;
|
|
639
|
+
}
|
|
640
|
+
interface PayOpenOptions {
|
|
641
|
+
package?: string;
|
|
642
|
+
arguments: PayOpenArguments;
|
|
643
|
+
config?: {
|
|
644
|
+
orderDesk: ConfigValue;
|
|
645
|
+
protocolConfig: ConfigValue;
|
|
646
|
+
predictOrdersPackageId?: string;
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Pay one Open record of a settled market its settled payout through Predict's
|
|
651
|
+
* `try_pay_settled`, at any time after settlement, before or after `settle_step`
|
|
652
|
+
* completes: the record the payout walk skipped because the market was short of
|
|
653
|
+
* cash or its receive address was denied. Permissionless. Emits
|
|
654
|
+
* `OpenRecordSettled` and closes the record, or emits `OpenRecordPayoutSkipped`
|
|
655
|
+
* and leaves it Open if the cause persists. A missing or non-Open record is left
|
|
656
|
+
* alone. Aborts `EMarketNotSettled` before Predict settles the market.
|
|
657
|
+
*/
|
|
658
|
+
declare function payOpen(options: PayOpenOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
659
|
+
interface ClaimParkedArguments {
|
|
660
|
+
queue: RawTransactionArgument<string>;
|
|
661
|
+
desk?: RawTransactionArgument<string>;
|
|
662
|
+
recordId: RawTransactionArgument<number | bigint>;
|
|
663
|
+
}
|
|
664
|
+
interface ClaimParkedOptions {
|
|
665
|
+
package?: string;
|
|
666
|
+
arguments: ClaimParkedArguments;
|
|
667
|
+
config?: {
|
|
668
|
+
orderDesk: ConfigValue;
|
|
669
|
+
predictOrdersPackageId?: string;
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Send a finished record's parked funds, change or a refund its receive address
|
|
674
|
+
* could not take, to that address once a send would go through (`denied` is
|
|
675
|
+
* false). Permissionless: the funds go only to the record's own receive address.
|
|
676
|
+
* Emits `RecordFundsClaimed` and returns the amount sent, or returns `0` and
|
|
677
|
+
* changes nothing for a missing or unfinished record, one with nothing parked, or
|
|
678
|
+
* an address still denied.
|
|
679
|
+
*/
|
|
680
|
+
declare function claimParked(options: ClaimParkedOptions): (tx: Transaction) => _mysten_sui_transactions224.TransactionResult;
|
|
681
|
+
//#endregion
|
|
682
|
+
export { queue_d_exports };
|
|
683
|
+
//# sourceMappingURL=queue.d.mts.map
|