@mysten/deepbook-v3 2.8.2 → 2.9.1
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 +28 -0
- package/PREDICT.md +26 -13
- package/dist/client.d.mts +2 -2
- package/dist/contracts/account/account.d.mts +23 -23
- package/dist/contracts/account/account.d.mts.map +1 -1
- package/dist/contracts/account/account_events.d.mts +20 -20
- package/dist/contracts/account/account_events.d.mts.map +1 -1
- package/dist/contracts/account/account_registry.d.mts +19 -19
- package/dist/contracts/account/account_registry.d.mts.map +1 -1
- 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/admin.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/builder_code.d.mts +11 -11
- package/dist/contracts/deepbook_predict/builder_code.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/builder_code_events.d.mts +10 -10
- package/dist/contracts/deepbook_predict/config_events.d.mts +86 -81
- package/dist/contracts/deepbook_predict/config_events.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/config_events.mjs +9 -0
- package/dist/contracts/deepbook_predict/config_events.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/expiry_market.d.mts +59 -59
- package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/market_manager.d.mts +33 -28
- package/dist/contracts/deepbook_predict/market_manager.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/market_manager.mjs +5 -3
- package/dist/contracts/deepbook_predict/market_manager.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/order_events.d.mts +50 -50
- package/dist/contracts/deepbook_predict/pause_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/pause_cap.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/plp.d.mts +74 -74
- package/dist/contracts/deepbook_predict/plp.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/predict_account.d.mts +14 -14
- package/dist/contracts/deepbook_predict/predict_account.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/pricing.d.mts +67 -67
- package/dist/contracts/deepbook_predict/pricing.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/protocol_config.d.mts +82 -82
- package/dist/contracts/deepbook_predict/range_codec.d.mts +2 -2
- package/dist/contracts/deepbook_predict/range_codec.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/registry.d.mts +108 -36
- package/dist/contracts/deepbook_predict/registry.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/registry.mjs +111 -7
- package/dist/contracts/deepbook_predict/registry.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/vault_events.d.mts +131 -131
- package/dist/contracts/deepbook_predict_math/lazer_price.d.mts +13 -13
- package/dist/contracts/deepbook_predict_math/math.d.mts +14 -14
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts +30 -30
- package/dist/contracts/deepbook_predict_orders/desk.d.mts +28 -28
- package/dist/contracts/deepbook_predict_orders/desk.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict_orders/order_queue.d.mts +187 -187
- package/dist/contracts/deepbook_predict_orders/queue.d.mts +49 -49
- package/dist/contracts/deepbook_predict_orders/queue_events.d.mts +140 -140
- package/dist/contracts/deepbook_sessions/session_config.d.mts +8 -8
- package/dist/contracts/deepbook_sessions/session_config.d.mts.map +1 -1
- package/dist/contracts/deepbook_sessions/sessions.d.mts +27 -27
- package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -1
- package/dist/deployments/testnet.mjs +1 -1
- package/dist/deployments/testnet.mjs.map +1 -1
- package/dist/predict/bindings/expiry-market.d.mts +5 -5
- package/dist/predict/bindings/expiry-market.d.mts.map +1 -1
- package/dist/predict/bindings/protocol-config.d.mts +3 -3
- package/dist/predict/bindings/protocol-config.d.mts.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/marginPool.d.mts +18 -18
- package/dist/transactions/marginPool.d.mts.map +1 -1
- package/dist/transactions/marginRegistry.d.mts +16 -16
- package/dist/transactions/marginTPSL.d.mts +10 -10
- package/dist/transactions/poolProxy.d.mts +8 -8
- package/dist/transactions/poolProxy.d.mts.map +1 -1
- package/dist/utils/constants.d.mts.map +1 -1
- package/dist/utils/constants.mjs +14 -4
- package/dist/utils/constants.mjs.map +1 -1
- package/package.json +1 -1
- package/src/contracts/deepbook_predict/config_events.ts +8 -0
- package/src/contracts/deepbook_predict/market_manager.ts +11 -5
- package/src/contracts/deepbook_predict/registry.ts +162 -6
- package/src/contracts/propbook/block_scholes_store.ts +48 -3
- package/src/contracts/propbook/registry.ts +45 -0
- package/src/deployments/testnet.ts +1 -1
- package/src/utils/constants.ts +24 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MoveStruct } from "../utils/index.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _mysten_sui_bcs30 from "@mysten/sui/bcs";
|
|
3
|
+
import * as _mysten_sui_transactions156 from "@mysten/sui/transactions";
|
|
4
4
|
import { Transaction, TransactionArgument } from "@mysten/sui/transactions";
|
|
5
5
|
|
|
6
6
|
//#region src/contracts/deepbook_predict/market_manager.d.ts
|
|
@@ -8,62 +8,67 @@ declare namespace market_manager_d_exports {
|
|
|
8
8
|
export { CadenceAdmissionTickSizeArguments, CadenceAdmissionTickSizeOptions, CadenceConfig, CadenceEnabledArguments, CadenceEnabledOptions, CadenceInitialExpiryCashArguments, CadenceInitialExpiryCashOptions, CadenceMaxExpiryAllocationArguments, CadenceMaxExpiryAllocationOptions, CadenceTickSizeArguments, CadenceTickSizeOptions, CadenceWindowSizeArguments, CadenceWindowSizeOptions, DeployableMarket, MarketKey, MarketManager, UnderlyingMarketConfig, cadenceAdmissionTickSize, cadenceEnabled, cadenceInitialExpiryCash, cadenceMaxExpiryAllocation, cadenceTickSize, cadenceWindowSize };
|
|
9
9
|
}
|
|
10
10
|
declare const MarketKey: MoveStruct<{
|
|
11
|
-
propbook_underlying_id:
|
|
12
|
-
expiry:
|
|
11
|
+
propbook_underlying_id: _mysten_sui_bcs30.BcsType<number, number, "u32">;
|
|
12
|
+
expiry: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
13
13
|
}, "@local-pkg/deepbook_predict::market_manager::MarketKey">;
|
|
14
14
|
declare const MarketManager: MoveStruct<{
|
|
15
15
|
/** Propbook underlying ID -> deployment watermarks. */underlying_configs: MoveStruct<{
|
|
16
|
-
id:
|
|
17
|
-
size:
|
|
16
|
+
id: _mysten_sui_bcs30.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
17
|
+
size: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
18
18
|
}, "0x2::table::Table<phantom K, phantom V>">; /** Created markets keyed by `(propbook_underlying_id, expiry)`. */
|
|
19
19
|
market_ids: MoveStruct<{
|
|
20
|
-
id:
|
|
21
|
-
size:
|
|
20
|
+
id: _mysten_sui_bcs30.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
+
size: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
22
22
|
}, "0x2::table::Table<phantom K, phantom V>">;
|
|
23
23
|
}, "@local-pkg/deepbook_predict::market_manager::MarketManager">;
|
|
24
24
|
declare const CadenceConfig: MoveStruct<{
|
|
25
|
-
/** Raw-price-per-tick factor snapshotted into each created market. */tick_size:
|
|
26
|
-
admission_tick_size:
|
|
25
|
+
/** Raw-price-per-tick factor snapshotted into each created market. */tick_size: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">; /** Coarser raw-price step that new finite mint boundaries must align to. */
|
|
26
|
+
admission_tick_size: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
27
27
|
/**
|
|
28
28
|
* USDC pool allocation cap snapshotted into pool accounting for each created
|
|
29
29
|
* expiry.
|
|
30
30
|
*/
|
|
31
|
-
max_expiry_allocation:
|
|
31
|
+
max_expiry_allocation: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
32
32
|
/**
|
|
33
33
|
* Minimum USDC cash target snapshotted into pool accounting for each created
|
|
34
34
|
* expiry.
|
|
35
35
|
*/
|
|
36
|
-
initial_expiry_cash:
|
|
36
|
+
initial_expiry_cash: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
37
37
|
/**
|
|
38
38
|
* Number of cadence periods in the rolling future deployment horizon. Zero
|
|
39
39
|
* disables this cadence.
|
|
40
40
|
*/
|
|
41
|
-
window_size:
|
|
41
|
+
window_size: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
42
42
|
}, "@local-pkg/deepbook_predict::market_manager::CadenceConfig">;
|
|
43
43
|
declare const DeployableMarket: MoveStruct<{
|
|
44
|
-
expiry:
|
|
44
|
+
expiry: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
45
45
|
cadence: MoveStruct<{
|
|
46
|
-
/** Raw-price-per-tick factor snapshotted into each created market. */tick_size:
|
|
47
|
-
admission_tick_size:
|
|
46
|
+
/** Raw-price-per-tick factor snapshotted into each created market. */tick_size: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">; /** Coarser raw-price step that new finite mint boundaries must align to. */
|
|
47
|
+
admission_tick_size: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
48
48
|
/**
|
|
49
49
|
* USDC pool allocation cap snapshotted into pool accounting for each created
|
|
50
50
|
* expiry.
|
|
51
51
|
*/
|
|
52
|
-
max_expiry_allocation:
|
|
52
|
+
max_expiry_allocation: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
53
53
|
/**
|
|
54
54
|
* Minimum USDC cash target snapshotted into pool accounting for each created
|
|
55
55
|
* expiry.
|
|
56
56
|
*/
|
|
57
|
-
initial_expiry_cash:
|
|
57
|
+
initial_expiry_cash: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
58
58
|
/**
|
|
59
59
|
* Number of cadence periods in the rolling future deployment horizon. Zero
|
|
60
60
|
* disables this cadence.
|
|
61
61
|
*/
|
|
62
|
-
window_size:
|
|
62
|
+
window_size: _mysten_sui_bcs30.BcsType<bigint, string | number | bigint, "u64">;
|
|
63
63
|
}, "@local-pkg/deepbook_predict::market_manager::CadenceConfig">;
|
|
64
64
|
}, "@local-pkg/deepbook_predict::market_manager::DeployableMarket">;
|
|
65
65
|
declare const UnderlyingMarketConfig: MoveStruct<{
|
|
66
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Deployment config indexed by cadence ID. Rows past its length are disabled; the
|
|
68
|
+
* vector grows past the six built-ins only when an added cadence is set or
|
|
69
|
+
* created, because package versions before the cadence table abort on longer rows.
|
|
70
|
+
*/
|
|
71
|
+
cadences: _mysten_sui_bcs30.BcsType<{
|
|
67
72
|
tick_size: bigint;
|
|
68
73
|
admission_tick_size: bigint;
|
|
69
74
|
max_expiry_allocation: bigint;
|
|
@@ -77,8 +82,8 @@ declare const UnderlyingMarketConfig: MoveStruct<{
|
|
|
77
82
|
window_size: string | number | bigint;
|
|
78
83
|
}> & {
|
|
79
84
|
length: number;
|
|
80
|
-
}, string>; /** Highest deployed expiry timestamp indexed by cadence ID. */
|
|
81
|
-
last_deployed_expiries:
|
|
85
|
+
}, string>; /** Highest deployed expiry timestamp indexed by cadence ID; missing rows are 0. */
|
|
86
|
+
last_deployed_expiries: _mysten_sui_bcs30.BcsType<bigint[], Iterable<string | number | bigint> & {
|
|
82
87
|
length: number;
|
|
83
88
|
}, string>;
|
|
84
89
|
}, "@local-pkg/deepbook_predict::market_manager::UnderlyingMarketConfig">;
|
|
@@ -93,7 +98,7 @@ interface CadenceTickSizeOptions {
|
|
|
93
98
|
};
|
|
94
99
|
}
|
|
95
100
|
/** Return the raw-price-per-tick factor for SDK and devInspect cadence reads. */
|
|
96
|
-
declare function cadenceTickSize(options: CadenceTickSizeOptions): (tx: Transaction) =>
|
|
101
|
+
declare function cadenceTickSize(options: CadenceTickSizeOptions): (tx: Transaction) => _mysten_sui_transactions156.TransactionResult;
|
|
97
102
|
interface CadenceAdmissionTickSizeArguments {
|
|
98
103
|
config: TransactionArgument;
|
|
99
104
|
}
|
|
@@ -105,7 +110,7 @@ interface CadenceAdmissionTickSizeOptions {
|
|
|
105
110
|
};
|
|
106
111
|
}
|
|
107
112
|
/** Return the admission-grid step for SDK and devInspect cadence reads. */
|
|
108
|
-
declare function cadenceAdmissionTickSize(options: CadenceAdmissionTickSizeOptions): (tx: Transaction) =>
|
|
113
|
+
declare function cadenceAdmissionTickSize(options: CadenceAdmissionTickSizeOptions): (tx: Transaction) => _mysten_sui_transactions156.TransactionResult;
|
|
109
114
|
interface CadenceMaxExpiryAllocationArguments {
|
|
110
115
|
config: TransactionArgument;
|
|
111
116
|
}
|
|
@@ -117,7 +122,7 @@ interface CadenceMaxExpiryAllocationOptions {
|
|
|
117
122
|
};
|
|
118
123
|
}
|
|
119
124
|
/** Return the expiry allocation cap for SDK and devInspect cadence reads. */
|
|
120
|
-
declare function cadenceMaxExpiryAllocation(options: CadenceMaxExpiryAllocationOptions): (tx: Transaction) =>
|
|
125
|
+
declare function cadenceMaxExpiryAllocation(options: CadenceMaxExpiryAllocationOptions): (tx: Transaction) => _mysten_sui_transactions156.TransactionResult;
|
|
121
126
|
interface CadenceInitialExpiryCashArguments {
|
|
122
127
|
config: TransactionArgument;
|
|
123
128
|
}
|
|
@@ -129,7 +134,7 @@ interface CadenceInitialExpiryCashOptions {
|
|
|
129
134
|
};
|
|
130
135
|
}
|
|
131
136
|
/** Return the initial expiry cash target for SDK and devInspect cadence reads. */
|
|
132
|
-
declare function cadenceInitialExpiryCash(options: CadenceInitialExpiryCashOptions): (tx: Transaction) =>
|
|
137
|
+
declare function cadenceInitialExpiryCash(options: CadenceInitialExpiryCashOptions): (tx: Transaction) => _mysten_sui_transactions156.TransactionResult;
|
|
133
138
|
interface CadenceWindowSizeArguments {
|
|
134
139
|
config: TransactionArgument;
|
|
135
140
|
}
|
|
@@ -141,7 +146,7 @@ interface CadenceWindowSizeOptions {
|
|
|
141
146
|
};
|
|
142
147
|
}
|
|
143
148
|
/** Return the rolling deployment horizon for SDK and devInspect cadence reads. */
|
|
144
|
-
declare function cadenceWindowSize(options: CadenceWindowSizeOptions): (tx: Transaction) =>
|
|
149
|
+
declare function cadenceWindowSize(options: CadenceWindowSizeOptions): (tx: Transaction) => _mysten_sui_transactions156.TransactionResult;
|
|
145
150
|
interface CadenceEnabledArguments {
|
|
146
151
|
config: TransactionArgument;
|
|
147
152
|
}
|
|
@@ -153,7 +158,7 @@ interface CadenceEnabledOptions {
|
|
|
153
158
|
};
|
|
154
159
|
}
|
|
155
160
|
/** Return whether this cadence is enabled for SDK and devInspect discovery. */
|
|
156
|
-
declare function cadenceEnabled(options: CadenceEnabledOptions): (tx: Transaction) =>
|
|
161
|
+
declare function cadenceEnabled(options: CadenceEnabledOptions): (tx: Transaction) => _mysten_sui_transactions156.TransactionResult;
|
|
157
162
|
//#endregion
|
|
158
163
|
export { market_manager_d_exports };
|
|
159
164
|
//# sourceMappingURL=market_manager.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market_manager.d.mts","names":[],"sources":["../../../src/contracts/deepbook_predict/market_manager.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"market_manager.d.mts","names":[],"sources":["../../../src/contracts/deepbook_predict/market_manager.ts"],"mappings":";;;;;;;;;cAoBa,SAAA,EAAS,UAAA;0BAMpB,iBAAA,CAAA,OAAA;;;cACW,aAAA,EAAa,UAAA;;;;;;;;;;cASb,aAAA,EAAa,UAAA;mFAuBxB,iBAAA,CAAA,OAAA,2CAjCA;;EAAA;;;;;EANoB;;;;;;;AAOtB;;;;cAiCa,gBAAA,EAAgB,UAAA;UAM3B,iBAAA,CAAA,OAAA;;;;;;;;;IAvCwB;;;;;;;;;;;;cAwCb,sBAAA,EAAsB,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;UAalB,wBAAA;EAChB,MAAA,EAAQ,mBAAA;AAAA;AAAA,UAEQ,sBAAA;EAChB,OAAA;EACA,SAAA,EAAW,wBAAA,IAA4B,MAAA,EAAQ,mBAAA;EAC/C,MAAA;IACC,gBAAA;EAAA;AAAA;;iBAIc,eAAA,CAAgB,OAAA,EAAS,sBAAA,IAKhC,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;AAAA,UAQP,iCAAA;EAChB,MAAA,EAAQ,mBAAA;AAAA;AAAA,UAEQ,+BAAA;EAChB,OAAA;EACA,SAAA,EAAW,iCAAA,IAAqC,MAAA,EAAQ,mBAAA;EACxD,MAAA;IACC,gBAAA;EAAA;AAAA;;iBAIc,wBAAA,CAAyB,OAAA,EAAS,+BAAA,IAKzC,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;AAAA,UAQP,mCAAA;EAChB,MAAA,EAAQ,mBAAA;AAAA;AAAA,UAEQ,iCAAA;EAChB,OAAA;EACA,SAAA,EAAW,mCAAA,IAAuC,MAAA,EAAQ,mBAAA;EAC1D,MAAA;IACC,gBAAA;EAAA;AAAA;;iBAIc,0BAAA,CAA2B,OAAA,EAAS,iCAAA,IAK3C,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;AAAA,UAQP,iCAAA;EAChB,MAAA,EAAQ,mBAAA;AAAA;AAAA,UAEQ,+BAAA;EAChB,OAAA;EACA,SAAA,EAAW,iCAAA,IAAqC,MAAA,EAAQ,mBAAA;EACxD,MAAA;IACC,gBAAA;EAAA;AAAA;;iBAIc,wBAAA,CAAyB,OAAA,EAAS,+BAAA,IAKzC,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;AAAA,UAQP,0BAAA;EAChB,MAAA,EAAQ,mBAAA;AAAA;AAAA,UAEQ,wBAAA;EAChB,OAAA;EACA,SAAA,EAAW,0BAAA,IAA8B,MAAA,EAAQ,mBAAA;EACjD,MAAA;IACC,gBAAA;EAAA;AAAA;;iBAIc,iBAAA,CAAkB,OAAA,EAAS,wBAAA,IAKlC,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;AAAA,UAQP,uBAAA;EAChB,MAAA,EAAQ,mBAAA;AAAA;AAAA,UAEQ,qBAAA;EAChB,OAAA;EACA,SAAA,EAAW,uBAAA,IAA2B,MAAA,EAAQ,mBAAA;EAC9C,MAAA;IACC,gBAAA;EAAA;AAAA;;iBAIc,cAAA,CAAe,OAAA,EAAS,qBAAA,IAK/B,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA"}
|
|
@@ -11,9 +11,11 @@ import { bcs } from "@mysten/sui/bcs";
|
|
|
11
11
|
/**
|
|
12
12
|
* Market identity and deployment cadence manager for Predict.
|
|
13
13
|
*
|
|
14
|
-
* `Registry` owns this state and delegates market admission to it.
|
|
15
|
-
*
|
|
16
|
-
* deployment terms, and per-underlying
|
|
14
|
+
* `Registry` owns this state and delegates market admission to it. Cadence periods
|
|
15
|
+
* live in the registry's admin-extended cadence table and are passed in, indexed
|
|
16
|
+
* by cadence ID; underlying rows, cadence deployment terms, and per-underlying
|
|
17
|
+
* watermarks are stored here. When two enabled cadences can create the same
|
|
18
|
+
* expiry, the one with the longer period owns it.
|
|
17
19
|
*/
|
|
18
20
|
var market_manager_exports = /* @__PURE__ */ __exportAll({
|
|
19
21
|
CadenceConfig: () => CadenceConfig,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market_manager.mjs","names":["table.Table"],"sources":["../../../src/contracts/deepbook_predict/market_manager.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Market identity and deployment cadence manager for Predict.\n *\n * `Registry` owns this state and delegates market admission to it. Fixed cadence\n * IDs, periods, and rank order are upgrade-required. Underlying rows, cadence\n * deployment terms, and per-underlying watermarks are stored here.\n */\n\nimport { MoveStruct, normalizeMoveArguments } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { U64 } from '../../bcs/integers.js';\nimport { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';\nimport * as table from './deps/sui/table.js';\nconst $moduleName = '@local-pkg/deepbook_predict::market_manager';\nexport const MarketKey = new MoveStruct({\n\tname: `${$moduleName}::MarketKey`,\n\tfields: {\n\t\tpropbook_underlying_id: bcs.u32(),\n\t\texpiry: U64,\n\t},\n});\nexport const MarketManager = new MoveStruct({\n\tname: `${$moduleName}::MarketManager`,\n\tfields: {\n\t\t/** Propbook underlying ID -> deployment watermarks. */\n\t\tunderlying_configs: table.Table,\n\t\t/** Created markets keyed by `(propbook_underlying_id, expiry)`. */\n\t\tmarket_ids: table.Table,\n\t},\n});\nexport const CadenceConfig = new MoveStruct({\n\tname: `${$moduleName}::CadenceConfig`,\n\tfields: {\n\t\t/** Raw-price-per-tick factor snapshotted into each created market. */\n\t\ttick_size: U64,\n\t\t/** Coarser raw-price step that new finite mint boundaries must align to. */\n\t\tadmission_tick_size: U64,\n\t\t/**\n\t\t * USDC pool allocation cap snapshotted into pool accounting for each created\n\t\t * expiry.\n\t\t */\n\t\tmax_expiry_allocation: U64,\n\t\t/**\n\t\t * Minimum USDC cash target snapshotted into pool accounting for each created\n\t\t * expiry.\n\t\t */\n\t\tinitial_expiry_cash: U64,\n\t\t/**\n\t\t * Number of cadence periods in the rolling future deployment horizon. Zero\n\t\t * disables this cadence.\n\t\t */\n\t\twindow_size: U64,\n\t},\n});\nexport const DeployableMarket = new MoveStruct({\n\tname: `${$moduleName}::DeployableMarket`,\n\tfields: {\n\t\texpiry: U64,\n\t\tcadence: CadenceConfig,\n\t},\n});\nexport const UnderlyingMarketConfig = new MoveStruct({\n\tname: `${$moduleName}::UnderlyingMarketConfig`,\n\tfields: {\n\t\t/** Deployment config indexed by cadence ID. */\n\t\tcadences: bcs.vector(CadenceConfig),\n\t\t/** Highest deployed expiry timestamp indexed by cadence ID. */\n\t\tlast_deployed_expiries: bcs.vector(U64),\n\t},\n});\nexport interface CadenceTickSizeArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceTickSizeOptions {\n\tpackage?: string;\n\targuments: CadenceTickSizeArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the raw-price-per-tick factor for SDK and devInspect cadence reads. */\nexport function cadenceTickSize(options: CadenceTickSizeOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_tick_size',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceAdmissionTickSizeArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceAdmissionTickSizeOptions {\n\tpackage?: string;\n\targuments: CadenceAdmissionTickSizeArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the admission-grid step for SDK and devInspect cadence reads. */\nexport function cadenceAdmissionTickSize(options: CadenceAdmissionTickSizeOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_admission_tick_size',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceMaxExpiryAllocationArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceMaxExpiryAllocationOptions {\n\tpackage?: string;\n\targuments: CadenceMaxExpiryAllocationArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the expiry allocation cap for SDK and devInspect cadence reads. */\nexport function cadenceMaxExpiryAllocation(options: CadenceMaxExpiryAllocationOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_max_expiry_allocation',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceInitialExpiryCashArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceInitialExpiryCashOptions {\n\tpackage?: string;\n\targuments: CadenceInitialExpiryCashArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the initial expiry cash target for SDK and devInspect cadence reads. */\nexport function cadenceInitialExpiryCash(options: CadenceInitialExpiryCashOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_initial_expiry_cash',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceWindowSizeArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceWindowSizeOptions {\n\tpackage?: string;\n\targuments: CadenceWindowSizeArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the rolling deployment horizon for SDK and devInspect cadence reads. */\nexport function cadenceWindowSize(options: CadenceWindowSizeOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_window_size',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceEnabledArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceEnabledOptions {\n\tpackage?: string;\n\targuments: CadenceEnabledArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return whether this cadence is enabled for SDK and devInspect discovery. */\nexport function cadenceEnabled(options: CadenceEnabledOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_enabled',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,cAAc;AACpB,MAAa,YAAY,IAAI,WAAW;CACvC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,wBAAwB,IAAI,KAAK;EACjC,QAAQ;EACR;CACD,CAAC;AACF,MAAa,gBAAgB,IAAI,WAAW;CAC3C,MAAM,GAAG,YAAY;CACrB,QAAQ;EAEP,oBAAoBA;EAEpB,YAAYA;EACZ;CACD,CAAC;AACF,MAAa,gBAAgB,IAAI,WAAW;CAC3C,MAAM,GAAG,YAAY;CACrB,QAAQ;EAEP,WAAW;EAEX,qBAAqB;EAKrB,uBAAuB;EAKvB,qBAAqB;EAKrB,aAAa;EACb;CACD,CAAC;AACF,MAAa,mBAAmB,IAAI,WAAW;CAC9C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,QAAQ;EACR,SAAS;EACT;CACD,CAAC;AACF,MAAa,yBAAyB,IAAI,WAAW;CACpD,MAAM,GAAG,YAAY;CACrB,QAAQ;EAEP,UAAU,IAAI,OAAO,cAAc;EAEnC,wBAAwB,IAAI,OAAO,IAAI;EACvC;CACD,CAAC;;AAYF,SAAgB,gBAAgB,SAAiC;CAChE,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,yBAAyB,SAA0C;CAClF,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,2BAA2B,SAA4C;CACtF,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,yBAAyB,SAA0C;CAClF,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,kBAAkB,SAAmC;CACpE,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,eAAe,SAAgC;CAC9D,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC"}
|
|
1
|
+
{"version":3,"file":"market_manager.mjs","names":["table.Table"],"sources":["../../../src/contracts/deepbook_predict/market_manager.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Market identity and deployment cadence manager for Predict.\n *\n * `Registry` owns this state and delegates market admission to it. Cadence periods\n * live in the registry's admin-extended cadence table and are passed in, indexed\n * by cadence ID; underlying rows, cadence deployment terms, and per-underlying\n * watermarks are stored here. When two enabled cadences can create the same\n * expiry, the one with the longer period owns it.\n */\n\nimport { MoveStruct, normalizeMoveArguments } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { U64 } from '../../bcs/integers.js';\nimport { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';\nimport * as table from './deps/sui/table.js';\nconst $moduleName = '@local-pkg/deepbook_predict::market_manager';\nexport const MarketKey = new MoveStruct({\n\tname: `${$moduleName}::MarketKey`,\n\tfields: {\n\t\tpropbook_underlying_id: bcs.u32(),\n\t\texpiry: U64,\n\t},\n});\nexport const MarketManager = new MoveStruct({\n\tname: `${$moduleName}::MarketManager`,\n\tfields: {\n\t\t/** Propbook underlying ID -> deployment watermarks. */\n\t\tunderlying_configs: table.Table,\n\t\t/** Created markets keyed by `(propbook_underlying_id, expiry)`. */\n\t\tmarket_ids: table.Table,\n\t},\n});\nexport const CadenceConfig = new MoveStruct({\n\tname: `${$moduleName}::CadenceConfig`,\n\tfields: {\n\t\t/** Raw-price-per-tick factor snapshotted into each created market. */\n\t\ttick_size: U64,\n\t\t/** Coarser raw-price step that new finite mint boundaries must align to. */\n\t\tadmission_tick_size: U64,\n\t\t/**\n\t\t * USDC pool allocation cap snapshotted into pool accounting for each created\n\t\t * expiry.\n\t\t */\n\t\tmax_expiry_allocation: U64,\n\t\t/**\n\t\t * Minimum USDC cash target snapshotted into pool accounting for each created\n\t\t * expiry.\n\t\t */\n\t\tinitial_expiry_cash: U64,\n\t\t/**\n\t\t * Number of cadence periods in the rolling future deployment horizon. Zero\n\t\t * disables this cadence.\n\t\t */\n\t\twindow_size: U64,\n\t},\n});\nexport const DeployableMarket = new MoveStruct({\n\tname: `${$moduleName}::DeployableMarket`,\n\tfields: {\n\t\texpiry: U64,\n\t\tcadence: CadenceConfig,\n\t},\n});\nexport const UnderlyingMarketConfig = new MoveStruct({\n\tname: `${$moduleName}::UnderlyingMarketConfig`,\n\tfields: {\n\t\t/**\n\t\t * Deployment config indexed by cadence ID. Rows past its length are disabled; the\n\t\t * vector grows past the six built-ins only when an added cadence is set or\n\t\t * created, because package versions before the cadence table abort on longer rows.\n\t\t */\n\t\tcadences: bcs.vector(CadenceConfig),\n\t\t/** Highest deployed expiry timestamp indexed by cadence ID; missing rows are 0. */\n\t\tlast_deployed_expiries: bcs.vector(U64),\n\t},\n});\nexport interface CadenceTickSizeArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceTickSizeOptions {\n\tpackage?: string;\n\targuments: CadenceTickSizeArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the raw-price-per-tick factor for SDK and devInspect cadence reads. */\nexport function cadenceTickSize(options: CadenceTickSizeOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_tick_size',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceAdmissionTickSizeArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceAdmissionTickSizeOptions {\n\tpackage?: string;\n\targuments: CadenceAdmissionTickSizeArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the admission-grid step for SDK and devInspect cadence reads. */\nexport function cadenceAdmissionTickSize(options: CadenceAdmissionTickSizeOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_admission_tick_size',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceMaxExpiryAllocationArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceMaxExpiryAllocationOptions {\n\tpackage?: string;\n\targuments: CadenceMaxExpiryAllocationArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the expiry allocation cap for SDK and devInspect cadence reads. */\nexport function cadenceMaxExpiryAllocation(options: CadenceMaxExpiryAllocationOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_max_expiry_allocation',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceInitialExpiryCashArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceInitialExpiryCashOptions {\n\tpackage?: string;\n\targuments: CadenceInitialExpiryCashArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the initial expiry cash target for SDK and devInspect cadence reads. */\nexport function cadenceInitialExpiryCash(options: CadenceInitialExpiryCashOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_initial_expiry_cash',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceWindowSizeArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceWindowSizeOptions {\n\tpackage?: string;\n\targuments: CadenceWindowSizeArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return the rolling deployment horizon for SDK and devInspect cadence reads. */\nexport function cadenceWindowSize(options: CadenceWindowSizeOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_window_size',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface CadenceEnabledArguments {\n\tconfig: TransactionArgument;\n}\nexport interface CadenceEnabledOptions {\n\tpackage?: string;\n\targuments: CadenceEnabledArguments | [config: TransactionArgument];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Return whether this cadence is enabled for SDK and devInspect discovery. */\nexport function cadenceEnabled(options: CadenceEnabledOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['config'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'market_manager',\n\t\t\tfunction: 'cadence_enabled',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,cAAc;AACpB,MAAa,YAAY,IAAI,WAAW;CACvC,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,wBAAwB,IAAI,KAAK;EACjC,QAAQ;EACR;CACD,CAAC;AACF,MAAa,gBAAgB,IAAI,WAAW;CAC3C,MAAM,GAAG,YAAY;CACrB,QAAQ;EAEP,oBAAoBA;EAEpB,YAAYA;EACZ;CACD,CAAC;AACF,MAAa,gBAAgB,IAAI,WAAW;CAC3C,MAAM,GAAG,YAAY;CACrB,QAAQ;EAEP,WAAW;EAEX,qBAAqB;EAKrB,uBAAuB;EAKvB,qBAAqB;EAKrB,aAAa;EACb;CACD,CAAC;AACF,MAAa,mBAAmB,IAAI,WAAW;CAC9C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,QAAQ;EACR,SAAS;EACT;CACD,CAAC;AACF,MAAa,yBAAyB,IAAI,WAAW;CACpD,MAAM,GAAG,YAAY;CACrB,QAAQ;EAMP,UAAU,IAAI,OAAO,cAAc;EAEnC,wBAAwB,IAAI,OAAO,IAAI;EACvC;CACD,CAAC;;AAYF,SAAgB,gBAAgB,SAAiC;CAChE,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,yBAAyB,SAA0C;CAClF,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,2BAA2B,SAA4C;CACtF,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,yBAAyB,SAA0C;CAClF,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,kBAAkB,SAAmC;CACpE,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,eAAe,SAAgC;CAC9D,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,SAAS;AACjC,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC"}
|
|
@@ -1,100 +1,100 @@
|
|
|
1
1
|
import { MoveStruct } from "../utils/index.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _mysten_sui_bcs265 from "@mysten/sui/bcs";
|
|
3
3
|
|
|
4
4
|
//#region src/contracts/deepbook_predict/order_events.d.ts
|
|
5
5
|
declare namespace order_events_d_exports {
|
|
6
6
|
export { LiveOrderRedeemed, OrderMinted, SettledOrderRedeemed };
|
|
7
7
|
}
|
|
8
8
|
declare const OrderMinted: MoveStruct<{
|
|
9
|
-
expiry_market_id:
|
|
10
|
-
account_id:
|
|
11
|
-
order_id:
|
|
9
|
+
expiry_market_id: _mysten_sui_bcs265.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
10
|
+
account_id: _mysten_sui_bcs265.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
11
|
+
order_id: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u256">;
|
|
12
12
|
/**
|
|
13
13
|
* Stable economic-position handle: the original mint's `order_id`, carried forward
|
|
14
14
|
* unchanged across partial-close replacements. Equals `order_id` here.
|
|
15
15
|
*/
|
|
16
|
-
position_root_id:
|
|
17
|
-
owner:
|
|
16
|
+
position_root_id: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u256">;
|
|
17
|
+
owner: _mysten_sui_bcs265.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
18
18
|
/**
|
|
19
19
|
* Canonical strike range as absolute ticks: `lower_tick` (`0` = `-inf`) and
|
|
20
20
|
* `higher_tick` (`pos_inf_tick` = `+inf`). Raw strikes are the derived display
|
|
21
21
|
* form, `tick * tick_size` with the `tick_size` from `MarketCreated`.
|
|
22
22
|
*/
|
|
23
|
-
lower_tick:
|
|
24
|
-
higher_tick:
|
|
25
|
-
entry_probability:
|
|
26
|
-
quantity:
|
|
27
|
-
premium:
|
|
28
|
-
trading_fee:
|
|
29
|
-
fee_incentive_subsidy:
|
|
30
|
-
builder_fee:
|
|
31
|
-
penalty_fee:
|
|
23
|
+
lower_tick: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
24
|
+
higher_tick: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** 1e9-scaled range probability quoted at entry. */
|
|
25
|
+
entry_probability: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
26
|
+
quantity: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** Premium the user paid into LP backing, in USDC base units. */
|
|
27
|
+
premium: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** Full trading fee assessed for the mint, including any sponsor-paid subsidy. */
|
|
28
|
+
trading_fee: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** Portion of `trading_fee` paid from expiry-local fee incentives. */
|
|
29
|
+
fee_incentive_subsidy: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
30
|
+
builder_fee: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** EWMA gas-price congestion surcharge assessed for the mint, in USDC base units. */
|
|
31
|
+
penalty_fee: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
32
32
|
/**
|
|
33
33
|
* Portion of the trader-paid trading fee and congestion surcharge delivered to the
|
|
34
34
|
* referrer.
|
|
35
35
|
*/
|
|
36
|
-
referral_fee:
|
|
37
|
-
inventory_impact_charge:
|
|
36
|
+
referral_fee: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** Separate inventory-impact charge escrowed for live-close rebates. */
|
|
37
|
+
inventory_impact_charge: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
38
38
|
/**
|
|
39
39
|
* Builder credited for `builder_fee`; `none` when no builder fee was paid
|
|
40
40
|
* (attribution follows the fee — applied once, in the emit helper).
|
|
41
41
|
*/
|
|
42
|
-
builder_code_id:
|
|
43
|
-
referrer_account_id:
|
|
44
|
-
onchain_timestamp_ms:
|
|
42
|
+
builder_code_id: _mysten_sui_bcs265.BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">; /** Referrer recorded on the minting account, independent of the fee paid. */
|
|
43
|
+
referrer_account_id: _mysten_sui_bcs265.BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
44
|
+
onchain_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
45
45
|
/**
|
|
46
46
|
* Oracle source timestamps present when this mint was priced: Pyth's canonical
|
|
47
47
|
* source time and the Block Scholes per-update source times used for freshness.
|
|
48
48
|
* The SVI one is also the roll-down anchor. Pyth is `0` only when unusable.
|
|
49
49
|
*/
|
|
50
|
-
pyth_spot_source_timestamp_ms:
|
|
51
|
-
block_scholes_spot_source_timestamp_ms:
|
|
52
|
-
block_scholes_forward_source_timestamp_ms:
|
|
53
|
-
block_scholes_svi_source_timestamp_ms:
|
|
50
|
+
pyth_spot_source_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
51
|
+
block_scholes_spot_source_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
52
|
+
block_scholes_forward_source_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
53
|
+
block_scholes_svi_source_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
54
54
|
}, "@local-pkg/deepbook_predict::order_events::OrderMinted">;
|
|
55
55
|
declare const LiveOrderRedeemed: MoveStruct<{
|
|
56
|
-
expiry_market_id:
|
|
57
|
-
account_id:
|
|
58
|
-
order_id:
|
|
56
|
+
expiry_market_id: _mysten_sui_bcs265.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
57
|
+
account_id: _mysten_sui_bcs265.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
58
|
+
order_id: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u256">;
|
|
59
59
|
/**
|
|
60
60
|
* Stable economic-position handle, constant across the replacement chain. On a
|
|
61
61
|
* partial close the replacement inherits this same root.
|
|
62
62
|
*/
|
|
63
|
-
position_root_id:
|
|
64
|
-
owner:
|
|
65
|
-
quantity_closed:
|
|
66
|
-
remaining_quantity:
|
|
67
|
-
replacement_order_id:
|
|
68
|
-
redeem_amount:
|
|
69
|
-
trading_fee:
|
|
70
|
-
builder_fee:
|
|
71
|
-
penalty_fee:
|
|
72
|
-
inventory_impact_rebate:
|
|
63
|
+
position_root_id: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u256">;
|
|
64
|
+
owner: _mysten_sui_bcs265.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
65
|
+
quantity_closed: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** `0` means the position was fully closed. */
|
|
66
|
+
remaining_quantity: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** New order ID minted to carry the remainder on a partial live close. */
|
|
67
|
+
replacement_order_id: _mysten_sui_bcs265.BcsType<bigint | null, string | number | bigint | null | undefined, "Option<u256>">; /** Redeem value before fees. */
|
|
68
|
+
redeem_amount: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
69
|
+
trading_fee: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
70
|
+
builder_fee: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** EWMA gas-price congestion surcharge retained by the pool, in USDC base units. */
|
|
71
|
+
penalty_fee: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">; /** Separate inventory-impact rebate paid from its isolated escrow. */
|
|
72
|
+
inventory_impact_rebate: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
73
73
|
/**
|
|
74
74
|
* Builder credited for `builder_fee`; `none` when no builder fee was paid
|
|
75
75
|
* (attribution follows the fee — applied once, in the emit helper).
|
|
76
76
|
*/
|
|
77
|
-
builder_code_id:
|
|
78
|
-
onchain_timestamp_ms:
|
|
77
|
+
builder_code_id: _mysten_sui_bcs265.BcsType<string | null, string | Uint8Array<ArrayBufferLike> | null | undefined, "Option<bytes[32]>">;
|
|
78
|
+
onchain_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
79
79
|
/**
|
|
80
80
|
* Oracle source timestamps present when this redemption was priced: Pyth's
|
|
81
81
|
* canonical source time and the Block Scholes per-update source times used for
|
|
82
82
|
* freshness. The SVI one is also the roll-down anchor. Pyth is `0` only when
|
|
83
83
|
* unusable.
|
|
84
84
|
*/
|
|
85
|
-
pyth_spot_source_timestamp_ms:
|
|
86
|
-
block_scholes_spot_source_timestamp_ms:
|
|
87
|
-
block_scholes_forward_source_timestamp_ms:
|
|
88
|
-
block_scholes_svi_source_timestamp_ms:
|
|
85
|
+
pyth_spot_source_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
86
|
+
block_scholes_spot_source_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
87
|
+
block_scholes_forward_source_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
88
|
+
block_scholes_svi_source_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
89
89
|
}, "@local-pkg/deepbook_predict::order_events::LiveOrderRedeemed">;
|
|
90
90
|
declare const SettledOrderRedeemed: MoveStruct<{
|
|
91
|
-
expiry_market_id:
|
|
92
|
-
account_id:
|
|
93
|
-
order_id:
|
|
94
|
-
position_root_id:
|
|
95
|
-
owner:
|
|
96
|
-
payout_amount:
|
|
97
|
-
onchain_timestamp_ms:
|
|
91
|
+
expiry_market_id: _mysten_sui_bcs265.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
92
|
+
account_id: _mysten_sui_bcs265.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
93
|
+
order_id: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u256">; /** Stable economic-position handle, constant across the replacement chain. */
|
|
94
|
+
position_root_id: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u256">;
|
|
95
|
+
owner: _mysten_sui_bcs265.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
96
|
+
payout_amount: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
97
|
+
onchain_timestamp_ms: _mysten_sui_bcs265.BcsType<bigint, string | number | bigint, "u64">;
|
|
98
98
|
}, "@local-pkg/deepbook_predict::order_events::SettledOrderRedeemed">;
|
|
99
99
|
//#endregion
|
|
100
100
|
export { order_events_d_exports };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MoveStruct, RawTransactionArgument } from "../utils/index.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _mysten_sui_bcs103 from "@mysten/sui/bcs";
|
|
3
|
+
import * as _mysten_sui_transactions192 from "@mysten/sui/transactions";
|
|
4
4
|
import { Transaction } from "@mysten/sui/transactions";
|
|
5
5
|
|
|
6
6
|
//#region src/contracts/deepbook_predict/pause_cap.d.ts
|
|
@@ -8,7 +8,7 @@ declare namespace pause_cap_d_exports {
|
|
|
8
8
|
export { DestroyArguments, DestroyOptions, IdArguments, IdOptions, PauseCap, destroy, id };
|
|
9
9
|
}
|
|
10
10
|
declare const PauseCap: MoveStruct<{
|
|
11
|
-
id:
|
|
11
|
+
id: _mysten_sui_bcs103.BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
12
12
|
}, "@local-pkg/deepbook_predict::pause_cap::PauseCap">;
|
|
13
13
|
interface IdArguments {
|
|
14
14
|
cap: RawTransactionArgument<string>;
|
|
@@ -21,7 +21,7 @@ interface IdOptions {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
/** Returns the capability identity used by the registry allowlist. */
|
|
24
|
-
declare function id(options: IdOptions): (tx: Transaction) =>
|
|
24
|
+
declare function id(options: IdOptions): (tx: Transaction) => _mysten_sui_transactions192.TransactionResult;
|
|
25
25
|
interface DestroyArguments {
|
|
26
26
|
cap: RawTransactionArgument<string>;
|
|
27
27
|
}
|
|
@@ -33,7 +33,7 @@ interface DestroyOptions {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
/** Destroy a `PauseCap` the holder no longer needs. */
|
|
36
|
-
declare function destroy(options: DestroyOptions): (tx: Transaction) =>
|
|
36
|
+
declare function destroy(options: DestroyOptions): (tx: Transaction) => _mysten_sui_transactions192.TransactionResult;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { pause_cap_d_exports };
|
|
39
39
|
//# sourceMappingURL=pause_cap.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pause_cap.d.mts","names":[],"sources":["../../../src/contracts/deepbook_predict/pause_cap.ts"],"mappings":";;;;;;;;;cAca,QAAA,EAAQ,UAAA;;;UAMJ,WAAA;EAChB,GAAA,EAAK,sBAAA;AAAA;AAAA,UAEW,SAAA;EAChB,OAAA;EACA,SAAA,EAAW,WAAA,IAAe,GAAA,EAAK,sBAAA;EAC/B,MAAA;IACC,gBAAA;EAAA;AAAA;;iBAIc,EAAA,CAAG,OAAA,EAAS,SAAA,IAKnB,EAAA,EAAI,WAAA,KAAW,
|
|
1
|
+
{"version":3,"file":"pause_cap.d.mts","names":[],"sources":["../../../src/contracts/deepbook_predict/pause_cap.ts"],"mappings":";;;;;;;;;cAca,QAAA,EAAQ,UAAA;;;UAMJ,WAAA;EAChB,GAAA,EAAK,sBAAA;AAAA;AAAA,UAEW,SAAA;EAChB,OAAA;EACA,SAAA,EAAW,WAAA,IAAe,GAAA,EAAK,sBAAA;EAC/B,MAAA;IACC,gBAAA;EAAA;AAAA;;iBAIc,EAAA,CAAG,OAAA,EAAS,SAAA,IAKnB,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA;AAAA,UAQP,gBAAA;EAChB,GAAA,EAAK,sBAAA;AAAA;AAAA,UAEW,cAAA;EAChB,OAAA;EACA,SAAA,EAAW,gBAAA,IAAoB,GAAA,EAAK,sBAAA;EACpC,MAAA;IACC,gBAAA;EAAA;AAAA;;iBAIc,OAAA,CAAQ,OAAA,EAAS,cAAA,IAKxB,EAAA,EAAI,WAAA,KAAW,2BAAA,CAAA,iBAAA"}
|